Version Description
- Changed: Available conditional logic rules/functionality with Providers have been updated
- Changed: Updated form builder modals (jquery-confirm.js)
- Changed: Many Form Builder performance enhancements
- Fixed: Number field validation message not saving
- Fixed: Email confirmation setting not displaying correctly with Small field size
Download this release
Release Info
Developer | jaredatch |
Plugin | Contact Form by WPForms – Drag & Drop Form Builder for WordPress |
Version | 1.3.8 |
Comparing to | |
See all releases |
Code changes from version 1.3.7.4 to 1.3.8
- assets/css/admin-builder-conditional-logic-core.css +114 -0
- assets/css/admin-builder-fields.css +1 -1
- assets/css/admin-builder-providers.css +9 -22
- assets/css/admin-builder.css +29 -74
- assets/css/jquery-confirm.min.css +3 -3
- assets/css/wpforms-full.css +4 -4
- assets/js/admin-builder-conditional-logic-core.js +470 -0
- assets/js/admin-builder-conditional-logic-core.min.js +1 -0
- assets/js/admin-builder-providers.js +86 -358
- assets/js/admin-builder.js +313 -187
- assets/js/admin-utils.js +113 -38
- assets/js/jquery.jquery-confirm.min.js +3 -3
- changelog.txt +9 -2
- includes/admin/builder/class-builder.php +19 -0
- includes/admin/builder/functions.php +6 -3
- includes/class-conditional-logic-core.php +664 -0
- includes/class-frontend.php +3 -1
- includes/class-process.php +55 -40
- includes/fields/class-base.php +6 -2
- includes/fields/class-name.php +4 -2
- includes/providers/class-base.php +27 -217
- languages/wpforms.pot +490 -381
- lite/assets/js/admin-builder-lite.js +13 -5
- lite/includes/admin/class-settings.php +1 -0
- lite/wpforms-lite.php +2 -1
- readme.txt +11 -4
- wpforms.php +60 -40
assets/css/admin-builder-conditional-logic-core.css
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ==========================================================================
|
2 |
+
Admin Form Builder - Conditional Fields Styles
|
3 |
+
========================================================================== */
|
4 |
+
|
5 |
+
.wpforms-notification .wpforms-conditional-groups {
|
6 |
+
padding: 0 20px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wpforms-conditional-block {
|
10 |
+
margin-bottom: 20px;
|
11 |
+
}
|
12 |
+
|
13 |
+
.wpforms-conditional-block button {
|
14 |
+
cursor: pointer;
|
15 |
+
}
|
16 |
+
|
17 |
+
.wpforms-conditional-block h4 {
|
18 |
+
margin: 0 0 15px 0;
|
19 |
+
font-size: 14px;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wpforms-conditional-block h5 {
|
23 |
+
margin: 10px 0;
|
24 |
+
font-size: 14px;
|
25 |
+
font-style: italic;
|
26 |
+
}
|
27 |
+
|
28 |
+
.wpforms-conditional-block h4 select {
|
29 |
+
display: inline-block;
|
30 |
+
margin: 0 5px 0 0;
|
31 |
+
vertical-align: baseline;
|
32 |
+
box-shadow: none;
|
33 |
+
}
|
34 |
+
|
35 |
+
.wpforms-conditional-block table {
|
36 |
+
width: 100%;
|
37 |
+
padding: 0;
|
38 |
+
margin: 0;
|
39 |
+
border-collapse: collapse;
|
40 |
+
border-spacing: 0;
|
41 |
+
font-size: 13px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wpforms-conditional-block table td {
|
45 |
+
padding: 0 5px 10px 0;
|
46 |
+
}
|
47 |
+
|
48 |
+
.wpforms-conditional-block .field {
|
49 |
+
width: 130px;
|
50 |
+
}
|
51 |
+
.wpforms-conditional-block .value {
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
.wpforms-conditional-block .value :disabled {
|
56 |
+
background-color: #f1f1f1;
|
57 |
+
cursor:not-allowed;
|
58 |
+
}
|
59 |
+
|
60 |
+
.wpforms-conditional-block .operator {
|
61 |
+
width: 68px;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wpforms-conditional-block .actions {
|
65 |
+
width: 66px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.wpforms-conditional-block .wpforms-conditional-row input,
|
69 |
+
.wpforms-conditional-block .wpforms-conditional-row select {
|
70 |
+
font-size: 13px;
|
71 |
+
width: 100%;
|
72 |
+
box-shadow: none;
|
73 |
+
margin: 0;
|
74 |
+
}
|
75 |
+
|
76 |
+
.wpforms-conditional-block .wpforms-conditional-rule-add {
|
77 |
+
color: #fff;
|
78 |
+
background-color: #999;
|
79 |
+
border: none;
|
80 |
+
padding: 2px 4px;
|
81 |
+
height: 26px;
|
82 |
+
vertical-align: middle;
|
83 |
+
font-size: 12px;
|
84 |
+
border-radius: 2px;
|
85 |
+
margin: 0 0 0 3px;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wpforms-conditional-block .wpforms-conditional-rule-add:hover {
|
89 |
+
background-color: #666;
|
90 |
+
}
|
91 |
+
|
92 |
+
.wpforms-conditional-block .wpforms-conditional-rule-delete {
|
93 |
+
background-color: transparent;
|
94 |
+
border: none;
|
95 |
+
color: #d22222;
|
96 |
+
opacity: 0.45;
|
97 |
+
font-size: 16px;
|
98 |
+
padding: 0 2px;
|
99 |
+
margin: 0 0 0 3px;
|
100 |
+
height: 26px;
|
101 |
+
vertical-align: middle;
|
102 |
+
}
|
103 |
+
|
104 |
+
.wpforms-conditional-block .wpforms-conditional-rule-delete:hover {
|
105 |
+
opacity: 1;
|
106 |
+
}
|
107 |
+
|
108 |
+
.wpforms-conditional-block .wpforms-conditional-groups-add {
|
109 |
+
background-color: #0e6cad;
|
110 |
+
border: none;
|
111 |
+
color: #fff;
|
112 |
+
padding: 6px 12px;
|
113 |
+
border-radius: 2px;
|
114 |
+
}
|
assets/css/admin-builder-fields.css
CHANGED
@@ -1331,4 +1331,4 @@
|
|
1331 |
margin-left: 8px;
|
1332 |
font-size: 18px;
|
1333 |
color: #666;
|
1334 |
-
}
|
1331 |
margin-left: 8px;
|
1332 |
font-size: 18px;
|
1333 |
color: #666;
|
1334 |
+
}
|
assets/css/admin-builder-providers.css
CHANGED
@@ -137,31 +137,18 @@
|
|
137 |
padding: 5px 10px;
|
138 |
}
|
139 |
|
140 |
-
#wpforms-panel-providers .wpforms-
|
141 |
-
|
142 |
-
border:1px solid #eee;
|
143 |
-
padding: 5px 0;
|
144 |
-
}
|
145 |
-
|
146 |
-
#wpforms-panel-providers .wpforms-provider-conditionals-group:first-of-type tr:first-of-type .wpforms-provider-conditionals-rule-delete {
|
147 |
-
display: none;
|
148 |
-
}
|
149 |
-
|
150 |
-
#wpforms-panel-providers .wpforms-provider-conditionals-groups input[type=text],
|
151 |
-
#wpforms-panel-providers .wpforms-provider-conditionals-groups select {
|
152 |
-
width: 100%;
|
153 |
-
}
|
154 |
-
|
155 |
-
#wpforms-panel-providers .wpforms-provider-conditionals-groups .field {
|
156 |
-
width: 150px;
|
157 |
}
|
158 |
|
159 |
-
#wpforms-panel-providers .wpforms-
|
160 |
-
|
161 |
}
|
162 |
|
163 |
-
#wpforms-panel-providers .wpforms-
|
164 |
-
|
|
|
|
|
165 |
}
|
166 |
|
167 |
#wpforms-panel-providers .wpforms-provider-options label.block {
|
@@ -174,4 +161,4 @@
|
|
174 |
width: 100%;
|
175 |
padding: 6px 8px;
|
176 |
box-shadow: none;
|
177 |
-
}
|
137 |
padding: 5px 10px;
|
138 |
}
|
139 |
|
140 |
+
#wpforms-panel-providers .wpforms-conditional-block {
|
141 |
+
padding: 10px 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
+
#wpforms-panel-providers .wpforms-conditional-block.wpforms-conditional-block {
|
145 |
+
margin: 0;
|
146 |
}
|
147 |
|
148 |
+
#wpforms-panel-providers .wpforms-conditional-block .value input:disabled,
|
149 |
+
#wpforms-panel-providers .wpforms-conditional-block .value select:disabled {
|
150 |
+
background-color: #f1f1f1;
|
151 |
+
cursor:not-allowed
|
152 |
}
|
153 |
|
154 |
#wpforms-panel-providers .wpforms-provider-options label.block {
|
161 |
width: 100%;
|
162 |
padding: 6px 8px;
|
163 |
box-shadow: none;
|
164 |
+
}
|
assets/css/admin-builder.css
CHANGED
@@ -920,106 +920,61 @@ body {
|
|
920 |
/* jquery confirm modals
|
921 |
-------------------------------------------------------------- */
|
922 |
|
923 |
-
.jconfirm.
|
924 |
-
background-color: rgba(107,107,107,0.7)
|
925 |
-
}
|
926 |
-
|
927 |
-
.jconfirm-box-container {
|
928 |
-
width: 100%;
|
929 |
-
max-width: 450px;
|
930 |
-
margin: 0 auto;
|
931 |
-
}
|
932 |
-
|
933 |
-
.jconfirm-box-container.modal-wide {
|
934 |
-
max-width: 700px
|
935 |
-
}
|
936 |
-
|
937 |
-
.jconfirm.white .jconfirm-box {
|
938 |
border-radius: 0;
|
939 |
-
|
940 |
-
text-align: center;
|
941 |
-
}
|
942 |
-
|
943 |
-
.jconfirm.white .modal-wide .jconfirm-box {
|
944 |
-
padding: 50px;
|
945 |
-
}
|
946 |
-
|
947 |
-
.jconfirm.white .jconfirm-box div.title {
|
948 |
-
padding: 0;
|
949 |
-
font-size: 26px;
|
950 |
-
line-height: normal;
|
951 |
-
color: #444;
|
952 |
-
margin: 0 0 20px 0;
|
953 |
-
}
|
954 |
-
|
955 |
-
.jconfirm.white .jconfirm-box div.content {
|
956 |
-
padding: 0;
|
957 |
-
color: #666;
|
958 |
-
font-size: 16px;
|
959 |
-
margin: 0 0 20px 0;
|
960 |
-
line-height: 1.6;
|
961 |
-
}
|
962 |
-
|
963 |
-
.jconfirm.white .modal-wide .jconfirm-box div.content {
|
964 |
-
margin: 0 0 40px 0;
|
965 |
}
|
966 |
|
967 |
-
.jconfirm
|
968 |
-
|
969 |
-
float: none;
|
970 |
-
}
|
971 |
-
|
972 |
-
.jconfirm.white .jconfirm-box .buttons button {
|
973 |
-
border-radius: 3px;
|
974 |
-
padding: 8px 15px;
|
975 |
-
font-size: 15px;
|
976 |
-
margin: 0 5px;
|
977 |
-
cursor: pointer;
|
978 |
}
|
979 |
|
980 |
-
.jconfirm
|
981 |
font-size: 16px;
|
|
|
|
|
982 |
}
|
983 |
|
984 |
-
.jconfirm
|
985 |
-
font-family: 'FontAwesome';
|
986 |
-
content:"\f00d";
|
987 |
-
}
|
988 |
-
|
989 |
-
.jconfirm.white .jconfirm-box input[type=text] {
|
990 |
display: block;
|
991 |
-
width:
|
992 |
border: 1px solid #d6d6d6;
|
993 |
-
padding:
|
994 |
box-shadow: none;
|
995 |
-
margin
|
996 |
}
|
997 |
|
998 |
-
.jconfirm
|
999 |
margin: 20px 0;
|
1000 |
text-align: center;
|
1001 |
font-size: 24px;
|
1002 |
padding: 8px 5px;
|
1003 |
}
|
1004 |
|
1005 |
-
.jconfirm
|
1006 |
color: #333;
|
1007 |
}
|
1008 |
|
1009 |
-
.jconfirm
|
1010 |
-
|
1011 |
-
color:
|
|
|
1012 |
}
|
1013 |
|
1014 |
-
.jconfirm
|
1015 |
-
background-color: #
|
1016 |
}
|
1017 |
|
1018 |
-
.jconfirm
|
1019 |
-
|
1020 |
-
|
1021 |
}
|
1022 |
|
1023 |
-
.jconfirm
|
1024 |
-
|
|
|
|
|
|
|
|
|
|
|
1025 |
}
|
920 |
/* jquery confirm modals
|
921 |
-------------------------------------------------------------- */
|
922 |
|
923 |
+
body div.jconfirm div.jconfirm-box-container div.jconfirm-box {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
924 |
border-radius: 0;
|
925 |
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
}
|
927 |
|
928 |
+
body div.jconfirm div.jconfirm-box div.jconfirm-content-pane {
|
929 |
+
margin-bottom: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
930 |
}
|
931 |
|
932 |
+
body div.jconfirm div.jconfirm-box div.jconfirm-content {
|
933 |
font-size: 16px;
|
934 |
+
color: #555;
|
935 |
+
line-height: 1.5;
|
936 |
}
|
937 |
|
938 |
+
body div.jconfirm div.jconfirm-box input[type=text] {
|
|
|
|
|
|
|
|
|
|
|
939 |
display: block;
|
940 |
+
width: 99%;
|
941 |
border: 1px solid #d6d6d6;
|
942 |
+
padding: 10px;
|
943 |
box-shadow: none;
|
944 |
+
margin: 20px auto 0 auto;
|
945 |
}
|
946 |
|
947 |
+
body div.jconfirm div.jconfirm-box #wpforms-embed-shortcode {
|
948 |
margin: 20px 0;
|
949 |
text-align: center;
|
950 |
font-size: 24px;
|
951 |
padding: 8px 5px;
|
952 |
}
|
953 |
|
954 |
+
body div.jconfirm div.jconfirm-box #wpforms-embed-shortcode:disabled {
|
955 |
color: #333;
|
956 |
}
|
957 |
|
958 |
+
body div.jconfirm div.jconfirm-box button.btn-confirm {
|
959 |
+
background-color: #83c11f;
|
960 |
+
color: #fff;
|
961 |
+
outline: none;
|
962 |
}
|
963 |
|
964 |
+
body div.jconfirm div.jconfirm-box button.btn-confirm:hover {
|
965 |
+
background-color: #75ac1c;
|
966 |
}
|
967 |
|
968 |
+
body div.jconfirm div.jconfirm-box .error {
|
969 |
+
display: none;
|
970 |
+
color: red;
|
971 |
}
|
972 |
|
973 |
+
body div.jconfirm div.jconfirm-box .jconfirm-title-c .jconfirm-icon-c {
|
974 |
+
-webkit-transition: none !important;
|
975 |
+
transition: none !important;
|
976 |
+
-webkit-transform: none !important;
|
977 |
+
-ms-transform: none !important;
|
978 |
+
transform: none !important;
|
979 |
+
font-size: 45px !important;
|
980 |
}
|
assets/css/jquery-confirm.min.css
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
/*!
|
2 |
-
* jquery-confirm
|
3 |
* Author: boniface pereira
|
4 |
* Website: www.craftpip.com
|
5 |
* Contact: hey@craftpip.com
|
6 |
*
|
7 |
-
* Copyright 2013-
|
8 |
* Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE)
|
9 |
-
*/body.jconfirm-noscroll{overflow:hidden!important}@-webkit-keyframes jconfirm-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes jconfirm-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.jconfirm{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99999999;font-family:inherit;overflow:hidden}.jconfirm .jconfirm-bg{position:fixed;top:0;left:0;right:0;bottom:0;opacity:0;-webkit-transition:all .4s;transition:all .4s}.jconfirm .jconfirm-bg.seen{opacity:1}.jconfirm .jconfirm-scrollpane{position:fixed;top:0;left:0;right:0;bottom:0;overflow-y:auto}.jconfirm .jconfirm-box{background:white;border-radius:4px;position:relative;outline:0}.jconfirm .jconfirm-box div.closeIcon{height:20px;width:20px;position:absolute;top:12px;right:12px;cursor:pointer;opacity:.6;text-align:center;display:none}.jconfirm .jconfirm-box div.closeIcon:hover{opacity:1}.jconfirm .jconfirm-box div.title{font-size:24px;font-weight:bold;font-family:inherit;padding:10px 15px 5px}.jconfirm .jconfirm-box div.content{padding-top:10px;padding:10px 15px 10px}.jconfirm .jconfirm-box div.content:empty{height:40px;position:relative;opacity:.6}.jconfirm .jconfirm-box div.content:empty:before{content:'';height:20px;width:20px;border:solid 2px #aaa;position:absolute;left:50%;margin-left:-45px;border-radius:20%;-webkit-animation:jconfirm-rotate 1s infinite;animation:jconfirm-rotate 1s infinite}.jconfirm .jconfirm-box div.content:empty:after{content:'loading..';position:absolute;left:50%;margin-left:-15px}.jconfirm .jconfirm-box .buttons{padding:10px 15px}.jconfirm .jconfirm-box .buttons button+button{margin-left:5px}.jconfirm .jquery-clear{clear:both}.jconfirm.rtl{direction:rtl}.jconfirm.rtl div.closeIcon{left:12px;right:auto}.jconfirm.white .jconfirm-bg{background-color:rgba(0,0,0,0.2)}.jconfirm.white .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.2);border-radius:5px}.jconfirm.white .jconfirm-box .buttons{float:right}.jconfirm.white .jconfirm-box .buttons button{border:0;background-image:none;text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none;-webkit-transition:background .1s;transition:background .1s;color:white}.jconfirm.white .jconfirm-box .buttons button.btn-default{box-shadow:none;color:#333}.jconfirm.white .jconfirm-box .buttons button.btn-default:hover{background:#ddd}.jconfirm.black .jconfirm-bg{background-color:rgba(0,0,0,0.5)}.jconfirm.black .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.2);background:#444;border-radius:5px;color:white}.jconfirm.black .jconfirm-box .buttons{float:right}.jconfirm.black .jconfirm-box .buttons button{border:0;background-image:none;text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none;-webkit-transition:background .1s;transition:background .1s;color:white}.jconfirm.black .jconfirm-box .buttons button.btn-default{box-shadow:none;color:#fff;background:0}.jconfirm.black .jconfirm-box .buttons button.btn-default:hover{background:#666}.jconfirm.hololight .jconfirm-bg{background-color:rgba(0,0,0,0.5)}.jconfirm.hololight .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.4);border-radius:2px;overflow:hidden}.jconfirm.hololight .jconfirm-box div.title{font-weight:inherit;border-bottom:solid 2px #76cfdf;color:#76cfdf}.jconfirm.hololight .jconfirm-box .buttons{border-top:solid 2px #e7e7e7;width:100%;float:none;padding:0}.jconfirm.hololight .jconfirm-box .buttons button{margin:0;border:0;background:#fff;border-radius:0;width:50%;padding:13px;font-size:16px;font-weight:bold;color:#666}.jconfirm.hololight .jconfirm-box .buttons button+button{border-left:solid 2px #e7e7e7}.jconfirm.holodark .jconfirm-bg{background-color:rgba(0,0,0,0.5)}.jconfirm.holodark .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.4);border-radius:2px;background:#333;overflow:hidden}.jconfirm.holodark .jconfirm-box div.closeIcon{color:white}.jconfirm.holodark .jconfirm-box div.title{font-weight:inherit;border-bottom:solid 2px #76cfdf;color:#76cfdf}.jconfirm.holodark .jconfirm-box div.content{color:white}.jconfirm.holodark .jconfirm-box .buttons{border-top:solid 2px rgba(255,255,255,0.2);width:100%;float:none;padding:0}.jconfirm.holodark .jconfirm-box .buttons button{margin:0;border:0;background:#333;border-radius:0;width:50%;padding:13px;font-size:16px;font-weight:bold;color:#fff;text-shadow:none}.jconfirm.holodark .jconfirm-box .buttons button+button{border-left:solid 2px rgba(255,255,255,0.2)}.jconfirm .jconfirm-box.hilight{-webkit-animation:hilight .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:hilight .82s cubic-bezier(0.36,0.07,0.19,0.97) both;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-webkit-keyframes hilight{10%,90%{-webkit-transform:translate3d(-2px,0,0);transform:translate3d(-2px,0,0)}20%,80%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-8px,0,0);transform:translate3d(-8px,0,0)}40%,60%{-webkit-transform:translate3d(8px,0,0);transform:translate3d(8px,0,0)}}@keyframes hilight{10%,90%{-webkit-transform:translate3d(-2px,0,0);transform:translate3d(-2px,0,0)}20%,80%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-8px,0,0);transform:translate3d(-8px,0,0)}40%,60%{-webkit-transform:translate3d(8px,0,0);transform:translate3d(8px,0,0)}}.jconfirm{-webkit-perspective:400px;perspective:400px}.jconfirm .jconfirm-box{opacity:1;-webkit-transition-property:-webkit-transform,opacity,box-shadow;transition-property:transform,opacity,box-shadow}.jconfirm .jconfirm-box.anim-top,.jconfirm .jconfirm-box.anim-left,.jconfirm .jconfirm-box.anim-right,.jconfirm .jconfirm-box.anim-bottom,.jconfirm .jconfirm-box.anim-opacity,.jconfirm .jconfirm-box.anim-zoom,.jconfirm .jconfirm-box.anim-scale,.jconfirm .jconfirm-box.anim-none,.jconfirm .jconfirm-box.anim-rotate,.jconfirm .jconfirm-box.anim-rotatex,.jconfirm .jconfirm-box.anim-rotatey,.jconfirm .jconfirm-box.anim-scaley,.jconfirm .jconfirm-box.anim-scalex{opacity:0}.jconfirm .jconfirm-box.anim-rotate{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.jconfirm .jconfirm-box.anim-rotatex{-webkit-transform:rotateX(90deg);transform:rotateX(90deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.anim-rotatey{-webkit-transform:rotatey(90deg);-ms-transform:rotatey(90deg);transform:rotatey(90deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.anim-scaley{-webkit-transform:scaley(1.5);-ms-transform:scaley(1.5);transform:scaley(1.5);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.anim-scalex{-webkit-transform:scalex(1.5);-ms-transform:scalex(1.5);transform:scalex(1.5);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.anim-top{-webkit-transform:translate(0px,-100px);-ms-transform:translate(0px,-100px);transform:translate(0px,-100px)}.jconfirm .jconfirm-box.anim-left{-webkit-transform:translate(-100px,0px);-ms-transform:translate(-100px,0px);transform:translate(-100px,0px)}.jconfirm .jconfirm-box.anim-right{-webkit-transform:translate(100px,0px);-ms-transform:translate(100px,0px);transform:translate(100px,0px)}.jconfirm .jconfirm-box.anim-bottom{-webkit-transform:translate(0px,100px);-ms-transform:translate(0px,100px);transform:translate(0px,100px)}.jconfirm .jconfirm-box.anim-zoom{-webkit-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2)}.jconfirm .jconfirm-box.anim-scale{-webkit-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5)}.jconfirm .jconfirm-box.anim-none{display:none}.jconfirm.supervan .jconfirm-bg{background-color:rgba(54,70,93,0.95)}.jconfirm.supervan .jconfirm-box{background-color:transparent}.jconfirm.supervan .jconfirm-box div.closeIcon{color:white}.jconfirm.supervan .jconfirm-box div.title{text-align:center;color:white;font-size:28px;font-weight:normal}.jconfirm.supervan .jconfirm-box div.content{text-align:center;color:white}.jconfirm.supervan .jconfirm-box .buttons{text-align:center}.jconfirm.supervan .jconfirm-box .buttons button{font-size:16px;border-radius:2px;background:#303f53;text-shadow:none;border:0;color:white;width:25%;padding:10px}
|
1 |
/*!
|
2 |
+
* jquery-confirm v3.2.3 (http://craftpip.github.io/jquery-confirm/)
|
3 |
* Author: boniface pereira
|
4 |
* Website: www.craftpip.com
|
5 |
* Contact: hey@craftpip.com
|
6 |
*
|
7 |
+
* Copyright 2013-2017 jquery-confirm
|
8 |
* Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE)
|
9 |
+
*/@-webkit-keyframes jconfirm-spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes jconfirm-spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}body[class*=jconfirm-no-scroll-]{overflow:hidden!important}.jconfirm{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99999999;font-family:inherit;overflow:hidden}.jconfirm .jconfirm-bg{position:fixed;top:0;left:0;right:0;bottom:0;-webkit-transition:opacity .4s;transition:opacity .4s}.jconfirm .jconfirm-bg.jconfirm-bg-h{opacity:0!important}.jconfirm .jconfirm-scrollpane{position:fixed;top:0;left:0;right:0;bottom:0;overflow-y:auto;-webkit-perspective:500px;perspective:500px;-webkit-perspective-origin:center;perspective-origin:center}.jconfirm .jconfirm-box{background:white;border-radius:4px;position:relative;outline:0;padding:15px 15px 0;overflow:hidden;margin-left:auto;margin-right:auto}@-webkit-keyframes type-blue{1%,100%{border-color:#3498db}50%{border-color:#5faee3}}@keyframes type-blue{1%,100%{border-color:#3498db}50%{border-color:#5faee3}}@-webkit-keyframes type-green{1%,100%{border-color:#2ecc71}50%{border-color:#54d98c}}@keyframes type-green{1%,100%{border-color:#2ecc71}50%{border-color:#54d98c}}@-webkit-keyframes type-red{1%,100%{border-color:#e74c3c}50%{border-color:#ed7669}}@keyframes type-red{1%,100%{border-color:#e74c3c}50%{border-color:#ed7669}}@-webkit-keyframes type-orange{1%,100%{border-color:#f1c40f}50%{border-color:#f4d03f}}@keyframes type-orange{1%,100%{border-color:#f1c40f}50%{border-color:#f4d03f}}@-webkit-keyframes type-purple{1%,100%{border-color:#9b59b6}50%{border-color:#b07cc6}}@keyframes type-purple{1%,100%{border-color:#9b59b6}50%{border-color:#b07cc6}}@-webkit-keyframes type-dark{1%,100%{border-color:#34495e}50%{border-color:#46627f}}@keyframes type-dark{1%,100%{border-color:#34495e}50%{border-color:#46627f}}.jconfirm .jconfirm-box.jconfirm-type-animated{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.jconfirm .jconfirm-box.jconfirm-type-blue{border-top:solid 7px #3498db;-webkit-animation-name:type-blue;animation-name:type-blue}.jconfirm .jconfirm-box.jconfirm-type-green{border-top:solid 7px #2ecc71;-webkit-animation-name:type-green;animation-name:type-green}.jconfirm .jconfirm-box.jconfirm-type-red{border-top:solid 7px #e74c3c;-webkit-animation-name:type-red;animation-name:type-red}.jconfirm .jconfirm-box.jconfirm-type-orange{border-top:solid 7px #f1c40f;-webkit-animation-name:type-orange;animation-name:type-orange}.jconfirm .jconfirm-box.jconfirm-type-purple{border-top:solid 7px #9b59b6;-webkit-animation-name:type-purple;animation-name:type-purple}.jconfirm .jconfirm-box.jconfirm-type-dark{border-top:solid 7px #34495e;-webkit-animation-name:type-dark;animation-name:type-dark}.jconfirm .jconfirm-box.loading{height:120px}.jconfirm .jconfirm-box.loading:before{content:'';position:absolute;left:0;background:white;right:0;top:0;bottom:0;border-radius:10px;z-index:1}.jconfirm .jconfirm-box.loading:after{opacity:.6;content:'';height:30px;width:30px;border:solid 3px transparent;position:absolute;left:50%;margin-left:-15px;border-radius:50%;-webkit-animation:jconfirm-spin 1s infinite linear;animation:jconfirm-spin 1s infinite linear;border-bottom-color:dodgerblue;top:50%;margin-top:-15px;z-index:2}.jconfirm .jconfirm-box div.jconfirm-closeIcon{height:20px;width:20px;position:absolute;top:5px;right:5px;cursor:pointer;opacity:.6;text-align:center;-webkit-transition:opacity .3s ease-in;transition:opacity .3s ease-in;font-size:27px!important;line-height:14px!important;display:none}.jconfirm .jconfirm-box div.jconfirm-closeIcon:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-closeIcon .fa{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon .glyphicon{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon .zmdi{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon:hover{opacity:1}.jconfirm .jconfirm-box div.jconfirm-title-c{display:block;font-size:22px;line-height:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jconfirm .jconfirm-box div.jconfirm-title-c.jconfirm-hand{cursor:move}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{font-size:inherit;padding-bottom:15px;display:inline-block;vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i{vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:inherit;font-family:inherit;display:inline-block;vertical-align:middle;padding-bottom:15px}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-content-pane{margin-bottom:15px;height:auto;-webkit-transition:height .4s ease-in;transition:height .4s ease-in;display:inline-block;width:100%;position:relative;overflow:hidden}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content img{max-width:100%;height:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content:empty{display:none}.jconfirm .jconfirm-box .jconfirm-buttons{padding-bottom:11px}.jconfirm .jconfirm-box .jconfirm-buttons>button{margin-bottom:4px;margin-left:2px;margin-right:2px}.jconfirm .jconfirm-box .jconfirm-buttons button{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;border-radius:4px;min-height:1em;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;-webkit-tap-highlight-color:transparent;border:0;background-image:none}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue{background-color:#3498db;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue:hover{background-color:#2980b9;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-green{background-color:#2ecc71;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-green:hover{background-color:#27ae60;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red{background-color:#e74c3c;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red:hover{background-color:#c0392b;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-orange{background-color:#f1c40f;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-orange:hover{background-color:#f39c12;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default{background-color:#ecf0f1;color:#000;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default:hover{background-color:#bdc3c7;color:#000}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-purple{background-color:#9b59b6;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-purple:hover{background-color:#8e44ad;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark{background-color:#34495e;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark:hover{background-color:#2c3e50;color:#FFF}.jconfirm .jconfirm-box.jconfirm-type-red .jconfirm-title-c .jconfirm-icon-c{color:#e74c3c!important}.jconfirm .jconfirm-box.jconfirm-type-blue .jconfirm-title-c .jconfirm-icon-c{color:#3498db!important}.jconfirm .jconfirm-box.jconfirm-type-green .jconfirm-title-c .jconfirm-icon-c{color:#2ecc71!important}.jconfirm .jconfirm-box.jconfirm-type-purple .jconfirm-title-c .jconfirm-icon-c{color:#9b59b6!important}.jconfirm .jconfirm-box.jconfirm-type-orange .jconfirm-title-c .jconfirm-icon-c{color:#f1c40f!important}.jconfirm .jconfirm-box.jconfirm-type-dark .jconfirm-title-c .jconfirm-icon-c{color:#34495e!important}.jconfirm .jconfirm-clear{clear:both}.jconfirm.jconfirm-rtl{direction:rtl}.jconfirm.jconfirm-rtl div.jconfirm-closeIcon{left:5px;right:auto}.jconfirm.jconfirm-white .jconfirm-bg,.jconfirm.jconfirm-light .jconfirm-bg{background-color:#444;opacity:.2}.jconfirm.jconfirm-white .jconfirm-box,.jconfirm.jconfirm-light .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.2);border-radius:5px}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons{float:right}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button{text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default{box-shadow:none;color:#333}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default:hover,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default:hover{background:#ddd}.jconfirm.jconfirm-white.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-light.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-black .jconfirm-bg,.jconfirm.jconfirm-dark .jconfirm-bg{background-color:darkslategray;opacity:.4}.jconfirm.jconfirm-black .jconfirm-box,.jconfirm.jconfirm-dark .jconfirm-box{box-shadow:0 2px 6px rgba(0,0,0,0.2);background:#444;border-radius:5px;color:white}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons{float:right}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button{border:0;background-image:none;text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none;-webkit-transition:background .1s;transition:background .1s;color:white}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default{box-shadow:none;color:#fff;background:0}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default:hover,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default:hover{background:#666}.jconfirm.jconfirm-black.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-dark.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm .jconfirm-box.hilight.jconfirm-hilight-shake{-webkit-animation:shake .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:shake .82s cubic-bezier(0.36,0.07,0.19,0.97) both;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.jconfirm .jconfirm-box.hilight.jconfirm-hilight-glow{-webkit-animation:glow .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:glow .82s cubic-bezier(0.36,0.07,0.19,0.97) both;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-2px,0,0);transform:translate3d(-2px,0,0)}20%,80%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-8px,0,0);transform:translate3d(-8px,0,0)}40%,60%{-webkit-transform:translate3d(8px,0,0);transform:translate3d(8px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-2px,0,0);transform:translate3d(-2px,0,0)}20%,80%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-8px,0,0);transform:translate3d(-8px,0,0)}40%,60%{-webkit-transform:translate3d(8px,0,0);transform:translate3d(8px,0,0)}}@-webkit-keyframes glow{0%,100%{box-shadow:0 0 3px red}50%{box-shadow:0 0 30px red}}@keyframes glow{0%,100%{box-shadow:0 0 3px red}50%{box-shadow:0 0 30px red}}.jconfirm{-webkit-perspective:400px;perspective:400px}.jconfirm .jconfirm-box{opacity:1;-webkit-transition-property:all;transition-property:all}.jconfirm .jconfirm-box.jconfirm-animation-top,.jconfirm .jconfirm-box.jconfirm-animation-left,.jconfirm .jconfirm-box.jconfirm-animation-right,.jconfirm .jconfirm-box.jconfirm-animation-bottom,.jconfirm .jconfirm-box.jconfirm-animation-opacity,.jconfirm .jconfirm-box.jconfirm-animation-zoom,.jconfirm .jconfirm-box.jconfirm-animation-scale,.jconfirm .jconfirm-box.jconfirm-animation-none,.jconfirm .jconfirm-box.jconfirm-animation-rotate,.jconfirm .jconfirm-box.jconfirm-animation-rotatex,.jconfirm .jconfirm-box.jconfirm-animation-rotatey,.jconfirm .jconfirm-box.jconfirm-animation-scaley,.jconfirm .jconfirm-box.jconfirm-animation-scalex{opacity:0}.jconfirm .jconfirm-box.jconfirm-animation-rotate{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.jconfirm .jconfirm-box.jconfirm-animation-rotatex{-webkit-transform:rotateX(90deg);transform:rotateX(90deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatexr{-webkit-transform:rotateX(-90deg);transform:rotateX(-90deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatey{-webkit-transform:rotatey(90deg);-ms-transform:rotatey(90deg);transform:rotatey(90deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotateyr{-webkit-transform:rotatey(-90deg);-ms-transform:rotatey(-90deg);transform:rotatey(-90deg);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scaley{-webkit-transform:scaley(1.5);-ms-transform:scaley(1.5);transform:scaley(1.5);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scalex{-webkit-transform:scalex(1.5);-ms-transform:scalex(1.5);transform:scalex(1.5);-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-top{-webkit-transform:translate(0px,-100px);-ms-transform:translate(0px,-100px);transform:translate(0px,-100px)}.jconfirm .jconfirm-box.jconfirm-animation-left{-webkit-transform:translate(-100px,0px);-ms-transform:translate(-100px,0px);transform:translate(-100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-right{-webkit-transform:translate(100px,0px);-ms-transform:translate(100px,0px);transform:translate(100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-bottom{-webkit-transform:translate(0px,100px);-ms-transform:translate(0px,100px);transform:translate(0px,100px)}.jconfirm .jconfirm-box.jconfirm-animation-zoom{-webkit-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2)}.jconfirm .jconfirm-box.jconfirm-animation-scale{-webkit-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5)}.jconfirm .jconfirm-box.jconfirm-animation-none{visibility:hidden}.jconfirm.jconfirm-supervan .jconfirm-bg{background-color:rgba(54,70,93,0.95)}.jconfirm.jconfirm-supervan .jconfirm-box{background-color:transparent}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-blue{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-green{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-red{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-orange{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-purple{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-dark{border:0}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-closeIcon{color:white}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c{text-align:center;color:white;font-size:28px;font-weight:normal}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c>*{padding-bottom:25px}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-content-pane{margin-bottom:25px}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-content{text-align:center;color:white}.jconfirm.jconfirm-supervan .jconfirm-box .jconfirm-buttons{text-align:center}.jconfirm.jconfirm-supervan .jconfirm-box .jconfirm-buttons button{font-size:16px;border-radius:2px;background:#303f53;text-shadow:none;border:0;color:white;padding:10px;min-width:100px}.jconfirm.jconfirm-supervan.jconfirm-rtl .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-material .jconfirm-bg{background-color:rgba(0,0,0,0.67)}.jconfirm.jconfirm-material .jconfirm-box{background-color:white;box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);padding:30px 25px 10px 25px}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:22px;font-weight:bold}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-content{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons{text-align:right}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons button{text-transform:uppercase;font-weight:500}.jconfirm.jconfirm-material.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-bootstrap .jconfirm-bg{background-color:rgba(0,0,0,0.21)}.jconfirm.jconfirm-bootstrap .jconfirm-box{background-color:white;box-shadow:0 3px 8px 0 rgba(0,0,0,0.2);border:solid 1px rgba(0,0,0,0.4);padding:15px 0 0}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:22px;font-weight:bold;padding-left:15px;padding-right:15px}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-content{color:rgba(0,0,0,0.87);padding:0 15px}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons{text-align:right;padding:10px;margin:-5px 0 0;border-top:solid 1px #ddd;overflow:hidden;border-radius:0 0 4px 4px}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons button{font-weight:500}.jconfirm.jconfirm-bootstrap.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-modern .jconfirm-bg{background-color:slategray;opacity:.6}.jconfirm.jconfirm-modern .jconfirm-box{background-color:white;box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);padding:30px 30px 15px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87);top:15px;right:15px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:24px;font-weight:bold;text-align:center;margin-bottom:10px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{-webkit-transition:-webkit-transform .5s;transition:transform .5s;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);display:block;margin-right:0;margin-left:0;margin-bottom:10px;font-size:69px;color:#aaa}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-content{text-align:center;font-size:15px;color:#777;margin-bottom:25px}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons{text-align:center}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons button{font-weight:bold;text-transform:uppercase;-webkit-transition:background .1s;transition:background .1s;padding:10px 20px}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons button+button{margin-left:4px}.jconfirm.jconfirm-modern.jconfirm-open .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}
|
assets/css/wpforms-full.css
CHANGED
@@ -106,7 +106,7 @@ div.wpforms-container-full .wpforms-form textarea.wpforms-field-medium {
|
|
106 |
/* Field sizes - small */
|
107 |
div.wpforms-container-full .wpforms-form input.wpforms-field-small,
|
108 |
div.wpforms-container-full .wpforms-form select.wpforms-field-small,
|
109 |
-
div.wpforms-container-full .wpforms-form.wpforms-field-row.wpforms-field-small {
|
110 |
max-width: 25%;
|
111 |
}
|
112 |
|
@@ -126,19 +126,19 @@ div.wpforms-container-full .wpforms-form textarea.wpforms-field-large {
|
|
126 |
}
|
127 |
|
128 |
/* Field container */
|
129 |
-
div.wpforms-container-full .wpforms-form
|
130 |
padding: 10px 0;
|
131 |
clear: both;
|
132 |
}
|
133 |
|
134 |
/* Field Description */
|
135 |
-
div.wpforms-container-full .wpforms-form
|
136 |
font-size: 13px;
|
137 |
line-height: 1.3;
|
138 |
margin: 8px 0 0 0;
|
139 |
}
|
140 |
|
141 |
-
div.wpforms-container-full .wpforms-form
|
142 |
margin: 0 0 8px 0;
|
143 |
}
|
144 |
|
106 |
/* Field sizes - small */
|
107 |
div.wpforms-container-full .wpforms-form input.wpforms-field-small,
|
108 |
div.wpforms-container-full .wpforms-form select.wpforms-field-small,
|
109 |
+
div.wpforms-container-full .wpforms-form .wpforms-field-row.wpforms-field-small {
|
110 |
max-width: 25%;
|
111 |
}
|
112 |
|
126 |
}
|
127 |
|
128 |
/* Field container */
|
129 |
+
div.wpforms-container-full .wpforms-form .wpforms-field {
|
130 |
padding: 10px 0;
|
131 |
clear: both;
|
132 |
}
|
133 |
|
134 |
/* Field Description */
|
135 |
+
div.wpforms-container-full .wpforms-form .wpforms-field-description {
|
136 |
font-size: 13px;
|
137 |
line-height: 1.3;
|
138 |
margin: 8px 0 0 0;
|
139 |
}
|
140 |
|
141 |
+
div.wpforms-container-full .wpforms-form .wpforms-field-description-before {
|
142 |
margin: 0 0 8px 0;
|
143 |
}
|
144 |
|
assets/js/admin-builder-conditional-logic-core.js
ADDED
@@ -0,0 +1,470 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* globals wpf, wpforms_builder, wp */
|
2 |
+
;(function($) {
|
3 |
+
|
4 |
+
var WPFormsConditionals = {
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Start the engine.
|
8 |
+
*
|
9 |
+
* @since 1.0.0
|
10 |
+
*/
|
11 |
+
init: function() {
|
12 |
+
|
13 |
+
WPFormsConditionals.bindUIActions();
|
14 |
+
},
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Element bindings.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
bindUIActions: function() {
|
22 |
+
|
23 |
+
// Conditional support toggle
|
24 |
+
$(document).on('change', '.wpforms-conditionals-enable-toggle input[type=checkbox]', function(e) {
|
25 |
+
WPFormsConditionals.conditionalToggle(this, e);
|
26 |
+
});
|
27 |
+
|
28 |
+
// Conditional process field select
|
29 |
+
$(document).on('change', '.wpforms-conditional-field', function(e) {
|
30 |
+
WPFormsConditionals.conditionalField(this, e);
|
31 |
+
});
|
32 |
+
|
33 |
+
// Conditional process operator select
|
34 |
+
$(document).on('change', '.wpforms-conditional-operator', function(e) {
|
35 |
+
WPFormsConditionals.conditionalOperator(this, e);
|
36 |
+
});
|
37 |
+
|
38 |
+
// Conditional add new rule
|
39 |
+
$(document).on('click', '.wpforms-conditional-rule-add', function(e) {
|
40 |
+
WPFormsConditionals.conditionalRuleAdd(this, e);
|
41 |
+
});
|
42 |
+
|
43 |
+
// Conditional delete rule
|
44 |
+
$(document).on('click', '.wpforms-conditional-rule-delete', function(e) {
|
45 |
+
WPFormsConditionals.conditionalRuleDelete(this, e);
|
46 |
+
});
|
47 |
+
|
48 |
+
// Conditional add new group
|
49 |
+
$(document).on('click', '.wpforms-conditional-groups-add', function(e) {
|
50 |
+
WPFormsConditionals.conditionalGroupAdd(this, e);
|
51 |
+
});
|
52 |
+
|
53 |
+
// Conditional logic update/refresh
|
54 |
+
$(document).on('wpformsFieldUpdate', WPFormsConditionals.conditionalUpdateOptions);
|
55 |
+
},
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Update/refresh the conditional logic fields and associated options.
|
59 |
+
*
|
60 |
+
* @since 1.0.0
|
61 |
+
*/
|
62 |
+
conditionalUpdateOptions: function(e, allFields, $rows) {
|
63 |
+
|
64 |
+
$rows = $rows || $('.wpforms-conditional-row'); // jshint ignore:line
|
65 |
+
|
66 |
+
var fields = $.extend({}, allFields),
|
67 |
+
allowed = ['text', 'textarea', 'select', 'radio', 'email', 'url', 'checkbox', 'number', 'payment-multiple', 'payment-select', 'hidden'],
|
68 |
+
changed = [],
|
69 |
+
key = '',
|
70 |
+
label = '';
|
71 |
+
|
72 |
+
if ( wpf.empty( fields ) ) {
|
73 |
+
return;
|
74 |
+
}
|
75 |
+
|
76 |
+
// Remove field types that are not allowed and whitelested
|
77 |
+
for(key in fields) {
|
78 |
+
if ( $.inArray(fields[key].type, allowed) === -1 ){
|
79 |
+
delete fields[key];
|
80 |
+
} else if (typeof fields[key].dynamic_choices !== 'undefined' && fields[key].dynamic_choices !== '' ) {
|
81 |
+
delete fields[key];
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
// Now go through each conditional rule in the builder
|
86 |
+
$rows.each(function(index, ele) {
|
87 |
+
|
88 |
+
var $this = $(this),
|
89 |
+
fieldID = $this.attr('data-field-id'),
|
90 |
+
$fields = $this.find('.wpforms-conditional-field'),
|
91 |
+
fieldSelected = $fields.find('option:selected').val(),
|
92 |
+
$value = $this.find('.wpforms-conditional-value'),
|
93 |
+
valueSelected = '';
|
94 |
+
|
95 |
+
// Empty the field select box, re-add placeholder option
|
96 |
+
$fields.empty().append($('<option>', { value: '', text : wpforms_builder.select_field }));
|
97 |
+
|
98 |
+
// Add appropriate options for each field. Reference using the
|
99 |
+
// field label (if provided) or fallback to the field ID.
|
100 |
+
for(key in fields) {
|
101 |
+
if (fields[key].label.length) {
|
102 |
+
label = wpf.sanitizeString(fields[key].label);
|
103 |
+
} else {
|
104 |
+
label = wpforms_builder.field + ' #' + fields[key].id;
|
105 |
+
}
|
106 |
+
if (fieldID && fieldID === fields[key].id) {
|
107 |
+
continue;
|
108 |
+
} else {
|
109 |
+
$fields.append($('<option>', { value: fields[key].id, text : label }));
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( !fieldSelected ) {
|
114 |
+
return true;
|
115 |
+
}
|
116 |
+
|
117 |
+
// Check if previous selected field exists in the new options added
|
118 |
+
if ( $fields.find('option[value="'+fieldSelected+'"]').length) {
|
119 |
+
|
120 |
+
// Exists, so restore previous selected value
|
121 |
+
$fields.find('option[value="'+fieldSelected+'"]').prop('selected', true);
|
122 |
+
|
123 |
+
// Since the field exist and was selected, now we must proceed
|
124 |
+
// to updating the field values. Luckily, we only have to do
|
125 |
+
// this for fields that leverage a select element.
|
126 |
+
if ($value.length && $value.is('select')) {
|
127 |
+
|
128 |
+
// Grab the currently selected value to restore later
|
129 |
+
valueSelected = $value.find('option:selected').val();
|
130 |
+
|
131 |
+
// Remove all current options
|
132 |
+
$value.empty();
|
133 |
+
|
134 |
+
// Add new options, in the correct order
|
135 |
+
$value.append($('<option>', { value: '', text : wpforms_builder.select_choice }));
|
136 |
+
for(key in fields['field_'+fieldSelected].choices) {
|
137 |
+
label = wpf.sanitizeString(fields['field_'+fieldSelected].choices[key].label);
|
138 |
+
$value.append($('<option>', { value: fields['field_'+fieldSelected].choices[key].key, text : label }));
|
139 |
+
}
|
140 |
+
|
141 |
+
// Check if previous selected calue exists in the new options added
|
142 |
+
if ($value.find('option[value="'+valueSelected+'"]').length) {
|
143 |
+
|
144 |
+
$value.find('option[value="'+valueSelected+'"]').prop('selected', true);
|
145 |
+
|
146 |
+
} else {
|
147 |
+
|
148 |
+
// Old value does not exist in the new options, likely
|
149 |
+
// deleted. Add the field ID to the charged variable,
|
150 |
+
// which will let the user know the fields conditional
|
151 |
+
// logic has been altered.
|
152 |
+
if (valueSelected.length > 0) {
|
153 |
+
changed.push($this.closest('.wpforms-conditional-group').data('reference'));
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
} else {
|
159 |
+
|
160 |
+
// Old field does not exist in the new options, likely deleted.
|
161 |
+
// Add the field ID to the charged variable, which will let
|
162 |
+
// the user know the fields conditional logic has been altered.
|
163 |
+
changed.push($this.closest('.wpforms-conditional-group').data('reference'));
|
164 |
+
|
165 |
+
// Since previously selected field no longer exists, this
|
166 |
+
// means this rule is now invalid. So the rule gets
|
167 |
+
// deleted as long as it isn't the only rule remaining.
|
168 |
+
var $group = $this.closest('.wpforms-conditional-group');
|
169 |
+
if ($group.find('table >tbody >tr').length === 1) {
|
170 |
+
var $groups = $this.closest('.wpforms-conditional-groups');
|
171 |
+
if ($groups.find('.wpforms-conditional-group').length > 1) {
|
172 |
+
$group.remove();
|
173 |
+
} else {
|
174 |
+
$this.find('.wpforms-conditional-value').remove();
|
175 |
+
$this.find('.value').append('<select>');
|
176 |
+
}
|
177 |
+
} else {
|
178 |
+
$this.remove();
|
179 |
+
}
|
180 |
+
}
|
181 |
+
});
|
182 |
+
|
183 |
+
// If conditional rules have been altered due to form updates then
|
184 |
+
// we alert the user.
|
185 |
+
if ( changed.length > 0 ) {
|
186 |
+
|
187 |
+
// Remove dupes
|
188 |
+
var changedUnique = changed.reduce(function(a,b){if(a.indexOf(b)<0)a.push(b);return a;},[]); // jshint ignore:line
|
189 |
+
|
190 |
+
// Build and trigger alert
|
191 |
+
var alert = wpforms_builder.conditionals_change;
|
192 |
+
|
193 |
+
for(key in changedUnique) {
|
194 |
+
if (wpf.isNumber(changedUnique[key]) ) {
|
195 |
+
// Field
|
196 |
+
if (allFields['field_'+changedUnique[key]].label.length ) {
|
197 |
+
alert += '<br/>'+wpf.sanitizeString(allFields['field_'+changedUnique[key]].label) + ' ('+wpforms_builder.field+' #'+changedUnique[key]+')';
|
198 |
+
} else {
|
199 |
+
alert += '<br>'+wpforms_builder.field+' #'+changedUnique[key];
|
200 |
+
}
|
201 |
+
} else {
|
202 |
+
// Panel
|
203 |
+
alert += '<br>'+changedUnique[key];
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
$.alert({
|
208 |
+
title: wpforms_builder.heads_up,
|
209 |
+
content: alert,
|
210 |
+
icon: 'fa fa-exclamation-circle',
|
211 |
+
type: 'orange',
|
212 |
+
buttons: {
|
213 |
+
confirm: {
|
214 |
+
text: wpforms_builder.ok,
|
215 |
+
btnClass: 'btn-confirm',
|
216 |
+
keys: ['enter']
|
217 |
+
}
|
218 |
+
}
|
219 |
+
});
|
220 |
+
}
|
221 |
+
|
222 |
+
//console.log('Conditional logic options updated');
|
223 |
+
},
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Toggle conditional support.
|
227 |
+
*
|
228 |
+
* @since 1.0.0
|
229 |
+
*/
|
230 |
+
conditionalToggle: function(el, e) {
|
231 |
+
|
232 |
+
e.preventDefault();
|
233 |
+
|
234 |
+
var $this = $(el),
|
235 |
+
$block = $this.parent().parent(),
|
236 |
+
logicBlock = wp.template('wpforms-conditional-block'),
|
237 |
+
data = {
|
238 |
+
fieldID : $this.parent().data('field-id'),
|
239 |
+
fieldName : $this.data('name'),
|
240 |
+
actions : $this.data('actions'),
|
241 |
+
actionDesc : $this.data('action-desc')
|
242 |
+
};
|
243 |
+
|
244 |
+
if ($this.is(':checked')) {
|
245 |
+
// Add conditional logic rules.
|
246 |
+
$block.append(logicBlock(data));
|
247 |
+
|
248 |
+
// Update fields in the added rule
|
249 |
+
WPFormsConditionals.conditionalUpdateOptions(false, wpf.getFields(false,true), $block.find('.wpforms-conditional-row') );
|
250 |
+
} else {
|
251 |
+
// Remove conditional logic rules.
|
252 |
+
$.confirm({
|
253 |
+
title: false,
|
254 |
+
content: wpforms_builder.conditionals_disable,
|
255 |
+
backgroundDismiss: false,
|
256 |
+
closeIcon: false,
|
257 |
+
icon: 'fa fa-exclamation-circle',
|
258 |
+
type: 'orange',
|
259 |
+
buttons: {
|
260 |
+
confirm: {
|
261 |
+
text: wpforms_builder.ok,
|
262 |
+
btnClass: 'btn-confirm',
|
263 |
+
action: function(){
|
264 |
+
// Prompt
|
265 |
+
$block.find('.wpforms-conditional-groups').remove();
|
266 |
+
}
|
267 |
+
},
|
268 |
+
cancel: {
|
269 |
+
text: wpforms_builder.cancel,
|
270 |
+
action: function() {
|
271 |
+
$this.prop('checked', true);
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
});
|
276 |
+
|
277 |
+
|
278 |
+
}
|
279 |
+
},
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Process conditional field.
|
283 |
+
*
|
284 |
+
* @since 1.0.0
|
285 |
+
*/
|
286 |
+
conditionalField: function(el, e) {
|
287 |
+
|
288 |
+
e.preventDefault();
|
289 |
+
|
290 |
+
var $this = $(el),
|
291 |
+
$rule = $this.parent().parent(),
|
292 |
+
$operator = $rule.find('.wpforms-conditional-operator'),
|
293 |
+
operator = $operator.find('option:selected').val(),
|
294 |
+
data = WPFormsConditionals.conditionalData($this),
|
295 |
+
name = data.inputName+'['+data.groupID+']['+data.ruleID+'][value]',
|
296 |
+
$element;
|
297 |
+
|
298 |
+
if ( !data.field ) {
|
299 |
+
|
300 |
+
// Placeholder has been selected
|
301 |
+
$element = $('<select>');
|
302 |
+
|
303 |
+
} else if ( data.field.type === 'select' || data.field.type === 'radio' || data.field.type === 'checkbox' || data.field.type === 'payment-multiple' || data.field.type === 'payment-select' ) {
|
304 |
+
|
305 |
+
// Selector type fields use select elements
|
306 |
+
$element = $('<select>').attr({ name: name, class: 'wpforms-conditional-value' });
|
307 |
+
$element.append($('<option>', { value: '', text : wpforms_builder.select_choice }));
|
308 |
+
if (data.field.choices){
|
309 |
+
for(var key in data.field.choices) {
|
310 |
+
$element.append($('<option>', { value: data.field.choices[key].key, text : wpf.sanitizeString(data.field.choices[key].label) }));
|
311 |
+
}
|
312 |
+
}
|
313 |
+
$operator.find("option:not([value='=='],[value='!='],[value='e'],[value='!e'])").prop('disabled', true).prop('selected', false);
|
314 |
+
|
315 |
+
} else {
|
316 |
+
|
317 |
+
// Text type fields (everything else) use text inputs
|
318 |
+
$element = $('<input>').attr({ type: 'text', name: name, class: 'wpforms-conditional-value' });
|
319 |
+
$operator.find('option').prop('disabled', false);
|
320 |
+
}
|
321 |
+
|
322 |
+
if ( operator === 'e' || operator === '!e' ) {
|
323 |
+
|
324 |
+
// Empty/not empty doesn't use input, so we disable it
|
325 |
+
$element.prop('disabled',true);
|
326 |
+
}
|
327 |
+
|
328 |
+
$rule.find('.value').empty().append($element);
|
329 |
+
},
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Process conditional field.
|
333 |
+
*
|
334 |
+
* @since 1.2.0
|
335 |
+
*/
|
336 |
+
conditionalOperator: function(el, e) {
|
337 |
+
|
338 |
+
e.preventDefault();
|
339 |
+
|
340 |
+
var $this = $(el),
|
341 |
+
$rule = $this.parent().parent(),
|
342 |
+
$value = $rule.find('.wpforms-conditional-value'),
|
343 |
+
operator = $this.find('option:selected').val();
|
344 |
+
|
345 |
+
if ( operator === 'e' || operator === '!e' ) {
|
346 |
+
$value.prop( 'disabled', true );
|
347 |
+
if ( $value.is( 'select' ) ) {
|
348 |
+
$value.find( 'option:selected' ).prop( 'selected', false );
|
349 |
+
} else {
|
350 |
+
$value.val('');
|
351 |
+
}
|
352 |
+
} else {
|
353 |
+
$value.prop( 'disabled', false );
|
354 |
+
}
|
355 |
+
},
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Add new conditional rule.
|
359 |
+
*
|
360 |
+
* @since 1.0.0
|
361 |
+
*/
|
362 |
+
conditionalRuleAdd: function(el, e) {
|
363 |
+
|
364 |
+
e.preventDefault();
|
365 |
+
|
366 |
+
var $this = $(el),
|
367 |
+
$group = $this.closest('.wpforms-conditional-group'),
|
368 |
+
$rule = $group.find('tr').last(),
|
369 |
+
$newRule = $rule.clone(),
|
370 |
+
$field = $newRule.find('.wpforms-conditional-field'),
|
371 |
+
$operator = $newRule.find('.wpforms-conditional-operator'),
|
372 |
+
data = WPFormsConditionals.conditionalData($field),
|
373 |
+
ruleID = Number(data.ruleID)+1,
|
374 |
+
name = data.inputName+'['+data.groupID+']['+ruleID+']';
|
375 |
+
|
376 |
+
$newRule.find('option:selected').prop('selected', false);
|
377 |
+
$newRule.find('.value').empty().append( $('<select>') );
|
378 |
+
$field.attr('name', name+'[field]').attr('data-ruleid', ruleID);
|
379 |
+
$operator.attr('name', name+'[operator]');
|
380 |
+
$rule.after($newRule);
|
381 |
+
},
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Delete conditional rule. If the only rule in group then group will
|
385 |
+
* also be removed.
|
386 |
+
*
|
387 |
+
* @since 1.0.0
|
388 |
+
*/
|
389 |
+
conditionalRuleDelete: function(el, e) {
|
390 |
+
|
391 |
+
e.preventDefault();
|
392 |
+
|
393 |
+
var $this = $(el),
|
394 |
+
$group = $this.closest('.wpforms-conditional-group'),
|
395 |
+
$rows = $group.find('table >tbody >tr');
|
396 |
+
|
397 |
+
if ($rows && $rows.length === 1) {
|
398 |
+
var $groups = $this.closest('.wpforms-conditional-groups');
|
399 |
+
if ( $groups.find('.wpforms-conditional-group').length > 1 ) {
|
400 |
+
$group.remove();
|
401 |
+
} else {
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
} else {
|
405 |
+
$this.parent().parent().remove();
|
406 |
+
}
|
407 |
+
},
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Add new conditional group.
|
411 |
+
*
|
412 |
+
* @since 1.0.0
|
413 |
+
*/
|
414 |
+
conditionalGroupAdd: function(el, e) {
|
415 |
+
|
416 |
+
e.preventDefault();
|
417 |
+
|
418 |
+
var $this = $(el),
|
419 |
+
$groupLast = $this.parent().find('.wpforms-conditional-group').last(),
|
420 |
+
$newGroup = $groupLast.clone();
|
421 |
+
$newGroup.find('tr').not(':first').remove();
|
422 |
+
var $field = $newGroup.find('.wpforms-conditional-field'),
|
423 |
+
$operator = $newGroup.find('.wpforms-conditional-operator'),
|
424 |
+
data = WPFormsConditionals.conditionalData($field),
|
425 |
+
groupID = Number(data.groupID)+1,
|
426 |
+
ruleID = 0,
|
427 |
+
name = data.inputName+'['+groupID+']['+ruleID+']';
|
428 |
+
|
429 |
+
$newGroup.find('option:selected').prop('selected', false);
|
430 |
+
$newGroup.find('.value').empty().append( $('<select>') );
|
431 |
+
$field.attr('name', name+'[field]').attr('data-ruleid', ruleID).attr('data-groupid', groupID);
|
432 |
+
$operator.attr('name', name+'[operator]');
|
433 |
+
$this.before($newGroup);
|
434 |
+
},
|
435 |
+
|
436 |
+
|
437 |
+
//--------------------------------------------------------------------//
|
438 |
+
// Helper functions
|
439 |
+
//--------------------------------------------------------------------//
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Return various data for the conditional field.
|
443 |
+
*
|
444 |
+
* @since 1.0.0
|
445 |
+
*/
|
446 |
+
conditionalData: function(el) {
|
447 |
+
|
448 |
+
var $this = $(el);
|
449 |
+
var data = {
|
450 |
+
fields : wpf.getFields(false, true),
|
451 |
+
inputBase : $this.closest('.wpforms-conditional-row').attr('data-input-name'),
|
452 |
+
fieldID : $this.closest('.wpforms-conditional-row').attr('data-field-id'),
|
453 |
+
ruleID : $this.attr('data-ruleid'),
|
454 |
+
groupID : $this.attr('data-groupid'),
|
455 |
+
selectedID : $this.find(':selected').val()
|
456 |
+
};
|
457 |
+
|
458 |
+
data.inputName = data.inputBase+'[conditionals]';
|
459 |
+
|
460 |
+
if (data.selectedID.length) {
|
461 |
+
data.field = data.fields['field_'+data.selectedID];
|
462 |
+
} else {
|
463 |
+
data.field = false;
|
464 |
+
}
|
465 |
+
return data;
|
466 |
+
}
|
467 |
+
};
|
468 |
+
|
469 |
+
WPFormsConditionals.init();
|
470 |
+
})(jQuery);
|
assets/js/admin-builder-conditional-logic-core.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function($){var e={init:function(){e.bindUIActions()},bindUIActions:function(){$(document).on("change",".wpforms-conditionals-enable-toggle input[type=checkbox]",function(t){e.conditionalToggle(this,t)}),$(document).on("change",".wpforms-conditional-field",function(t){e.conditionalField(this,t)}),$(document).on("change",".wpforms-conditional-operator",function(t){e.conditionalOperator(this,t)}),$(document).on("click",".wpforms-conditional-rule-add",function(t){e.conditionalRuleAdd(this,t)}),$(document).on("click",".wpforms-conditional-rule-delete",function(t){e.conditionalRuleDelete(this,t)}),$(document).on("click",".wpforms-conditional-groups-add",function(t){e.conditionalGroupAdd(this,t)}),$(document).on("wpformsFieldUpdate",e.conditionalUpdateOptions)},conditionalUpdateOptions:function(e,t,i){i=i||$(".wpforms-conditional-row");var o=$.extend({},t),n=["text","textarea","select","radio","email","url","checkbox","number","payment-multiple","payment-select","hidden"],l=[],a="",d="";if(!wpf.empty(o)){for(a in o)-1===$.inArray(o[a].type,n)?delete o[a]:void 0!==o[a].dynamic_choices&&""!==o[a].dynamic_choices&&delete o[a];if(i.each(function(e,t){var i=$(this),n=i.attr("data-field-id"),r=i.find(".wpforms-conditional-field"),c=r.find("option:selected").val(),p=i.find(".wpforms-conditional-value"),f="";r.empty().append($("<option>",{value:"",text:wpforms_builder.select_field}));for(a in o)d=o[a].label.length?wpf.sanitizeString(o[a].label):wpforms_builder.field+" #"+o[a].id,n&&n===o[a].id||r.append($("<option>",{value:o[a].id,text:d}));if(!c)return!0;if(r.find('option[value="'+c+'"]').length){if(r.find('option[value="'+c+'"]').prop("selected",!0),p.length&&p.is("select")){f=p.find("option:selected").val(),p.empty(),p.append($("<option>",{value:"",text:wpforms_builder.select_choice}));for(a in o["field_"+c].choices)d=wpf.sanitizeString(o["field_"+c].choices[a].label),p.append($("<option>",{value:o["field_"+c].choices[a].key,text:d}));p.find('option[value="'+f+'"]').length?p.find('option[value="'+f+'"]').prop("selected",!0):f.length>0&&l.push(i.closest(".wpforms-conditional-group").data("reference"))}}else{l.push(i.closest(".wpforms-conditional-group").data("reference"));var s=i.closest(".wpforms-conditional-group");if(1===s.find("table >tbody >tr").length){i.closest(".wpforms-conditional-groups").find(".wpforms-conditional-group").length>1?s.remove():(i.find(".wpforms-conditional-value").remove(),i.find(".value").append("<select>"))}else i.remove()}}),l.length>0){var r=l.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]),c=wpforms_builder.conditionals_change;for(a in r)wpf.isNumber(r[a])?t["field_"+r[a]].label.length?c+="<br/>"+wpf.sanitizeString(t["field_"+r[a]].label)+" ("+wpforms_builder.field+" #"+r[a]+")":c+="<br>"+wpforms_builder.field+" #"+r[a]:c+="<br>"+r[a];$.alert({title:wpforms_builder.heads_up,content:c,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}})}}},conditionalToggle:function(t,i){i.preventDefault();var o=$(t),n=o.parent().parent(),l=wp.template("wpforms-conditional-block"),a={fieldID:o.parent().data("field-id"),fieldName:o.data("name"),actions:o.data("actions"),actionDesc:o.data("action-desc")};o.is(":checked")?(n.append(l(a)),e.conditionalUpdateOptions(!1,wpf.getFields(!1,!0),n.find(".wpforms-conditional-row"))):$.confirm({title:!1,content:wpforms_builder.conditionals_disable,backgroundDismiss:!1,closeIcon:!1,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",action:function(){n.find(".wpforms-conditional-groups").remove()}},cancel:{text:wpforms_builder.cancel,action:function(){o.prop("checked",!0)}}}})},conditionalField:function(t,i){i.preventDefault();var o=$(t),n=o.parent().parent(),l=n.find(".wpforms-conditional-operator"),a=l.find("option:selected").val(),d=e.conditionalData(o),r=d.inputName+"["+d.groupID+"]["+d.ruleID+"][value]",c;if(d.field)if("select"===d.field.type||"radio"===d.field.type||"checkbox"===d.field.type||"payment-multiple"===d.field.type||"payment-select"===d.field.type){if(c=$("<select>").attr({name:r,class:"wpforms-conditional-value"}),c.append($("<option>",{value:"",text:wpforms_builder.select_choice})),d.field.choices)for(var p in d.field.choices)c.append($("<option>",{value:d.field.choices[p].key,text:wpf.sanitizeString(d.field.choices[p].label)}));l.find("option:not([value='=='],[value='!='],[value='e'],[value='!e'])").prop("disabled",!0).prop("selected",!1)}else c=$("<input>").attr({type:"text",name:r,class:"wpforms-conditional-value"}),l.find("option").prop("disabled",!1);else c=$("<select>");"e"!==a&&"!e"!==a||c.prop("disabled",!0),n.find(".value").empty().append(c)},conditionalOperator:function(e,t){t.preventDefault();var i=$(e),o=i.parent().parent(),n=o.find(".wpforms-conditional-value"),l=i.find("option:selected").val();"e"===l||"!e"===l?(n.prop("disabled",!0),n.is("select")?n.find("option:selected").prop("selected",!1):n.val("")):n.prop("disabled",!1)},conditionalRuleAdd:function(t,i){i.preventDefault();var o=$(t),n=o.closest(".wpforms-conditional-group"),l=n.find("tr").last(),a=l.clone(),d=a.find(".wpforms-conditional-field"),r=a.find(".wpforms-conditional-operator"),c=e.conditionalData(d),p=Number(c.ruleID)+1,f=c.inputName+"["+c.groupID+"]["+p+"]";a.find("option:selected").prop("selected",!1),a.find(".value").empty().append($("<select>")),d.attr("name",f+"[field]").attr("data-ruleid",p),r.attr("name",f+"[operator]"),l.after(a)},conditionalRuleDelete:function(e,t){t.preventDefault();var i=$(e),o=i.closest(".wpforms-conditional-group"),n=o.find("table >tbody >tr");if(n&&1===n.length){if(!(i.closest(".wpforms-conditional-groups").find(".wpforms-conditional-group").length>1))return;o.remove()}else i.parent().parent().remove()},conditionalGroupAdd:function(t,i){i.preventDefault();var o=$(t),n=o.parent().find(".wpforms-conditional-group").last(),l=n.clone();l.find("tr").not(":first").remove();var a=l.find(".wpforms-conditional-field"),d=l.find(".wpforms-conditional-operator"),r=e.conditionalData(a),c=Number(r.groupID)+1,p=0,f=r.inputName+"["+c+"][0]";l.find("option:selected").prop("selected",!1),l.find(".value").empty().append($("<select>")),a.attr("name",f+"[field]").attr("data-ruleid",0).attr("data-groupid",c),d.attr("name",f+"[operator]"),o.before(l)},conditionalData:function(e){var t=$(e),i={fields:wpf.getFields(!1,!0),inputBase:t.closest(".wpforms-conditional-row").attr("data-input-name"),fieldID:t.closest(".wpforms-conditional-row").attr("data-field-id"),ruleID:t.attr("data-ruleid"),groupID:t.attr("data-groupid"),selectedID:t.find(":selected").val()};return i.inputName=i.inputBase+"[conditionals]",i.selectedID.length?i.field=i.fields["field_"+i.selectedID]:i.field=!1,i}};e.init()}(jQuery);
|
assets/js/admin-builder-providers.js
CHANGED
@@ -66,34 +66,6 @@
|
|
66 |
WPFormsProviders.accountListSelect(this, e);
|
67 |
});
|
68 |
|
69 |
-
// Conditional support toggle
|
70 |
-
$(document).on('change', '.wpforms-provider-conditionals .toggle', function(e) {
|
71 |
-
WPFormsProviders.conditionalToggle(this, e);
|
72 |
-
});
|
73 |
-
|
74 |
-
// Conditional logic real updates
|
75 |
-
$(document).on('wpformsFieldUpdate', WPFormsProviders.conditionalUpdateOptions);
|
76 |
-
|
77 |
-
// Conditional process field
|
78 |
-
$(document).on('change', '.wpforms-provider-conditionals .field select', function(e) {
|
79 |
-
WPFormsProviders.conditionalField(this, e);
|
80 |
-
});
|
81 |
-
|
82 |
-
// Conditional add new rule
|
83 |
-
$(document).on('click', '.wpforms-provider-conditionals-rule-add', function(e) {
|
84 |
-
WPFormsProviders.conditionalRuleAdd(this, e);
|
85 |
-
});
|
86 |
-
|
87 |
-
// Conditional delete rule
|
88 |
-
$(document).on('click', '.wpforms-provider-conditionals-rule-delete', function(e) {
|
89 |
-
WPFormsProviders.conditionalRuleDelete(this, e);
|
90 |
-
});
|
91 |
-
|
92 |
-
// Conditional add new group
|
93 |
-
$(document).on('click', '.wpforms-provider-conditionals-groups-add', function(e) {
|
94 |
-
WPFormsProviders.conditionalGroupAdd(this, e);
|
95 |
-
});
|
96 |
-
|
97 |
$(document).on('wpformsPanelSwitch', function(e, targetPanel) {
|
98 |
WPFormsProviders.providerPanelConfirm(targetPanel);
|
99 |
});
|
@@ -113,10 +85,22 @@
|
|
113 |
content: wpforms_builder_providers.confirm_connection,
|
114 |
backgroundDismiss: false,
|
115 |
closeIcon: false,
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
-
});
|
120 |
},
|
121 |
|
122 |
/**
|
@@ -142,43 +126,55 @@
|
|
142 |
$.confirm({
|
143 |
title: false,
|
144 |
content: modalContent,
|
|
|
|
|
145 |
backgroundDismiss: false,
|
146 |
closeIcon: false,
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
WPFormsProviders.inputToggle($this, 'disable');
|
159 |
-
|
160 |
-
// Fire AJAX
|
161 |
-
var data = {
|
162 |
-
action : 'wpforms_provider_ajax_'+provider,
|
163 |
-
provider: provider,
|
164 |
-
task : 'new_connection',
|
165 |
-
name : name,
|
166 |
-
id : s.form.data('id'),
|
167 |
-
nonce : wpforms_builder.nonce
|
168 |
-
}
|
169 |
-
WPFormsProviders.fireAJAX($this, data, function(res) {
|
170 |
-
if (res.success) {
|
171 |
-
$connections.find('.wpforms-provider-connections').prepend(res.data.html);
|
172 |
-
// Process and load the accounts if they exist
|
173 |
-
var $connection = $connections.find('.wpforms-provider-connection:first');
|
174 |
-
if ($connection.find( '.wpforms-provider-accounts option:selected')) {
|
175 |
-
$connection.find( '.wpforms-provider-accounts option:first').prop('selected', true);
|
176 |
-
$connection.find('.wpforms-provider-accounts select').trigger('change');
|
177 |
-
}
|
178 |
} else {
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
181 |
-
}
|
|
|
|
|
|
|
182 |
}
|
183 |
}
|
184 |
});
|
@@ -219,9 +215,10 @@
|
|
219 |
WPFormsProviders.fireAJAX($this, data, function(res) {
|
220 |
if (res.success) {
|
221 |
$container.nextAll('.wpforms-connection-block').remove();
|
|
|
222 |
$container.after(res.data.html);
|
223 |
$container.slideUp();
|
224 |
-
$connection.find('.wpforms-provider-accounts select').trigger('change');
|
225 |
} else {
|
226 |
WPFormsProviders.errorDisplay(res.data.error, $container);
|
227 |
}
|
@@ -246,6 +243,7 @@
|
|
246 |
|
247 |
// Remove any blocks that might exist as we prep for new account
|
248 |
$container.nextAll('.wpforms-connection-block').remove();
|
|
|
249 |
|
250 |
if (!$this.val()) {
|
251 |
|
@@ -253,7 +251,7 @@
|
|
253 |
$connection.find('.wpforms-provider-account-add input').val('');
|
254 |
$connection.find('.wpforms-provider-account-add').slideDown();
|
255 |
WPFormsProviders.inputToggle($this, 'enable');
|
256 |
-
|
257 |
} else {
|
258 |
|
259 |
$connection.find('.wpforms-provider-account-add').slideUp();
|
@@ -297,6 +295,7 @@
|
|
297 |
|
298 |
// Remove any blocks that might exist as we prep for new account
|
299 |
$container.nextAll('.wpforms-connection-block').remove();
|
|
|
300 |
|
301 |
data = {
|
302 |
action : 'wpforms_provider_ajax_'+provider,
|
@@ -307,7 +306,7 @@
|
|
307 |
list_id : $this.find(':selected').val(),
|
308 |
form_id : s.formID
|
309 |
}
|
310 |
-
|
311 |
WPFormsProviders.fireAJAX($this, data, function(res) {
|
312 |
if (res.success) {
|
313 |
$container.after(res.data.html);
|
@@ -317,262 +316,6 @@
|
|
317 |
});
|
318 |
},
|
319 |
|
320 |
-
/**
|
321 |
-
* Toggle conditional field support.
|
322 |
-
*
|
323 |
-
* @since 1.0.0
|
324 |
-
*/
|
325 |
-
conditionalToggle: function(el, e) {
|
326 |
-
e.preventDefault();
|
327 |
-
|
328 |
-
var $this = $(el);
|
329 |
-
if ($this.is(':checked')) {
|
330 |
-
$this.parent().parent().find('.wpforms-provider-conditionals-groups').slideDown();
|
331 |
-
} else {
|
332 |
-
$this.parent().parent().find('.wpforms-provider-conditionals-groups').slideUp();
|
333 |
-
}
|
334 |
-
},
|
335 |
-
|
336 |
-
/**
|
337 |
-
* Update/refresh the conditional logic fields and associated options.
|
338 |
-
*
|
339 |
-
* @since 1.0.4
|
340 |
-
*/
|
341 |
-
conditionalUpdateOptions: function(e, fields) {
|
342 |
-
|
343 |
-
// @toodo
|
344 |
-
return;
|
345 |
-
var formFields = $.extend({}, fields);
|
346 |
-
allowed = ['text', 'textarea', 'select', 'radio', 'checkbox', 'number' ],
|
347 |
-
changed = false;
|
348 |
-
|
349 |
-
// Remove field types that are not allowed and whitelested
|
350 |
-
for(var key in formFields) {
|
351 |
-
if ($.inArray(formFields[key].type, allowed) == '-1' ){
|
352 |
-
delete formFields[key];
|
353 |
-
}
|
354 |
-
}
|
355 |
-
|
356 |
-
// Now go through each conditional rule in the builder
|
357 |
-
$('.wpforms-provider-conditionals-group-row').each(function(index, ele) {
|
358 |
-
|
359 |
-
var $this = $(this),
|
360 |
-
fieldID = $this.data('field-id'),
|
361 |
-
$fields = $this.find('.wpforms-provider-conditionals-field'),
|
362 |
-
fieldSelected = $fields.find('option:selected').val(),
|
363 |
-
$value = $this.find('.wpforms-provider-conditionals-value'),
|
364 |
-
valueSelected = '',
|
365 |
-
choiceOrder = [];
|
366 |
-
|
367 |
-
// Empty the field select box, re-add placeholder option
|
368 |
-
$fields.empty().append($('<option>', { value: '', text : '-- Select field --' }));
|
369 |
-
|
370 |
-
// Add appropriate options for each field. Reference using the
|
371 |
-
// field label (if provided) or fallback to the field ID.
|
372 |
-
for(var key in formFields) {
|
373 |
-
if (formFields[key].label.length) {
|
374 |
-
var label = wpf.sanitizeString(formFields[key].label);
|
375 |
-
} else {
|
376 |
-
var label = 'Field #' + formFields[key].val;
|
377 |
-
}
|
378 |
-
$fields.append($('<option>', { value: fields[key].id, text : label }));
|
379 |
-
}
|
380 |
-
|
381 |
-
// Check if previous selected field exists in the new options added
|
382 |
-
if ($fields.find('option[value="'+fieldSelected+'"]').length) {
|
383 |
-
|
384 |
-
// Exists, so restore previous selected value
|
385 |
-
$fields.find('option[value="'+fieldSelected+'"]').prop('selected', true);
|
386 |
-
|
387 |
-
// Since the field exist and was selected, now we must proceed
|
388 |
-
// to updating the field values. Luckily, we only have to do
|
389 |
-
// this for fields that leverage a select element.
|
390 |
-
if ( $value.length && $value.is('select') ) {
|
391 |
-
|
392 |
-
// Define the order of the choices
|
393 |
-
$('#wpforms-field-option-row-'+fieldSelected+'-choices li').each(function(index, ele) {
|
394 |
-
choiceOrder.push($(ele).data('key'));
|
395 |
-
});
|
396 |
-
|
397 |
-
// Grab the currently selected value to restore later
|
398 |
-
valueSelected = $value.find('option:selected').val();
|
399 |
-
|
400 |
-
// Remove all current options
|
401 |
-
$value.empty();
|
402 |
-
|
403 |
-
// Add new options, in the correct order
|
404 |
-
$.each(choiceOrder, function(index, val) {
|
405 |
-
var label = wpf.sanitizeString(fields['field_'+fieldSelected].choices[val].label);
|
406 |
-
$value.append($('<option>', { value: val, text : label }));
|
407 |
-
});
|
408 |
-
|
409 |
-
// Check if previous selected calue exists in the new options added
|
410 |
-
if ($value.find('option[value="'+valueSelected+'"]').length) {
|
411 |
-
|
412 |
-
$value.find('option[value="'+valueSelected+'"]').prop('selected', true);
|
413 |
-
|
414 |
-
} else {
|
415 |
-
|
416 |
-
// Add temporary placeholder value since the old one
|
417 |
-
// doesn't exist
|
418 |
-
$value.prepend($('<option>', { value: '', text : '-- Select Choice --' }));
|
419 |
-
|
420 |
-
// Old value does not exist in the new options, likely
|
421 |
-
// deleted. Add the field ID to the charged variable,
|
422 |
-
// which will let the user know the fields conditional
|
423 |
-
// logic has been altered.
|
424 |
-
if (valueSelected.length > 0) {
|
425 |
-
changed = true;
|
426 |
-
}
|
427 |
-
}
|
428 |
-
}
|
429 |
-
|
430 |
-
} else {
|
431 |
-
|
432 |
-
// Old field does not exist in the new options, likely deleted.
|
433 |
-
// Add the field ID to the charged variable, which will let
|
434 |
-
// the user know the fields conditional logic has been altered.
|
435 |
-
changed = true;
|
436 |
-
|
437 |
-
// Since previously selected field no longer exists, this
|
438 |
-
// means this rule is now invalid. So the rule gets
|
439 |
-
// deleted as long as it isn't the only rule remaining.
|
440 |
-
$group = $this.closest('.wpforms-provider-conditionals-group');
|
441 |
-
if ($group.find('table >tbody >tr').length === 1) {
|
442 |
-
var $groups = $this.closest('.wpforms-provider-conditionals-groups');
|
443 |
-
if ($groups.find('.wpforms-provider-conditionals-group').length > 1) {
|
444 |
-
$group.remove();
|
445 |
-
} else {
|
446 |
-
$this.find('.wpforms-provider-conditionals-value').remove();
|
447 |
-
$this.find('.value').append('<select>');
|
448 |
-
}
|
449 |
-
} else {
|
450 |
-
$this.remove();
|
451 |
-
}
|
452 |
-
}
|
453 |
-
});
|
454 |
-
|
455 |
-
// If conditional rules have been altered due to form updates then
|
456 |
-
// we alert the user.
|
457 |
-
if ( changed ) {
|
458 |
-
|
459 |
-
// Build and trigger alert
|
460 |
-
var alert = 'Due to form changes, Marketing Provider conditional logic rules have been removed or updated.';
|
461 |
-
$.alert({
|
462 |
-
title: 'Heads Up!',
|
463 |
-
content: alert
|
464 |
-
});
|
465 |
-
}
|
466 |
-
|
467 |
-
//console.log('Conditional logic options updated');
|
468 |
-
},
|
469 |
-
|
470 |
-
/**
|
471 |
-
* Process conditional field
|
472 |
-
*
|
473 |
-
* @since 1.0.0
|
474 |
-
*/
|
475 |
-
conditionalField: function(el, e) {
|
476 |
-
e.preventDefault();
|
477 |
-
|
478 |
-
var $this = $(el),
|
479 |
-
$rule = $this.parent().parent(),
|
480 |
-
data = WPFormsProviders.conditionalData($this),
|
481 |
-
name = data.name+'['+data.groupID+']['+data.ruleID+'][value]',
|
482 |
-
element;
|
483 |
-
|
484 |
-
if ( !data.field ) {
|
485 |
-
// Placeholder has been selected
|
486 |
-
element = $('<select>');
|
487 |
-
} else if (data.field.type == 'text' || data.field.type == 'number' || data.field.type == 'textarea') {
|
488 |
-
var element = $('<input>').attr({ type: 'text', name: name, class: 'wpforms-provider-conditionals-value' });
|
489 |
-
} else {
|
490 |
-
var element = $('<select>').attr({ name: name, class: 'wpforms-provider-conditionals-value' });
|
491 |
-
$.each(data.field.choices, function( key, ele) {
|
492 |
-
if (ele) {
|
493 |
-
element.append($('<option>', { value: key, text : wpf.sanitizeString(ele.label) }));
|
494 |
-
}
|
495 |
-
});
|
496 |
-
}
|
497 |
-
$rule.find('.value').empty().append(element);
|
498 |
-
},
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Add new conditional rule.
|
502 |
-
*
|
503 |
-
* @since 1.0.0
|
504 |
-
*/
|
505 |
-
conditionalRuleAdd: function(el, e) {
|
506 |
-
e.preventDefault();
|
507 |
-
|
508 |
-
var $this = $(el),
|
509 |
-
$group = $this.closest('.wpforms-provider-conditionals-group'),
|
510 |
-
$rule = $group.find('tr').last(),
|
511 |
-
$newRule = $rule.clone(),
|
512 |
-
$field = $newRule.find('.field select'),
|
513 |
-
$operator = $newRule.find('.operator select'),
|
514 |
-
data = WPFormsProviders.conditionalData($field),
|
515 |
-
ruleID = Number(data.ruleID)+1,
|
516 |
-
name = data.name+'['+data.groupID+']['+ruleID+']';
|
517 |
-
|
518 |
-
$newRule.find('option:selected').prop('selected', false);
|
519 |
-
$newRule.find('.value').empty().append( $('<select>') );
|
520 |
-
$field.attr('name', name+'[field]').attr('data-ruleid', ruleID);
|
521 |
-
$operator.attr('name', name+'[operator]');
|
522 |
-
$rule.after($newRule);
|
523 |
-
},
|
524 |
-
|
525 |
-
/**
|
526 |
-
* Delete conditional rule. If the only rule in group then group will
|
527 |
-
* also be removed.
|
528 |
-
*
|
529 |
-
* @since 1.0.0
|
530 |
-
*/
|
531 |
-
conditionalRuleDelete: function(el, e) {
|
532 |
-
e.preventDefault();
|
533 |
-
|
534 |
-
var $this = $(el),
|
535 |
-
$group = $this.closest('.wpforms-provider-conditionals-group');
|
536 |
-
$rows = $group.find('table >tbody >tr');
|
537 |
-
|
538 |
-
if ($rows && $rows.length === 1) {
|
539 |
-
var $groups = $this.closest('.wpforms-provider-conditionals-groups');
|
540 |
-
if ( $groups.find('.wpforms-provider-conditionals-group').length > 1 ) {
|
541 |
-
$group.remove();
|
542 |
-
} else {
|
543 |
-
return;
|
544 |
-
}
|
545 |
-
} else {
|
546 |
-
$this.parent().parent().remove();
|
547 |
-
}
|
548 |
-
},
|
549 |
-
|
550 |
-
/**
|
551 |
-
* Add new conditional group.
|
552 |
-
*
|
553 |
-
* @since 1.0.0
|
554 |
-
*/
|
555 |
-
conditionalGroupAdd: function(el, e) {
|
556 |
-
e.preventDefault();
|
557 |
-
|
558 |
-
var $this = $(el),
|
559 |
-
$groupLast = $this.parent().find('.wpforms-provider-conditionals-group').last(),
|
560 |
-
$newGroup = $groupLast.clone();
|
561 |
-
$newGroup.find('tr').not(':first').remove();
|
562 |
-
var $field = $newGroup.find('.field select'),
|
563 |
-
$operator = $newGroup.find('.operator select'),
|
564 |
-
data = WPFormsProviders.conditionalData($field),
|
565 |
-
groupID = Number(data.groupID)+1,
|
566 |
-
ruleID = 0,
|
567 |
-
name = data.name+'['+groupID+']['+ruleID+']';
|
568 |
-
|
569 |
-
$newGroup.find('option:selected').prop('selected', false);
|
570 |
-
$newGroup.find('.value').empty().append( $('<select>') );
|
571 |
-
$field.attr('name', name+'[field]').attr('data-ruleid', ruleID).attr('data-groupid', groupID);
|
572 |
-
$operator.attr('name', name+'[operator]');
|
573 |
-
$this.before($newGroup);
|
574 |
-
},
|
575 |
-
|
576 |
/**
|
577 |
* Confirm form save before loading Provider panel.
|
578 |
* If confirmed, save and reload panel.
|
@@ -583,20 +326,31 @@
|
|
583 |
|
584 |
wpforms_panel_switch = true;
|
585 |
if (targetPanel =='providers') {
|
586 |
-
|
587 |
-
if ( currentState != wpforms_builder.saved_state ) {
|
588 |
wpforms_panel_switch = false;
|
589 |
$.confirm({
|
590 |
title: false,
|
591 |
content: wpforms_builder_providers.confirm_save,
|
592 |
backgroundDismiss: false,
|
593 |
closeIcon: false,
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
});
|
601 |
}
|
602 |
}
|
@@ -626,32 +380,6 @@
|
|
626 |
});
|
627 |
},
|
628 |
|
629 |
-
/**
|
630 |
-
* Return various data for the conditional field.
|
631 |
-
*
|
632 |
-
* @since 1.0.0
|
633 |
-
*/
|
634 |
-
conditionalData: function(el) {
|
635 |
-
|
636 |
-
var $this = $(el);
|
637 |
-
var data = {
|
638 |
-
formData : $('#wpforms-builder-form').serializeObject(),
|
639 |
-
fieldID : $this.find(':selected').val(),
|
640 |
-
ruleID : $this.attr('data-ruleid'),
|
641 |
-
groupID : $this.attr('data-groupid'),
|
642 |
-
connectionID: $this.attr('data-connectionid'),
|
643 |
-
provider : $this.attr('data-provider'),
|
644 |
-
selectedID : $this.find(':selected').val()
|
645 |
-
}
|
646 |
-
if (data.selectedID.length) {
|
647 |
-
data.field = data.formData.fields[data.selectedID];
|
648 |
-
} else {
|
649 |
-
data.field = false;
|
650 |
-
}
|
651 |
-
data.name = 'providers['+data.provider+']['+data.connectionID+'][conditionals]';
|
652 |
-
return data;
|
653 |
-
},
|
654 |
-
|
655 |
/**
|
656 |
* Toggle input with loading indicator.
|
657 |
*
|
@@ -728,4 +456,4 @@
|
|
728 |
};
|
729 |
|
730 |
WPFormsProviders.init();
|
731 |
-
})(jQuery);
|
66 |
WPFormsProviders.accountListSelect(this, e);
|
67 |
});
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
$(document).on('wpformsPanelSwitch', function(e, targetPanel) {
|
70 |
WPFormsProviders.providerPanelConfirm(targetPanel);
|
71 |
});
|
85 |
content: wpforms_builder_providers.confirm_connection,
|
86 |
backgroundDismiss: false,
|
87 |
closeIcon: false,
|
88 |
+
icon: 'fa fa-exclamation-circle',
|
89 |
+
type: 'orange',
|
90 |
+
buttons: {
|
91 |
+
confirm: {
|
92 |
+
text: wpforms_builder.ok,
|
93 |
+
btnClass: 'btn-confirm',
|
94 |
+
keys: ['enter'],
|
95 |
+
action: function(){
|
96 |
+
$this.closest('.wpforms-provider-connection').remove();
|
97 |
+
}
|
98 |
+
},
|
99 |
+
cancel: {
|
100 |
+
text: wpforms_builder.cancel
|
101 |
+
}
|
102 |
}
|
103 |
+
});
|
104 |
},
|
105 |
|
106 |
/**
|
126 |
$.confirm({
|
127 |
title: false,
|
128 |
content: modalContent,
|
129 |
+
icon: 'fa fa-info-circle',
|
130 |
+
type: 'blue',
|
131 |
backgroundDismiss: false,
|
132 |
closeIcon: false,
|
133 |
+
buttons: {
|
134 |
+
confirm: {
|
135 |
+
text: wpforms_builder.ok,
|
136 |
+
btnClass: 'btn-confirm',
|
137 |
+
keys: ['enter'],
|
138 |
+
action: function() {
|
139 |
+
var input = this.$content.find('input#provider-connection-name');
|
140 |
+
var error = this.$content.find('.error');
|
141 |
+
if (input.val() == '') {
|
142 |
+
error.show();
|
143 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
} else {
|
145 |
+
|
146 |
+
var name = input.val();
|
147 |
+
|
148 |
+
// Disable button
|
149 |
+
WPFormsProviders.inputToggle($this, 'disable');
|
150 |
+
|
151 |
+
// Fire AJAX
|
152 |
+
var data = {
|
153 |
+
action : 'wpforms_provider_ajax_'+provider,
|
154 |
+
provider: provider,
|
155 |
+
task : 'new_connection',
|
156 |
+
name : name,
|
157 |
+
id : s.form.data('id'),
|
158 |
+
nonce : wpforms_builder.nonce
|
159 |
+
}
|
160 |
+
WPFormsProviders.fireAJAX($this, data, function(res) {
|
161 |
+
if (res.success) {
|
162 |
+
$connections.find('.wpforms-provider-connections').prepend(res.data.html);
|
163 |
+
// Process and load the accounts if they exist
|
164 |
+
var $connection = $connections.find('.wpforms-provider-connection:first');
|
165 |
+
if ($connection.find( '.wpforms-provider-accounts option:selected')) {
|
166 |
+
$connection.find( '.wpforms-provider-accounts option:first').prop('selected', true);
|
167 |
+
$connection.find('.wpforms-provider-accounts select').trigger('change');
|
168 |
+
}
|
169 |
+
} else {
|
170 |
+
WPFormsProviders.errorDisplay(res.data.error, $container);
|
171 |
+
}
|
172 |
+
});
|
173 |
}
|
174 |
+
}
|
175 |
+
},
|
176 |
+
cancel: {
|
177 |
+
text: wpforms_builder.cancel
|
178 |
}
|
179 |
}
|
180 |
});
|
215 |
WPFormsProviders.fireAJAX($this, data, function(res) {
|
216 |
if (res.success) {
|
217 |
$container.nextAll('.wpforms-connection-block').remove();
|
218 |
+
$container.nextAll('.wpforms-conditional-block').remove();
|
219 |
$container.after(res.data.html);
|
220 |
$container.slideUp();
|
221 |
+
$connection.find('.wpforms-provider-accounts select').trigger('change');
|
222 |
} else {
|
223 |
WPFormsProviders.errorDisplay(res.data.error, $container);
|
224 |
}
|
243 |
|
244 |
// Remove any blocks that might exist as we prep for new account
|
245 |
$container.nextAll('.wpforms-connection-block').remove();
|
246 |
+
$container.nextAll('.wpforms-conditional-block').remove();
|
247 |
|
248 |
if (!$this.val()) {
|
249 |
|
251 |
$connection.find('.wpforms-provider-account-add input').val('');
|
252 |
$connection.find('.wpforms-provider-account-add').slideDown();
|
253 |
WPFormsProviders.inputToggle($this, 'enable');
|
254 |
+
|
255 |
} else {
|
256 |
|
257 |
$connection.find('.wpforms-provider-account-add').slideUp();
|
295 |
|
296 |
// Remove any blocks that might exist as we prep for new account
|
297 |
$container.nextAll('.wpforms-connection-block').remove();
|
298 |
+
$container.nextAll('.wpforms-conditional-block').remove();
|
299 |
|
300 |
data = {
|
301 |
action : 'wpforms_provider_ajax_'+provider,
|
306 |
list_id : $this.find(':selected').val(),
|
307 |
form_id : s.formID
|
308 |
}
|
309 |
+
|
310 |
WPFormsProviders.fireAJAX($this, data, function(res) {
|
311 |
if (res.success) {
|
312 |
$container.after(res.data.html);
|
316 |
});
|
317 |
},
|
318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
/**
|
320 |
* Confirm form save before loading Provider panel.
|
321 |
* If confirmed, save and reload panel.
|
326 |
|
327 |
wpforms_panel_switch = true;
|
328 |
if (targetPanel =='providers') {
|
329 |
+
if ( wpf.savedState != wpf.getFormState('#wpforms-builder-form') ) {
|
|
|
330 |
wpforms_panel_switch = false;
|
331 |
$.confirm({
|
332 |
title: false,
|
333 |
content: wpforms_builder_providers.confirm_save,
|
334 |
backgroundDismiss: false,
|
335 |
closeIcon: false,
|
336 |
+
icon: 'fa fa-info-circle',
|
337 |
+
type: 'blue',
|
338 |
+
buttons: {
|
339 |
+
confirm: {
|
340 |
+
text: wpforms_builder.ok,
|
341 |
+
btnClass: 'btn-confirm',
|
342 |
+
keys: ['enter'],
|
343 |
+
action: function(){
|
344 |
+
$('#wpforms-save').trigger('click');
|
345 |
+
$(document).on('wpformsSaved', function() {
|
346 |
+
window.location.href = wpforms_builder_providers.url;
|
347 |
+
});
|
348 |
+
}
|
349 |
+
},
|
350 |
+
cancel: {
|
351 |
+
text: wpforms_builder.cancel
|
352 |
+
}
|
353 |
+
}
|
354 |
});
|
355 |
}
|
356 |
}
|
380 |
});
|
381 |
},
|
382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
/**
|
384 |
* Toggle input with loading indicator.
|
385 |
*
|
456 |
};
|
457 |
|
458 |
WPFormsProviders.init();
|
459 |
+
})(jQuery);
|
assets/js/admin-builder.js
CHANGED
@@ -44,7 +44,16 @@
|
|
44 |
if ( wpforms_builder.template_modal_display == '1' && 'fields' == wpf.getQueryString('view') ) {
|
45 |
$.alert({
|
46 |
title: wpforms_builder.template_modal_title,
|
47 |
-
content: wpforms_builder.template_modal_msg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
})
|
49 |
}
|
50 |
},
|
@@ -62,19 +71,11 @@
|
|
62 |
WPFormsBuilder.formSave(false);
|
63 |
}
|
64 |
|
65 |
-
wpforms_builder.saved_state = $('#wpforms-builder-form').serializeJSON();
|
66 |
-
|
67 |
// Setup/cache some vars not available before
|
68 |
s.formID = $('#wpforms-builder-form').data('id');
|
69 |
-
s.formData = $('#wpforms-builder-form').serializeObject();
|
70 |
s.pagebreakTop = $('.wpforms-pagebreak-top').length;
|
71 |
s.pagebreakBottom = $('.wpforms-pagebreak-bottom').length;
|
72 |
|
73 |
-
// @todo - performance testing
|
74 |
-
//wpforms_builder.saved_state = $('#wpforms-builder-form').serializeJSON();
|
75 |
-
//jQuery.parseJSON(json);
|
76 |
-
//console.log( $(':input').length);
|
77 |
-
|
78 |
// If there is a section configured, display it. Otherwise
|
79 |
// we show the first panel by default.
|
80 |
$('.wpforms-panel').each(function(index, el) {
|
@@ -138,12 +139,13 @@
|
|
138 |
|
139 |
// jquery-confirmd defaults
|
140 |
jconfirm.defaults = {
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
147 |
};
|
148 |
},
|
149 |
|
@@ -332,33 +334,43 @@
|
|
332 |
if (s.formID) {
|
333 |
|
334 |
$.confirm({
|
335 |
-
title:
|
336 |
content: wpforms_builder.template_confirm,
|
337 |
backgroundDismiss: false,
|
338 |
closeIcon: false,
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
}
|
355 |
-
}
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
|
|
362 |
}
|
363 |
});
|
364 |
|
@@ -886,7 +898,15 @@
|
|
886 |
$.alert({
|
887 |
title: wpforms_builder.field_locked,
|
888 |
content: wpforms_builder.field_locked_msg,
|
889 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
890 |
});
|
891 |
} else {
|
892 |
$.confirm({
|
@@ -894,14 +914,26 @@
|
|
894 |
content: wpforms_builder.delete_confirm,
|
895 |
backgroundDismiss: false,
|
896 |
closeIcon: false,
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
905 |
}
|
906 |
});
|
907 |
}
|
@@ -921,7 +953,15 @@
|
|
921 |
$.alert({
|
922 |
title: wpforms_builder.field_locked,
|
923 |
content: wpforms_builder.field_locked_msg,
|
924 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
925 |
});
|
926 |
} else {
|
927 |
$.confirm({
|
@@ -929,81 +969,92 @@
|
|
929 |
content: wpforms_builder.duplicate_confirm,
|
930 |
backgroundDismiss: false,
|
931 |
closeIcon: false,
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
// Add new field options panel
|
966 |
-
$fieldOptions.hide().after('<div class="wpforms-field-option wpforms-field-option-'+type+'" id="wpforms-field-option-'+newFieldID+'" data-field-id="'+newFieldID+'">'+newFieldOptions+'</div>');
|
967 |
-
var $newFieldOptions = $('#wpforms-field-option-'+newFieldID);
|
968 |
-
|
969 |
-
// Copy over values
|
970 |
-
$fieldOptions.find(':input').each(function(index, el) {
|
971 |
-
var $this = $(this);
|
972 |
-
name = $this.attr('name'),
|
973 |
-
newName = name.replace(regex_fieldID, 'fields['+newFieldID+']'),
|
974 |
-
type = $this.attr('type');
|
975 |
-
|
976 |
-
if ( type === 'checkbox' || type === 'radio' ) {
|
977 |
-
if ($this.is(':checked')){
|
978 |
-
$newFieldOptions.find('[name="'+newName+'"]').prop('checked', true).attr('checked','checked');
|
979 |
-
} else {
|
980 |
-
$newFieldOptions.find('[name="'+newName+'"]').prop('checked', false).attr('checked',false);
|
981 |
-
}
|
982 |
-
} else if ($this.is('select')) {
|
983 |
-
if ($this.find('option:selected').length) {
|
984 |
-
var optionVal = $this.find('option:selected').val();
|
985 |
-
$newFieldOptions.find('[name="'+newName+'"]').find('[value="'+optionVal+'"]').prop('selected',true);
|
986 |
-
}
|
987 |
-
} else {
|
988 |
-
if ($this.val() != '') {
|
989 |
-
$newFieldOptions.find('[name="'+newName+'"]').val( $this.val() );
|
990 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
991 |
}
|
992 |
-
}
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
$('#wpforms-field-id').val(nextID);
|
997 |
-
|
998 |
-
// Adjust label to indicate this is a copy
|
999 |
-
$('#wpforms-field-option-'+newFieldID+'-label').val(newFieldLabel);
|
1000 |
-
$newField.find('.label-title .text').text(newFieldLabel);
|
1001 |
-
|
1002 |
-
// Fire field add custom event
|
1003 |
-
$(document).trigger('wpformsFieldAdd', [newFieldID, type]);
|
1004 |
-
|
1005 |
-
// Lastly, update the next ID stored in database
|
1006 |
-
$.post(wpforms_builder.ajax_url, {form_id : s.formID, nonce : wpforms_builder.nonce, action : 'wpforms_builder_increase_next_field_id'});
|
1007 |
}
|
1008 |
});
|
1009 |
}
|
@@ -2051,7 +2102,7 @@
|
|
2051 |
*/
|
2052 |
notificationAdd: function() {
|
2053 |
|
2054 |
-
var nextID = Number($('.wpforms-notifications-add').attr('data-next-id'))
|
2055 |
namePrompt = wpforms_builder.notification_prompt,
|
2056 |
nameField = '<input autofocus="" type="text" id="notification-name" placeholder="'+wpforms_builder.notification_ph+'">',
|
2057 |
nameError = '<p class="error">'+wpforms_builder.notification_error+'</p>',
|
@@ -2060,51 +2111,63 @@
|
|
2060 |
$.confirm({
|
2061 |
title: false,
|
2062 |
content: modalContent,
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
$
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2085 |
}
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
$newNotification.find('.email-msg textarea').val('{all_fields}').attr('value','{all_fields}');;
|
2090 |
-
$newNotification.find('.email-recipient input').val('{admin_email}').attr('value','{admin_email}');
|
2091 |
-
// Conditional logic, if present
|
2092 |
-
var $conditionalLogic = $newNotification.find('.wpforms-conditional-block');
|
2093 |
-
if ($conditionalLogic.length) {
|
2094 |
-
$conditionalLogic.find('.wpforms-conditional-group').not(':first').remove();
|
2095 |
-
$conditionalLogic.find('.wpforms-conditional-row').not(':first').remove();
|
2096 |
-
$conditionalLogic.find('.wpforms-conditional-row').attr('data-input-name', 'settings[notifications]['+nextID+']');
|
2097 |
-
$conditionalLogic.find('.wpforms-conditional-field').attr('data-groupid', '0').attr('data-ruleid', '0');
|
2098 |
-
$conditionalLogic.find('.wpforms-conditional-row').find('.value').empty().append('<select>');
|
2099 |
-
$conditionalLogic.find('.wpforms-conditional-groups').hide();
|
2100 |
-
}
|
2101 |
-
newNotification = $newNotification.wrap('<div>').parent().html();
|
2102 |
-
newNotification = newNotification.replace( /wpforms-panel-field-notifications-(\d+)/g, 'wpforms-panel-field-notification-'+nextID );
|
2103 |
-
newNotification = newNotification.replace( /\[conditionals\]\[(\d+)\]\[(\d+)\]/g, '[conditionals][0][0]' );
|
2104 |
|
2105 |
-
|
2106 |
|
2107 |
-
|
|
|
|
|
|
|
|
|
|
|
2108 |
}
|
2109 |
}
|
2110 |
});
|
@@ -2122,15 +2185,36 @@
|
|
2122 |
$.confirm({
|
2123 |
title: false,
|
2124 |
content: wpforms_builder.notification_delete,
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2134 |
}
|
2135 |
}
|
2136 |
});
|
@@ -2158,7 +2242,14 @@
|
|
2158 |
columnClass: 'modal-wide',
|
2159 |
title: false,
|
2160 |
content: content,
|
2161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2162 |
});
|
2163 |
});
|
2164 |
|
@@ -2204,7 +2295,7 @@
|
|
2204 |
if (res.success) {
|
2205 |
$label.text(text);
|
2206 |
$icon.toggleClass('fa-check fa-cog fa-spin');
|
2207 |
-
|
2208 |
$(document).trigger('wpformsSaved');
|
2209 |
if (true === redirect ) {
|
2210 |
window.location.href = wpforms_builder.exit_url;
|
@@ -2230,15 +2321,25 @@
|
|
2230 |
$.confirm({
|
2231 |
title: false,
|
2232 |
content: wpforms_builder.exit_confirm,
|
2233 |
-
|
2234 |
-
|
2235 |
backgroundDismiss: false,
|
2236 |
closeIcon: false,
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2242 |
}
|
2243 |
});
|
2244 |
}
|
@@ -2251,9 +2352,7 @@
|
|
2251 |
*/
|
2252 |
formIsSaved: function() {
|
2253 |
|
2254 |
-
|
2255 |
-
|
2256 |
-
if ( wpforms_builder.saved_state == currentState ) {
|
2257 |
return true;
|
2258 |
} else {
|
2259 |
return false;
|
@@ -2322,6 +2421,33 @@
|
|
2322 |
formatted = wpf.amountFormat(sanitized);
|
2323 |
$this.val(formatted);
|
2324 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2325 |
},
|
2326 |
|
2327 |
/**
|
@@ -2348,9 +2474,9 @@
|
|
2348 |
var allowed = $this.data('fields'),
|
2349 |
type = $this.data('type');
|
2350 |
if ( allowed && allowed.length ) {
|
2351 |
-
var fields = wpf.getFields(allowed.split(','));
|
2352 |
} else {
|
2353 |
-
var fields = wpf.getFields();
|
2354 |
}
|
2355 |
|
2356 |
// Create smart tags list
|
44 |
if ( wpforms_builder.template_modal_display == '1' && 'fields' == wpf.getQueryString('view') ) {
|
45 |
$.alert({
|
46 |
title: wpforms_builder.template_modal_title,
|
47 |
+
content: wpforms_builder.template_modal_msg,
|
48 |
+
icon: 'fa fa-info-circle',
|
49 |
+
type: 'blue',
|
50 |
+
buttons: {
|
51 |
+
confirm: {
|
52 |
+
text: wpforms_builder.close,
|
53 |
+
btnClass: 'btn-confirm',
|
54 |
+
keys: ['enter']
|
55 |
+
}
|
56 |
+
}
|
57 |
})
|
58 |
}
|
59 |
},
|
71 |
WPFormsBuilder.formSave(false);
|
72 |
}
|
73 |
|
|
|
|
|
74 |
// Setup/cache some vars not available before
|
75 |
s.formID = $('#wpforms-builder-form').data('id');
|
|
|
76 |
s.pagebreakTop = $('.wpforms-pagebreak-top').length;
|
77 |
s.pagebreakBottom = $('.wpforms-pagebreak-bottom').length;
|
78 |
|
|
|
|
|
|
|
|
|
|
|
79 |
// If there is a section configured, display it. Otherwise
|
80 |
// we show the first panel by default.
|
81 |
$('.wpforms-panel').each(function(index, el) {
|
139 |
|
140 |
// jquery-confirmd defaults
|
141 |
jconfirm.defaults = {
|
142 |
+
closeIcon: true,
|
143 |
+
backgroundDismiss: true,
|
144 |
+
escapeKey: true,
|
145 |
+
animationBounce: 1,
|
146 |
+
useBootstrap: false,
|
147 |
+
theme: 'modern',
|
148 |
+
boxWidth: '400px'
|
149 |
};
|
150 |
},
|
151 |
|
334 |
if (s.formID) {
|
335 |
|
336 |
$.confirm({
|
337 |
+
title: wpforms_builder.heads_up,
|
338 |
content: wpforms_builder.template_confirm,
|
339 |
backgroundDismiss: false,
|
340 |
closeIcon: false,
|
341 |
+
icon: 'fa fa-exclamation-circle',
|
342 |
+
type: 'orange',
|
343 |
+
buttons: {
|
344 |
+
confirm: {
|
345 |
+
text: wpforms_builder.ok,
|
346 |
+
btnClass: 'btn-confirm',
|
347 |
+
action: function(){
|
348 |
+
// Ajax update form
|
349 |
+
var data = {
|
350 |
+
title : $formName.val(),
|
351 |
+
action : 'wpforms_update_form_template',
|
352 |
+
template: template,
|
353 |
+
form_id : s.formID,
|
354 |
+
nonce : wpforms_builder.nonce
|
355 |
+
}
|
356 |
+
$.post(wpforms_builder.ajax_url, data, function(res) {
|
357 |
+
if (res.success){
|
358 |
+
window.location.href = res.data.redirect;
|
359 |
+
} else {
|
360 |
+
console.log(res);
|
361 |
+
}
|
362 |
+
}).fail(function(xhr, textStatus, e) {
|
363 |
+
console.log(xhr.responseText);
|
364 |
+
});
|
365 |
}
|
366 |
+
},
|
367 |
+
cancel: {
|
368 |
+
text: wpforms_builder.cancel,
|
369 |
+
action: function(){
|
370 |
+
$templateBtns.prop('disabled', false);
|
371 |
+
$this.html(labelOriginal);
|
372 |
+
}
|
373 |
+
}
|
374 |
}
|
375 |
});
|
376 |
|
898 |
$.alert({
|
899 |
title: wpforms_builder.field_locked,
|
900 |
content: wpforms_builder.field_locked_msg,
|
901 |
+
icon: 'fa fa-info-circle',
|
902 |
+
type: 'blue',
|
903 |
+
buttons: {
|
904 |
+
confirm: {
|
905 |
+
text: wpforms_builder.close,
|
906 |
+
btnClass: 'btn-confirm',
|
907 |
+
keys: ['enter']
|
908 |
+
}
|
909 |
+
}
|
910 |
});
|
911 |
} else {
|
912 |
$.confirm({
|
914 |
content: wpforms_builder.delete_confirm,
|
915 |
backgroundDismiss: false,
|
916 |
closeIcon: false,
|
917 |
+
icon: 'fa fa-exclamation-circle',
|
918 |
+
type: 'orange',
|
919 |
+
buttons: {
|
920 |
+
confirm: {
|
921 |
+
text: wpforms_builder.ok,
|
922 |
+
btnClass: 'btn-confirm',
|
923 |
+
keys: ['enter'],
|
924 |
+
action: function(){
|
925 |
+
$('#wpforms-field-'+id).fadeOut(400, function(){
|
926 |
+
$(this).remove();
|
927 |
+
$('#wpforms-field-option-'+id).remove();
|
928 |
+
$('.wpforms-field, .wpforms-title-desc').removeClass('active');
|
929 |
+
WPFormsBuilder.fieldTabToggle('add-fields');
|
930 |
+
$(document).trigger('wpformsFieldDelete', [id, type ]);
|
931 |
+
});
|
932 |
+
}
|
933 |
+
},
|
934 |
+
cancel: {
|
935 |
+
text: wpforms_builder.cancel
|
936 |
+
}
|
937 |
}
|
938 |
});
|
939 |
}
|
953 |
$.alert({
|
954 |
title: wpforms_builder.field_locked,
|
955 |
content: wpforms_builder.field_locked_msg,
|
956 |
+
icon: 'fa fa-info-circle',
|
957 |
+
type: 'blue',
|
958 |
+
buttons : {
|
959 |
+
confirm : {
|
960 |
+
text: wpforms_builder.close,
|
961 |
+
btnClass: 'btn-confirm',
|
962 |
+
keys: ['enter'],
|
963 |
+
}
|
964 |
+
}
|
965 |
});
|
966 |
} else {
|
967 |
$.confirm({
|
969 |
content: wpforms_builder.duplicate_confirm,
|
970 |
backgroundDismiss: false,
|
971 |
closeIcon: false,
|
972 |
+
icon: 'fa fa-exclamation-circle',
|
973 |
+
type: 'orange',
|
974 |
+
buttons: {
|
975 |
+
confirm: {
|
976 |
+
text: wpforms_builder.ok,
|
977 |
+
btnClass: 'btn-confirm',
|
978 |
+
keys: ['enter'],
|
979 |
+
action: function(){
|
980 |
+
var $newField = $field.clone(),
|
981 |
+
$fieldOptions = $('#wpforms-field-option-'+id),
|
982 |
+
newFieldOptions = $fieldOptions.html(),
|
983 |
+
newFieldID = $('#wpforms-field-id').val(),
|
984 |
+
newFieldLabel = $('#wpforms-field-option-'+id+'-label').val()+' '+wpforms_builder.duplicate_copy,
|
985 |
+
nextID = Number(newFieldID)+1,
|
986 |
+
regex_fieldOptionsID = new RegExp( 'ID #'+id, "g"),
|
987 |
+
regex_fieldID = new RegExp( 'fields\\['+id+'\\]', "g"),
|
988 |
+
regex_dataFieldID = new RegExp( 'data-field-id="'+id+'"', "g"),
|
989 |
+
regex_referenceID = new RegExp( 'data-reference="'+id+'"', "g"),
|
990 |
+
regex_elementID = new RegExp( '\\b(id|for)="wpforms-(.*?)'+id+'(.*?)"', "ig");
|
991 |
+
|
992 |
+
// Toggle visibility states
|
993 |
+
$field.after($newField);
|
994 |
+
$field.removeClass('active');
|
995 |
+
$newField.addClass('active').attr({
|
996 |
+
'id' : 'wpforms-field-'+newFieldID,
|
997 |
+
'data-field-id': newFieldID
|
998 |
+
});
|
999 |
+
|
1000 |
+
// Various regex to adjust the field options to work with
|
1001 |
+
// the new field ID
|
1002 |
+
function regex_elementID_replace(match, p1, p2, p3, offset, string) {
|
1003 |
+
return p1+'="wpforms-'+p2+newFieldID+p3+'"';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1004 |
}
|
1005 |
+
newFieldOptions = newFieldOptions.replace(regex_fieldOptionsID, 'ID #'+newFieldID);
|
1006 |
+
newFieldOptions = newFieldOptions.replace(regex_fieldID, 'fields['+newFieldID+']');
|
1007 |
+
newFieldOptions = newFieldOptions.replace(regex_dataFieldID, 'data-field-id="'+newFieldID+'"');
|
1008 |
+
newFieldOptions = newFieldOptions.replace(regex_referenceID, 'data-reference="'+newFieldID+'"');
|
1009 |
+
newFieldOptions = newFieldOptions.replace(regex_elementID, regex_elementID_replace);
|
1010 |
+
|
1011 |
+
// Add new field options panel
|
1012 |
+
$fieldOptions.hide().after('<div class="wpforms-field-option wpforms-field-option-'+type+'" id="wpforms-field-option-'+newFieldID+'" data-field-id="'+newFieldID+'">'+newFieldOptions+'</div>');
|
1013 |
+
var $newFieldOptions = $('#wpforms-field-option-'+newFieldID);
|
1014 |
+
|
1015 |
+
// Copy over values
|
1016 |
+
$fieldOptions.find(':input').each(function(index, el) {
|
1017 |
+
var $this = $(this);
|
1018 |
+
name = $this.attr('name'),
|
1019 |
+
newName = name.replace(regex_fieldID, 'fields['+newFieldID+']'),
|
1020 |
+
type = $this.attr('type');
|
1021 |
+
|
1022 |
+
if ( type === 'checkbox' || type === 'radio' ) {
|
1023 |
+
if ($this.is(':checked')){
|
1024 |
+
$newFieldOptions.find('[name="'+newName+'"]').prop('checked', true).attr('checked','checked');
|
1025 |
+
} else {
|
1026 |
+
$newFieldOptions.find('[name="'+newName+'"]').prop('checked', false).attr('checked',false);
|
1027 |
+
}
|
1028 |
+
} else if ($this.is('select')) {
|
1029 |
+
if ($this.find('option:selected').length) {
|
1030 |
+
var optionVal = $this.find('option:selected').val();
|
1031 |
+
$newFieldOptions.find('[name="'+newName+'"]').find('[value="'+optionVal+'"]').prop('selected',true);
|
1032 |
+
}
|
1033 |
+
} else {
|
1034 |
+
if ($this.val() != '') {
|
1035 |
+
$newFieldOptions.find('[name="'+newName+'"]').val( $this.val() );
|
1036 |
+
}
|
1037 |
+
}
|
1038 |
+
});
|
1039 |
+
|
1040 |
+
// ID adjustments
|
1041 |
+
$('#wpforms-field-option-'+newFieldID).find('.wpforms-field-option-hidden-id').val(newFieldID);
|
1042 |
+
$('#wpforms-field-id').val(nextID);
|
1043 |
+
|
1044 |
+
// Adjust label to indicate this is a copy
|
1045 |
+
$('#wpforms-field-option-'+newFieldID+'-label').val(newFieldLabel);
|
1046 |
+
$newField.find('.label-title .text').text(newFieldLabel);
|
1047 |
+
|
1048 |
+
// Fire field add custom event
|
1049 |
+
$(document).trigger('wpformsFieldAdd', [newFieldID, type]);
|
1050 |
+
|
1051 |
+
// Lastly, update the next ID stored in database
|
1052 |
+
$.post(wpforms_builder.ajax_url, {form_id : s.formID, nonce : wpforms_builder.nonce, action : 'wpforms_builder_increase_next_field_id'});
|
1053 |
}
|
1054 |
+
},
|
1055 |
+
cancel: {
|
1056 |
+
text: wpforms_builder.cancel
|
1057 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1058 |
}
|
1059 |
});
|
1060 |
}
|
2102 |
*/
|
2103 |
notificationAdd: function() {
|
2104 |
|
2105 |
+
var nextID = Number($('.wpforms-notifications-add').attr('data-next-id')),
|
2106 |
namePrompt = wpforms_builder.notification_prompt,
|
2107 |
nameField = '<input autofocus="" type="text" id="notification-name" placeholder="'+wpforms_builder.notification_ph+'">',
|
2108 |
nameError = '<p class="error">'+wpforms_builder.notification_error+'</p>',
|
2111 |
$.confirm({
|
2112 |
title: false,
|
2113 |
content: modalContent,
|
2114 |
+
icon: 'fa fa-info-circle',
|
2115 |
+
type: 'blue',
|
2116 |
+
buttons: {
|
2117 |
+
confirm: {
|
2118 |
+
text: wpforms_builder.ok,
|
2119 |
+
btnClass: 'btn-confirm',
|
2120 |
+
keys: ['enter'],
|
2121 |
+
action: function() {
|
2122 |
+
var input = this.$content.find('input#notification-name'),
|
2123 |
+
error = this.$content.find('.error');
|
2124 |
+
if (input.val() == '') {
|
2125 |
+
error.show();
|
2126 |
+
return false;
|
2127 |
+
} else {
|
2128 |
+
var $firstNotification = $('.wpforms-notification').first(),
|
2129 |
+
$newNotification = $firstNotification.clone(),
|
2130 |
+
newNotification = '';
|
2131 |
+
|
2132 |
+
$newNotification.find('.wpforms-notification-header span').text(input.val());
|
2133 |
+
$newNotification.find('input, textarea, select').each(function(index, el) {
|
2134 |
+
if ($(this).attr('name')) {
|
2135 |
+
$(this).val('').attr('name', $(this).attr('name').replace(/\[(\d+)\]/, '['+nextID+']'));
|
2136 |
+
if ($(this).is('select')) {
|
2137 |
+
$(this).find('option').prop('selected',false).attr('selected',false);
|
2138 |
+
$(this).find('option:first').prop('selected',true).attr('selected','selected');
|
2139 |
+
} else if ( $(this).attr('type') === 'checkbox') {
|
2140 |
+
$(this).prop('checked', false).attr('checked', false).val('1');
|
2141 |
+
} else {
|
2142 |
+
$(this).val('').attr('value','');
|
2143 |
+
}
|
2144 |
+
}
|
2145 |
+
});
|
2146 |
+
$newNotification.find('.wpforms-notification-header input').val(input.val()).attr('value',input.val());
|
2147 |
+
$newNotification.find('.email-msg textarea').val('{all_fields}').attr('value','{all_fields}');;
|
2148 |
+
$newNotification.find('.email-recipient input').val('{admin_email}').attr('value','{admin_email}');
|
2149 |
+
// Conditional logic, if present
|
2150 |
+
var $conditionalLogic = $newNotification.find('.wpforms-conditional-block');
|
2151 |
+
if ($conditionalLogic.length) {
|
2152 |
+
$conditionalLogic.find('.wpforms-conditional-group').not(':first').remove();
|
2153 |
+
$conditionalLogic.find('.wpforms-conditional-row').not(':first').remove();
|
2154 |
+
$conditionalLogic.find('.wpforms-conditional-row').attr('data-input-name', 'settings[notifications]['+nextID+']');
|
2155 |
+
$conditionalLogic.find('.wpforms-conditional-field').attr('data-groupid', '0').attr('data-ruleid', '0');
|
2156 |
+
$conditionalLogic.find('.wpforms-conditional-row').find('.value').empty().append('<select>');
|
2157 |
+
$conditionalLogic.find('.wpforms-conditional-groups').hide();
|
2158 |
}
|
2159 |
+
newNotification = $newNotification.wrap('<div>').parent().html();
|
2160 |
+
newNotification = newNotification.replace( /wpforms-panel-field-notifications-(\d+)/g, 'wpforms-panel-field-notification-'+nextID );
|
2161 |
+
newNotification = newNotification.replace( /\[conditionals\]\[(\d+)\]\[(\d+)\]/g, '[conditionals][0][0]' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2162 |
|
2163 |
+
$firstNotification.before( newNotification );
|
2164 |
|
2165 |
+
$('.wpforms-notifications-add').attr('data-next-id', nextID+1);
|
2166 |
+
}
|
2167 |
+
}
|
2168 |
+
},
|
2169 |
+
cancel: {
|
2170 |
+
text: wpforms_builder.cancel
|
2171 |
}
|
2172 |
}
|
2173 |
});
|
2185 |
$.confirm({
|
2186 |
title: false,
|
2187 |
content: wpforms_builder.notification_delete,
|
2188 |
+
icon: 'fa fa-exclamation-circle',
|
2189 |
+
type: 'orange',
|
2190 |
+
buttons: {
|
2191 |
+
confirm: {
|
2192 |
+
text: wpforms_builder.ok,
|
2193 |
+
btnClass: 'btn-confirm',
|
2194 |
+
keys: ['enter'],
|
2195 |
+
action: function () {
|
2196 |
+
var notifications = $('.wpforms-notification');
|
2197 |
+
if ( notifications.length <= 1 ) {
|
2198 |
+
$.alert({
|
2199 |
+
title: false,
|
2200 |
+
content: wpforms_builder.notification_error2,
|
2201 |
+
icon: 'fa fa-exclamation-circle',
|
2202 |
+
type: 'orange',
|
2203 |
+
buttons: {
|
2204 |
+
cancel: {
|
2205 |
+
text: wpforms_builder.ok,
|
2206 |
+
btnClass: 'btn-confirm',
|
2207 |
+
keys: ['enter']
|
2208 |
+
}
|
2209 |
+
}
|
2210 |
+
});
|
2211 |
+
} else {
|
2212 |
+
$this.closest('.wpforms-notification').remove();
|
2213 |
+
}
|
2214 |
+
}
|
2215 |
+
},
|
2216 |
+
cancel: {
|
2217 |
+
text: wpforms_builder.cancel
|
2218 |
}
|
2219 |
}
|
2220 |
});
|
2242 |
columnClass: 'modal-wide',
|
2243 |
title: false,
|
2244 |
content: content,
|
2245 |
+
boxWidth: '600px',
|
2246 |
+
buttons: {
|
2247 |
+
confirm: {
|
2248 |
+
text: wpforms_builder.close,
|
2249 |
+
btnClass: 'btn-confirm',
|
2250 |
+
keys: ['enter']
|
2251 |
+
}
|
2252 |
+
}
|
2253 |
});
|
2254 |
});
|
2255 |
|
2295 |
if (res.success) {
|
2296 |
$label.text(text);
|
2297 |
$icon.toggleClass('fa-check fa-cog fa-spin');
|
2298 |
+
wpf.savedState = wpf.getFormState( '#wpforms-builder-form');
|
2299 |
$(document).trigger('wpformsSaved');
|
2300 |
if (true === redirect ) {
|
2301 |
window.location.href = wpforms_builder.exit_url;
|
2321 |
$.confirm({
|
2322 |
title: false,
|
2323 |
content: wpforms_builder.exit_confirm,
|
2324 |
+
icon: 'fa fa-exclamation-circle',
|
2325 |
+
type: 'orange',
|
2326 |
backgroundDismiss: false,
|
2327 |
closeIcon: false,
|
2328 |
+
buttons: {
|
2329 |
+
confirm: {
|
2330 |
+
text: wpforms_builder.save_exit,
|
2331 |
+
btnClass: 'btn-confirm',
|
2332 |
+
keys: ['enter'],
|
2333 |
+
action: function(){
|
2334 |
+
WPFormsBuilder.formSave(true);
|
2335 |
+
}
|
2336 |
+
},
|
2337 |
+
cancel: {
|
2338 |
+
text: wpforms_builder.exit,
|
2339 |
+
action: function(){
|
2340 |
+
window.location.href = wpforms_builder.exit_url;
|
2341 |
+
}
|
2342 |
+
}
|
2343 |
}
|
2344 |
});
|
2345 |
}
|
2352 |
*/
|
2353 |
formIsSaved: function() {
|
2354 |
|
2355 |
+
if ( wpf.savedState == wpf.getFormState( '#wpforms-builder-form' ) ) {
|
|
|
|
|
2356 |
return true;
|
2357 |
} else {
|
2358 |
return false;
|
2421 |
formatted = wpf.amountFormat(sanitized);
|
2422 |
$this.val(formatted);
|
2423 |
});
|
2424 |
+
|
2425 |
+
// Don't allow users to enable payments if storing entries has
|
2426 |
+
// been disabled in the General settings.
|
2427 |
+
$(document).on('change', '#wpforms-panel-field-stripe-enable, #wpforms-panel-field-paypal_standard-enable', function(event) {
|
2428 |
+
var $this = $(this);
|
2429 |
+
if ( $this.prop('checked') ) {
|
2430 |
+
var disabled = $('#wpforms-panel-field-settings-disable_entries').prop('checked');
|
2431 |
+
if ( disabled ) {
|
2432 |
+
$.confirm({
|
2433 |
+
title: wpforms_builder.heads_up,
|
2434 |
+
content: wpforms_builder.payments_entries_off,
|
2435 |
+
backgroundDismiss: false,
|
2436 |
+
closeIcon: false,
|
2437 |
+
icon: 'fa fa-exclamation-circle',
|
2438 |
+
type: 'orange',
|
2439 |
+
buttons: {
|
2440 |
+
confirm: {
|
2441 |
+
text: wpforms_builder.ok,
|
2442 |
+
btnClass: 'btn-confirm',
|
2443 |
+
}
|
2444 |
+
}
|
2445 |
+
});
|
2446 |
+
$this.prop('checked',false);
|
2447 |
+
}
|
2448 |
+
}
|
2449 |
+
});
|
2450 |
+
|
2451 |
},
|
2452 |
|
2453 |
/**
|
2474 |
var allowed = $this.data('fields'),
|
2475 |
type = $this.data('type');
|
2476 |
if ( allowed && allowed.length ) {
|
2477 |
+
var fields = wpf.getFields(allowed.split(','),true);
|
2478 |
} else {
|
2479 |
+
var fields = wpf.getFields(false, true);
|
2480 |
}
|
2481 |
|
2482 |
// Create smart tags list
|
assets/js/admin-utils.js
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
;
|
2 |
var wpf = {
|
3 |
|
|
|
|
|
|
|
4 |
// This file contains a collection of utility functions.
|
5 |
|
6 |
/**
|
@@ -21,6 +24,9 @@ var wpf = {
|
|
21 |
* @since 1.0.1
|
22 |
*/
|
23 |
ready: function() {
|
|
|
|
|
|
|
24 |
},
|
25 |
|
26 |
/**
|
@@ -49,8 +55,10 @@ var wpf = {
|
|
49 |
fieldUpdate: function() {
|
50 |
|
51 |
var fields = wpf.getFields();
|
|
|
52 |
jQuery(document).trigger('wpformsFieldUpdate', [fields] );
|
53 |
-
|
|
|
54 |
},
|
55 |
|
56 |
/**
|
@@ -58,56 +66,80 @@ var wpf = {
|
|
58 |
*
|
59 |
* @since 1.0.1
|
60 |
* @param array allowedFields
|
|
|
61 |
* @return object
|
62 |
*/
|
63 |
-
getFields: function(allowedFields) {
|
64 |
|
65 |
-
|
66 |
-
fields = formData.fields,
|
67 |
-
fieldOrder = [],
|
68 |
-
fieldsOrdered = new Array(),
|
69 |
-
fieldBlacklist = ['html','divider','pagebreak'];
|
70 |
|
71 |
-
if (!
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
if (jQuery.inArray(fields[index].type,
|
89 |
delete fields[index];
|
90 |
wpf.removeArrayItem(fieldOrder, index);
|
91 |
}
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
if (fields[key].choices) {
|
99 |
-
jQuery('#wpforms-field-option-row-'+fields[key].id+'-choices .choices-list li').each(function(index, ele) {
|
100 |
-
var choiceKey = jQuery(ele).data('key');
|
101 |
-
fields[key].choices['choice_'+choiceKey] = fields[key].choices[choiceKey];
|
102 |
-
fields[key].choices['choice_'+choiceKey].key = choiceKey;
|
103 |
-
delete fields[key].choices[choiceKey];
|
104 |
-
});
|
105 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
-
//
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
return fieldsOrdered;
|
@@ -148,6 +180,21 @@ var wpf = {
|
|
148 |
// @todo
|
149 |
},
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
// hasField @todo
|
152 |
|
153 |
/**
|
@@ -351,6 +398,34 @@ var wpf = {
|
|
351 |
}
|
352 |
|
353 |
return false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
}
|
355 |
}
|
356 |
wpf.init();
|
1 |
;
|
2 |
var wpf = {
|
3 |
|
4 |
+
cachedFields: {},
|
5 |
+
savedState: false,
|
6 |
+
|
7 |
// This file contains a collection of utility functions.
|
8 |
|
9 |
/**
|
24 |
* @since 1.0.1
|
25 |
*/
|
26 |
ready: function() {
|
27 |
+
|
28 |
+
// Load initial form saved state.
|
29 |
+
wpf.savedState = wpf.getFormState( '#wpforms-builder-form' );
|
30 |
},
|
31 |
|
32 |
/**
|
55 |
fieldUpdate: function() {
|
56 |
|
57 |
var fields = wpf.getFields();
|
58 |
+
|
59 |
jQuery(document).trigger('wpformsFieldUpdate', [fields] );
|
60 |
+
|
61 |
+
wpf.debug('fieldUpdate triggered');
|
62 |
},
|
63 |
|
64 |
/**
|
66 |
*
|
67 |
* @since 1.0.1
|
68 |
* @param array allowedFields
|
69 |
+
* @param bool useCache
|
70 |
* @return object
|
71 |
*/
|
72 |
+
getFields: function(allowedFields, useCache ) {
|
73 |
|
74 |
+
useCache = useCache || false;
|
|
|
|
|
|
|
|
|
75 |
|
76 |
+
if ( useCache && ! jQuery.isEmptyObject(wpf.cachedFields) ) {
|
77 |
+
|
78 |
+
// Use cache if told and cache is primed.
|
79 |
+
var fieldsOrdered = jQuery.extend({}, wpf.cachedFields);
|
80 |
+
|
81 |
+
wpf.debug('getFields triggered (cached)');
|
82 |
+
|
83 |
+
} else {
|
84 |
+
|
85 |
+
// Normal processing, get fields from builder and prime cache.
|
86 |
+
var formData = jQuery('#wpforms-builder-form').serializeObject(),
|
87 |
+
fields = formData.fields,
|
88 |
+
fieldOrder = [],
|
89 |
+
fieldsOrdered = new Array(),
|
90 |
+
fieldBlacklist = ['html','divider','pagebreak'];
|
91 |
|
92 |
+
if (!fields) {
|
93 |
+
return false;
|
94 |
+
}
|
95 |
+
|
96 |
+
// Find and store the order of forms. The order is lost when javascript
|
97 |
+
// serilizes the form.
|
98 |
+
jQuery('.wpforms-field-option').each(function(index, ele) {
|
99 |
+
fieldOrder.push(jQuery(ele).data('field-id'));
|
100 |
+
});
|
101 |
+
|
102 |
+
// Remove fields that are not supported and check for white list
|
103 |
+
jQuery.each(fields, function(index, ele) {
|
104 |
+
if (ele) {
|
105 |
+
if (jQuery.inArray(fields[index].type, fieldBlacklist) == '1' ){
|
106 |
delete fields[index];
|
107 |
wpf.removeArrayItem(fieldOrder, index);
|
108 |
}
|
109 |
}
|
110 |
+
});
|
111 |
+
|
112 |
+
// Preserve the order of field choices
|
113 |
+
for(var key in fields) {
|
114 |
+
if (fields[key].choices) {
|
115 |
+
jQuery('#wpforms-field-option-row-'+fields[key].id+'-choices .choices-list li').each(function(index, ele) {
|
116 |
+
var choiceKey = jQuery(ele).data('key');
|
117 |
+
fields[key].choices['choice_'+choiceKey] = fields[key].choices[choiceKey];
|
118 |
+
fields[key].choices['choice_'+choiceKey].key = choiceKey;
|
119 |
+
delete fields[key].choices[choiceKey];
|
120 |
+
});
|
121 |
+
}
|
122 |
}
|
123 |
+
|
124 |
+
// Preserve the order of fields
|
125 |
+
for(var key in fieldOrder) {
|
126 |
+
fieldsOrdered['field_'+fieldOrder[key]] = fields[fieldOrder[key]];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
+
|
129 |
+
// Cache the all the fields now that they have been ordered and initially
|
130 |
+
// processed.
|
131 |
+
wpf.cachedFields = fieldsOrdered;
|
132 |
+
|
133 |
+
wpf.debug('getFields triggered');
|
134 |
}
|
135 |
|
136 |
+
// If we should only return specfic field types, remove the others.
|
137 |
+
if ( allowedFields && allowedFields.constructor === Array ) {
|
138 |
+
for(key in fieldsOrdered) {
|
139 |
+
if ( jQuery.inArray(fieldsOrdered[key].type, allowedFields) === -1 ){
|
140 |
+
delete fieldsOrdered[key];
|
141 |
+
}
|
142 |
+
}
|
143 |
}
|
144 |
|
145 |
return fieldsOrdered;
|
180 |
// @todo
|
181 |
},
|
182 |
|
183 |
+
/**
|
184 |
+
* Get form state.
|
185 |
+
*
|
186 |
+
* @since 1.3.8
|
187 |
+
* @param object el
|
188 |
+
*/
|
189 |
+
getFormState: function( el ) {
|
190 |
+
|
191 |
+
//return JSON.stringify( jQuery( el ).serializeArray() );
|
192 |
+
|
193 |
+
// Serialize tested the most performant string we can use for
|
194 |
+
// comparisons.
|
195 |
+
return jQuery( el ).serialize();
|
196 |
+
},
|
197 |
+
|
198 |
// hasField @todo
|
199 |
|
200 |
/**
|
398 |
}
|
399 |
|
400 |
return false
|
401 |
+
},
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Debug output helper.
|
405 |
+
*
|
406 |
+
* @since 1.3.8
|
407 |
+
* @param mixed msg
|
408 |
+
*/
|
409 |
+
debug: function( msg ) {
|
410 |
+
|
411 |
+
if ( wpf.isDebug() ) {
|
412 |
+
if ( typeof msg === 'object' || msg.constructor === Array ) {
|
413 |
+
console.log( 'WPForms Debug:' );
|
414 |
+
console.log( msg )
|
415 |
+
} else {
|
416 |
+
console.log( 'WPForms Debug: '+msg );
|
417 |
+
}
|
418 |
+
}
|
419 |
+
},
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Is debug mode.
|
423 |
+
*
|
424 |
+
* @since 1.3.8
|
425 |
+
*/
|
426 |
+
isDebug: function() {
|
427 |
+
|
428 |
+
return ( ( window.location.hash && '#wpformsdebug' === window.location.hash ) || wpforms_builder.debug );
|
429 |
}
|
430 |
}
|
431 |
wpf.init();
|
assets/js/jquery.jquery-confirm.min.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
/*!
|
2 |
-
* jquery-confirm
|
3 |
* Author: Boniface Pereira
|
4 |
* Website: www.craftpip.com
|
5 |
* Contact: hey@craftpip.com
|
6 |
*
|
7 |
-
* Copyright 2013-
|
8 |
* Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE)
|
9 |
*/
|
10 |
-
if(typeof jQuery==="undefined"){throw new Error("jquery-confirm requires jQuery")}var jconfirm,Jconfirm;(function(b){b.fn.confirm=function(c){if(typeof c==="undefined"){c={}}var d=b(this);d.on("click",function(f){f.preventDefault();if(d.attr("href")){c.confirm=function(){location.href=d.attr("href")}}b.confirm(c)});return d};b.confirm=function(c){return jconfirm(c)};b.alert=function(c){c.cancelButton=false;return jconfirm(c)};b.dialog=function(c){c.cancelButton=false;c.confirmButton=false;c.confirmKeys=[13];return jconfirm(c)};jconfirm=function(c){if(typeof c==="undefined"){c={}}if(jconfirm.defaults){b.extend(jconfirm.pluginDefaults,jconfirm.defaults)}var c=b.extend({},jconfirm.pluginDefaults,c);return new Jconfirm(c)};Jconfirm=function(c){b.extend(this,c);this._init()};Jconfirm.prototype={_init:function(){var c=this;this._rand=Math.round(Math.random()*99999);this._buildHTML();this._bindEvents();setTimeout(function(){c.open()},0)},animations:["anim-scale","anim-top","anim-bottom","anim-left","anim-right","anim-zoom","anim-opacity","anim-none","anim-rotate","anim-rotatex","anim-rotatey","anim-scalex","anim-scaley"],_buildHTML:function(){this.animation="anim-"+this.animation.toLowerCase();this.closeAnimation="anim-"+this.closeAnimation.toLowerCase();this.$el=b(this.template).appendTo(this.container).addClass(this.theme);this.$el.find(".jconfirm-box-container").addClass(this.columnClass);this.CSS={"-webkit-transition-duration":this.animationSpeed/1000+"s","transition-duration":this.animationSpeed/1000+"s","-webkit-transition-timing-function":"cubic-bezier(.38,1.28,.2, "+this.animationBounce+")","transition-timing-function":"cubic-bezier(.38,1.28,.2, "+this.animationBounce+")"};this.$el.find(".jconfirm-bg").css(this.CSS);this.$b=this.$el.find(".jconfirm-box").css(this.CSS).addClass(this.animation);this.$body=this.$b;if(this.rtl){this.$el.addClass("rtl")}this.$title=this.$el.find("div.title");this.setTitle();this.contentDiv=this.$el.find("div.content");this.$content=this.contentDiv;this.$btnc=this.$el.find(".buttons");if(this.confirmButton&&this.confirmButton.trim()!==""){this.$confirmButton=b('<button class="btn">'+this.confirmButton+"</button>").appendTo(this.$btnc).addClass(this.confirmButtonClass)}if(this.cancelButton&&this.cancelButton.trim()!==""){this.$cancelButton=b('<button class="btn">'+this.cancelButton+"</button>").appendTo(this.$btnc).addClass(this.cancelButtonClass)}if(!this.confirmButton&&!this.cancelButton){this.$btnc.remove()}if(!this.confirmButton&&!this.cancelButton&&this.closeIcon===null){this.$closeButton=this.$b.find(".closeIcon").show()}if(this.closeIcon===true){this.$closeButton=this.$b.find(".closeIcon").show()}this.setContent();if(this.autoClose){this._startCountDown()}},setTitle:function(c){this.title=(typeof c!=="undefined")?c:this.title;if(this.title&&this.$title){this.$title.html('<i class="'+this.icon+'"></i> '+this.title)}else{this.$title.remove()}},setContent:function(e){var f=this;this.content=(e)?e:this.content;var c=(e)?true:false;if(typeof this.content==="boolean"){if(!this.content){this.contentDiv.remove()}else{console.error("Invalid option for property content: passed TRUE")}}else{if(typeof this.content==="string"){if(this.content.substr(0,4).toLowerCase()==="url:"){this.contentDiv.html("");this.$btnc.find("button").prop("disabled",true);var d=this.content.substring(4,this.content.length);b.get(d).done(function(h){f.contentDiv.html(h)}).always(function(i,h,j){if(typeof f.contentLoaded==="function"){f.contentLoaded(i,h,j)}f.$btnc.find("button").prop("disabled",false);f.setDialogCenter()})}else{this.contentDiv.html(this.content)}}else{if(typeof this.content==="function"){this.contentDiv.html("");this.$btnc.find("button").attr("disabled","disabled");var g=this.content(this);if(typeof g!=="object"){console.error("The content function must return jquery promise.")}else{if(typeof g.always!=="function"){console.error("The object returned is not a jquery promise.")}else{g.always(function(i,h){f.$btnc.find("button").removeAttr("disabled");f.setDialogCenter()})}}}else{console.error("Invalid option for property content, passed: "+typeof this.content)}}}this.setDialogCenter(c)},_startCountDown:function(){var c=this.autoClose.split("|");if(/cancel/.test(c[0])&&this.type==="alert"){return false}else{if(/confirm|cancel/.test(c[0])){this.$cd=b('<span class="countdown">').appendTo(this["$"+c[0]+"Button"]);var d=this;d.$cd.parent().click();var e=c[1]/1000;this.interval=setInterval(function(){d.$cd.html(" ["+(e-=1)+"]");if(e===0){d.$cd.parent().trigger("click");clearInterval(d.interval)}},1000)}else{console.error("Invalid option "+c[0]+", must be confirm/cancel")}}},_bindEvents:function(){var d=this;var c=false;this.$el.find(".jconfirm-scrollpane").click(function(f){if(!c){if(d.backgroundDismiss){d.cancel();d.close()}else{d.$b.addClass("hilight");setTimeout(function(){d.$b.removeClass("hilight")},400)}}c=false});this.$el.find(".jconfirm-box").click(function(f){c=true});if(this.$confirmButton){this.$confirmButton.click(function(g){g.preventDefault();var f=d.confirm(d.$b);d.onAction("confirm");if(typeof f==="undefined"||f){d.close()}})}if(this.$cancelButton){this.$cancelButton.click(function(g){g.preventDefault();var f=d.cancel(d.$b);d.onAction("cancel");if(typeof f==="undefined"||f){d.close()}})}if(this.$closeButton){this.$closeButton.click(function(f){f.preventDefault();d.cancel();d.onAction("close");d.close()})}if(this.keyboardEnabled){setTimeout(function(){b(window).on("keyup."+this._rand,function(f){d.reactOnKey(f)})},500)}b(window).on("resize."+this._rand,function(){d.setDialogCenter(true)})},reactOnKey:function a(f){var c=b(".jconfirm");if(c.eq(c.length-1)[0]!==this.$el[0]){return false}var d=f.which;if(this.contentDiv.find(":input").is(":focus")&&/13|32/.test(d)){return false}if(b.inArray(d,this.cancelKeys)!==-1){if(!this.backgroundDismiss){this.$el.find(".jconfirm-bg").click();return false}if(this.$cancelButton){this.$cancelButton.click()}else{this.close()}}if(b.inArray(d,this.confirmKeys)!==-1){if(this.$confirmButton){this.$confirmButton.click()}}},setDialogCenter:function(d){var h=b(window).height();var g=this.$b.outerHeight();var c=(h-g)/2;var f=100;if(g>(h-f)){var e={"margin-top":f/2,"margin-bottom":f/2}}else{var e={"margin-top":c}}if(d){this.$b.animate(e,{duration:this.animationSpeed,queue:false})}else{this.$b.css(e)}},close:function(){var c=this;if(this.isClosed()){return false}if(typeof this.onClose==="function"){this.onClose()}b(window).unbind("resize."+this._rand);if(this.keyboardEnabled){b(window).unbind("keyup."+this._rand)}c.$el.find(".jconfirm-bg").removeClass("seen");this.$b.addClass(this.closeAnimation);var d=(this.closeAnimation=="anim-none")?0:this.animationSpeed;setTimeout(function(){c.$el.remove()},d+50);jconfirm.record.closed+=1;jconfirm.record.currentlyOpen-=1;if(jconfirm.record.currentlyOpen<1){b("body").removeClass("jconfirm-noscroll")}return true},open:function(){var d=this;if(this.isClosed()){return false}d.$el.find(".jconfirm-bg").addClass("seen");b("body").addClass("jconfirm-noscroll");this.$b.removeClass(this.animations.join(" "));this.$b.find("input[autofocus]:visible:first").focus();jconfirm.record.opened+=1;jconfirm.record.currentlyOpen+=1;if(typeof this.onOpen==="function"){this.onOpen()}var c="jconfirm-box"+this._rand;this.$b.attr("aria-labelledby",c).attr("tabindex",-1).focus();if(this.$title){this.$title.attr("id",c)}else{if(this.$content){this.$content.attr("id",c)}}return true},isClosed:function(){return this.$el.css("display")===""}};jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg"></div><div class="jconfirm-scrollpane"><div class="container"><div class="row"><div class="jconfirm-box-container span6 offset3"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="closeIcon"><span class="glyphicon glyphicon-remove"></span></div><div class="title"></div><div class="content"></div><div class="buttons"></div><div class="jquery-clear"></div></div></div></div></div></div></div>',title:"Hello",content:"Are you sure to continue?",contentLoaded:function(){},icon:"",confirmButton:"Okay",cancelButton:"Cancel",confirmButtonClass:"btn-default",cancelButtonClass:"btn-default",theme:"white",animation:"zoom",closeAnimation:"scale",animationSpeed:500,animationBounce:1.2,keyboardEnabled:false,rtl:false,confirmKeys:[13,32],cancelKeys:[27],container:"body",confirm:function(){},cancel:function(){},backgroundDismiss:true,autoClose:false,closeIcon:null,columnClass:"col-md-4 col-md-offset-4",onOpen:function(){},onClose:function(){},onAction:function(){}};jconfirm.record={opened:0,closed:0,currentlyOpen:0}})(jQuery);
|
1 |
/*!
|
2 |
+
* jquery-confirm v3.2.3 (http://craftpip.github.io/jquery-confirm/)
|
3 |
* Author: Boniface Pereira
|
4 |
* Website: www.craftpip.com
|
5 |
* Contact: hey@craftpip.com
|
6 |
*
|
7 |
+
* Copyright 2013-2017 jquery-confirm
|
8 |
* Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE)
|
9 |
*/
|
10 |
+
if(typeof jQuery==="undefined"){throw new Error("jquery-confirm requires jQuery");}var jconfirm,Jconfirm;(function($,window){$.fn.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}$(this).each(function(){var $this=$(this);$this.on("click",function(e){e.preventDefault();var jcOption=$.extend({},options);if($this.attr("data-title")){jcOption.title=$this.attr("data-title");}if($this.attr("data-content")){jcOption.content=$this.attr("data-content");}if(typeof jcOption.buttons=="undefined"){jcOption.buttons={};}jcOption["$target"]=$this;if($this.attr("href")&&Object.keys(jcOption.buttons).length==0){var buttons=$.extend(true,{},jconfirm.pluginDefaults.defaultButtons,(jconfirm.defaults||{}).defaultButtons||{});var firstBtn=Object.keys(buttons)[0];jcOption.buttons=buttons;jcOption.buttons[firstBtn].action=function(){location.href=$this.attr("href");};}jcOption.closeIcon=false;$.confirm(jcOption);});});return $(this);};$.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}if(typeof options.buttons!="object"){options.buttons={};}if(Object.keys(options.buttons).length==0){var buttons=$.extend(true,{},jconfirm.pluginDefaults.defaultButtons,(jconfirm.defaults||{}).defaultButtons||{});options.buttons=buttons;}return jconfirm(options);};$.alert=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}if(typeof options.buttons!="object"){options.buttons={};}if(Object.keys(options.buttons).length==0){var buttons=$.extend(true,{},jconfirm.pluginDefaults.defaultButtons,(jconfirm.defaults||{}).defaultButtons||{});var firstBtn=Object.keys(buttons)[0];options.buttons[firstBtn]=buttons[firstBtn];}return jconfirm(options);};$.dialog=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false,closeIcon:function(){}};}options.buttons={};if(typeof options.closeIcon=="undefined"){options.closeIcon=function(){};}options.confirmKeys=[13];return jconfirm(options);};jconfirm=function(options){if(typeof options==="undefined"){options={};}var pluginOptions=$.extend(true,{},jconfirm.pluginDefaults);if(jconfirm.defaults){pluginOptions=$.extend(true,pluginOptions,jconfirm.defaults);}pluginOptions=$.extend(true,{},pluginOptions,options);var instance=new Jconfirm(pluginOptions);jconfirm.instances.push(instance);return instance;};Jconfirm=function(options){$.extend(this,options);this._init();};Jconfirm.prototype={_init:function(){var that=this;if(!jconfirm.instances.length){jconfirm.lastFocused=$("body").find(":focus");}this._id=Math.round(Math.random()*99999);if(!this.lazyOpen){setTimeout(function(){that.open();},0);}},_buildHTML:function(){var that=this;this._parseAnimation(this.animation,"o");this._parseAnimation(this.closeAnimation,"c");this._parseBgDismissAnimation(this.backgroundDismissAnimation);this._parseColumnClass(this.columnClass);this._parseTheme(this.theme);this._parseType(this.type);var template=$(this.template);template.find(".jconfirm-box").addClass(this.animationParsed).addClass(this.backgroundDismissAnimationParsed).addClass(this.typeParsed);if(this.typeAnimated){template.find(".jconfirm-box").addClass("jconfirm-type-animated");}if(this.useBootstrap){template.find(".jc-bs3-row").addClass(this.bootstrapClasses.row);template.find(".jc-bs3-row").addClass("justify-content-md-center justify-content-sm-center justify-content-xs-center justify-content-lg-center");template.find(".jconfirm-box-container").addClass(this.columnClassParsed);if(this.containerFluid){template.find(".jc-bs3-container").addClass(this.bootstrapClasses.containerFluid);}else{template.find(".jc-bs3-container").addClass(this.bootstrapClasses.container);}}else{template.find(".jconfirm-box").css("width",this.boxWidth);}if(this.titleClass){template.find(".jconfirm-title-c").addClass(this.titleClass);}template.addClass(this.themeParsed);var ariaLabel="jconfirm-box"+this._id;template.find(".jconfirm-box").attr("aria-labelledby",ariaLabel).attr("tabindex",-1);template.find(".jconfirm-content").attr("id",ariaLabel);if(this.bgOpacity!=null){template.find(".jconfirm-bg").css("opacity",this.bgOpacity);}if(this.rtl){template.addClass("jconfirm-rtl");}this.$el=template.appendTo(this.container);this.$jconfirmBoxContainer=this.$el.find(".jconfirm-box-container");this.$jconfirmBox=this.$body=this.$el.find(".jconfirm-box");this.$jconfirmBg=this.$el.find(".jconfirm-bg");this.$title=this.$el.find(".jconfirm-title");this.$titleContainer=this.$el.find(".jconfirm-title-c");this.$content=this.$el.find("div.jconfirm-content");this.$contentPane=this.$el.find(".jconfirm-content-pane");this.$icon=this.$el.find(".jconfirm-icon-c");this.$closeIcon=this.$el.find(".jconfirm-closeIcon");this.$btnc=this.$el.find(".jconfirm-buttons");this.$scrollPane=this.$el.find(".jconfirm-scrollpane");this._contentReady=$.Deferred();this._modalReady=$.Deferred();this.setTitle();this.setIcon();this._setButtons();this._parseContent();this.initDraggable();if(this.isAjax){this.showLoading(false);}$.when(this._contentReady,this._modalReady).then(function(){if(that.isAjaxLoading){setTimeout(function(){that.isAjaxLoading=false;that.setContent();that.setTitle();that.setIcon();setTimeout(function(){that.hideLoading(false);},100);if(typeof that.onContentReady=="function"){that.onContentReady();}},50);}else{that.setContent();that.setTitle();that.setIcon();if(typeof that.onContentReady=="function"){that.onContentReady();}}if(that.autoClose){that._startCountDown();}});that._contentHash=this._hash(that.$content.html());that._contentHeight=this.$content.height();this._watchContent();this.setDialogCenter();if(this.animation=="none"){this.animationSpeed=1;this.animationBounce=1;}this.$body.css(this._getCSS(this.animationSpeed,this.animationBounce));this.$contentPane.css(this._getCSS(this.animationSpeed,1));this.$jconfirmBg.css(this._getCSS(this.animationSpeed,1));},_typePrefix:"jconfirm-type-",typeParsed:"",_parseType:function(type){this.typeParsed=this._typePrefix+type;},setType:function(type){var oldClass=this.typeParsed;this._parseType(type);this.$jconfirmBox.removeClass(oldClass).addClass(this.typeParsed);},themeParsed:"",_themePrefix:"jconfirm-",setTheme:function(theme){var previous=this.theme;this.theme=theme||this.theme;this._parseTheme(this.theme);if(previous){this.$el.removeClass(previous);}this.$el.addClass(this.themeParsed);this.theme=theme;},_parseTheme:function(theme){var that=this;theme=theme.split(",");$.each(theme,function(k,a){if(a.indexOf(that._themePrefix)==-1){theme[k]=that._themePrefix+$.trim(a);}});this.themeParsed=theme.join(" ").toLowerCase();},backgroundDismissAnimationParsed:"",_bgDismissPrefix:"jconfirm-hilight-",_parseBgDismissAnimation:function(bgDismissAnimation){var animation=bgDismissAnimation.split(",");var that=this;$.each(animation,function(k,a){if(a.indexOf(that._bgDismissPrefix)==-1){animation[k]=that._bgDismissPrefix+$.trim(a);}});this.backgroundDismissAnimationParsed=animation.join(" ").toLowerCase();},animationParsed:"",closeAnimationParsed:"",_animationPrefix:"jconfirm-animation-",setAnimation:function(animation){this.animation=animation||this.animation;this._parseAnimation(this.animation,"o");},_parseAnimation:function(animation,which){which=which||"o";var animations=animation.split(",");var that=this;$.each(animations,function(k,a){if(a.indexOf(that._animationPrefix)==-1){animations[k]=that._animationPrefix+$.trim(a);}});var a_string=animations.join(" ").toLowerCase();if(which=="o"){this.animationParsed=a_string;}else{this.closeAnimationParsed=a_string;}return a_string;},setCloseAnimation:function(closeAnimation){this.closeAnimation=closeAnimation||this.closeAnimation;this._parseAnimation(this.closeAnimation,"c");},setAnimationSpeed:function(speed){this.animationSpeed=speed||this.animationSpeed;},columnClassParsed:"",setColumnClass:function(colClass){if(!this.useBootstrap){console.warn("cannot set columnClass, useBootstrap is set to false");return;}this.columnClass=colClass||this.columnClass;this._parseColumnClass(this.columnClass);this.$jconfirmBoxContainer.addClass(this.columnClassParsed);},setBoxWidth:function(){if(this.useBootstrap){console.warn("cannot set boxWidth, useBootstrap is set to true");return;}this.$jconfirmBox.css("width",this.boxWidth);},_parseColumnClass:function(colClass){colClass=colClass.toLowerCase();var p;switch(colClass){case"xl":case"xlarge":p="col-md-12";break;case"l":case"large":p="col-md-8 col-md-offset-2";break;case"m":case"medium":p="col-md-6 col-md-offset-3";break;case"s":case"small":p="col-md-4 col-md-offset-4";break;case"xs":case"xsmall":p="col-md-2 col-md-offset-5";break;default:p=colClass;}this.columnClassParsed=p;},initDraggable:function(){var that=this;var $t=this.$titleContainer;this.resetDrag();if(this.draggable){$t.addClass("jconfirm-hand");$t.on("mousedown",function(e){that.mouseX=e.clientX;that.mouseY=e.clientY;that.isDrag=true;});$(window).on("mousemove."+this._id,function(e){if(that.isDrag){that.movingX=e.clientX-that.mouseX+that.initialX;that.movingY=e.clientY-that.mouseY+that.initialY;that.setDrag();}});$(window).on("mouseup."+this._id,function(){if(that.isDrag){that.isDrag=false;that.initialX=that.movingX;that.initialY=that.movingY;}});}},resetDrag:function(){this.isDrag=false;this.initialX=0;this.initialY=0;this.movingX=0;this.movingY=0;this.movingXCurrent=0;this.movingYCurrent=0;this.mouseX=0;this.mouseY=0;this.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");},setDrag:function(){if(!this.draggable){return;}this.alignMiddle=false;this._boxWidth=this.$jconfirmBox.outerWidth();var ww=$(window).width();var that=this;if(that.movingX%2==0||that.movingY%2==0){var tb=that._boxTopMargin-that.dragWindowGap;if(tb+that.movingY<0){that.movingY=-tb;}else{that.movingYCurrent=that.movingY;}var lb=(ww/2)-that._boxWidth/2;var rb=(ww/2)+(that._boxWidth/2)-that._boxWidth;rb-=that.dragWindowGap;lb-=that.dragWindowGap;if(lb+that.movingX<0){that.movingX=-lb;}else{if(rb-that.movingX<0){that.movingX=rb;}else{that.movingXCurrent=that.movingX;}}that.$jconfirmBoxContainer.css("transform","translate("+that.movingX+"px, "+that.movingY+"px)");}},_hash:function(a){var string=a.toString();var h=0;if(string.length==0){return h;}for(var i=0;i<string.length;i++){var c=string.toString().charCodeAt(i);h=((h<<5)-h)+c;h=h&h;}return h;},_watchContent:function(){var that=this;if(this._timer){clearInterval(this._timer);}this._timer=setInterval(function(){var now=that._hash(that.$content.html());var nowHeight=that.$content.height();if(that._contentHash!=now||that._contentHeight!=nowHeight){that._contentHash=now;that._contentHeight=nowHeight;that.setDialogCenter();that._imagesLoaded();}},this.watchInterval);},_hilightAnimating:false,_hiLightModal:function(){var that=this;if(this._hilightAnimating){return;}that.$body.addClass("hilight");var duration=2;this._hilightAnimating=true;setTimeout(function(){that._hilightAnimating=false;that.$body.removeClass("hilight");},duration*1000);},_bindEvents:function(){var that=this;this.boxClicked=false;this.$scrollPane.click(function(e){if(!that.boxClicked){var buttonName=false;var shouldClose=false;var str;if(typeof that.backgroundDismiss=="function"){str=that.backgroundDismiss();}else{str=that.backgroundDismiss;}if(typeof str=="string"&&typeof that.buttons[str]!="undefined"){buttonName=str;shouldClose=false;}else{if(typeof str=="undefined"||!!(str)==true){shouldClose=true;}else{shouldClose=false;}}if(buttonName){var btnResponse=that.buttons[buttonName].action.apply(that);shouldClose=(typeof btnResponse=="undefined")||!!(btnResponse);}if(shouldClose){that.close();}else{that._hiLightModal();}}that.boxClicked=false;});this.$jconfirmBox.click(function(e){that.boxClicked=true;});var isKeyDown=false;$(window).on("jcKeyDown."+that._id,function(e){if(!isKeyDown){isKeyDown=true;}});$(window).on("keyup."+that._id,function(e){if(isKeyDown){that.reactOnKey(e);isKeyDown=false;}});$(window).on("resize."+this._id,function(){that.setDialogCenter(true);setTimeout(function(){that.resetDrag();},100);});},_cubic_bezier:"0.36, 0.55, 0.19",_getCSS:function(speed,bounce){return{"-webkit-transition-duration":speed/1000+"s","transition-duration":speed/1000+"s","-webkit-transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+bounce+")","transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+bounce+")"};},_imagesLoaded:function(){var that=this;if(that.imageLoadInterval){clearInterval(that.imageLoadInterval);}$.each(this.$content.find("img:not(.loaded)"),function(i,a){that.imageLoadInterval=setInterval(function(){var h=$(a).css("height");if(h!=="0px"){$(a).addClass("loaded");clearInterval(that.imageLoadInterval);that.setDialogCenter();}},40);});},_setButtons:function(){var that=this;var total_buttons=0;if(typeof this.buttons!=="object"){this.buttons={};}$.each(this.buttons,function(key,button){total_buttons+=1;if(typeof button==="function"){that.buttons[key]=button={action:button};}that.buttons[key].text=button.text||key;that.buttons[key].btnClass=button.btnClass||"btn-default";that.buttons[key].action=button.action||function(){};that.buttons[key].keys=button.keys||[];that.buttons[key].isHidden=button.isHidden||false;that.buttons[key].isDisabled=button.isDisabled||false;$.each(that.buttons[key].keys,function(i,a){that.buttons[key].keys[i]=a.toLowerCase();});var button_element=$('<button type="button" class="btn"></button>').html(that.buttons[key].text).addClass(that.buttons[key].btnClass).prop("disabled",that.buttons[key].isDisabled).css("display",that.buttons[key].isHidden?"none":"").click(function(e){e.preventDefault();var res=that.buttons[key].action.apply(that);that.onAction(key);that._stopCountDown();if(typeof res==="undefined"||res){that.close();}});that.buttons[key].el=button_element;that.buttons[key].setText=function(text){button_element.html(text);};that.buttons[key].addClass=function(className){button_element.addClass(className);};that.buttons[key].removeClass=function(className){button_element.removeClass(className);};that.buttons[key].disable=function(){that.buttons[key].isDisabled=true;button_element.prop("disabled",true);};that.buttons[key].enable=function(){that.buttons[key].isDisabled=false;button_element.prop("disabled",false);};that.buttons[key].show=function(){that.buttons[key].isHidden=false;button_element.css("display","");that.setDialogCenter();};that.buttons[key].hide=function(){that.buttons[key].isHidden=true;button_element.css("display","none");that.setDialogCenter();};that["$_"+key]=that["$$"+key]=button_element;that.$btnc.append(button_element);});if(total_buttons===0){this.$btnc.hide();}if(this.closeIcon===null&&total_buttons===0){this.closeIcon=true;}if(this.closeIcon){if(this.closeIconClass){var closeHtml='<i class="'+this.closeIconClass+'"></i>';this.$closeIcon.html(closeHtml);}this.$closeIcon.click(function(e){e.preventDefault();var buttonName=false;var shouldClose=false;var str;if(typeof that.closeIcon=="function"){str=that.closeIcon();}else{str=that.closeIcon;}if(typeof str=="string"&&typeof that.buttons[str]!="undefined"){buttonName=str;shouldClose=false;}else{if(typeof str=="undefined"||!!(str)==true){shouldClose=true;}else{shouldClose=false;}}if(buttonName){var btnResponse=that.buttons[buttonName].action.apply(that);shouldClose=(typeof btnResponse=="undefined")||!!(btnResponse);}if(shouldClose){that.close();}});this.$closeIcon.show();}else{this.$closeIcon.hide();}},setTitle:function(string,force){force=force||false;if(typeof string!=="undefined"){if(typeof string=="string"){this.title=string;}else{if(typeof string=="function"){if(typeof string.promise=="function"){console.error("Promise was returned from title function, this is not supported.");}var response=string();if(typeof response=="string"){this.title=response;}else{this.title=false;}}else{this.title=false;}}}if(this.isAjaxLoading&&!force){return;}this.$title.html(this.title||"");},setIcon:function(iconClass,force){force=force||false;if(typeof iconClass!=="undefined"){if(typeof iconClass=="string"){this.icon=iconClass;}else{if(typeof iconClass==="function"){var response=iconClass();if(typeof response=="string"){this.icon=response;}else{this.icon=false;}}else{this.icon=false;}}}if(this.isAjaxLoading&&!force){return;}this.$icon.html(this.icon?'<i class="'+this.icon+'"></i>':"");},setContentPrepend:function(string,force){this.contentParsed=string+this.contentParsed;if(this.isAjaxLoading&&!force){return;}this.$content.prepend(string);},setContentAppend:function(string,force){this.contentParsed=this.contentParsed+string;if(this.isAjaxLoading&&!force){return;}this.$content.append(string);},setContent:function(string,force){force=force||false;var that=this;this.contentParsed=(typeof string=="undefined")?this.contentParsed:string;if(this.isAjaxLoading&&!force){return;}this.$content.html(this.contentParsed);this.setDialogCenter();setTimeout(function(){that.$body.find("input[autofocus]:visible:first").focus();},100);},loadingSpinner:false,showLoading:function(disableButtons){this.loadingSpinner=true;this.$jconfirmBox.addClass("loading");if(disableButtons){this.$btnc.find("button").prop("disabled",true);}this.setDialogCenter();},hideLoading:function(enableButtons){this.loadingSpinner=false;this.$jconfirmBox.removeClass("loading");if(enableButtons){this.$btnc.find("button").prop("disabled",false);}this.setDialogCenter();},ajaxResponse:false,contentParsed:"",isAjax:false,isAjaxLoading:false,_parseContent:function(){var that=this;var e=" ";if(typeof this.content=="function"){var res=this.content.apply(this);if(typeof res=="string"){this.content=res;}else{if(typeof res=="object"&&typeof res.always=="function"){this.isAjax=true;this.isAjaxLoading=true;res.always(function(data,status,xhr){that.ajaxResponse={data:data,status:status,xhr:xhr};that._contentReady.resolve(data,status,xhr);if(typeof that.contentLoaded=="function"){that.contentLoaded(data,status,xhr);}});this.content=e;}else{this.content=e;}}}if(typeof this.content=="string"&&this.content.substr(0,4).toLowerCase()==="url:"){this.isAjax=true;this.isAjaxLoading=true;var u=this.content.substring(4,this.content.length);$.get(u).done(function(html){that.contentParsed=html;}).always(function(data,status,xhr){that.ajaxResponse={data:data,status:status,xhr:xhr};that._contentReady.resolve(data,status,xhr);if(typeof that.contentLoaded=="function"){that.contentLoaded(data,status,xhr);}});}if(!this.content){this.content=e;}if(!this.isAjax){this.contentParsed=this.content;this.setContent(this.contentParsed);that._contentReady.resolve();}},_stopCountDown:function(){clearInterval(this.autoCloseInterval);if(this.$cd){this.$cd.remove();}},_startCountDown:function(){var that=this;var opt=this.autoClose.split("|");if(opt.length!==2){console.error("Invalid option for autoClose. example 'close|10000'");return false;}var button_key=opt[0];var time=parseInt(opt[1]);if(typeof this.buttons[button_key]==="undefined"){console.error("Invalid button key '"+button_key+"' for autoClose");return false;}var seconds=Math.ceil(time/1000);this.$cd=$('<span class="countdown"> ('+seconds+")</span>").appendTo(this["$_"+button_key]);this.autoCloseInterval=setInterval(function(){that.$cd.html(" ("+(seconds-=1)+") ");if(seconds<=0){that["$$"+button_key].trigger("click");that._stopCountDown();}},1000);},_getKey:function(key){switch(key){case 192:return"tilde";case 13:return"enter";case 16:return"shift";case 9:return"tab";case 20:return"capslock";case 17:return"ctrl";case 91:return"win";case 18:return"alt";case 27:return"esc";case 32:return"space";}var initial=String.fromCharCode(key);if(/^[A-z0-9]+$/.test(initial)){return initial.toLowerCase();}else{return false;}},reactOnKey:function(e){var that=this;var a=$(".jconfirm");if(a.eq(a.length-1)[0]!==this.$el[0]){return false;}var key=e.which;if(this.$content.find(":input").is(":focus")&&/13|32/.test(key)){return false;}var keyChar=this._getKey(key);if(keyChar==="esc"&&this.escapeKey){if(this.escapeKey===true){this.$scrollPane.trigger("click");}else{if(typeof this.escapeKey==="string"||typeof this.escapeKey==="function"){var buttonKey;if(typeof this.escapeKey==="function"){buttonKey=this.escapeKey();}else{buttonKey=this.escapeKey;}if(buttonKey){if(typeof this.buttons[buttonKey]==="undefined"){console.warn("Invalid escapeKey, no buttons found with key "+buttonKey);}else{this["$_"+buttonKey].trigger("click");}}}}}$.each(this.buttons,function(key,button){if(button.keys.indexOf(keyChar)!=-1){that["$_"+key].trigger("click");}});},_boxTopMargin:0,_boxBottomMargin:0,_boxWidth:0,setDialogCenter:function(){var contentHeight;var paneHeight;var style;contentHeight=0;paneHeight=0;if(this.$contentPane.css("display")!="none"){contentHeight=this.$content.outerHeight()||0;paneHeight=this.$contentPane.height()||0;}var children=this.$content.children();if(children.length!=0){var marginTopChild=parseInt(children.eq(0).css("margin-top"));if(marginTopChild){contentHeight+=marginTopChild;}}if(paneHeight==0){paneHeight=contentHeight;}var windowHeight=$(window).height();var boxHeight;boxHeight=(this.$body.outerHeight()-paneHeight)+contentHeight;var topMargin=(windowHeight-boxHeight)/2;if(boxHeight>(windowHeight-(this.offsetTop+this.offsetBottom))||!this.alignMiddle){style={"margin-top":this.offsetTop,"margin-bottom":this.offsetBottom};this._boxTopMargin=this.offsetTop;this._boxBottomMargin=this.offsetBottom;$("body").addClass("jconfirm-no-scroll-"+this._id);}else{style={"margin-top":topMargin,"margin-bottom":this.offsetBottom};this._boxTopMargin=topMargin;this._boxBottomMargin=this.offsetBottom;$("body").removeClass("jconfirm-no-scroll-"+this._id);}this.$contentPane.css({height:contentHeight}).scrollTop(0);this.$body.css(style);this.setDrag();},_unwatchContent:function(){clearInterval(this._timer);},close:function(){var that=this;if(typeof this.onClose==="function"){this.onClose();}this._unwatchContent();clearInterval(this.imageLoadInterval);$(window).unbind("resize."+this._id);$(window).unbind("keyup."+this._id);$(window).unbind("jcKeyDown."+this._id);if(this.draggable){$(window).unbind("mousemove."+this._id);$(window).unbind("mouseup."+this._id);this.$titleContainer.unbind("mousedown");}$("body").removeClass("jconfirm-no-scroll-"+this._id);this.$body.addClass(this.closeAnimationParsed);this.$jconfirmBg.addClass("jconfirm-bg-h");var closeTimer=(this.closeAnimation=="none")?1:this.animationSpeed;that.$el.removeClass(that.loadedClass);setTimeout(function(){that.$el.remove();var l=jconfirm.instances;var i=jconfirm.instances.length-1;for(i;i>=0;i--){if(jconfirm.instances[i]._id==that._id){jconfirm.instances.splice(i,1);}}if(!jconfirm.instances.length){if(that.scrollToPreviousElement&&jconfirm.lastFocused&&jconfirm.lastFocused.length&&$.contains(document,jconfirm.lastFocused[0])){var $lf=jconfirm.lastFocused;if(that.scrollToPreviousElementAnimate){var st=$(window).scrollTop();var ot=jconfirm.lastFocused.offset().top;var wh=$(window).height();if(!(ot>st&&ot<(st+wh))){var scrollTo=(ot-Math.round((wh/3)));$("html, body").animate({scrollTop:scrollTo},that.animationSpeed,"swing",function(){$lf.focus();});}else{$lf.focus();}}else{$lf.focus();}jconfirm.lastFocused=false;}}if(typeof that.onDestroy=="function"){that.onDestroy();}},closeTimer*0.4);return true;},open:function(){if(this.isOpen()){return false;}this._buildHTML();this._bindEvents();this._open();return true;},_open:function(){var that=this;if(typeof that.onOpenBefore=="function"){that.onOpenBefore();}this.$body.removeClass(this.animationParsed);this.$jconfirmBg.removeClass("jconfirm-bg-h");this.$body.focus();setTimeout(function(){that.$body.css(that._getCSS(that.animationSpeed,1));that.$body.css({"transition-property":that.$body.css("transition-property")+", margin"});that._modalReady.resolve();if(typeof that.onOpen==="function"){that.onOpen();}that.$el.addClass(that.loadedClass);},this.animationSpeed);},loadedClass:"jconfirm-open",isClosed:function(){return !this.$el||this.$el.css("display")==="";},isOpen:function(){return !this.isClosed();},toggle:function(){if(!this.isOpen()){this.open();}else{this.close();}}};jconfirm.instances=[];jconfirm.lastFocused=false;jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg jconfirm-bg-h"></div><div class="jconfirm-scrollpane"><div class="jc-bs3-container"><div class="jc-bs3-row"><div class="jconfirm-box-container"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="jconfirm-closeIcon">×</div><div class="jconfirm-title-c"><span class="jconfirm-icon-c"></span><span class="jconfirm-title"></span></div><div class="jconfirm-content-pane"><div class="jconfirm-content"></div></div><div class="jconfirm-buttons"></div><div class="jconfirm-clear"></div></div></div></div></div></div></div>',title:"Hello",titleClass:"",type:"default",typeAnimated:true,draggable:false,alignMiddle:true,content:"Are you sure to continue?",buttons:{},defaultButtons:{ok:{action:function(){}},close:{action:function(){}}},contentLoaded:function(){},icon:"",lazyOpen:false,bgOpacity:null,theme:"light",animation:"zoom",closeAnimation:"scale",animationSpeed:400,animationBounce:1.2,escapeKey:true,rtl:false,container:"body",containerFluid:false,backgroundDismiss:false,backgroundDismissAnimation:"shake",autoClose:false,closeIcon:null,closeIconClass:false,watchInterval:100,columnClass:"col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1",boxWidth:"50%",scrollToPreviousElement:true,scrollToPreviousElementAnimate:true,useBootstrap:true,offsetTop:50,offsetBottom:50,dragWindowGap:15,bootstrapClasses:{container:"container",containerFluid:"container-fluid",row:"row"},onContentReady:function(){},onOpenBefore:function(){},onOpen:function(){},onClose:function(){},onDestroy:function(){},onAction:function(){}};var keyDown=false;$(window).on("keydown",function(e){if(!keyDown){var $target=$(e.target);var pass=false;if($target.closest(".jconfirm-box").length){pass=true;}if(pass){$(window).trigger("jcKeyDown");}keyDown=true;}});$(window).on("keyup",function(e){keyDown=false;});})(jQuery,window);
|
changelog.txt
CHANGED
@@ -1,7 +1,14 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.3.7.4 =
|
4 |
-
-
|
5 |
|
6 |
= 1.3.7.3
|
7 |
- Fixed: Required setting checkbox getting out of sync when duplicating fields
|
@@ -20,7 +27,7 @@
|
|
20 |
- Added: Google Invisible reCAPTCHA support
|
21 |
- Added: Custom field validation messages (see WPForms Settings page)
|
22 |
- Added: Bulk add choices for Checkbox, Multiple Choice, and Dropdown fields
|
23 |
-
-
|
24 |
- Added: Field CSS layout selector
|
25 |
- Changed: Leverage `wp_json_encode` instead of native PHP function
|
26 |
- Changed: Various WordPress coding standard improvements (work in progress)
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.3.8 =
|
4 |
+
- Changed: Available conditional logic rules/functionality with Providers have been updated
|
5 |
+
- Changed: Updated form builder modals (jquery-confirm.js)
|
6 |
+
- Changed: Many Form Builder performance enhancements
|
7 |
+
- Fixed: Number field validation message not saving
|
8 |
+
- Fixed: Email confirmation setting not displaying correctly with Small field size
|
9 |
+
|
10 |
= 1.3.7.4 =
|
11 |
+
- Added: Marketing tab in the form builder shows all possible providers.
|
12 |
|
13 |
= 1.3.7.3
|
14 |
- Fixed: Required setting checkbox getting out of sync when duplicating fields
|
27 |
- Added: Google Invisible reCAPTCHA support
|
28 |
- Added: Custom field validation messages (see WPForms Settings page)
|
29 |
- Added: Bulk add choices for Checkbox, Multiple Choice, and Dropdown fields
|
30 |
+
- Added: Filter to allow email notifications to include empty fields, `wpforms_email_display_empty_fields`
|
31 |
- Added: Field CSS layout selector
|
32 |
- Changed: Leverage `wp_json_encode` instead of native PHP function
|
33 |
- Changed: Various WordPress coding standard improvements (work in progress)
|
includes/admin/builder/class-builder.php
CHANGED
@@ -195,6 +195,7 @@ class WPForms_Builder {
|
|
195 |
wp_enqueue_media();
|
196 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
197 |
wp_enqueue_script( 'jquery-ui-draggable' );
|
|
|
198 |
|
199 |
wp_enqueue_script(
|
200 |
'serialize-object',
|
@@ -269,6 +270,7 @@ class WPForms_Builder {
|
|
269 |
);
|
270 |
|
271 |
$strings = array(
|
|
|
272 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
273 |
'bulk_add_button' => __( 'Add New Choices', 'wpforms '),
|
274 |
'bulk_add_show' => __( 'Bulk Add', 'wpforms' ),
|
@@ -279,11 +281,13 @@ class WPForms_Builder {
|
|
279 |
'bulk_add_presets_hide' => __( 'Hide presets', 'wpforms '),
|
280 |
'date_select_day' => __( 'DD', 'wpforms' ),
|
281 |
'date_select_month' => __( 'MM', 'wpforms' ),
|
|
|
282 |
'dynamic_choice_limit' => __( 'The {source} {type} contains over {limit} items ({total}). This may make the field difficult for your vistors to use and/or cause the form to be slow.', 'wpforms' ),
|
283 |
'cancel' => __( 'Cancel', 'wpforms' ),
|
284 |
'ok' => __( 'OK', 'wpforms' ),
|
285 |
'close' => __( 'Close', 'wpforms' ),
|
286 |
'conditionals_change' => __( 'Due to form changes, conditional logic rules have been removed or updated:', 'wpforms' ),
|
|
|
287 |
'field' => __( 'Field', 'wpforms' ),
|
288 |
'field_locked' => __( 'Field Locked', 'wpforms' ),
|
289 |
'field_locked_msg' => __( 'This field cannot be deleted or duplicated.', 'wpforms' ),
|
@@ -324,8 +328,21 @@ class WPForms_Builder {
|
|
324 |
'error_choice' => __( 'This item must contain at least one choice.', 'wpforms' ),
|
325 |
'off' => __( 'Off', 'wpforms' ),
|
326 |
'on' => __( 'On', 'wpforms' ),
|
|
|
327 |
'other' => __( 'Other', 'wpforms' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
'previous' => __( 'Previous', 'wpforms' ),
|
|
|
|
|
|
|
329 |
'saved_state' => '',
|
330 |
'smart_tags' => wpforms()->smart_tags->get(),
|
331 |
'smart_tags_show' => __( 'Show Smart Tags', 'wpforms' ),
|
@@ -385,6 +402,8 @@ class WPForms_Builder {
|
|
385 |
$choices = apply_filters( 'wpforms_builder_preset_choices', $choices );
|
386 |
|
387 |
echo '<script type="text/javascript">wpforms_preset_choices=' . wp_json_encode( $choices ) . '</script>';
|
|
|
|
|
388 |
}
|
389 |
|
390 |
/**
|
195 |
wp_enqueue_media();
|
196 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
197 |
wp_enqueue_script( 'jquery-ui-draggable' );
|
198 |
+
wp_enqueue_script( 'wp-util' );
|
199 |
|
200 |
wp_enqueue_script(
|
201 |
'serialize-object',
|
270 |
);
|
271 |
|
272 |
$strings = array(
|
273 |
+
'and' => __( 'AND', 'wpforms' ),
|
274 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
275 |
'bulk_add_button' => __( 'Add New Choices', 'wpforms '),
|
276 |
'bulk_add_show' => __( 'Bulk Add', 'wpforms' ),
|
281 |
'bulk_add_presets_hide' => __( 'Hide presets', 'wpforms '),
|
282 |
'date_select_day' => __( 'DD', 'wpforms' ),
|
283 |
'date_select_month' => __( 'MM', 'wpforms' ),
|
284 |
+
'debug' => wpforms_debug(),
|
285 |
'dynamic_choice_limit' => __( 'The {source} {type} contains over {limit} items ({total}). This may make the field difficult for your vistors to use and/or cause the form to be slow.', 'wpforms' ),
|
286 |
'cancel' => __( 'Cancel', 'wpforms' ),
|
287 |
'ok' => __( 'OK', 'wpforms' ),
|
288 |
'close' => __( 'Close', 'wpforms' ),
|
289 |
'conditionals_change' => __( 'Due to form changes, conditional logic rules have been removed or updated:', 'wpforms' ),
|
290 |
+
'conditionals_disable' => __( 'Are you sure you want to disable conditional logic? This will remove the rules for this field or setting.' ),
|
291 |
'field' => __( 'Field', 'wpforms' ),
|
292 |
'field_locked' => __( 'Field Locked', 'wpforms' ),
|
293 |
'field_locked_msg' => __( 'This field cannot be deleted or duplicated.', 'wpforms' ),
|
328 |
'error_choice' => __( 'This item must contain at least one choice.', 'wpforms' ),
|
329 |
'off' => __( 'Off', 'wpforms' ),
|
330 |
'on' => __( 'On', 'wpforms' ),
|
331 |
+
'or' => __( 'or', 'wpforms' ),
|
332 |
'other' => __( 'Other', 'wpforms' ),
|
333 |
+
'operator_is' => __( 'is', 'wpforms' ),
|
334 |
+
'operator_is_not' => __( 'is not', 'wpforms' ),
|
335 |
+
'operator_empty' => __( 'empty', 'wpforms' ),
|
336 |
+
'operator_not_empty' => __( 'not empty', 'wpforms' ),
|
337 |
+
'operator_contains' => __( 'contains', 'wpforms' ),
|
338 |
+
'operator_not_contains' => __( 'does not contain', 'wpforms' ),
|
339 |
+
'operator_starts' => __( 'starts with', 'wpforms' ),
|
340 |
+
'operator_ends' => __( 'ends with', 'wpforms' ),
|
341 |
+
'payments_entries_off' => __( 'Form entries must be stored to accept payments. Please enable saving form entries in the General settings first.', 'wpforms' ),
|
342 |
'previous' => __( 'Previous', 'wpforms' ),
|
343 |
+
'rule_create' => __( 'Create new rule', 'wpforms' ),
|
344 |
+
'rule_create_group' => __( 'Add new group', 'wpforms' ),
|
345 |
+
'rule_delete' => __( 'Delete rule', 'wpforms' ),
|
346 |
'saved_state' => '',
|
347 |
'smart_tags' => wpforms()->smart_tags->get(),
|
348 |
'smart_tags_show' => __( 'Show Smart Tags', 'wpforms' ),
|
402 |
$choices = apply_filters( 'wpforms_builder_preset_choices', $choices );
|
403 |
|
404 |
echo '<script type="text/javascript">wpforms_preset_choices=' . wp_json_encode( $choices ) . '</script>';
|
405 |
+
|
406 |
+
do_action( 'wpforms_builder_print_footer_scripts' );
|
407 |
}
|
408 |
|
409 |
/**
|
includes/admin/builder/functions.php
CHANGED
@@ -56,9 +56,12 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
56 |
}
|
57 |
|
58 |
// Check for data attributes
|
59 |
-
if ( !empty( $args['data'] ) ) {
|
60 |
foreach ( $args['data'] as $key => $val ) {
|
61 |
-
|
|
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
|
@@ -259,4 +262,4 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
259 |
} else {
|
260 |
return $output;
|
261 |
}
|
262 |
-
}
|
56 |
}
|
57 |
|
58 |
// Check for data attributes
|
59 |
+
if ( ! empty( $args['data'] ) ) {
|
60 |
foreach ( $args['data'] as $key => $val ) {
|
61 |
+
if ( is_array( $val ) ) {
|
62 |
+
$val = wp_json_encode( $val );
|
63 |
+
}
|
64 |
+
$data_attr .= ' data-' . $key . '=\'' . $val . '\'';
|
65 |
}
|
66 |
}
|
67 |
|
262 |
} else {
|
263 |
return $output;
|
264 |
}
|
265 |
+
}
|
includes/class-conditional-logic-core.php
ADDED
@@ -0,0 +1,664 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Conditional logic core.
|
4 |
+
*
|
5 |
+
* Contains functionality for using conditional logic in the form builder as
|
6 |
+
* well as a global processing method that can be leveraged by all types of
|
7 |
+
* conditional logic.
|
8 |
+
*
|
9 |
+
* This was contained in an addon until version 1.3.8 when it was rolled into
|
10 |
+
* core.
|
11 |
+
*
|
12 |
+
* @package WPForms
|
13 |
+
* @author WPForms
|
14 |
+
* @since 1.3.8
|
15 |
+
* @license GPL-2.0+
|
16 |
+
* @copyright Copyright (c) 2017, WPForms LLC
|
17 |
+
*/
|
18 |
+
class WPForms_Conditional_Logic_Core {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* One is the loneliest number that you'll ever do.
|
22 |
+
*
|
23 |
+
* @since 1.1.0
|
24 |
+
* @var object
|
25 |
+
*/
|
26 |
+
private static $instance;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Main Instance.
|
30 |
+
*
|
31 |
+
* @since 1.1.0
|
32 |
+
* @return WPForms_Conditional_Logic_Core
|
33 |
+
*/
|
34 |
+
public static function instance() {
|
35 |
+
|
36 |
+
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WPForms_Conditional_Logic_Core ) ) {
|
37 |
+
self::$instance = new WPForms_Conditional_Logic_Core;
|
38 |
+
add_action( 'wpforms_loaded', array( self::$instance, 'init' ), 10 );
|
39 |
+
}
|
40 |
+
return self::$instance;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Initialize.
|
45 |
+
*
|
46 |
+
* @since 1.0.0
|
47 |
+
*/
|
48 |
+
public function init() {
|
49 |
+
|
50 |
+
// Form builder.
|
51 |
+
add_action( 'wpforms_builder_enqueues', array( $this, 'builder_assets' ) );
|
52 |
+
add_action( 'wpforms_builder_print_footer_scripts', array( $this, 'builder_footer_scripts' ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Enqueue assets for the builder.
|
57 |
+
*
|
58 |
+
* @since 1.0.0
|
59 |
+
*/
|
60 |
+
public function builder_assets() {
|
61 |
+
|
62 |
+
$suffix = ( ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || wpforms_debug() ) ? '' : '.min';
|
63 |
+
|
64 |
+
// CSS
|
65 |
+
wp_enqueue_style(
|
66 |
+
'wpforms-builder-conditionals',
|
67 |
+
WPFORMS_PLUGIN_URL . 'assets/css/admin-builder-conditional-logic-core.css',
|
68 |
+
array(),
|
69 |
+
WPFORMS_VERSION
|
70 |
+
);
|
71 |
+
|
72 |
+
// JS
|
73 |
+
wp_enqueue_script(
|
74 |
+
'wpforms-builder-conditionals',
|
75 |
+
WPFORMS_PLUGIN_URL . 'assets/js/admin-builder-conditional-logic-core' . $suffix . '.js',
|
76 |
+
array( 'jquery', 'serialize-object' ),
|
77 |
+
WPFORMS_VERSION,
|
78 |
+
false
|
79 |
+
);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Outputs footer scripts inside the form builder.
|
84 |
+
*
|
85 |
+
* @since 1.3.8
|
86 |
+
*/
|
87 |
+
public function builder_footer_scripts() {
|
88 |
+
|
89 |
+
?>
|
90 |
+
<script type="text/html" id="tmpl-wpforms-conditional-block">
|
91 |
+
<div class="wpforms-conditional-groups">
|
92 |
+
<h4>
|
93 |
+
<select name="{{ data.fieldName }}[conditional_type]">
|
94 |
+
<# _.each(data.actions, function(key, val) { #>
|
95 |
+
<option value="{{ val }}">{{ key }}</option>
|
96 |
+
<# }) #>
|
97 |
+
</select>
|
98 |
+
{{ data.actionDesc }}
|
99 |
+
</h4>
|
100 |
+
<div class="wpforms-conditional-group" data-reference="{{ data.fieldID }}">
|
101 |
+
<table><tbody>
|
102 |
+
<tr class="wpforms-conditional-row" data-field-id="{{ data.fieldID }}" data-input-name="{{ data.fieldName }}">
|
103 |
+
<td class="field">
|
104 |
+
<select name="{{ data.fieldName }}[conditionals][0][0][field]" class="wpforms-conditional-field" data-groupid="0" data-ruleid="0">
|
105 |
+
<option value="">{{ wpforms_builder.select_field }}</option>
|
106 |
+
</select>
|
107 |
+
</td>
|
108 |
+
<td class="operator">
|
109 |
+
<select name="{{ data.fieldName }}[conditionals][0][0][operator]" class="wpforms-conditional-operator">
|
110 |
+
<option value="==">{{ wpforms_builder.operator_is }}</option>
|
111 |
+
<option value="!=">{{ wpforms_builder.operator_is_not }}</option>
|
112 |
+
<option value="e">{{ wpforms_builder.operator_empty }}</option>
|
113 |
+
<option value="!e">{{ wpforms_builder.operator_not_empty }}</option>
|
114 |
+
<option value="c">{{ wpforms_builder.operator_contains }}</option>
|
115 |
+
<option value="!c">{{ wpforms_builder.operator_not_contains }}</option>
|
116 |
+
<option value="^">{{ wpforms_builder.operator_starts }}</option>
|
117 |
+
<option value="~">{{ wpforms_builder.operator_ends }}</option>
|
118 |
+
</select>
|
119 |
+
</td>
|
120 |
+
<td class="value">
|
121 |
+
<select name="{{ data.fieldName }}[conditionals][0][0][value]" class="wpforms-conditional-value">
|
122 |
+
<option value="">{{ wpforms_builder.select_choice }}</option>
|
123 |
+
</select>
|
124 |
+
</td>
|
125 |
+
<td class="actions">
|
126 |
+
<button class="wpforms-conditional-rule-add" title="{{ wpforms_builder.rule_create }}">{{ wpforms_builder.and }}</button><button class="wpforms-conditional-rule-delete" title="{{ wpforms_builder.rule_delete }}"><i class="fa fa-times-circle" aria-hidden="true"></i></button>
|
127 |
+
</td>
|
128 |
+
</tr>
|
129 |
+
</tbody></table>
|
130 |
+
<h5>{{ wpforms_builder.or }}</h5>
|
131 |
+
</div>
|
132 |
+
<button class="wpforms-conditional-groups-add">{{ wpforms_builder.rule_create_group }}</button>
|
133 |
+
</div>
|
134 |
+
</script>
|
135 |
+
<?php
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Builds the conditional logic settings to display in the form builder.
|
140 |
+
*
|
141 |
+
* @since 1.3.8
|
142 |
+
* @param array $args
|
143 |
+
* @param bool $echo
|
144 |
+
*/
|
145 |
+
public function builder_block( $args = array(), $echo = true ) {
|
146 |
+
|
147 |
+
if ( ! empty( $args['form'] ) ) {
|
148 |
+
$form_fields = wpforms_get_form_fields( $args['form'], array( 'text', 'textarea', 'select', 'radio', 'email', 'url', 'checkbox', 'number', 'payment-multiple', 'payment-select', 'hidden' ) );
|
149 |
+
} else {
|
150 |
+
$form_fields = array();
|
151 |
+
}
|
152 |
+
|
153 |
+
// Define data.
|
154 |
+
$type = ! empty( $args['type'] ) ? $args['type'] : 'field';
|
155 |
+
$panel = ! empty( $args['panel'] ) ? $args['panel'] : false; // notifications
|
156 |
+
$parent = ! empty( $args['parent'] ) ? $args['parent'] : false; // settings
|
157 |
+
$subsection = ! empty( $args['subsection'] ) ? $args['subsection'] : false;
|
158 |
+
$action_desc = ! empty( $args['action_desc'] ) ? $args['action_desc'] : __( 'this field if', 'wpforms' );
|
159 |
+
$field = ! empty( $args['field'] ) ? $args['field'] : false;
|
160 |
+
$reference = ! empty( $args['reference'] ) ? $args['reference'] : '';
|
161 |
+
$data_attrs = '';
|
162 |
+
|
163 |
+
if ( empty( $args['actions'] ) ) {
|
164 |
+
$actions = array(
|
165 |
+
'show' => __( 'Show', 'wpforms' ),
|
166 |
+
'hide' => __( 'Hide', 'wpforms' ),
|
167 |
+
);
|
168 |
+
} else {
|
169 |
+
$actions = array_map( 'esc_attr', $args['actions'] );
|
170 |
+
}
|
171 |
+
|
172 |
+
ob_start();
|
173 |
+
|
174 |
+
// Block open markup.
|
175 |
+
printf(
|
176 |
+
'<div class="wpforms-conditional-block wpforms-conditional-block-%s" data-type="%s">',
|
177 |
+
$type,
|
178 |
+
$type
|
179 |
+
);
|
180 |
+
|
181 |
+
if ( 'field' === $type ) {
|
182 |
+
// This settings block is for a field.
|
183 |
+
|
184 |
+
// Define more data for this field.
|
185 |
+
$fields_instance = $args['instance'];
|
186 |
+
$field_id = absint( $field['id'] );
|
187 |
+
$field_name = "fields[{$field_id}]";
|
188 |
+
$action_selected = ! empty( $field['conditional_type'] ) ? $field['conditional_type'] : '';
|
189 |
+
$conditionals = ! empty( $field['conditionals'] ) ? $field['conditionals'] : array( array( array() ) );
|
190 |
+
$data_attrs = 'data-field-id="' . $field_id . '" ';
|
191 |
+
$reference = $field_id;
|
192 |
+
$enabled = isset( $field['conditional_logic'] ) ? $field['conditional_logic'] : false;
|
193 |
+
|
194 |
+
// Output Conditional Logic toggle checkbox field option.
|
195 |
+
$fld = $fields_instance->field_element(
|
196 |
+
'checkbox',
|
197 |
+
$field,
|
198 |
+
array(
|
199 |
+
'slug' => 'conditional_logic',
|
200 |
+
'value' => $enabled,
|
201 |
+
'desc' => __( 'Enable conditional logic', 'wpforms' ),
|
202 |
+
'tooltip' => __( 'Check this option to enable conditional logic on this field.', 'wpforms' ),
|
203 |
+
'data' => array(
|
204 |
+
'name' => $field_name,
|
205 |
+
'actions' => $actions,
|
206 |
+
'action-desc' => esc_attr( $action_desc ),
|
207 |
+
),
|
208 |
+
),
|
209 |
+
false
|
210 |
+
);
|
211 |
+
$fields_instance->field_element(
|
212 |
+
'row',
|
213 |
+
$field,
|
214 |
+
array(
|
215 |
+
'slug' => 'conditional_logic',
|
216 |
+
'content' => $fld,
|
217 |
+
'class' => 'wpforms-conditionals-enable-toggle',
|
218 |
+
)
|
219 |
+
);
|
220 |
+
|
221 |
+
// Prevent conditional logic from being applied to itself.
|
222 |
+
if ( ! empty( $form_fields[ $field['id'] ] ) ) {
|
223 |
+
unset( $form_fields[ $field['id'] ] );
|
224 |
+
}
|
225 |
+
} elseif ( 'panel' === $type ) {
|
226 |
+
// This settings block is for something else - eg Stripe, PayPal
|
227 |
+
// email notifications, etc.
|
228 |
+
$form_data = $args['form'];
|
229 |
+
|
230 |
+
// Below we do a bunch of voodoo to determine where this block
|
231 |
+
// is located in the form builder - eg is it in a top level
|
232 |
+
// setting or in a subsection, etc.
|
233 |
+
if ( ! empty( $parent ) ) {
|
234 |
+
if ( ! empty( $subsection ) ) {
|
235 |
+
$field_name = sprintf( '%s[%s][%s]', $parent, $panel, $subsection );
|
236 |
+
$enabled = ! empty( $form_data[ $parent ][ $panel ][ $subsection ]['conditional_logic'] ) ? true : false;
|
237 |
+
$action_selected = ! empty( $form_data[ $parent ][ $panel ][ $subsection ]['conditional_type'] ) ? $form_data[ $parent ][ $panel ][ $subsection ]['conditional_type'] : '';
|
238 |
+
$conditionals = ! empty( $form_data[ $parent ][ $panel ][ $subsection ]['conditionals'] ) ? $form_data[ $parent ][ $panel ][ $subsection ]['conditionals'] : array( array( array() ) );
|
239 |
+
} else {
|
240 |
+
$field_name = sprintf( '%s[%s]', $parent, $panel );
|
241 |
+
$enabled = ! empty( $form_data[ $parent ][ $panel ]['conditional_logic'] ) ? true : false;
|
242 |
+
$action_selected = ! empty( $form_data[ $parent ][ $panel ]['conditional_type'] ) ? $form_data[ $parent ][ $panel ]['conditional_type'] : '';
|
243 |
+
$conditionals = ! empty( $form_data[ $parent ][ $panel ]['conditionals'] ) ? $form_data[ $parent ][ $panel ]['conditionals'] : array( array( array() ) );
|
244 |
+
}
|
245 |
+
} else {
|
246 |
+
$field_name = sprintf( '%s', $panel );
|
247 |
+
$enabled = ! empty( $form_data[ $panel ]['conditional_logic'] ) ? true : false;
|
248 |
+
$action_selected = ! empty( $form_data[ $panel ]['conditional_type'] ) ? $form_data[ $panel ]['conditional_type'] : '';
|
249 |
+
$conditionals = ! empty( $form_data[ $panel ]['conditionals'] ) ? $form_data[ $panel ]['conditionals'] : array( array( array() ) );
|
250 |
+
}
|
251 |
+
|
252 |
+
// Output Conditional Logic toggle checkbox panel setting.
|
253 |
+
wpforms_panel_field(
|
254 |
+
'checkbox',
|
255 |
+
$panel,
|
256 |
+
'conditional_logic',
|
257 |
+
$args['form'],
|
258 |
+
__( 'Enable conditional logic', 'wpforms' ),
|
259 |
+
array(
|
260 |
+
'tooltip' => __( 'Check this option to enable conditional logic.', 'wpforms' ),
|
261 |
+
'parent' => $parent,
|
262 |
+
'subsection' => $subsection,
|
263 |
+
'class' => 'wpforms-conditionals-enable-toggle',
|
264 |
+
'data' => array(
|
265 |
+
'name' => $field_name,
|
266 |
+
'actions' => $actions,
|
267 |
+
'action-desc' => esc_attr( $action_desc ),
|
268 |
+
),
|
269 |
+
)
|
270 |
+
);
|
271 |
+
} // End if().
|
272 |
+
|
273 |
+
// Only display the block details if conditional logic is enabled.
|
274 |
+
if ( $enabled ) :
|
275 |
+
|
276 |
+
$data_attrs .= 'data-input-name="' . $field_name . '"';
|
277 |
+
$style = $enabled ? '' : 'display:none;';
|
278 |
+
|
279 |
+
// Groups wrap open markup.
|
280 |
+
echo '<div class="wpforms-conditional-groups" style="' . $style . '">';
|
281 |
+
|
282 |
+
// This is the "[Show] this field if" type text and setting.
|
283 |
+
echo '<h4>';
|
284 |
+
echo '<select name="' . $field_name . '[conditional_type]">';
|
285 |
+
foreach ( $actions as $key => $label ) {
|
286 |
+
printf(
|
287 |
+
'<option value="%s" %s>%s</option>',
|
288 |
+
trim( esc_attr( $key ) ),
|
289 |
+
selected( $key, $action_selected, false ),
|
290 |
+
esc_html( $label )
|
291 |
+
);
|
292 |
+
}
|
293 |
+
echo '</select>';
|
294 |
+
echo $action_desc; // Eg "this field if".
|
295 |
+
echo '</h4>';
|
296 |
+
|
297 |
+
// Go through each conditional logic group.
|
298 |
+
foreach ( $conditionals as $group_id => $group ) :
|
299 |
+
|
300 |
+
// Individual group open markup.
|
301 |
+
echo '<div class="wpforms-conditional-group" data-reference="' . $reference . '">';
|
302 |
+
|
303 |
+
echo'<table><tbody>';
|
304 |
+
|
305 |
+
foreach ( $group as $rule_id => $rule ) :
|
306 |
+
|
307 |
+
$selected_current = false;
|
308 |
+
|
309 |
+
// Indivdual rule table row.
|
310 |
+
echo '<tr class="wpforms-conditional-row" ' . $data_attrs . '>';
|
311 |
+
|
312 |
+
// Rule field - allows the user to select
|
313 |
+
// which field the conditional logic rule is
|
314 |
+
// anchored to.
|
315 |
+
echo '<td class="field">';
|
316 |
+
|
317 |
+
printf(
|
318 |
+
'<select name="%s[conditionals][%d][%d][field]" class="wpforms-conditional-field" data-groupid="%d" data-ruleid="%d">',
|
319 |
+
$field_name,
|
320 |
+
$group_id,
|
321 |
+
$rule_id,
|
322 |
+
$group_id,
|
323 |
+
$rule_id
|
324 |
+
);
|
325 |
+
|
326 |
+
echo '<option value="">' . __( '-- Select Field --', 'wpforms' ) . '</option>';
|
327 |
+
|
328 |
+
if ( ! empty( $form_fields ) ) {
|
329 |
+
|
330 |
+
foreach ( $form_fields as $form_field ) {
|
331 |
+
|
332 |
+
// Exclude fields that are
|
333 |
+
// leveraging dynamic choices.
|
334 |
+
if ( ! empty( $form_field['dynamic_choices'] ) ) {
|
335 |
+
continue;
|
336 |
+
}
|
337 |
+
|
338 |
+
if ( isset( $rule['field'] ) ) {
|
339 |
+
$selected = $rule['field'];
|
340 |
+
$selected_current = $rule['field'];
|
341 |
+
} else {
|
342 |
+
$selected = false;
|
343 |
+
}
|
344 |
+
|
345 |
+
$selected = selected( $selected, $form_field['id'], false );
|
346 |
+
printf( '<option value="%s" %s>%s</option>', absint( $form_field['id'] ), $selected, esc_html( $form_field['label'] ) );
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
echo '</select>';
|
351 |
+
|
352 |
+
echo '</td>';
|
353 |
+
|
354 |
+
// Rule operator - allows the user to
|
355 |
+
// determine the comparison operator used
|
356 |
+
// for processing.
|
357 |
+
echo '<td class="operator">';
|
358 |
+
|
359 |
+
printf(
|
360 |
+
'<select name="%s[conditionals][%s][%s][operator]" class="wpforms-conditional-operator">',
|
361 |
+
$field_name,
|
362 |
+
$group_id,
|
363 |
+
$rule_id
|
364 |
+
);
|
365 |
+
|
366 |
+
$operator = ! empty( $rule['operator'] ) ? $rule['operator'] : false;
|
367 |
+
printf( '<option value="==" %s>%s</option>', selected( $operator, '==', false ), __( 'is', 'wpforms' ) );
|
368 |
+
printf( '<option value="!=" %s>%s</option>', selected( $operator, '!=', false ), __( 'is not', 'wpforms' ) );
|
369 |
+
printf( '<option value="e" %s>%s</option>', selected( $operator, 'e', false ), __( 'empty', 'wpforms' ) );
|
370 |
+
printf( '<option value="!e" %s>%s</option>', selected( $operator, '!e', false ), __( 'not empty', 'wpforms' ) );
|
371 |
+
|
372 |
+
// Only text based fields support
|
373 |
+
// these additional operators.
|
374 |
+
if ( ! $selected || ( in_array( $form_fields[ $rule['field'] ]['type'], array( 'text', 'textarea', 'email', 'url', 'number', 'hidden' ), true ) ) ) {
|
375 |
+
printf( '<option value="c" %s>%s</option>', selected( $operator, 'c', false ), __( 'contains', 'wpforms' ) );
|
376 |
+
printf( '<option value="!c" %s>%s</option>', selected( $operator, '!c', false ), __( 'does not contain', 'wpforms' ) );
|
377 |
+
printf( '<option value="^" %s>%s</option>', selected( $operator, '^', false ), __( 'starts with', 'wpforms' ) );
|
378 |
+
printf( '<option value="~" %s>%s</option>', selected( $operator, '~', false ), __( 'ends with', 'wpforms' ) );
|
379 |
+
}
|
380 |
+
|
381 |
+
echo '</select>';
|
382 |
+
|
383 |
+
echo '</td>';
|
384 |
+
|
385 |
+
// Rule value - allows the user to
|
386 |
+
// determine the value we are using for
|
387 |
+
// comparison.
|
388 |
+
echo '<td class="value">';
|
389 |
+
|
390 |
+
if ( isset( $rule['field'] ) ) {
|
391 |
+
|
392 |
+
// For empty/not empty fields the field value input is not needed so we disable it
|
393 |
+
if ( ! empty( $rule['operator'] ) && in_array( $rule['operator'], array( 'e', '!e' ), true ) ) {
|
394 |
+
$disabled = 'disabled';
|
395 |
+
$rule['value'] = '';
|
396 |
+
} else {
|
397 |
+
$disabled = '';
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( isset( $form_fields[ $rule['field'] ]['type'] ) && in_array( $form_fields[ $rule['field'] ]['type'], array( 'text', 'textarea', 'email', 'url', 'number', 'hidden' ), true ) ) {
|
401 |
+
|
402 |
+
printf(
|
403 |
+
'<input type="text" name="%s[conditionals][%s][%s][value]" value="%s" class="wpforms-conditional-value" %s>',
|
404 |
+
$field_name,
|
405 |
+
$group_id,
|
406 |
+
$rule_id,
|
407 |
+
esc_attr( $rule['value'] ),
|
408 |
+
$disabled
|
409 |
+
);
|
410 |
+
|
411 |
+
} else {
|
412 |
+
|
413 |
+
printf(
|
414 |
+
'<select name="%s[conditionals][%s][%s][value]" class="wpforms-conditional-value" %d>',
|
415 |
+
$field_name,
|
416 |
+
$group_id,
|
417 |
+
$rule_id,
|
418 |
+
$disabled
|
419 |
+
);
|
420 |
+
|
421 |
+
echo '<option value="">' . __( '-- Select Choice --', 'wpforms' ) . '</option>';
|
422 |
+
|
423 |
+
if ( ! empty( $form_fields[ $rule['field'] ]['choices'] ) ) {
|
424 |
+
|
425 |
+
foreach ( $form_fields[ $rule['field'] ]['choices'] as $option_id => $option ) {
|
426 |
+
$value = isset( $rule['value'] ) ? $rule['value'] : '';
|
427 |
+
$selected = selected( $option_id, $value, false );
|
428 |
+
printf( '<option value="%s" %s>%s</option>', $option_id, $selected, esc_html( $option['label'] ) );
|
429 |
+
}
|
430 |
+
}
|
431 |
+
|
432 |
+
echo '</select>';
|
433 |
+
}
|
434 |
+
} else {
|
435 |
+
echo '<select></select>';
|
436 |
+
} // End if().
|
437 |
+
echo '</td>';
|
438 |
+
|
439 |
+
// Rule actions.
|
440 |
+
echo '<td class="actions">';
|
441 |
+
echo '<button class="wpforms-conditional-rule-add" title="' . __( 'Create new rule', 'wpforms' ) . '">' . __( 'AND', 'wpforms') . '</button>';
|
442 |
+
echo '<button class="wpforms-conditional-rule-delete" title="' . __( 'Delete rule', 'wpforms' ) . '"><i class="fa fa-times-circle" aria-hidden="true"></i></button>';
|
443 |
+
echo '</td>';
|
444 |
+
|
445 |
+
echo '</tr>'; // Close indivdual rule table row.
|
446 |
+
|
447 |
+
endforeach; // End foreach() for individual rules.
|
448 |
+
|
449 |
+
echo '</tbody></table>';
|
450 |
+
|
451 |
+
echo '<h5>or</h5>';
|
452 |
+
|
453 |
+
echo '</div>'; // Close individual group markup.
|
454 |
+
|
455 |
+
endforeach; // End foreach() for conditional logic groups.
|
456 |
+
|
457 |
+
echo '<button class="wpforms-conditional-groups-add">' . __( 'Add rule group', 'wpforms' ) . '</button>';
|
458 |
+
|
459 |
+
echo '</div>'; // Close Groups wrap markup.
|
460 |
+
|
461 |
+
endif; // End $enabled if().
|
462 |
+
|
463 |
+
echo '</div>'; // Close block markup.
|
464 |
+
|
465 |
+
$output = ob_get_clean();
|
466 |
+
|
467 |
+
if ( $echo ) {
|
468 |
+
echo $output;
|
469 |
+
} else {
|
470 |
+
return $output;
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Alias method for backwards compatibility.
|
476 |
+
*
|
477 |
+
* @since 1.1.0
|
478 |
+
* @param array $args
|
479 |
+
* @param bool $echo
|
480 |
+
*/
|
481 |
+
public function conditionals_block( $args = array(), $echo = true ) {
|
482 |
+
|
483 |
+
if ( $echo ) {
|
484 |
+
echo $this->builder_block( $args, $echo );
|
485 |
+
} else {
|
486 |
+
return $this->builder_block( $args, $echo );
|
487 |
+
}
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Process conditional rules.
|
492 |
+
*
|
493 |
+
* Checks if a form passes the conditional logic rules that are provided.
|
494 |
+
*
|
495 |
+
* @since 1.3.8
|
496 |
+
* @param array $fields
|
497 |
+
* @param array $form_data
|
498 |
+
* @param array $conditionals
|
499 |
+
*/
|
500 |
+
public function process( $fields, $form_data, $conditionals ) {
|
501 |
+
|
502 |
+
if ( empty( $conditionals ) ) {
|
503 |
+
return true;
|
504 |
+
}
|
505 |
+
|
506 |
+
$pass = false;
|
507 |
+
|
508 |
+
foreach ( $conditionals as $group_id => $group ) {
|
509 |
+
|
510 |
+
$pass_group = true;
|
511 |
+
|
512 |
+
if ( ! empty( $group ) ) {
|
513 |
+
|
514 |
+
foreach ( $group as $rule_id => $rule ) {
|
515 |
+
|
516 |
+
if ( ! isset( $rule['field'] ) || '' == $rule['field'] || ! isset( $rule['operator'] ) ) {
|
517 |
+
continue;
|
518 |
+
}
|
519 |
+
|
520 |
+
if ( ! isset( $rule['value'] ) && ! in_array( $rule['operator'], array( 'e', '!e' ), true ) ) {
|
521 |
+
continue;
|
522 |
+
}
|
523 |
+
|
524 |
+
$rule_field = $rule['field'];
|
525 |
+
$rule_operator = $rule['operator'];
|
526 |
+
$rule_value = isset( $rule['value'] ) ? $rule['value'] : '';
|
527 |
+
|
528 |
+
if ( in_array( $fields[ $rule_field ]['type'], array( 'text', 'textarea', 'email', 'url', 'number', 'hidden' ), true ) ) {
|
529 |
+
|
530 |
+
// Text based fields.
|
531 |
+
$left = trim( strtolower( $fields[ $rule_field ]['value'] ) );
|
532 |
+
$right = trim( strtolower( $rule_value ) );
|
533 |
+
|
534 |
+
switch ( $rule_operator ) {
|
535 |
+
case '==' :
|
536 |
+
$pass_rule = ( $left == $right );
|
537 |
+
break;
|
538 |
+
case '!=' :
|
539 |
+
$pass_rule = ( $left != $right );
|
540 |
+
break;
|
541 |
+
case 'c' :
|
542 |
+
$pass_rule = ( strpos( $left, $right ) !== false );
|
543 |
+
break;
|
544 |
+
case '!c' :
|
545 |
+
$pass_rule = ( strpos( $left, $right ) === false );
|
546 |
+
break;
|
547 |
+
case '^' :
|
548 |
+
$pass_rule = ( strrpos( $left, $right, -strlen( $left ) ) !== false );
|
549 |
+
break;
|
550 |
+
case '~' :
|
551 |
+
$pass_rule = ( ( $temp = strlen( $left ) - strlen( $right ) ) >= 0 && strpos( $left, $right, $temp ) !== false );
|
552 |
+
break;
|
553 |
+
case 'e' :
|
554 |
+
$pass_rule = ( '' == $left );
|
555 |
+
break;
|
556 |
+
case '!e' :
|
557 |
+
$pass_rule = ( '' != $left );
|
558 |
+
break;
|
559 |
+
default :
|
560 |
+
$pass_rule = apply_filters( 'wpforms_process_conditional_logic', false, $rule_operator, $left, $right );
|
561 |
+
break;
|
562 |
+
}
|
563 |
+
} else {
|
564 |
+
|
565 |
+
// Selector based fields.
|
566 |
+
$provided_id = false;
|
567 |
+
|
568 |
+
if ( in_array( $fields[ $rule_field ]['type'], array( 'payment-multiple', 'payment-select' ), true ) && isset( $fields[ $rule_field ]['value_raw'] ) && '' != $fields[ $rule_field ]['value_raw'] ) {
|
569 |
+
|
570 |
+
// Payment Multiple field stores the option key, so
|
571 |
+
// we can reference that easily.
|
572 |
+
$provided_id = $fields[ $rule_field ]['value_raw'];
|
573 |
+
|
574 |
+
} elseif ( isset( $fields[ $rule_field ]['value'] ) && '' != $fields[ $rule_field ]['value'] ) {
|
575 |
+
|
576 |
+
// Other select type fields we don't store the
|
577 |
+
// option key so we have to do the logic to locate
|
578 |
+
// it ourselves.
|
579 |
+
$provided_id = array();
|
580 |
+
|
581 |
+
if ( in_array( $fields[ $rule_field ]['type'], array( 'checkbox' ) ) ) {
|
582 |
+
$values = explode( "\n", $fields[ $rule_field ]['value'] );
|
583 |
+
} else {
|
584 |
+
$values = (array) $fields[ $rule_field ]['value'];
|
585 |
+
}
|
586 |
+
|
587 |
+
foreach ( $form_data['fields'][ $rule_field ]['choices'] as $key => $choice ) {
|
588 |
+
foreach ( $values as $value ) {
|
589 |
+
if ( in_array( $value, $choice ) ) {
|
590 |
+
$provided_id[] = $key;
|
591 |
+
}
|
592 |
+
}
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
$left = (array) $provided_id;
|
597 |
+
$right = trim( strtolower( (int) $rule_value ) );
|
598 |
+
|
599 |
+
switch ( $rule_operator ) {
|
600 |
+
case '==' :
|
601 |
+
case 'c' : // BC, no longer availabile
|
602 |
+
case '^' : // BC, no longer availabile
|
603 |
+
case '~' : // BC, no longer availabile
|
604 |
+
$pass_rule = in_array( $right, $left );
|
605 |
+
break;
|
606 |
+
case '!=' :
|
607 |
+
case '!c' : // BC, no longer availabile
|
608 |
+
$pass_rule = ! in_array( $right, $left );
|
609 |
+
break;
|
610 |
+
case 'e' :
|
611 |
+
$pass_rule = ( false === $left[0] );
|
612 |
+
break;
|
613 |
+
case '!e' :
|
614 |
+
$pass_rule = ( false !== $left[0] );
|
615 |
+
break;
|
616 |
+
default :
|
617 |
+
$pass_rule = apply_filters( 'wpforms_process_conditional_logic', false, $rule_operator, $left, $right );
|
618 |
+
break;
|
619 |
+
}
|
620 |
+
} // End if().
|
621 |
+
|
622 |
+
if ( ! $pass_rule ) {
|
623 |
+
$pass_group = false;
|
624 |
+
break;
|
625 |
+
}
|
626 |
+
} // End foreach().
|
627 |
+
} // End if().
|
628 |
+
|
629 |
+
if ( $pass_group ) {
|
630 |
+
$pass = true;
|
631 |
+
}
|
632 |
+
} // End foreach().
|
633 |
+
|
634 |
+
return $pass;
|
635 |
+
}
|
636 |
+
|
637 |
+
/**
|
638 |
+
* Alias function for backwards compatibility.
|
639 |
+
*
|
640 |
+
* @since 1.0.0
|
641 |
+
* @param array $fields
|
642 |
+
* @param array $form_data
|
643 |
+
* @param array $conditionals
|
644 |
+
*/
|
645 |
+
public function conditionals_process( $fields, $form_data, $conditionals ) {
|
646 |
+
|
647 |
+
return $this->process( $fields, $form_data, $conditionals );
|
648 |
+
}
|
649 |
+
}
|
650 |
+
|
651 |
+
/**
|
652 |
+
* The function which returns the one WPForms_Conditional_Logic_Core instance.
|
653 |
+
*
|
654 |
+
* Use this function like you would a global variable, except without needing
|
655 |
+
* to declare the global.
|
656 |
+
*
|
657 |
+
* @since 1.1.0
|
658 |
+
* @return object
|
659 |
+
*/
|
660 |
+
function wpforms_conditional_logic() {
|
661 |
+
|
662 |
+
return WPForms_Conditional_Logic_Core::instance();
|
663 |
+
}
|
664 |
+
wpforms_conditional_logic();
|
includes/class-frontend.php
CHANGED
@@ -419,7 +419,9 @@ class WPForms_Frontend {
|
|
419 |
$field_id = absint( $field['id'] );
|
420 |
$properties = array(
|
421 |
'container' => array(
|
422 |
-
'attr' => array(
|
|
|
|
|
423 |
'class' => $attributes['field_class'],
|
424 |
'data' => array(),
|
425 |
'id' => implode( '', array_slice( $attributes['field_id'], 0 ) ),
|
419 |
$field_id = absint( $field['id'] );
|
420 |
$properties = array(
|
421 |
'container' => array(
|
422 |
+
'attr' => array(
|
423 |
+
'style' => $attributes['field_style'],
|
424 |
+
),
|
425 |
'class' => $attributes['field_class'],
|
426 |
'data' => array(),
|
427 |
'id' => implode( '', array_slice( $attributes['field_id'], 0 ) ),
|
includes/class-process.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Process {
|
12 |
|
13 |
/**
|
@@ -51,11 +51,11 @@ class WPForms_Process {
|
|
51 |
*/
|
52 |
public function listen() {
|
53 |
|
54 |
-
if ( !empty( $_GET['wpforms_return'] ) ) {
|
55 |
$this->entry_confirmation_redirect( '', $_GET['wpforms_return'] );
|
56 |
}
|
57 |
|
58 |
-
if ( !empty( $_POST['wpforms']['id'] ) ) {
|
59 |
$this->process( stripslashes_deep( $_POST['wpforms'] ) );
|
60 |
}
|
61 |
}
|
@@ -64,7 +64,7 @@ class WPForms_Process {
|
|
64 |
* Process the form entry.
|
65 |
*
|
66 |
* @since 1.0.0
|
67 |
-
* @param array $
|
68 |
*/
|
69 |
public function process( $entry ) {
|
70 |
|
@@ -75,8 +75,8 @@ class WPForms_Process {
|
|
75 |
$honeypot = false;
|
76 |
|
77 |
// Validate form is real and active (published)
|
78 |
-
if (
|
79 |
-
$this->errors[$form_id]['header'] = __( 'Invalid form.', 'wpforms' );
|
80 |
return;
|
81 |
}
|
82 |
|
@@ -95,7 +95,7 @@ class WPForms_Process {
|
|
95 |
|
96 |
$field_id = $field['id'];
|
97 |
$field_type = $field['type'];
|
98 |
-
$field_submit = isset( $entry['fields'][$field_id] ) ? $entry['fields'][$field_id] : '';
|
99 |
|
100 |
do_action( "wpforms_process_validate_{$field_type}", $field_id, $field_submit, $form_data );
|
101 |
}
|
@@ -103,27 +103,35 @@ class WPForms_Process {
|
|
103 |
// reCAPTCHA check
|
104 |
$site_key = wpforms_setting( 'recaptcha-site-key', '' );
|
105 |
$secret_key = wpforms_setting( 'recaptcha-secret-key', '' );
|
106 |
-
if ( !empty( $site_key ) && !empty( $secret_key ) && isset( $form_data['settings']['recaptcha'] ) && '1' == $form_data['settings']['recaptcha'] ) {
|
107 |
-
if ( !empty( $_POST['g-recaptcha-response'] ) ) {
|
108 |
$data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $_POST['g-recaptcha-response'] );
|
109 |
$data = json_decode( wp_remote_retrieve_body( $data ) );
|
110 |
if ( empty( $data->success ) ) {
|
111 |
-
$this->errors[$form_id]['recaptcha'] = __( 'Incorrect reCAPTCHA, please try again.', 'wpforms' );
|
112 |
}
|
113 |
} else {
|
114 |
-
$this->errors[$form_id]['recaptcha'] = __( 'reCAPTCHA is required.', 'wpforms' );
|
115 |
}
|
116 |
}
|
117 |
|
118 |
-
//
|
119 |
-
if
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
return;
|
122 |
}
|
123 |
|
124 |
// Validate honeypot
|
125 |
-
if ( !empty( $form_data['settings']['honeypot'] ) && '1' == $form_data['settings']['honeypot'] ) {
|
126 |
-
if ( isset( $entry['hp'] ) && !empty( $entry['hp'] ) ) {
|
127 |
$honeypot = __( 'WPForms honeypot field triggered.', 'wpforms' );
|
128 |
}
|
129 |
}
|
@@ -132,7 +140,7 @@ class WPForms_Process {
|
|
132 |
|
133 |
// Only trigger the processing (saving/sending entries, etc) if the entry
|
134 |
// is not spam.
|
135 |
-
if (
|
136 |
|
137 |
// Pass the form created date into the form data
|
138 |
$form_data['created'] = $form->post_date;
|
@@ -142,11 +150,14 @@ class WPForms_Process {
|
|
142 |
|
143 |
$field_id = $field['id'];
|
144 |
$field_type = $field['type'];
|
145 |
-
$field_submit = isset( $entry['fields'][$field_id] ) ? $entry['fields'][$field_id] : '';
|
146 |
|
147 |
do_action( "wpforms_process_format_{$field_type}", $field_id, $field_submit, $form_data );
|
148 |
}
|
149 |
|
|
|
|
|
|
|
150 |
// Process hooks/filter - this is where most add-ons should hook
|
151 |
// because at this point we have completed all field validation and
|
152 |
// formatted the data.
|
@@ -157,10 +168,10 @@ class WPForms_Process {
|
|
157 |
|
158 |
$this->fields = apply_filters( 'wpforms_process_after_filter', $this->fields, $entry, $form_data );
|
159 |
|
160 |
-
// One last error check - don't proceed if there are any errors
|
161 |
-
if ( ! empty( $this->errors[$form_id] ) ) {
|
162 |
-
if ( empty( $this->errors[$form_id]['header'] ) ) {
|
163 |
-
$this->errors[$form_id]['header'] = __( 'Form has not been submitted, please see the errors below.', 'wpforms' );
|
164 |
}
|
165 |
return;
|
166 |
}
|
@@ -203,7 +214,7 @@ class WPForms_Process {
|
|
203 |
'form_id' => $form_data['id'],
|
204 |
)
|
205 |
);
|
206 |
-
}
|
207 |
|
208 |
$this->entry_confirmation_redirect( $form_data );
|
209 |
}
|
@@ -221,12 +232,13 @@ class WPForms_Process {
|
|
221 |
parse_str( $query_args );
|
222 |
|
223 |
// Verify hash matches
|
224 |
-
if (
|
225 |
return false;
|
226 |
}
|
227 |
|
228 |
// Get lead and verify it is attached to the form we received with it
|
229 |
$entry = wpforms()->entry->get( $entry_id );
|
|
|
230 |
if ( $form_id != $entry->form_id ) {
|
231 |
return false;
|
232 |
}
|
@@ -245,36 +257,37 @@ class WPForms_Process {
|
|
245 |
|
246 |
$url = '';
|
247 |
|
248 |
-
if ( !empty( $hash ) ) {
|
249 |
|
250 |
$form_id = $this->validate_return_hash( $hash );
|
251 |
|
252 |
-
if (
|
253 |
return;
|
|
|
254 |
|
255 |
// Get form
|
256 |
$form_data = wpforms()->form->get( $form_id, array( 'content_only' => true ) );
|
257 |
}
|
258 |
|
259 |
// Redirect if needed, to either a page or URL, after form processing
|
260 |
-
if ( !empty( $form_data['settings']['confirmation_type'] ) && $form_data['settings']['confirmation_type']
|
261 |
|
262 |
-
if ( $form_data['settings']['confirmation_type']
|
263 |
$url = apply_filters( 'wpforms_process_smart_tags', $form_data['settings']['confirmation_redirect'], $form_data, $this->fields, $this->entry_id );
|
264 |
}
|
265 |
|
266 |
-
if ( $form_data['settings']['confirmation_type']
|
267 |
$url = get_permalink( (int) $form_data['settings']['confirmation_page'] );
|
268 |
}
|
269 |
}
|
270 |
|
271 |
-
if ( !empty( $form_data['id'] ) ) {
|
272 |
$form_id = $form_data['id'];
|
273 |
} else {
|
274 |
return;
|
275 |
}
|
276 |
|
277 |
-
if ( !empty( $url ) ) {
|
278 |
$url = apply_filters( 'wpforms_process_redirect_url', $url, $form_id, $this->fields );
|
279 |
wp_redirect( esc_url_raw( $url ) );
|
280 |
do_action( 'wpforms_process_redirect', $form_id );
|
@@ -291,6 +304,7 @@ class WPForms_Process {
|
|
291 |
* @param array $entry
|
292 |
* @param array $form_data
|
293 |
* @param array $entry_id
|
|
|
294 |
*/
|
295 |
public function entry_email( $fields, $entry, $form_data, $entry_id, $context = '' ) {
|
296 |
|
@@ -320,7 +334,7 @@ class WPForms_Process {
|
|
320 |
$notifications = $form_data['settings']['notifications'];
|
321 |
}
|
322 |
|
323 |
-
foreach( $notifications as $notification_id => $notification ) {
|
324 |
|
325 |
if ( empty( $notification['email'] ) ) {
|
326 |
continue;
|
@@ -337,11 +351,11 @@ class WPForms_Process {
|
|
337 |
// Setup email properties
|
338 |
$email['address'] = explode( ',', apply_filters( 'wpforms_process_smart_tags', $notification['email'], $form_data, $fields, $this->entry_id ) );
|
339 |
$email['address'] = array_map( 'sanitize_email', $email['address'] );
|
340 |
-
$email['subject'] = !empty( $notification['subject'] ) ? $notification['subject'] : sprintf( __( 'New %s Entry', 'wpforms ' ), $form_data['settings']['form_title'] );
|
341 |
-
$email['sender_address'] = !empty( $notification['sender_address'] ) ? $notification['sender_address'] : get_option( 'admin_email' );
|
342 |
-
$email['sender_name'] = !empty( $notification['sender_name'] ) ? $notification['sender_name'] : get_bloginfo( 'name' );
|
343 |
-
$email['replyto'] = !empty( $notification['replyto'] ) ? $notification['replyto'] : false;
|
344 |
-
$email['message'] = !empty( $notification['message'] ) ? $notification['message'] : '{all_fields}';
|
345 |
$email = apply_filters( 'wpforms_entry_email_atts', $email, $fields, $entry, $form_data, $notification_id );
|
346 |
|
347 |
// Create new email
|
@@ -354,15 +368,15 @@ class WPForms_Process {
|
|
354 |
$emails->__set( 'reply_to', $email['replyto'] );
|
355 |
|
356 |
// Maybe include CC
|
357 |
-
if ( !empty( $notification['carboncopy'] ) && wpforms_setting( 'email-carbon-copy', false ) ) {
|
358 |
$emails->__set( 'cc', $notification['carboncopy'] );
|
359 |
}
|
360 |
|
361 |
// Go
|
362 |
-
foreach( $email['address'] as $address ) {
|
363 |
$emails->send( trim( $address ), $email['subject'], $email['message'] );
|
364 |
}
|
365 |
-
}
|
366 |
}
|
367 |
|
368 |
/**
|
@@ -371,6 +385,7 @@ class WPForms_Process {
|
|
371 |
* @since 1.0.0
|
372 |
* @param array $fields
|
373 |
* @param array $entry
|
|
|
374 |
* @param array $form_data
|
375 |
*/
|
376 |
public function entry_save( $fields, $entry, $form_id, $form_data = '' ) {
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Process {
|
12 |
|
13 |
/**
|
51 |
*/
|
52 |
public function listen() {
|
53 |
|
54 |
+
if ( ! empty( $_GET['wpforms_return'] ) ) {
|
55 |
$this->entry_confirmation_redirect( '', $_GET['wpforms_return'] );
|
56 |
}
|
57 |
|
58 |
+
if ( ! empty( $_POST['wpforms']['id'] ) ) {
|
59 |
$this->process( stripslashes_deep( $_POST['wpforms'] ) );
|
60 |
}
|
61 |
}
|
64 |
* Process the form entry.
|
65 |
*
|
66 |
* @since 1.0.0
|
67 |
+
* @param array $entry $_POST object.
|
68 |
*/
|
69 |
public function process( $entry ) {
|
70 |
|
75 |
$honeypot = false;
|
76 |
|
77 |
// Validate form is real and active (published)
|
78 |
+
if ( ! $form || 'publish' !== $form->post_status ) {
|
79 |
+
$this->errors[ $form_id ]['header'] = __( 'Invalid form.', 'wpforms' );
|
80 |
return;
|
81 |
}
|
82 |
|
95 |
|
96 |
$field_id = $field['id'];
|
97 |
$field_type = $field['type'];
|
98 |
+
$field_submit = isset( $entry['fields'][ $field_id ] ) ? $entry['fields'][ $field_id ] : '';
|
99 |
|
100 |
do_action( "wpforms_process_validate_{$field_type}", $field_id, $field_submit, $form_data );
|
101 |
}
|
103 |
// reCAPTCHA check
|
104 |
$site_key = wpforms_setting( 'recaptcha-site-key', '' );
|
105 |
$secret_key = wpforms_setting( 'recaptcha-secret-key', '' );
|
106 |
+
if ( ! empty( $site_key ) && ! empty( $secret_key ) && isset( $form_data['settings']['recaptcha'] ) && '1' == $form_data['settings']['recaptcha'] ) {
|
107 |
+
if ( ! empty( $_POST['g-recaptcha-response'] ) ) {
|
108 |
$data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $_POST['g-recaptcha-response'] );
|
109 |
$data = json_decode( wp_remote_retrieve_body( $data ) );
|
110 |
if ( empty( $data->success ) ) {
|
111 |
+
$this->errors[ $form_id ]['recaptcha'] = __( 'Incorrect reCAPTCHA, please try again.', 'wpforms' );
|
112 |
}
|
113 |
} else {
|
114 |
+
$this->errors[ $form_id ]['recaptcha'] = __( 'reCAPTCHA is required.', 'wpforms' );
|
115 |
}
|
116 |
}
|
117 |
|
118 |
+
// Initial error check.
|
119 |
+
// Don't proceed if there are any errors thus far. We provide a filter
|
120 |
+
// so that other features, such as conditional logic, have the ability
|
121 |
+
// to adjust blocking errors.
|
122 |
+
$errors = apply_filters( 'wpforms_process_initial_errors', $this->errors, $form_data );
|
123 |
+
|
124 |
+
if ( ! empty( $errors[ $form_id ] ) ) {
|
125 |
+
if ( empty( $this->errors[ $form_id ]['header'] ) ) {
|
126 |
+
$errors[ $form_id ]['header'] = __( 'Form has not been submitted, please see the errors below.', 'wpforms' );
|
127 |
+
}
|
128 |
+
$this->errors = $errors;
|
129 |
return;
|
130 |
}
|
131 |
|
132 |
// Validate honeypot
|
133 |
+
if ( ! empty( $form_data['settings']['honeypot'] ) && '1' == $form_data['settings']['honeypot'] ) {
|
134 |
+
if ( isset( $entry['hp'] ) && ! empty( $entry['hp'] ) ) {
|
135 |
$honeypot = __( 'WPForms honeypot field triggered.', 'wpforms' );
|
136 |
}
|
137 |
}
|
140 |
|
141 |
// Only trigger the processing (saving/sending entries, etc) if the entry
|
142 |
// is not spam.
|
143 |
+
if ( ! $honeypot ) {
|
144 |
|
145 |
// Pass the form created date into the form data
|
146 |
$form_data['created'] = $form->post_date;
|
150 |
|
151 |
$field_id = $field['id'];
|
152 |
$field_type = $field['type'];
|
153 |
+
$field_submit = isset( $entry['fields'][ $field_id ] ) ? $entry['fields'][ $field_id ] : '';
|
154 |
|
155 |
do_action( "wpforms_process_format_{$field_type}", $field_id, $field_submit, $form_data );
|
156 |
}
|
157 |
|
158 |
+
// This hook is for internal purposes and should not be leveraged.
|
159 |
+
do_action( 'wpforms_process_format_after', $form_data );
|
160 |
+
|
161 |
// Process hooks/filter - this is where most add-ons should hook
|
162 |
// because at this point we have completed all field validation and
|
163 |
// formatted the data.
|
168 |
|
169 |
$this->fields = apply_filters( 'wpforms_process_after_filter', $this->fields, $entry, $form_data );
|
170 |
|
171 |
+
// One last error check - don't proceed if there are any errors.
|
172 |
+
if ( ! empty( $this->errors[ $form_id ] ) ) {
|
173 |
+
if ( empty( $this->errors[ $form_id ]['header'] ) ) {
|
174 |
+
$this->errors[ $form_id ]['header'] = __( 'Form has not been submitted, please see the errors below.', 'wpforms' );
|
175 |
}
|
176 |
return;
|
177 |
}
|
214 |
'form_id' => $form_data['id'],
|
215 |
)
|
216 |
);
|
217 |
+
} // End if().
|
218 |
|
219 |
$this->entry_confirmation_redirect( $form_data );
|
220 |
}
|
232 |
parse_str( $query_args );
|
233 |
|
234 |
// Verify hash matches
|
235 |
+
if ( wp_hash( $form_id . ',' . $entry_id ) != $hash ) {
|
236 |
return false;
|
237 |
}
|
238 |
|
239 |
// Get lead and verify it is attached to the form we received with it
|
240 |
$entry = wpforms()->entry->get( $entry_id );
|
241 |
+
|
242 |
if ( $form_id != $entry->form_id ) {
|
243 |
return false;
|
244 |
}
|
257 |
|
258 |
$url = '';
|
259 |
|
260 |
+
if ( ! empty( $hash ) ) {
|
261 |
|
262 |
$form_id = $this->validate_return_hash( $hash );
|
263 |
|
264 |
+
if ( ! $form_id ) {
|
265 |
return;
|
266 |
+
}
|
267 |
|
268 |
// Get form
|
269 |
$form_data = wpforms()->form->get( $form_id, array( 'content_only' => true ) );
|
270 |
}
|
271 |
|
272 |
// Redirect if needed, to either a page or URL, after form processing
|
273 |
+
if ( ! empty( $form_data['settings']['confirmation_type'] ) && 'message' !== $form_data['settings']['confirmation_type'] ) {
|
274 |
|
275 |
+
if ( 'redirect' === $form_data['settings']['confirmation_type'] ) {
|
276 |
$url = apply_filters( 'wpforms_process_smart_tags', $form_data['settings']['confirmation_redirect'], $form_data, $this->fields, $this->entry_id );
|
277 |
}
|
278 |
|
279 |
+
if ( 'page' === $form_data['settings']['confirmation_type'] ) {
|
280 |
$url = get_permalink( (int) $form_data['settings']['confirmation_page'] );
|
281 |
}
|
282 |
}
|
283 |
|
284 |
+
if ( ! empty( $form_data['id'] ) ) {
|
285 |
$form_id = $form_data['id'];
|
286 |
} else {
|
287 |
return;
|
288 |
}
|
289 |
|
290 |
+
if ( ! empty( $url ) ) {
|
291 |
$url = apply_filters( 'wpforms_process_redirect_url', $url, $form_id, $this->fields );
|
292 |
wp_redirect( esc_url_raw( $url ) );
|
293 |
do_action( 'wpforms_process_redirect', $form_id );
|
304 |
* @param array $entry
|
305 |
* @param array $form_data
|
306 |
* @param array $entry_id
|
307 |
+
* @param string $context
|
308 |
*/
|
309 |
public function entry_email( $fields, $entry, $form_data, $entry_id, $context = '' ) {
|
310 |
|
334 |
$notifications = $form_data['settings']['notifications'];
|
335 |
}
|
336 |
|
337 |
+
foreach ( $notifications as $notification_id => $notification ) {
|
338 |
|
339 |
if ( empty( $notification['email'] ) ) {
|
340 |
continue;
|
351 |
// Setup email properties
|
352 |
$email['address'] = explode( ',', apply_filters( 'wpforms_process_smart_tags', $notification['email'], $form_data, $fields, $this->entry_id ) );
|
353 |
$email['address'] = array_map( 'sanitize_email', $email['address'] );
|
354 |
+
$email['subject'] = ! empty( $notification['subject'] ) ? $notification['subject'] : sprintf( __( 'New %s Entry', 'wpforms ' ), $form_data['settings']['form_title'] );
|
355 |
+
$email['sender_address'] = ! empty( $notification['sender_address'] ) ? $notification['sender_address'] : get_option( 'admin_email' );
|
356 |
+
$email['sender_name'] = ! empty( $notification['sender_name'] ) ? $notification['sender_name'] : get_bloginfo( 'name' );
|
357 |
+
$email['replyto'] = ! empty( $notification['replyto'] ) ? $notification['replyto'] : false;
|
358 |
+
$email['message'] = ! empty( $notification['message'] ) ? $notification['message'] : '{all_fields}';
|
359 |
$email = apply_filters( 'wpforms_entry_email_atts', $email, $fields, $entry, $form_data, $notification_id );
|
360 |
|
361 |
// Create new email
|
368 |
$emails->__set( 'reply_to', $email['replyto'] );
|
369 |
|
370 |
// Maybe include CC
|
371 |
+
if ( ! empty( $notification['carboncopy'] ) && wpforms_setting( 'email-carbon-copy', false ) ) {
|
372 |
$emails->__set( 'cc', $notification['carboncopy'] );
|
373 |
}
|
374 |
|
375 |
// Go
|
376 |
+
foreach ( $email['address'] as $address ) {
|
377 |
$emails->send( trim( $address ), $email['subject'], $email['message'] );
|
378 |
}
|
379 |
+
} // End foreach().
|
380 |
}
|
381 |
|
382 |
/**
|
385 |
* @since 1.0.0
|
386 |
* @param array $fields
|
387 |
* @param array $entry
|
388 |
+
* @param int $form_id
|
389 |
* @param array $form_data
|
390 |
*/
|
391 |
public function entry_save( $fields, $entry, $form_id, $form_data = '' ) {
|
includes/fields/class-base.php
CHANGED
@@ -190,7 +190,10 @@ abstract class WPForms_Field {
|
|
190 |
|
191 |
if ( ! empty( $args['data'] ) ) {
|
192 |
foreach ( $args['data'] as $key => $val ) {
|
193 |
-
|
|
|
|
|
|
|
194 |
}
|
195 |
}
|
196 |
|
@@ -491,6 +494,7 @@ abstract class WPForms_Field {
|
|
491 |
|
492 |
case 'size':
|
493 |
$value = ! empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
|
|
|
494 |
$tooltip = __( 'Select the default form field size.', 'wpforms' );
|
495 |
$options = array(
|
496 |
'small' => __( 'Small', 'wpforms' ),
|
@@ -499,7 +503,7 @@ abstract class WPForms_Field {
|
|
499 |
);
|
500 |
$output = $this->field_element( 'label', $field, array( 'slug' => 'size', 'value' => __( 'Field Size', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
501 |
$output .= $this->field_element( 'select', $field, array( 'slug' => 'size', 'value' => $value, 'options' => $options ), false );
|
502 |
-
$output = $this->field_element( 'row', $field, array( 'slug' => 'size', 'content' => $output ), false );
|
503 |
break;
|
504 |
|
505 |
// Advanced Options markup ---------------------------------------//
|
190 |
|
191 |
if ( ! empty( $args['data'] ) ) {
|
192 |
foreach ( $args['data'] as $key => $val ) {
|
193 |
+
if ( is_array( $val ) ) {
|
194 |
+
$val = wp_json_encode( $val );
|
195 |
+
}
|
196 |
+
$data .= ' data-' . $key . '=\'' . $val . '\'';
|
197 |
}
|
198 |
}
|
199 |
|
494 |
|
495 |
case 'size':
|
496 |
$value = ! empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
|
497 |
+
$class = ! empty( $args['class'] ) ? esc_html( $args['class'] ) : '';
|
498 |
$tooltip = __( 'Select the default form field size.', 'wpforms' );
|
499 |
$options = array(
|
500 |
'small' => __( 'Small', 'wpforms' ),
|
503 |
);
|
504 |
$output = $this->field_element( 'label', $field, array( 'slug' => 'size', 'value' => __( 'Field Size', 'wpforms' ), 'tooltip' => $tooltip ), false );
|
505 |
$output .= $this->field_element( 'select', $field, array( 'slug' => 'size', 'value' => $value, 'options' => $options ), false );
|
506 |
+
$output = $this->field_element( 'row', $field, array( 'slug' => 'size', 'content' => $output, 'class' => $class ), false );
|
507 |
break;
|
508 |
|
509 |
// Advanced Options markup ---------------------------------------//
|
includes/fields/class-name.php
CHANGED
@@ -97,6 +97,7 @@ class WPForms_Field_Name extends WPForms_Field {
|
|
97 |
),
|
98 |
'data' => array(),
|
99 |
'id' => "wpforms-{$form_id}-field_{$field_id}-middle",
|
|
|
100 |
'sublabel' => array(
|
101 |
'hidden' => ! empty( $field['sublabel_hide'] ),
|
102 |
'value' => __( 'Middle', 'wpforms' ),
|
@@ -441,8 +442,9 @@ class WPForms_Field_Name extends WPForms_Field {
|
|
441 |
if ( 'first-middle-last' === $format ) {
|
442 |
echo '<div ' . wpforms_html_attributes( false, $middle['block'] ) . '>';
|
443 |
$this->field_display_sublabel( 'middle', 'before', $field );
|
444 |
-
printf( '<input type="text" %s>',
|
445 |
-
wpforms_html_attributes( $middle['id'], $middle['class'], $middle['data'], $middle['attr'] )
|
|
|
446 |
);
|
447 |
$this->field_display_sublabel( 'middle', 'after', $field );
|
448 |
$this->field_display_error( 'middle', $field );
|
97 |
),
|
98 |
'data' => array(),
|
99 |
'id' => "wpforms-{$form_id}-field_{$field_id}-middle",
|
100 |
+
'required' => '',
|
101 |
'sublabel' => array(
|
102 |
'hidden' => ! empty( $field['sublabel_hide'] ),
|
103 |
'value' => __( 'Middle', 'wpforms' ),
|
442 |
if ( 'first-middle-last' === $format ) {
|
443 |
echo '<div ' . wpforms_html_attributes( false, $middle['block'] ) . '>';
|
444 |
$this->field_display_sublabel( 'middle', 'before', $field );
|
445 |
+
printf( '<input type="text" %s %s>',
|
446 |
+
wpforms_html_attributes( $middle['id'], $middle['class'], $middle['data'], $middle['attr'] ),
|
447 |
+
$middle['required']
|
448 |
);
|
449 |
$this->field_display_sublabel( 'middle', 'after', $field );
|
450 |
$this->field_display_error( 'middle', $field );
|
includes/providers/class-base.php
CHANGED
@@ -248,96 +248,13 @@ abstract class WPForms_Provider {
|
|
248 |
return true;
|
249 |
}
|
250 |
|
251 |
-
$
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
$pass_group = true;
|
256 |
-
|
257 |
-
if ( !empty( $group ) ) {
|
258 |
-
|
259 |
-
foreach( $group as $rule_id => $rule ) {
|
260 |
-
|
261 |
-
if ( in_array( $fields[$rule['field']]['type'], array( 'text', 'textarea' ) ) ) {
|
262 |
-
|
263 |
-
if ( $rule['operator'] == "==" ) {
|
264 |
-
|
265 |
-
$pass_rule = ( $fields[$rule['field']]['value'] === $rule['value'] );
|
266 |
-
|
267 |
-
} elseif( $rule['operator'] == "!=" ) {
|
268 |
-
|
269 |
-
$pass_rule = ( $fields[$rule['field']]['value'] !== $rule['value'] );
|
270 |
-
|
271 |
-
}
|
272 |
-
|
273 |
-
} elseif ( in_array( $fields[$rule['field']]['type'], array( 'checkbox' ) ) ) {
|
274 |
-
|
275 |
-
$provided_id = false;
|
276 |
-
|
277 |
-
if ( !empty( $fields[$rule['field']]['value'] ) ) {
|
278 |
-
|
279 |
-
$provided_id = array();
|
280 |
-
$values = explode( "\n", $fields[$rule['field']]['value'] );
|
281 |
-
|
282 |
-
foreach( $form_data['fields'][$rule['field']]['choices'] as $key => $choice ) {
|
283 |
-
|
284 |
-
foreach( $values as $value ) {
|
285 |
-
|
286 |
-
if ( in_array( $value, $choice ) ) {
|
287 |
-
$provided_id[] = $key;
|
288 |
-
}
|
289 |
-
}
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
-
if ( $rule['operator'] == "==" ) {
|
294 |
-
|
295 |
-
$pass_rule = in_array( (int) $rule['value'], (array) $provided_id );
|
296 |
-
|
297 |
-
} elseif( $rule['operator'] == "!=" ) {
|
298 |
-
|
299 |
-
$pass_rule = ! in_array( (int) $rule['value'], (array) $provided_id );
|
300 |
-
}
|
301 |
-
|
302 |
-
} else {
|
303 |
-
|
304 |
-
$provided_id = false;
|
305 |
-
|
306 |
-
if ( !empty( $fields[$rule['field']]['value'] ) ) {
|
307 |
-
|
308 |
-
foreach( $form_data['fields'][$rule['field']]['choices'] as $key => $choice ) {
|
309 |
-
|
310 |
-
if ( in_array( $fields[$rule['field']]['value'], $choice ) ) {
|
311 |
-
|
312 |
-
$provided_id = (int) $key;
|
313 |
-
}
|
314 |
-
}
|
315 |
-
}
|
316 |
-
|
317 |
-
if ( $rule['operator'] == "==" ) {
|
318 |
-
|
319 |
-
$pass_rule = ( $provided_id === (int) $rule['value'] );
|
320 |
-
|
321 |
-
} elseif( $rule['operator'] == "!=" ) {
|
322 |
-
|
323 |
-
$pass_rule = ( $provided_id !== (int) $rule['value'] );
|
324 |
-
|
325 |
-
}
|
326 |
-
}
|
327 |
-
|
328 |
-
if ( !$pass_rule ) {
|
329 |
-
$pass_group = false;
|
330 |
-
break;
|
331 |
-
}
|
332 |
-
}
|
333 |
-
}
|
334 |
-
|
335 |
-
if ( $pass_group ) {
|
336 |
-
$pass = true;
|
337 |
-
}
|
338 |
}
|
339 |
|
340 |
-
return $
|
341 |
}
|
342 |
|
343 |
/**
|
@@ -857,140 +774,33 @@ abstract class WPForms_Provider {
|
|
857 |
* Provider connection conditional options HTML
|
858 |
*
|
859 |
* @since 1.0.0
|
860 |
-
* @
|
|
|
|
|
|
|
861 |
*/
|
862 |
public function output_conditionals( $connection_id = '', $connection = array(), $form = '' ) {
|
863 |
|
864 |
-
if ( empty( $connection['account_id'] ) )
|
865 |
return;
|
|
|
866 |
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
$style = empty( $connection['conditional_logic'] ) ? 'display:none' : '';
|
884 |
-
|
885 |
-
$output .= sprintf( '<div class="wpforms-provider-conditionals-groups" style="%s">', $style );
|
886 |
-
|
887 |
-
$output .= '<h4>' . __( 'Process this form if', 'wpforms' ) . '</h4>';
|
888 |
-
|
889 |
-
if ( empty( $connection['conditionals'] ) ){
|
890 |
-
$connection['conditionals'][0][0] = array();
|
891 |
-
}
|
892 |
-
|
893 |
-
foreach ( $connection['conditionals'] as $group_id => $group ) :
|
894 |
-
|
895 |
-
$output .= '<div class="wpforms-provider-conditionals-group">';
|
896 |
-
|
897 |
-
$output .='<table><tbody>';
|
898 |
-
|
899 |
-
foreach ( $group as $rule_id => $rule ) :
|
900 |
-
|
901 |
-
$output .= '<tr class="wpforms-provider-conditionals-group-row">';
|
902 |
-
|
903 |
-
// Fields
|
904 |
-
$output .= '<td class="field">';
|
905 |
-
|
906 |
-
$output .= sprintf(
|
907 |
-
'<select name="providers[%s][%s][conditionals][%d][%d][field]" data-provider="%s" data-connectionid="%s" data-groupid="%d" data-ruleid="%d" class="wpforms-provider-conditionals-field">',
|
908 |
-
$this->slug,
|
909 |
-
$connection_id,
|
910 |
-
$group_id,
|
911 |
-
$rule_id,
|
912 |
-
$this->slug,
|
913 |
-
$connection_id,
|
914 |
-
$group_id,
|
915 |
-
$rule_id
|
916 |
-
);
|
917 |
-
|
918 |
-
$output .= '<option value="">' . __( '-- Select field --', 'wpforms' ) . '</option>';
|
919 |
-
|
920 |
-
foreach( $form_fields as $form_field ) {
|
921 |
-
$selected = !empty( $rule['field'] ) ? $rule['field'] : false;
|
922 |
-
$selected = selected( $selected, $form_field['id'], false );
|
923 |
-
$output .= sprintf( '<option value="%s" %s>%s</option>', absint( $form_field['id'] ), $selected, esc_html( $form_field['label'] ) );
|
924 |
-
}
|
925 |
-
|
926 |
-
$output .= '</select>';
|
927 |
-
|
928 |
-
$output .= '</td>';
|
929 |
-
|
930 |
-
// Operator
|
931 |
-
$output .= '<td class="operator">';
|
932 |
-
|
933 |
-
$output .= sprintf( '<select name="providers[%s][%s][conditionals][%s][%s][operator]" class="wpforms-provider-conditionals-operator">', $this->slug, $connection_id, $group_id, $rule_id );
|
934 |
-
$operator = !empty( $rule['operator'] ) ? $rule['operator'] : false;
|
935 |
-
$output .= sprintf( '<option value="==" %s>%s</option>', selected( $operator, '==', false ), __( 'is', 'wpforms' ) );
|
936 |
-
$output .= sprintf( '<option value="!=" %s>%s</option>', selected( $operator, '!=', false ), __( 'is not', 'wpforms' ) );
|
937 |
-
$output .= '</select>';
|
938 |
-
|
939 |
-
$output .= '</td>';
|
940 |
-
|
941 |
-
// Values
|
942 |
-
$output .= '<td class="value">';
|
943 |
-
|
944 |
-
if ( !empty( $rule['field'] ) ) {
|
945 |
-
|
946 |
-
if ( in_array( $form_fields[$rule['field']]['type'], array( 'text', 'textarea') ) ) {
|
947 |
-
|
948 |
-
$output .= sprintf( '<input type="text" name="providers[%s][%s][conditionals][%s][%s][value]" value="%s" class="wpforms-provider-conditionals-value">', $this->slug, $connection_id, $group_id, $rule_id, esc_attr($rule['value'] ) );
|
949 |
-
|
950 |
-
} else {
|
951 |
-
$output .= sprintf( '<select name="providers[%s][%s][conditionals][%s][%s][value]" class="wpforms-provider-conditionals-value">', $this->slug, $connection_id, $group_id, $rule_id );
|
952 |
-
$output .= '<option value="">' . __( '-- Select Choice --', 'wpforms' ) . '</option>';
|
953 |
-
foreach( $form_fields[$rule['field']]['choices'] as $option_id => $option ) {
|
954 |
-
$value = !empty( $rule['value'] ) ? $rule['value'] : '';
|
955 |
-
$selected = selected( $option_id, $rule['value'], false );
|
956 |
-
$output .= sprintf( '<option value="%s" %s>%s</option>', $option_id, $selected, esc_html( $option['label'] ) );
|
957 |
-
}
|
958 |
-
$output .= '</select>';
|
959 |
-
}
|
960 |
-
|
961 |
-
} else {
|
962 |
-
$output .= '<select></select>';
|
963 |
-
}
|
964 |
-
|
965 |
-
$output .= '</td>';
|
966 |
-
|
967 |
-
// Actions
|
968 |
-
$output .= '<td class="actions">';
|
969 |
-
|
970 |
-
$output .= sprintf( '<button class="wpforms-provider-conditionals-rule-add">%s</button>', __( 'AND', 'wpforms') );
|
971 |
-
$output .= '<button class="wpforms-provider-conditionals-rule-delete"><i class="fa fa-minus-circle"></i></button>';
|
972 |
-
|
973 |
-
$output .= '</td>';
|
974 |
-
|
975 |
-
$output .= '</tr>';
|
976 |
-
|
977 |
-
endforeach;
|
978 |
-
|
979 |
-
$output .= '</tbody></table>';
|
980 |
-
|
981 |
-
$output .= '<h5>or</h5>';
|
982 |
-
|
983 |
-
$output .= '</div>';
|
984 |
-
|
985 |
-
endforeach;
|
986 |
-
|
987 |
-
$output .= '<button class="wpforms-provider-conditionals-groups-add">' . __( 'Add rule group', 'wpforms' ) . '</button>';
|
988 |
-
|
989 |
-
$output .= '</div>';
|
990 |
-
|
991 |
-
$output .= '</div>';
|
992 |
-
|
993 |
-
return $output;
|
994 |
}
|
995 |
|
996 |
|
@@ -1019,7 +829,7 @@ abstract class WPForms_Provider {
|
|
1019 |
*/
|
1020 |
public function builder_form_data() {
|
1021 |
|
1022 |
-
if ( !empty( $_GET['form_id'] ) ) {
|
1023 |
$this->form_data = wpforms()->form->get( absint( $_GET['form_id'] ), array( 'content_only' => true ) );
|
1024 |
}
|
1025 |
}
|
248 |
return true;
|
249 |
}
|
250 |
|
251 |
+
$process = wpforms_conditional_logic()->process( $fields, $form_data, $connection['conditionals'] );
|
252 |
|
253 |
+
if ( ! empty( $connection['conditional_type'] ) && 'stop' === $connection['conditional_type'] ) {
|
254 |
+
$process = ! $process;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
}
|
256 |
|
257 |
+
return $process;
|
258 |
}
|
259 |
|
260 |
/**
|
774 |
* Provider connection conditional options HTML
|
775 |
*
|
776 |
* @since 1.0.0
|
777 |
+
* @param string $connection_id
|
778 |
+
* @param array $connection
|
779 |
+
* @param array $form
|
780 |
+
* @return string
|
781 |
*/
|
782 |
public function output_conditionals( $connection_id = '', $connection = array(), $form = '' ) {
|
783 |
|
784 |
+
if ( empty( $connection['account_id'] ) ) {
|
785 |
return;
|
786 |
+
}
|
787 |
|
788 |
+
return wpforms_conditional_logic()->builder_block(
|
789 |
+
array(
|
790 |
+
'form' => $this->form_data,
|
791 |
+
'type' => 'panel',
|
792 |
+
'panel' => $this->slug,
|
793 |
+
'parent' => 'providers',
|
794 |
+
'subsection' => $connection_id,
|
795 |
+
'actions' => array(
|
796 |
+
'go' => __( 'Process', 'wpforms' ),
|
797 |
+
'stop' => __( 'Don\'t process', 'wpforms' ),
|
798 |
+
),
|
799 |
+
'action_desc' => __( 'this connection if', 'wpforms' ),
|
800 |
+
'reference' => __( 'Marketing provider connection', 'wpforms' ),
|
801 |
+
),
|
802 |
+
false
|
803 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
}
|
805 |
|
806 |
|
829 |
*/
|
830 |
public function builder_form_data() {
|
831 |
|
832 |
+
if ( ! empty( $_GET['form_id'] ) && empty( $this->form_data ) ) {
|
833 |
$this->form_data = wpforms()->form->get( absint( $_GET['form_id'] ), array( 'content_only' => true ) );
|
834 |
}
|
835 |
}
|
languages/wpforms.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the WPForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPForms 1.3.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,7 +12,7 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: includes/admin/ajax-actions.php:24 includes/fields/class-base.php:
|
16 |
msgid "You do no have permission."
|
17 |
msgstr ""
|
18 |
|
@@ -40,47 +40,52 @@ msgstr ""
|
|
40 |
msgid "Error updating form template"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: includes/admin/ajax-actions.php:243 includes/fields/class-base.php:
|
44 |
msgid "post type"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: includes/admin/ajax-actions.php:262 includes/fields/class-base.php:
|
48 |
msgid "taxonomy"
|
49 |
msgstr ""
|
50 |
|
51 |
#: includes/admin/builder/class-builder.php:273
|
|
|
|
|
|
|
|
|
|
|
52 |
msgid "Add New Choices"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: includes/admin/builder/class-builder.php:
|
56 |
-
#: includes/fields/class-base.php:
|
57 |
msgid "Bulk Add"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: includes/admin/builder/class-builder.php:
|
61 |
msgid "Hide Bulk Add"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: includes/admin/builder/class-builder.php:
|
65 |
msgid "Add Choices (one per line)"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: includes/admin/builder/class-builder.php:
|
69 |
msgid ""
|
70 |
"Blue\n"
|
71 |
"Red\n"
|
72 |
"Green"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: includes/admin/builder/class-builder.php:
|
76 |
msgid "Show presets"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: includes/admin/builder/class-builder.php:
|
80 |
msgid "Hide presets"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: includes/admin/builder/class-builder.php:
|
84 |
#: pro/includes/fields/class-date-time.php:229
|
85 |
#: pro/includes/fields/class-date-time.php:231
|
86 |
#: pro/includes/fields/class-date-time.php:452
|
@@ -88,7 +93,7 @@ msgstr ""
|
|
88 |
msgid "DD"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: includes/admin/builder/class-builder.php:
|
92 |
#: pro/includes/fields/class-date-time.php:228
|
93 |
#: pro/includes/fields/class-date-time.php:232
|
94 |
#: pro/includes/fields/class-date-time.php:433
|
@@ -98,265 +103,336 @@ msgstr ""
|
|
98 |
msgid "MM"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/admin/builder/class-builder.php:
|
102 |
msgid ""
|
103 |
"The {source} {type} contains over {limit} items ({total}). This may make the "
|
104 |
"field difficult for your vistors to use and/or cause the form to be slow."
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: includes/admin/builder/class-builder.php:
|
108 |
#: includes/admin/class-editor.php:96
|
109 |
#: pro/includes/admin/entries/class-entries.php:994
|
110 |
msgid "Cancel"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/admin/builder/class-builder.php:
|
114 |
msgid "OK"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/admin/builder/class-builder.php:
|
118 |
#: includes/admin/class-editor.php:70
|
119 |
msgid "Close"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: includes/admin/builder/class-builder.php:
|
123 |
msgid ""
|
124 |
"Due to form changes, conditional logic rules have been removed or updated:"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: includes/admin/builder/class-builder.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
#: pro/includes/admin/entries/class-entries-table.php:176
|
129 |
msgid "Field"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: includes/admin/builder/class-builder.php:
|
133 |
msgid "Field Locked"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: includes/admin/builder/class-builder.php:
|
137 |
msgid "This field cannot be deleted or duplicated."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: includes/admin/builder/class-builder.php:
|
141 |
msgid "Available Fields"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: includes/admin/builder/class-builder.php:
|
145 |
msgid "No fields available"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/admin/builder/class-builder.php:
|
149 |
msgid "Heads up!"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/admin/builder/class-builder.php:
|
153 |
msgid "No email fields"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: includes/admin/builder/class-builder.php:
|
157 |
msgid "Are you sure you want to delete this notification?"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: includes/admin/builder/class-builder.php:
|
161 |
msgid "Enter a notification name"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: includes/admin/builder/class-builder.php:
|
165 |
msgid "Eg: User Confirmation"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: includes/admin/builder/class-builder.php:
|
169 |
msgid "You must provide a notification name"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: includes/admin/builder/class-builder.php:
|
173 |
msgid ""
|
174 |
"Form must contain one notification. To disable all notifications use the "
|
175 |
"setting Notifications dropdown setting."
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: includes/admin/builder/class-builder.php:
|
179 |
#: lite/includes/admin/class-settings.php:149
|
180 |
#: pro/includes/admin/class-settings.php:160
|
181 |
msgid "Saving ..."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/admin/builder/class-builder.php:
|
185 |
msgid "Saved!"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: includes/admin/builder/class-builder.php:
|
189 |
msgid "Save and Exit"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: includes/admin/builder/class-builder.php:
|
193 |
-
#: includes/fields/class-base.php:
|
194 |
msgid "Show Layouts"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: includes/admin/builder/class-builder.php:
|
198 |
msgid "Hide Layouts"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: includes/admin/builder/class-builder.php:
|
202 |
msgid "Select your layout"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: includes/admin/builder/class-builder.php:
|
206 |
msgid "Select your column"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: includes/admin/builder/class-builder.php:
|
210 |
-
#: includes/admin/builder/class-builder.php:
|
211 |
msgid "Loading"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: includes/admin/builder/class-builder.php:
|
215 |
msgid "Use Template"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/admin/builder/class-builder.php:
|
219 |
msgid ""
|
220 |
"Changing templates on an existing form will DELETE existing form fields. Are "
|
221 |
"you sure you want apply the new template?"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: includes/admin/builder/class-builder.php:
|
225 |
msgid ""
|
226 |
"You are almost done. To embed this form on your site, please paste the "
|
227 |
"following shortcode inside a post or page."
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/admin/builder/class-builder.php:
|
231 |
msgid "Or you can follow the instructions in this video."
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: includes/admin/builder/class-builder.php:
|
235 |
-
#: includes/admin/builder/class-builder.php:
|
236 |
msgid "Exit"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: includes/admin/builder/class-builder.php:
|
240 |
msgid "If you exit without saving, your changes will be lost."
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: includes/admin/builder/class-builder.php:
|
244 |
msgid "Are you sure you want to delete this field?"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: includes/admin/builder/class-builder.php:
|
248 |
msgid "Are you sure you want to duplicate this field?"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: includes/admin/builder/class-builder.php:
|
252 |
msgid "(copy)"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: includes/admin/builder/class-builder.php:
|
256 |
msgid "Please enter a form title."
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: includes/admin/builder/class-builder.php:
|
260 |
msgid "This item must contain at least one choice."
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: includes/admin/builder/class-builder.php:
|
264 |
-
#: includes/fields/class-base.php:
|
265 |
-
#: lite/wpforms-lite.php:
|
266 |
msgid "Off"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: includes/admin/builder/class-builder.php:
|
270 |
-
#: includes/fields/class-base.php:
|
271 |
-
#: pro/wpforms-pro.php:
|
272 |
msgid "On"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: includes/admin/builder/class-builder.php:
|
|
|
|
|
|
|
|
|
276 |
#: includes/templates/class-suggestion.php:59
|
277 |
msgid "Other"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: includes/admin/builder/class-builder.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
#: pro/includes/fields/class-page-break.php:186
|
282 |
#: pro/includes/fields/class-page-break.php:517
|
283 |
msgid "Previous"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: includes/admin/builder/class-builder.php:
|
287 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
msgid "Show Smart Tags"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: includes/admin/builder/class-builder.php:
|
292 |
msgid "Hide Smart Tags"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: includes/admin/builder/class-builder.php:
|
|
|
296 |
msgid "-- Select Field --"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: includes/admin/builder/class-builder.php:
|
300 |
-
#: includes/
|
301 |
msgid "-- Select Choice --"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: includes/admin/builder/class-builder.php:
|
305 |
msgid "Countries"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: includes/admin/builder/class-builder.php:
|
309 |
msgid "Countries Postal Code"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: includes/admin/builder/class-builder.php:
|
313 |
msgid "States"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: includes/admin/builder/class-builder.php:
|
317 |
msgid "States Postal Code"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: includes/admin/builder/class-builder.php:
|
321 |
msgid "Months"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: includes/admin/builder/class-builder.php:
|
325 |
msgid "Days"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: includes/admin/builder/class-builder.php:
|
329 |
msgid "Now editing"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: includes/admin/builder/class-builder.php:
|
333 |
#: pro/includes/admin/entries/class-entries.php:512
|
334 |
msgid "Preview Form"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/admin/builder/class-builder.php:
|
338 |
#: includes/admin/overview/class-overview-table.php:159
|
339 |
msgid "Preview"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: includes/admin/builder/class-builder.php:
|
343 |
msgid "Embed Form"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: includes/admin/builder/class-builder.php:
|
347 |
msgid "Embed"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: includes/admin/builder/class-builder.php:
|
351 |
msgid "Save Form"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: includes/admin/builder/class-builder.php:
|
355 |
-
#: pro/includes/admin/class-settings.php:
|
356 |
msgid "Save"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: includes/admin/builder/functions.php:
|
360 |
msgid "Field #"
|
361 |
msgstr ""
|
362 |
|
@@ -404,17 +480,17 @@ msgid "You don't have any fields yet. Add some!"
|
|
404 |
msgstr ""
|
405 |
|
406 |
#: includes/admin/builder/panels/class-fields.php:252
|
407 |
-
#: includes/fields/class-base.php:
|
408 |
msgid "Duplicate Field"
|
409 |
msgstr ""
|
410 |
|
411 |
#: includes/admin/builder/panels/class-fields.php:254
|
412 |
-
#: includes/fields/class-base.php:
|
413 |
msgid "Delete Field"
|
414 |
msgstr ""
|
415 |
|
416 |
#: includes/admin/builder/panels/class-fields.php:256
|
417 |
-
#: includes/fields/class-base.php:
|
418 |
msgid "Click to edit. Drag to reorder."
|
419 |
msgstr ""
|
420 |
|
@@ -477,8 +553,8 @@ msgid ""
|
|
477 |
msgstr ""
|
478 |
|
479 |
#: includes/admin/builder/panels/class-settings.php:21
|
480 |
-
#: includes/admin/class-menu.php:81 lite/includes/admin/class-settings.php:
|
481 |
-
#: pro/includes/admin/class-settings.php:
|
482 |
msgid "Settings"
|
483 |
msgstr ""
|
484 |
|
@@ -489,8 +565,8 @@ msgstr ""
|
|
489 |
msgid "General"
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:
|
493 |
-
#: lite/wpforms-lite.php:
|
494 |
msgid "Notifications"
|
495 |
msgstr ""
|
496 |
|
@@ -568,8 +644,8 @@ msgid "Confirmation Type"
|
|
568 |
msgstr ""
|
569 |
|
570 |
#: includes/admin/builder/panels/class-settings.php:188
|
571 |
-
#: includes/templates/class-suggestion.php:74 lite/wpforms-lite.php:
|
572 |
-
#: pro/wpforms-pro.php:
|
573 |
msgid "Message"
|
574 |
msgstr ""
|
575 |
|
@@ -666,9 +742,9 @@ msgid ""
|
|
666 |
"a>?"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.3.
|
670 |
#. Plugin Name of the plugin/theme
|
671 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.3.
|
672 |
#. Author of the plugin/theme
|
673 |
#: includes/admin/class-menu.php:36 includes/admin/class-menu.php:37
|
674 |
#: includes/admin/class-menu.php:48 includes/admin/class-menu.php:90
|
@@ -686,7 +762,7 @@ msgstr ""
|
|
686 |
|
687 |
#: includes/admin/class-menu.php:59
|
688 |
#: includes/admin/overview/class-overview.php:148
|
689 |
-
#: includes/providers/class-base.php:
|
690 |
msgid "Add New"
|
691 |
msgstr ""
|
692 |
|
@@ -696,7 +772,7 @@ msgstr ""
|
|
696 |
|
697 |
#: includes/admin/class-menu.php:69
|
698 |
#: includes/admin/overview/class-overview-table.php:152
|
699 |
-
#: pro/includes/admin/entries/class-entries.php:411 pro/wpforms-pro.php:
|
700 |
msgid "Entries"
|
701 |
msgstr ""
|
702 |
|
@@ -776,7 +852,7 @@ msgid "See all Features"
|
|
776 |
msgstr ""
|
777 |
|
778 |
#: includes/admin/overview/class-overview-table.php:53
|
779 |
-
#: includes/fields/class-name.php:21 includes/fields/class-name.php:
|
780 |
#: includes/templates/class-contact.php:32
|
781 |
#: includes/templates/class-subscribe.php:35
|
782 |
#: includes/templates/class-suggestion.php:32
|
@@ -864,57 +940,86 @@ msgstr ""
|
|
864 |
msgid "Forms Overview"
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: includes/class-
|
868 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
869 |
msgid "This field is required."
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: includes/class-frontend.php:
|
873 |
-
#: pro/includes/admin/class-settings.php:
|
874 |
msgid "Please enter a valid URL."
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: includes/class-frontend.php:
|
878 |
-
#: pro/includes/admin/class-settings.php:
|
879 |
msgid "Please enter a valid email address."
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: includes/class-frontend.php:
|
883 |
-
#: lite/includes/admin/class-settings.php:
|
884 |
-
#: pro/includes/admin/class-settings.php:
|
885 |
msgid "Please enter a valid number."
|
886 |
msgstr ""
|
887 |
|
888 |
-
#: includes/class-frontend.php:
|
889 |
-
#: pro/includes/admin/class-settings.php:
|
890 |
#: pro/includes/fields/class-password.php:394
|
891 |
msgid "Field values do not match."
|
892 |
msgstr ""
|
893 |
|
894 |
-
#: includes/class-frontend.php:
|
895 |
-
#: pro/includes/fields/class-file-upload.php:
|
896 |
-
#: pro/includes/fields/class-file-upload.php:
|
897 |
-
#: pro/includes/fields/class-file-upload.php:
|
898 |
msgid "File type is not allowed."
|
899 |
msgstr ""
|
900 |
|
901 |
-
#: includes/class-frontend.php:
|
902 |
msgid "File exceeds max size allowed."
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: includes/class-frontend.php:
|
906 |
msgid "Please enter time in 12-hour AM/PM format (eg 8:45 AM)."
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: includes/class-frontend.php:
|
910 |
msgid "Please enter time in 24-hour format (eg 22:45)."
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/class-frontend.php:
|
914 |
msgid "Payment is required."
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: includes/class-frontend.php:
|
918 |
msgid "Please enter a valid credit card number."
|
919 |
msgstr ""
|
920 |
|
@@ -985,16 +1090,16 @@ msgstr ""
|
|
985 |
msgid "reCAPTCHA is required."
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: includes/class-process.php:
|
989 |
msgid "Form has not been submitted, please see the errors below."
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: includes/class-process.php:
|
993 |
msgid "WPForms honeypot field triggered."
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: includes/class-process.php:
|
997 |
-
#: pro/wpforms-pro.php:
|
998 |
msgid "New %s Entry"
|
999 |
msgstr ""
|
1000 |
|
@@ -1085,7 +1190,7 @@ msgstr ""
|
|
1085 |
msgid "Lost Password URL"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: includes/class-widget.php:127 pro/includes/admin/class-settings.php:
|
1089 |
msgid "No forms"
|
1090 |
msgstr ""
|
1091 |
|
@@ -1117,69 +1222,69 @@ msgstr ""
|
|
1117 |
msgid "Sent from <a href=\"%s\" style=\"color:#bbbbbb;\">%s</a>"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: includes/fields/class-base.php:
|
1121 |
msgid ""
|
1122 |
"Enter text for the form field label. Field labels are recommended and can be "
|
1123 |
"hidden in the Advanced Settings."
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: includes/fields/class-base.php:
|
1127 |
msgid "Label"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
-
#: includes/fields/class-base.php:
|
1131 |
msgid "Enter text for the form field description."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: includes/fields/class-base.php:
|
1135 |
msgid "Description"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: includes/fields/class-base.php:
|
1139 |
msgid ""
|
1140 |
"Check this option to mark the field required. A form will not submit unless "
|
1141 |
"all required fields are provided."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: includes/fields/class-base.php:
|
1145 |
-
#: lite/includes/admin/class-settings.php:
|
1146 |
-
#: pro/includes/admin/class-settings.php:
|
1147 |
msgid "Required"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: includes/fields/class-base.php:
|
1151 |
msgid "Enter code for the form field."
|
1152 |
msgstr ""
|
1153 |
|
1154 |
-
#: includes/fields/class-base.php:
|
1155 |
msgid "Code"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: includes/fields/class-base.php:
|
1159 |
msgid "Add choices for the form field."
|
1160 |
msgstr ""
|
1161 |
|
1162 |
-
#: includes/fields/class-base.php:
|
1163 |
msgid "Choices"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
-
#: includes/fields/class-base.php:
|
1167 |
msgid ""
|
1168 |
"Choices are dynamically populated from the <span class=\"dynamic-name\">%s</"
|
1169 |
"span> <span class=\"dynamic-type\">%s</span>"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
-
#: includes/fields/class-base.php:
|
1173 |
msgid "Items"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
-
#: includes/fields/class-base.php:
|
1177 |
msgid "Enter text for the default form field value."
|
1178 |
msgstr ""
|
1179 |
|
1180 |
-
#: includes/fields/class-base.php:
|
1181 |
-
#: includes/fields/class-name.php:
|
1182 |
-
#: includes/fields/class-name.php:
|
1183 |
#: pro/includes/fields/class-address.php:133
|
1184 |
#: pro/includes/fields/class-address.php:151
|
1185 |
#: pro/includes/fields/class-address.php:166
|
@@ -1188,121 +1293,121 @@ msgstr ""
|
|
1188 |
msgid "Default Value"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: includes/fields/class-base.php:
|
1192 |
msgid "Select the default form field size."
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: includes/fields/class-base.php:
|
1196 |
msgid "Small"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: includes/fields/class-base.php:
|
1200 |
msgid "Medium"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: includes/fields/class-base.php:
|
1204 |
msgid "Large"
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: includes/fields/class-base.php:
|
1208 |
msgid "Field Size"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#: includes/fields/class-base.php:
|
1212 |
msgid "Advanced Options"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: includes/fields/class-base.php:
|
1216 |
msgid "Enter text for the form field placeholder."
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: includes/fields/class-base.php:
|
1220 |
msgid "Placeholder Text"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: includes/fields/class-base.php:
|
1224 |
msgid ""
|
1225 |
"Enter CSS class names for the form field container. Class names should be "
|
1226 |
"separated with spaces."
|
1227 |
msgstr ""
|
1228 |
|
1229 |
-
#: includes/fields/class-base.php:
|
1230 |
msgid "CSS Classes"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
-
#: includes/fields/class-base.php:
|
1234 |
msgid "Check this option to hide the form field label."
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: includes/fields/class-base.php:
|
1238 |
msgid "Hide Label"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
-
#: includes/fields/class-base.php:
|
1242 |
msgid "Check this option to hide the form field sub-label."
|
1243 |
msgstr ""
|
1244 |
|
1245 |
-
#: includes/fields/class-base.php:
|
1246 |
msgid "Hide Sub-Labels"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
-
#: includes/fields/class-base.php:
|
1250 |
msgid "Select the layout for displaying field choices."
|
1251 |
msgstr ""
|
1252 |
|
1253 |
-
#: includes/fields/class-base.php:
|
1254 |
msgid "One Column"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: includes/fields/class-base.php:
|
1258 |
msgid "Two Columns"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
-
#: includes/fields/class-base.php:
|
1262 |
msgid "Three Columns"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
-
#: includes/fields/class-base.php:
|
1266 |
msgid "Choice Layout"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
-
#: includes/fields/class-base.php:
|
1270 |
msgid "Select auto-populate method to use."
|
1271 |
msgstr ""
|
1272 |
|
1273 |
-
#: includes/fields/class-base.php:
|
1274 |
msgid "Post Type"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
-
#: includes/fields/class-base.php:
|
1278 |
msgid "Taxonomy"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
-
#: includes/fields/class-base.php:
|
1282 |
msgid "Dynamic Choices"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
-
#: includes/fields/class-base.php:
|
1286 |
msgid "Select %s to use for auto-populating field choices."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
-
#: includes/fields/class-base.php:
|
1290 |
msgid "Dynamic %s Source"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
-
#: includes/fields/class-base.php:
|
1294 |
msgid "No form ID found"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
-
#: includes/fields/class-base.php:
|
1298 |
msgid "No field type found"
|
1299 |
msgstr ""
|
1300 |
|
1301 |
-
#: includes/fields/class-base.php:
|
1302 |
#: includes/fields/class-number.php:152
|
1303 |
#: pro/includes/fields/class-address.php:624
|
1304 |
#: pro/includes/fields/class-date-time.php:532
|
1305 |
-
#: pro/includes/fields/class-file-upload.php:
|
1306 |
#: pro/includes/fields/class-password.php:371
|
1307 |
#: pro/includes/fields/class-payment-dropdown.php:208
|
1308 |
#: pro/includes/fields/class-payment-multiple.php:175
|
@@ -1348,10 +1453,10 @@ msgstr ""
|
|
1348 |
#: includes/fields/class-email.php:21 includes/fields/class-email.php:68
|
1349 |
#: includes/fields/class-email.php:306
|
1350 |
#: includes/templates/class-subscribe.php:42
|
1351 |
-
#: lite/includes/admin/class-settings.php:
|
1352 |
-
#: lite/includes/admin/class-settings.php:
|
1353 |
-
#: pro/includes/admin/class-settings.php:
|
1354 |
-
#: pro/includes/admin/class-settings.php:
|
1355 |
#: pro/includes/templates/class-donation.php:42
|
1356 |
#: pro/includes/templates/class-order.php:42
|
1357 |
#: pro/includes/templates/class-request-quote.php:46
|
@@ -1382,22 +1487,22 @@ msgstr ""
|
|
1382 |
msgid "Enter text for the confirmation field placeholder."
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: includes/fields/class-name.php:82 includes/fields/class-name.php:
|
1386 |
-
#: includes/providers/class-base.php:
|
1387 |
msgid "First"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
-
#: includes/fields/class-name.php:
|
1391 |
-
#: includes/providers/class-base.php:
|
1392 |
msgid "Middle"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
-
#: includes/fields/class-name.php:
|
1396 |
-
#: includes/providers/class-base.php:
|
1397 |
msgid "Last"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
-
#: includes/fields/class-name.php:
|
1401 |
#: pro/includes/fields/class-date-time.php:56
|
1402 |
#: pro/includes/fields/class-date-time.php:132
|
1403 |
#: pro/includes/fields/class-date-time.php:168
|
@@ -1405,28 +1510,28 @@ msgstr ""
|
|
1405 |
msgid "Format"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
-
#: includes/fields/class-name.php:
|
1409 |
msgid "Select format to use for the name form field"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
-
#: includes/fields/class-name.php:
|
1413 |
msgid "Simple"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
-
#: includes/fields/class-name.php:
|
1417 |
msgid "First Last"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
-
#: includes/fields/class-name.php:
|
1421 |
msgid "First Middle Last"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: includes/fields/class-name.php:
|
1425 |
msgid "Name field advanced options."
|
1426 |
msgstr ""
|
1427 |
|
1428 |
-
#: includes/fields/class-name.php:
|
1429 |
-
#: includes/fields/class-name.php:
|
1430 |
#: pro/includes/fields/class-address.php:113
|
1431 |
#: pro/includes/fields/class-address.php:129
|
1432 |
#: pro/includes/fields/class-address.php:147
|
@@ -1438,27 +1543,27 @@ msgstr ""
|
|
1438 |
msgid "Placeholder"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
-
#: includes/fields/class-name.php:
|
1442 |
msgid "First Name"
|
1443 |
msgstr ""
|
1444 |
|
1445 |
-
#: includes/fields/class-name.php:
|
1446 |
msgid "First name field advanced options."
|
1447 |
msgstr ""
|
1448 |
|
1449 |
-
#: includes/fields/class-name.php:
|
1450 |
msgid "Middle Name"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
-
#: includes/fields/class-name.php:
|
1454 |
msgid "Middle name field advanced options."
|
1455 |
msgstr ""
|
1456 |
|
1457 |
-
#: includes/fields/class-name.php:
|
1458 |
msgid "Last Name"
|
1459 |
msgstr ""
|
1460 |
|
1461 |
-
#: includes/fields/class-name.php:
|
1462 |
msgid "Last name field advanced options."
|
1463 |
msgstr ""
|
1464 |
|
@@ -1538,111 +1643,94 @@ msgstr ""
|
|
1538 |
msgid "Connection"
|
1539 |
msgstr ""
|
1540 |
|
1541 |
-
#: includes/providers/class-base.php:149 includes/providers/class-base.php:
|
1542 |
-
#: includes/providers/class-base.php:
|
1543 |
msgid "You do not have permission"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
-
#: includes/providers/class-base.php:
|
1547 |
msgid "Full"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
-
#: includes/providers/class-base.php:
|
1551 |
msgid "Select Account"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
-
#: includes/providers/class-base.php:
|
1555 |
#: includes/providers/class-constant-contact.php:476
|
1556 |
msgid "Add New Account"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
-
#: includes/providers/class-base.php:
|
1560 |
msgid "Select List"
|
1561 |
msgstr ""
|
1562 |
|
1563 |
-
#: includes/providers/class-base.php:
|
1564 |
msgid "Select Groups"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
-
#: includes/providers/class-base.php:
|
1568 |
msgid ""
|
1569 |
"We also noticed that you have some segments in your list. You can select "
|
1570 |
"specific list segments below if needed. This is optional."
|
1571 |
msgstr ""
|
1572 |
|
1573 |
-
#: includes/providers/class-base.php:
|
1574 |
msgid "List Fields"
|
1575 |
msgstr ""
|
1576 |
|
1577 |
-
#: includes/providers/class-base.php:
|
1578 |
msgid "Available Form Fields"
|
1579 |
msgstr ""
|
1580 |
|
1581 |
-
#: includes/providers/class-base.php:
|
1582 |
-
msgid "
|
1583 |
msgstr ""
|
1584 |
|
1585 |
-
#: includes/providers/class-base.php:
|
1586 |
-
msgid "
|
1587 |
-
msgstr ""
|
1588 |
-
|
1589 |
-
#: includes/providers/class-base.php:887
|
1590 |
-
msgid "Process this form if"
|
1591 |
msgstr ""
|
1592 |
|
1593 |
-
#: includes/providers/class-base.php:
|
1594 |
-
msgid "
|
1595 |
msgstr ""
|
1596 |
|
1597 |
-
#: includes/providers/class-base.php:
|
1598 |
-
msgid "
|
1599 |
-
msgstr ""
|
1600 |
-
|
1601 |
-
#: includes/providers/class-base.php:936
|
1602 |
-
msgid "is not"
|
1603 |
msgstr ""
|
1604 |
|
1605 |
-
#: includes/providers/class-base.php:970
|
1606 |
-
msgid "AND"
|
1607 |
-
msgstr ""
|
1608 |
-
|
1609 |
-
#: includes/providers/class-base.php:987
|
1610 |
-
msgid "Add rule group"
|
1611 |
-
msgstr ""
|
1612 |
-
|
1613 |
-
#: includes/providers/class-base.php:1160
|
1614 |
-
#: includes/providers/class-base.php:1195
|
1615 |
msgid "Missing data"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
-
#: includes/providers/class-base.php:
|
1619 |
msgid "Connection missing"
|
1620 |
msgstr ""
|
1621 |
|
1622 |
-
#: includes/providers/class-base.php:
|
1623 |
-
#: includes/providers/class-base.php:
|
1624 |
msgid "Connected on: "
|
1625 |
msgstr ""
|
1626 |
|
1627 |
-
#: includes/providers/class-base.php:
|
1628 |
-
#: includes/providers/class-base.php:
|
1629 |
msgid "Disconnect "
|
1630 |
msgstr ""
|
1631 |
|
1632 |
-
#: includes/providers/class-base.php:
|
1633 |
msgid "Integrate %s with WPForms"
|
1634 |
msgstr ""
|
1635 |
|
1636 |
-
#: includes/providers/class-base.php:
|
1637 |
msgid "Connected"
|
1638 |
msgstr ""
|
1639 |
|
1640 |
-
#: includes/providers/class-base.php:
|
1641 |
msgid ""
|
1642 |
"Please fill out all of the fields below to add your new provider account."
|
1643 |
msgstr ""
|
1644 |
|
1645 |
-
#: includes/providers/class-base.php:
|
1646 |
msgid "Connect to"
|
1647 |
msgstr ""
|
1648 |
|
@@ -2046,131 +2134,131 @@ msgstr ""
|
|
2046 |
|
2047 |
#: lite/includes/admin/class-settings.php:195
|
2048 |
#: pro/includes/admin/class-settings.php:208
|
2049 |
-
#: pro/includes/admin/class-settings.php:
|
2050 |
msgid "Settings check failed."
|
2051 |
msgstr ""
|
2052 |
|
2053 |
-
#: lite/includes/admin/class-settings.php:
|
2054 |
-
#: pro/includes/admin/class-settings.php:
|
2055 |
msgid "General settings updated."
|
2056 |
msgstr ""
|
2057 |
|
2058 |
-
#: lite/includes/admin/class-settings.php:
|
2059 |
-
#: pro/includes/admin/class-settings.php:
|
2060 |
msgid "Include Form Styling"
|
2061 |
msgstr ""
|
2062 |
|
2063 |
-
#: lite/includes/admin/class-settings.php:243
|
2064 |
-
#: pro/includes/admin/class-settings.php:318
|
2065 |
-
msgid "Base and form theme styling"
|
2066 |
-
msgstr ""
|
2067 |
-
|
2068 |
#: lite/includes/admin/class-settings.php:244
|
2069 |
#: pro/includes/admin/class-settings.php:319
|
2070 |
-
msgid "Base styling
|
2071 |
msgstr ""
|
2072 |
|
2073 |
#: lite/includes/admin/class-settings.php:245
|
2074 |
#: pro/includes/admin/class-settings.php:320
|
|
|
|
|
|
|
|
|
|
|
2075 |
#: pro/includes/fields/class-page-break.php:274
|
2076 |
msgid "None"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
-
#: lite/includes/admin/class-settings.php:
|
2080 |
-
#: pro/includes/admin/class-settings.php:
|
2081 |
msgid "Determines which CSS files to load for the site."
|
2082 |
msgstr ""
|
2083 |
|
2084 |
-
#: lite/includes/admin/class-settings.php:
|
2085 |
-
#: pro/includes/admin/class-settings.php:
|
2086 |
msgid "Load Assets Globally"
|
2087 |
msgstr ""
|
2088 |
|
2089 |
-
#: lite/includes/admin/class-settings.php:
|
2090 |
-
#: pro/includes/admin/class-settings.php:
|
2091 |
msgid ""
|
2092 |
"Check this if you would like to load WPForms assets site-wide. Only check if "
|
2093 |
"your site is having compatibility issues or instructed to by support."
|
2094 |
msgstr ""
|
2095 |
|
2096 |
-
#: lite/includes/admin/class-settings.php:
|
2097 |
-
#: pro/includes/admin/class-settings.php:
|
2098 |
msgid "Email Template"
|
2099 |
msgstr ""
|
2100 |
|
2101 |
-
#: lite/includes/admin/class-settings.php:
|
2102 |
-
#: pro/includes/admin/class-settings.php:
|
2103 |
msgid "Default HTML template"
|
2104 |
msgstr ""
|
2105 |
|
2106 |
-
#: lite/includes/admin/class-settings.php:
|
2107 |
-
#: pro/includes/admin/class-settings.php:
|
2108 |
msgid "Plain Text"
|
2109 |
msgstr ""
|
2110 |
|
2111 |
-
#: lite/includes/admin/class-settings.php:
|
2112 |
-
#: pro/includes/admin/class-settings.php:
|
2113 |
msgid "Determines how email notifications will be formatted."
|
2114 |
msgstr ""
|
2115 |
|
2116 |
-
#: lite/includes/admin/class-settings.php:
|
2117 |
-
#: pro/includes/admin/class-settings.php:
|
2118 |
msgid "Email Header Image "
|
2119 |
msgstr ""
|
2120 |
|
2121 |
-
#: lite/includes/admin/class-settings.php:
|
2122 |
-
#: pro/includes/admin/class-settings.php:
|
2123 |
msgid "Upload Image"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
-
#: lite/includes/admin/class-settings.php:
|
2127 |
-
#: pro/includes/admin/class-settings.php:
|
2128 |
msgid ""
|
2129 |
"Upload or choose a logo to be displayed at the top of email notifications."
|
2130 |
msgstr ""
|
2131 |
|
2132 |
-
#: lite/includes/admin/class-settings.php:
|
2133 |
-
#: pro/includes/admin/class-settings.php:
|
2134 |
msgid "Recommended size is 300x100 or smaller for best support on all devices."
|
2135 |
msgstr ""
|
2136 |
|
2137 |
-
#: lite/includes/admin/class-settings.php:
|
2138 |
-
#: pro/includes/admin/class-settings.php:
|
2139 |
msgid "Email Background Color"
|
2140 |
msgstr ""
|
2141 |
|
2142 |
-
#: lite/includes/admin/class-settings.php:
|
2143 |
-
#: pro/includes/admin/class-settings.php:
|
2144 |
msgid "Customize the background color of the HTML email template."
|
2145 |
msgstr ""
|
2146 |
|
2147 |
-
#: lite/includes/admin/class-settings.php:
|
2148 |
-
#: pro/includes/admin/class-settings.php:
|
2149 |
msgid "Email Carbon Copy"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
-
#: lite/includes/admin/class-settings.php:
|
2153 |
-
#: pro/includes/admin/class-settings.php:
|
2154 |
msgid ""
|
2155 |
"Check this if you would like to enable the ability to CC: email addresses in "
|
2156 |
"the form notification settings."
|
2157 |
msgstr ""
|
2158 |
|
2159 |
-
#: lite/includes/admin/class-settings.php:
|
2160 |
-
#: pro/includes/admin/class-settings.php:
|
2161 |
msgid "reCAPTCHA"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: lite/includes/admin/class-settings.php:
|
2165 |
-
#: pro/includes/admin/class-settings.php:
|
2166 |
msgid ""
|
2167 |
"reCAPTCHA is a free anti-spam service from Google which helps to protect "
|
2168 |
"your website from spam and abuse while letting real people pass through with "
|
2169 |
"ease."
|
2170 |
msgstr ""
|
2171 |
|
2172 |
-
#: lite/includes/admin/class-settings.php:
|
2173 |
-
#: pro/includes/admin/class-settings.php:
|
2174 |
msgid ""
|
2175 |
"Google's original <a href=\"https://www.google.com/recaptcha/intro/\" rel="
|
2176 |
"\"noopener noreferrer\">v2 reCAPTCHA</a> prompts users to check a box to "
|
@@ -2179,132 +2267,132 @@ msgid ""
|
|
2179 |
"uses advanced technology to detect real users without requiring any input."
|
2180 |
msgstr ""
|
2181 |
|
2182 |
-
#: lite/includes/admin/class-settings.php:
|
2183 |
-
#: pro/includes/admin/class-settings.php:
|
2184 |
msgid ""
|
2185 |
"Sites already using v2 reCAPTCHA will need to create new site keys before "
|
2186 |
"switching to the Invisible reCAPTCHA."
|
2187 |
msgstr ""
|
2188 |
|
2189 |
-
#: lite/includes/admin/class-settings.php:
|
2190 |
-
#: pro/includes/admin/class-settings.php:
|
2191 |
msgid ""
|
2192 |
"<a href=\"https://wpforms.com/docs/setup-captcha-wpforms/\" rel=\"noopener "
|
2193 |
"noreferrer\">Read our walk through</a> to learn more and for step-by-step "
|
2194 |
"directions."
|
2195 |
msgstr ""
|
2196 |
|
2197 |
-
#: lite/includes/admin/class-settings.php:
|
2198 |
-
#: pro/includes/admin/class-settings.php:
|
2199 |
msgid "reCAPTCHA Type"
|
2200 |
msgstr ""
|
2201 |
|
2202 |
-
#: lite/includes/admin/class-settings.php:
|
2203 |
-
#: pro/includes/admin/class-settings.php:
|
2204 |
msgid "reCAPTCHA Site key"
|
2205 |
msgstr ""
|
2206 |
|
2207 |
-
#: lite/includes/admin/class-settings.php:
|
2208 |
-
#: pro/includes/admin/class-settings.php:
|
2209 |
msgid "reCAPTCHA Secret key"
|
2210 |
msgstr ""
|
2211 |
|
2212 |
-
#: lite/includes/admin/class-settings.php:
|
2213 |
-
#: pro/includes/admin/class-settings.php:
|
2214 |
msgid "Validation Messages"
|
2215 |
msgstr ""
|
2216 |
|
2217 |
-
#: lite/includes/admin/class-settings.php:
|
2218 |
-
#: pro/includes/admin/class-settings.php:
|
2219 |
msgid "Website URL"
|
2220 |
msgstr ""
|
2221 |
|
2222 |
-
#: lite/includes/admin/class-settings.php:
|
2223 |
-
#: pro/includes/admin/class-settings.php:
|
2224 |
msgid "Number"
|
2225 |
msgstr ""
|
2226 |
|
2227 |
-
#: lite/includes/admin/class-settings.php:
|
2228 |
-
#: pro/includes/admin/class-settings.php:
|
2229 |
msgid "Confirm Value"
|
2230 |
msgstr ""
|
2231 |
|
2232 |
-
#: lite/includes/admin/class-settings.php:
|
2233 |
-
#: pro/includes/admin/class-settings.php:
|
2234 |
msgid "Save General Settings"
|
2235 |
msgstr ""
|
2236 |
|
2237 |
-
#: lite/includes/admin/class-settings.php:
|
2238 |
-
#: pro/includes/admin/class-settings.php:
|
2239 |
msgid ""
|
2240 |
"You do not have any marketing add-ons activated. You can head over to the <a "
|
2241 |
"href=\"%s\">Add-Ons page</a> to install and activate the add-on for your "
|
2242 |
"provider."
|
2243 |
msgstr ""
|
2244 |
|
2245 |
-
#: lite/includes/admin/class-settings.php:
|
2246 |
-
#: lite/includes/admin/class-settings.php:
|
2247 |
-
#: pro/includes/admin/class-settings.php:
|
2248 |
-
#: pro/includes/admin/class-settings.php:
|
2249 |
#: pro/includes/admin/entries/class-entries.php:1105
|
2250 |
#: pro/includes/admin/entries/class-entries.php:1427
|
2251 |
msgid "M j, Y @ g:ia"
|
2252 |
msgstr ""
|
2253 |
|
2254 |
-
#: lite/wpforms-lite.php:
|
2255 |
msgid "Default Notification"
|
2256 |
msgstr ""
|
2257 |
|
2258 |
-
#: lite/wpforms-lite.php:
|
2259 |
msgid "Send To Email Address"
|
2260 |
msgstr ""
|
2261 |
|
2262 |
-
#: lite/wpforms-lite.php:
|
2263 |
msgid ""
|
2264 |
"Enter the email address to receive form entry notifications. For multiple "
|
2265 |
"notifications, separate email addresses with a comma."
|
2266 |
msgstr ""
|
2267 |
|
2268 |
-
#: lite/wpforms-lite.php:
|
2269 |
msgid "CC"
|
2270 |
msgstr ""
|
2271 |
|
2272 |
-
#: lite/wpforms-lite.php:
|
2273 |
msgid "Email Subject"
|
2274 |
msgstr ""
|
2275 |
|
2276 |
-
#: lite/wpforms-lite.php:
|
2277 |
msgid "New Entry: "
|
2278 |
msgstr ""
|
2279 |
|
2280 |
-
#: lite/wpforms-lite.php:
|
2281 |
msgid "From Name"
|
2282 |
msgstr ""
|
2283 |
|
2284 |
-
#: lite/wpforms-lite.php:
|
2285 |
msgid "From Email"
|
2286 |
msgstr ""
|
2287 |
|
2288 |
-
#: lite/wpforms-lite.php:
|
2289 |
msgid "Reply-To"
|
2290 |
msgstr ""
|
2291 |
|
2292 |
-
#: lite/wpforms-lite.php:
|
2293 |
msgid ""
|
2294 |
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
2295 |
msgstr ""
|
2296 |
|
2297 |
-
#: lite/wpforms-lite.php:
|
2298 |
msgid "is a PRO Feature"
|
2299 |
msgstr ""
|
2300 |
|
2301 |
-
#: lite/wpforms-lite.php:
|
2302 |
msgid ""
|
2303 |
"We're sorry, %name% is not available on your plan.<br><br>Please upgrade to "
|
2304 |
"the PRO plan to unlock all these awesome features."
|
2305 |
msgstr ""
|
2306 |
|
2307 |
-
#: lite/wpforms-lite.php:
|
2308 |
msgid "Upgrade to PRO"
|
2309 |
msgstr ""
|
2310 |
|
@@ -2481,143 +2569,146 @@ msgstr ""
|
|
2481 |
msgid "Import/Export"
|
2482 |
msgstr ""
|
2483 |
|
2484 |
-
#: pro/includes/admin/class-settings.php:
|
2485 |
msgid "Please enter a license key to verify."
|
2486 |
msgstr ""
|
2487 |
|
2488 |
-
#: pro/includes/admin/class-settings.php:
|
2489 |
msgid "License"
|
2490 |
msgstr ""
|
2491 |
|
2492 |
-
#: pro/includes/admin/class-settings.php:
|
2493 |
msgid "Your license key provides access to updates and Add-ons. "
|
2494 |
msgstr ""
|
2495 |
|
2496 |
-
#: pro/includes/admin/class-settings.php:
|
2497 |
msgid "License Key"
|
2498 |
msgstr ""
|
2499 |
|
2500 |
-
#: pro/includes/admin/class-settings.php:
|
2501 |
msgid "Verify Key"
|
2502 |
msgstr ""
|
2503 |
|
2504 |
-
#: pro/includes/admin/class-settings.php:
|
2505 |
msgid "Deactivate Key"
|
2506 |
msgstr ""
|
2507 |
|
2508 |
-
#: pro/includes/admin/class-settings.php:
|
2509 |
msgid "License Key Type"
|
2510 |
msgstr ""
|
2511 |
|
2512 |
-
#: pro/includes/admin/class-settings.php:
|
2513 |
msgid "Your license key type for this site is <strong>%s.</strong>"
|
2514 |
msgstr ""
|
2515 |
|
2516 |
-
#: pro/includes/admin/class-settings.php:
|
2517 |
msgid "Refresh Key"
|
2518 |
msgstr ""
|
2519 |
|
2520 |
-
#: pro/includes/admin/class-settings.php:
|
2521 |
msgid ""
|
2522 |
"If your license has been upgraded or is incorrect, you may force a refresh."
|
2523 |
msgstr ""
|
2524 |
|
2525 |
-
#: pro/includes/admin/class-settings.php:
|
2526 |
msgid "File Extension"
|
2527 |
msgstr ""
|
2528 |
|
2529 |
-
#: pro/includes/admin/class-settings.php:
|
2530 |
msgid "File Size"
|
2531 |
msgstr ""
|
2532 |
|
2533 |
-
#: pro/includes/admin/class-settings.php:
|
2534 |
-
#: pro/includes/admin/class-settings.php:508
|
2535 |
msgid "Time (12 hour)"
|
2536 |
msgstr ""
|
2537 |
|
2538 |
-
#: pro/includes/admin/class-settings.php:
|
|
|
|
|
|
|
|
|
2539 |
msgid "Payment Required"
|
2540 |
msgstr ""
|
2541 |
|
2542 |
-
#: pro/includes/admin/class-settings.php:
|
2543 |
#: pro/includes/fields/class-payment-credit-card.php:21
|
2544 |
msgid "Credit Card"
|
2545 |
msgstr ""
|
2546 |
|
2547 |
-
#: pro/includes/admin/class-settings.php:
|
2548 |
msgid "Settings updated."
|
2549 |
msgstr ""
|
2550 |
|
2551 |
-
#: pro/includes/admin/class-settings.php:
|
2552 |
msgid "Currency"
|
2553 |
msgstr ""
|
2554 |
|
2555 |
-
#: pro/includes/admin/class-settings.php:
|
2556 |
msgid "Determines which currency to use for payments."
|
2557 |
msgstr ""
|
2558 |
|
2559 |
-
#: pro/includes/admin/class-settings.php:
|
2560 |
msgid "Form(s) imported"
|
2561 |
msgstr ""
|
2562 |
|
2563 |
-
#: pro/includes/admin/class-settings.php:
|
2564 |
msgid "Form Import"
|
2565 |
msgstr ""
|
2566 |
|
2567 |
-
#: pro/includes/admin/class-settings.php:
|
2568 |
msgid "Select an export file."
|
2569 |
msgstr ""
|
2570 |
|
2571 |
-
#: pro/includes/admin/class-settings.php:
|
2572 |
msgid "Import"
|
2573 |
msgstr ""
|
2574 |
|
2575 |
-
#: pro/includes/admin/class-settings.php:
|
2576 |
msgid "Form Export"
|
2577 |
msgstr ""
|
2578 |
|
2579 |
-
#: pro/includes/admin/class-settings.php:
|
2580 |
msgid ""
|
2581 |
"Select form(s) to download an export file. This can be imported into another "
|
2582 |
"site."
|
2583 |
msgstr ""
|
2584 |
|
2585 |
-
#: pro/includes/admin/class-settings.php:
|
2586 |
msgid "Export"
|
2587 |
msgstr ""
|
2588 |
|
2589 |
-
#: pro/includes/admin/class-settings.php:
|
2590 |
msgid "Form Template Export"
|
2591 |
msgstr ""
|
2592 |
|
2593 |
-
#: pro/includes/admin/class-settings.php:
|
2594 |
msgid ""
|
2595 |
"The following code can be used to register your custom form template. Copy "
|
2596 |
"and paste the following code to your theme's functions.php file or include "
|
2597 |
"it within an external file."
|
2598 |
msgstr ""
|
2599 |
|
2600 |
-
#: pro/includes/admin/class-settings.php:
|
2601 |
msgid ""
|
2602 |
"For more information <a href=\"%s\" target=\"blank\" rel=\"noopener "
|
2603 |
"noreferrer\">see our documentation</a> for additional details."
|
2604 |
msgstr ""
|
2605 |
|
2606 |
-
#: pro/includes/admin/class-settings.php:
|
2607 |
msgid ""
|
2608 |
"Select a form to generate PHP code that can be used to register a custom "
|
2609 |
"form template."
|
2610 |
msgstr ""
|
2611 |
|
2612 |
-
#: pro/includes/admin/class-settings.php:
|
2613 |
msgid "Generate template code"
|
2614 |
msgstr ""
|
2615 |
|
2616 |
-
#: pro/includes/admin/class-settings.php:
|
2617 |
msgid "Please upload a valid .json form export file."
|
2618 |
msgstr ""
|
2619 |
|
2620 |
-
#: pro/includes/admin/class-settings.php:
|
2621 |
#: pro/includes/admin/entries/class-entries-export.php:305
|
2622 |
msgid "Error"
|
2623 |
msgstr ""
|
@@ -2979,12 +3070,21 @@ msgstr ""
|
|
2979 |
msgid "(Abandoned)"
|
2980 |
msgstr ""
|
2981 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2982 |
#: pro/includes/fields/class-address.php:21
|
2983 |
#: pro/includes/templates/class-order.php:57
|
2984 |
msgid "Address"
|
2985 |
msgstr ""
|
2986 |
|
2987 |
#: pro/includes/fields/class-address.php:28
|
|
|
2988 |
msgid "US"
|
2989 |
msgstr ""
|
2990 |
|
@@ -3017,6 +3117,7 @@ msgid "Zip Code"
|
|
3017 |
msgstr ""
|
3018 |
|
3019 |
#: pro/includes/fields/class-address.php:38
|
|
|
3020 |
msgid "International"
|
3021 |
msgstr ""
|
3022 |
|
@@ -3113,73 +3214,73 @@ msgstr ""
|
|
3113 |
msgid "File Upload"
|
3114 |
msgstr ""
|
3115 |
|
3116 |
-
#: pro/includes/fields/class-file-upload.php:
|
3117 |
msgid "Allowed File Extensions"
|
3118 |
msgstr ""
|
3119 |
|
3120 |
-
#: pro/includes/fields/class-file-upload.php:
|
3121 |
msgid "Enter the extensions you would like to allow, comma separated."
|
3122 |
msgstr ""
|
3123 |
|
3124 |
-
#: pro/includes/fields/class-file-upload.php:
|
3125 |
msgid "Max File Size"
|
3126 |
msgstr ""
|
3127 |
|
3128 |
-
#: pro/includes/fields/class-file-upload.php:
|
3129 |
msgid ""
|
3130 |
"Enter the max file size, in megabytyes, to allow. If left blank, the value "
|
3131 |
"defaults to the maximum size the server allows which is "
|
3132 |
msgstr ""
|
3133 |
|
3134 |
-
#: pro/includes/fields/class-file-upload.php:
|
3135 |
msgid "Store file in WordPress Media Library"
|
3136 |
msgstr ""
|
3137 |
|
3138 |
-
#: pro/includes/fields/class-file-upload.php:
|
3139 |
msgid ""
|
3140 |
"Check this option to store the final uploaded file in the WordPress Media "
|
3141 |
"Library"
|
3142 |
msgstr ""
|
3143 |
|
3144 |
-
#: pro/includes/fields/class-file-upload.php:
|
3145 |
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
|
3146 |
msgstr ""
|
3147 |
|
3148 |
-
#: pro/includes/fields/class-file-upload.php:
|
3149 |
msgid ""
|
3150 |
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
|
3151 |
"the HTML form."
|
3152 |
msgstr ""
|
3153 |
|
3154 |
-
#: pro/includes/fields/class-file-upload.php:
|
3155 |
msgid "The uploaded file was only partially uploaded."
|
3156 |
msgstr ""
|
3157 |
|
3158 |
-
#: pro/includes/fields/class-file-upload.php:
|
3159 |
msgid "No file was uploaded."
|
3160 |
msgstr ""
|
3161 |
|
3162 |
-
#: pro/includes/fields/class-file-upload.php:
|
3163 |
msgid "Missing a temporary folder."
|
3164 |
msgstr ""
|
3165 |
|
3166 |
-
#: pro/includes/fields/class-file-upload.php:
|
3167 |
msgid "Failed to write file to disk."
|
3168 |
msgstr ""
|
3169 |
|
3170 |
-
#: pro/includes/fields/class-file-upload.php:
|
3171 |
msgid "File upload stopped by extension."
|
3172 |
msgstr ""
|
3173 |
|
3174 |
-
#: pro/includes/fields/class-file-upload.php:
|
3175 |
msgid "File upload error. "
|
3176 |
msgstr ""
|
3177 |
|
3178 |
-
#: pro/includes/fields/class-file-upload.php:
|
3179 |
msgid "File exceeds max size allowed"
|
3180 |
msgstr ""
|
3181 |
|
3182 |
-
#: pro/includes/fields/class-file-upload.php:
|
3183 |
msgid "File must have an extension."
|
3184 |
msgstr ""
|
3185 |
|
@@ -3611,43 +3712,51 @@ msgstr ""
|
|
3611 |
msgid "Request"
|
3612 |
msgstr ""
|
3613 |
|
3614 |
-
#: pro/wpforms-pro.php:
|
3615 |
msgid "Disable storing entry information in WordPress"
|
3616 |
msgstr ""
|
3617 |
|
3618 |
-
#: pro/wpforms-pro.php:
|
3619 |
msgid "Add New Notification"
|
3620 |
msgstr ""
|
3621 |
|
3622 |
-
#: pro/wpforms-pro.php:
|
3623 |
msgid "Send"
|
3624 |
msgstr ""
|
3625 |
|
3626 |
-
#: pro/wpforms-pro.php:
|
3627 |
msgid "Don't send"
|
3628 |
msgstr ""
|
3629 |
|
3630 |
-
#: pro/wpforms-pro.php:
|
3631 |
msgid "this notification if"
|
3632 |
msgstr ""
|
3633 |
|
3634 |
-
#: pro/wpforms-pro.php:
|
3635 |
msgid "Email notifications"
|
3636 |
msgstr ""
|
3637 |
|
3638 |
-
#: pro/wpforms-pro.php:
|
3639 |
msgid ""
|
3640 |
"Install the <a href=\"%s\">Conditional Logic add-on</a> to enable "
|
3641 |
"conditional logic for Email Notifications."
|
3642 |
msgstr ""
|
3643 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3644 |
#: wpforms.php:54
|
3645 |
msgid "Please deactivate WPForms Lite before activating WPForms"
|
3646 |
msgstr ""
|
3647 |
|
3648 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.3.
|
3649 |
#. Plugin URI of the plugin/theme
|
3650 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.3.
|
3651 |
#. Author URI of the plugin/theme
|
3652 |
msgid "https://wpforms.com"
|
3653 |
msgstr ""
|
2 |
# This file is distributed under the same license as the WPForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPForms 1.3.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
|
7 |
+
"POT-Creation-Date: 2017-06-13 17:28:50+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: includes/admin/ajax-actions.php:24 includes/fields/class-base.php:731
|
16 |
msgid "You do no have permission."
|
17 |
msgstr ""
|
18 |
|
40 |
msgid "Error updating form template"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: includes/admin/ajax-actions.php:243 includes/fields/class-base.php:403
|
44 |
msgid "post type"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: includes/admin/ajax-actions.php:262 includes/fields/class-base.php:410
|
48 |
msgid "taxonomy"
|
49 |
msgstr ""
|
50 |
|
51 |
#: includes/admin/builder/class-builder.php:273
|
52 |
+
#: includes/class-conditional-logic-core.php:441
|
53 |
+
msgid "AND"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: includes/admin/builder/class-builder.php:275
|
57 |
msgid "Add New Choices"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: includes/admin/builder/class-builder.php:276
|
61 |
+
#: includes/fields/class-base.php:362
|
62 |
msgid "Bulk Add"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: includes/admin/builder/class-builder.php:277
|
66 |
msgid "Hide Bulk Add"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/admin/builder/class-builder.php:278
|
70 |
msgid "Add Choices (one per line)"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/admin/builder/class-builder.php:279
|
74 |
msgid ""
|
75 |
"Blue\n"
|
76 |
"Red\n"
|
77 |
"Green"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: includes/admin/builder/class-builder.php:280
|
81 |
msgid "Show presets"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: includes/admin/builder/class-builder.php:281
|
85 |
msgid "Hide presets"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: includes/admin/builder/class-builder.php:282
|
89 |
#: pro/includes/fields/class-date-time.php:229
|
90 |
#: pro/includes/fields/class-date-time.php:231
|
91 |
#: pro/includes/fields/class-date-time.php:452
|
93 |
msgid "DD"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/admin/builder/class-builder.php:283
|
97 |
#: pro/includes/fields/class-date-time.php:228
|
98 |
#: pro/includes/fields/class-date-time.php:232
|
99 |
#: pro/includes/fields/class-date-time.php:433
|
103 |
msgid "MM"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: includes/admin/builder/class-builder.php:285
|
107 |
msgid ""
|
108 |
"The {source} {type} contains over {limit} items ({total}). This may make the "
|
109 |
"field difficult for your vistors to use and/or cause the form to be slow."
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: includes/admin/builder/class-builder.php:286
|
113 |
#: includes/admin/class-editor.php:96
|
114 |
#: pro/includes/admin/entries/class-entries.php:994
|
115 |
msgid "Cancel"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/admin/builder/class-builder.php:287
|
119 |
msgid "OK"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/admin/builder/class-builder.php:288
|
123 |
#: includes/admin/class-editor.php:70
|
124 |
msgid "Close"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: includes/admin/builder/class-builder.php:289
|
128 |
msgid ""
|
129 |
"Due to form changes, conditional logic rules have been removed or updated:"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: includes/admin/builder/class-builder.php:290
|
133 |
+
msgid ""
|
134 |
+
"Are you sure you want to disable conditional logic? This will remove the "
|
135 |
+
"rules for this field or setting."
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: includes/admin/builder/class-builder.php:291
|
139 |
#: pro/includes/admin/entries/class-entries-table.php:176
|
140 |
msgid "Field"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: includes/admin/builder/class-builder.php:292
|
144 |
msgid "Field Locked"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/admin/builder/class-builder.php:293
|
148 |
msgid "This field cannot be deleted or duplicated."
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: includes/admin/builder/class-builder.php:294
|
152 |
msgid "Available Fields"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: includes/admin/builder/class-builder.php:295
|
156 |
msgid "No fields available"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: includes/admin/builder/class-builder.php:296
|
160 |
msgid "Heads up!"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: includes/admin/builder/class-builder.php:298
|
164 |
msgid "No email fields"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/admin/builder/class-builder.php:299
|
168 |
msgid "Are you sure you want to delete this notification?"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/admin/builder/class-builder.php:300
|
172 |
msgid "Enter a notification name"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/admin/builder/class-builder.php:301
|
176 |
msgid "Eg: User Confirmation"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: includes/admin/builder/class-builder.php:302
|
180 |
msgid "You must provide a notification name"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: includes/admin/builder/class-builder.php:303
|
184 |
msgid ""
|
185 |
"Form must contain one notification. To disable all notifications use the "
|
186 |
"setting Notifications dropdown setting."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: includes/admin/builder/class-builder.php:304
|
190 |
#: lite/includes/admin/class-settings.php:149
|
191 |
#: pro/includes/admin/class-settings.php:160
|
192 |
msgid "Saving ..."
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: includes/admin/builder/class-builder.php:305
|
196 |
msgid "Saved!"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: includes/admin/builder/class-builder.php:306
|
200 |
msgid "Save and Exit"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: includes/admin/builder/class-builder.php:307
|
204 |
+
#: includes/fields/class-base.php:539
|
205 |
msgid "Show Layouts"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: includes/admin/builder/class-builder.php:308
|
209 |
msgid "Hide Layouts"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/admin/builder/class-builder.php:309
|
213 |
msgid "Select your layout"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/admin/builder/class-builder.php:310
|
217 |
msgid "Select your column"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/admin/builder/class-builder.php:311
|
221 |
+
#: includes/admin/builder/class-builder.php:427
|
222 |
msgid "Loading"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: includes/admin/builder/class-builder.php:317
|
226 |
msgid "Use Template"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: includes/admin/builder/class-builder.php:318
|
230 |
msgid ""
|
231 |
"Changing templates on an existing form will DELETE existing form fields. Are "
|
232 |
"you sure you want apply the new template?"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: includes/admin/builder/class-builder.php:319
|
236 |
msgid ""
|
237 |
"You are almost done. To embed this form on your site, please paste the "
|
238 |
"following shortcode inside a post or page."
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: includes/admin/builder/class-builder.php:320
|
242 |
msgid "Or you can follow the instructions in this video."
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: includes/admin/builder/class-builder.php:321
|
246 |
+
#: includes/admin/builder/class-builder.php:477
|
247 |
msgid "Exit"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: includes/admin/builder/class-builder.php:323
|
251 |
msgid "If you exit without saving, your changes will be lost."
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/admin/builder/class-builder.php:324
|
255 |
msgid "Are you sure you want to delete this field?"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/admin/builder/class-builder.php:325
|
259 |
msgid "Are you sure you want to duplicate this field?"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/admin/builder/class-builder.php:326
|
263 |
msgid "(copy)"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: includes/admin/builder/class-builder.php:327
|
267 |
msgid "Please enter a form title."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/admin/builder/class-builder.php:328
|
271 |
msgid "This item must contain at least one choice."
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: includes/admin/builder/class-builder.php:329
|
275 |
+
#: includes/fields/class-base.php:253 includes/fields/class-base.php:587
|
276 |
+
#: lite/wpforms-lite.php:79 pro/wpforms-pro.php:269
|
277 |
msgid "Off"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: includes/admin/builder/class-builder.php:330
|
281 |
+
#: includes/fields/class-base.php:253 lite/wpforms-lite.php:78
|
282 |
+
#: pro/wpforms-pro.php:268
|
283 |
msgid "On"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: includes/admin/builder/class-builder.php:331
|
287 |
+
msgid "or"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: includes/admin/builder/class-builder.php:332
|
291 |
#: includes/templates/class-suggestion.php:59
|
292 |
msgid "Other"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: includes/admin/builder/class-builder.php:333
|
296 |
+
#: includes/class-conditional-logic-core.php:367
|
297 |
+
msgid "is"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: includes/admin/builder/class-builder.php:334
|
301 |
+
#: includes/class-conditional-logic-core.php:368
|
302 |
+
msgid "is not"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: includes/admin/builder/class-builder.php:335
|
306 |
+
#: includes/class-conditional-logic-core.php:369
|
307 |
+
msgid "empty"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: includes/admin/builder/class-builder.php:336
|
311 |
+
#: includes/class-conditional-logic-core.php:370
|
312 |
+
msgid "not empty"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: includes/admin/builder/class-builder.php:337
|
316 |
+
#: includes/class-conditional-logic-core.php:375
|
317 |
+
msgid "contains"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: includes/admin/builder/class-builder.php:338
|
321 |
+
#: includes/class-conditional-logic-core.php:376
|
322 |
+
msgid "does not contain"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: includes/admin/builder/class-builder.php:339
|
326 |
+
#: includes/class-conditional-logic-core.php:377
|
327 |
+
msgid "starts with"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: includes/admin/builder/class-builder.php:340
|
331 |
+
#: includes/class-conditional-logic-core.php:378
|
332 |
+
msgid "ends with"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: includes/admin/builder/class-builder.php:341
|
336 |
+
msgid ""
|
337 |
+
"Form entries must be stored to accept payments. Please enable saving form "
|
338 |
+
"entries in the General settings first."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: includes/admin/builder/class-builder.php:342
|
342 |
#: pro/includes/fields/class-page-break.php:186
|
343 |
#: pro/includes/fields/class-page-break.php:517
|
344 |
msgid "Previous"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: includes/admin/builder/class-builder.php:343
|
348 |
+
#: includes/class-conditional-logic-core.php:441
|
349 |
+
msgid "Create new rule"
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: includes/admin/builder/class-builder.php:344
|
353 |
+
msgid "Add new group"
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: includes/admin/builder/class-builder.php:345
|
357 |
+
#: includes/class-conditional-logic-core.php:442
|
358 |
+
msgid "Delete rule"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: includes/admin/builder/class-builder.php:348
|
362 |
+
#: includes/admin/builder/functions.php:249 includes/fields/class-base.php:487
|
363 |
msgid "Show Smart Tags"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: includes/admin/builder/class-builder.php:349
|
367 |
msgid "Hide Smart Tags"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/admin/builder/class-builder.php:350
|
371 |
+
#: includes/class-conditional-logic-core.php:326
|
372 |
msgid "-- Select Field --"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: includes/admin/builder/class-builder.php:351
|
376 |
+
#: includes/class-conditional-logic-core.php:421
|
377 |
msgid "-- Select Choice --"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: includes/admin/builder/class-builder.php:378
|
381 |
msgid "Countries"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/admin/builder/class-builder.php:382
|
385 |
msgid "Countries Postal Code"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/admin/builder/class-builder.php:386
|
389 |
msgid "States"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: includes/admin/builder/class-builder.php:390
|
393 |
msgid "States Postal Code"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/admin/builder/class-builder.php:394
|
397 |
msgid "Months"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/admin/builder/class-builder.php:398
|
401 |
msgid "Days"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/admin/builder/class-builder.php:450
|
405 |
msgid "Now editing"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: includes/admin/builder/class-builder.php:460
|
409 |
#: pro/includes/admin/entries/class-entries.php:512
|
410 |
msgid "Preview Form"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: includes/admin/builder/class-builder.php:462
|
414 |
#: includes/admin/overview/class-overview-table.php:159
|
415 |
msgid "Preview"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: includes/admin/builder/class-builder.php:465
|
419 |
msgid "Embed Form"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: includes/admin/builder/class-builder.php:467
|
423 |
msgid "Embed"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: includes/admin/builder/class-builder.php:470
|
427 |
msgid "Save Form"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: includes/admin/builder/class-builder.php:472
|
431 |
+
#: pro/includes/admin/class-settings.php:604
|
432 |
msgid "Save"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: includes/admin/builder/functions.php:189
|
436 |
msgid "Field #"
|
437 |
msgstr ""
|
438 |
|
480 |
msgstr ""
|
481 |
|
482 |
#: includes/admin/builder/panels/class-fields.php:252
|
483 |
+
#: includes/fields/class-base.php:770
|
484 |
msgid "Duplicate Field"
|
485 |
msgstr ""
|
486 |
|
487 |
#: includes/admin/builder/panels/class-fields.php:254
|
488 |
+
#: includes/fields/class-base.php:771
|
489 |
msgid "Delete Field"
|
490 |
msgstr ""
|
491 |
|
492 |
#: includes/admin/builder/panels/class-fields.php:256
|
493 |
+
#: includes/fields/class-base.php:772
|
494 |
msgid "Click to edit. Drag to reorder."
|
495 |
msgstr ""
|
496 |
|
553 |
msgstr ""
|
554 |
|
555 |
#: includes/admin/builder/panels/class-settings.php:21
|
556 |
+
#: includes/admin/class-menu.php:81 lite/includes/admin/class-settings.php:524
|
557 |
+
#: pro/includes/admin/class-settings.php:963
|
558 |
msgid "Settings"
|
559 |
msgstr ""
|
560 |
|
565 |
msgid "General"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:64
|
569 |
+
#: lite/wpforms-lite.php:74 pro/wpforms-pro.php:255 pro/wpforms-pro.php:264
|
570 |
msgid "Notifications"
|
571 |
msgstr ""
|
572 |
|
644 |
msgstr ""
|
645 |
|
646 |
#: includes/admin/builder/panels/class-settings.php:188
|
647 |
+
#: includes/templates/class-suggestion.php:74 lite/wpforms-lite.php:192
|
648 |
+
#: pro/wpforms-pro.php:388
|
649 |
msgid "Message"
|
650 |
msgstr ""
|
651 |
|
742 |
"a>?"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.3.8) #-#-#-#-#
|
746 |
#. Plugin Name of the plugin/theme
|
747 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.3.8) #-#-#-#-#
|
748 |
#. Author of the plugin/theme
|
749 |
#: includes/admin/class-menu.php:36 includes/admin/class-menu.php:37
|
750 |
#: includes/admin/class-menu.php:48 includes/admin/class-menu.php:90
|
762 |
|
763 |
#: includes/admin/class-menu.php:59
|
764 |
#: includes/admin/overview/class-overview.php:148
|
765 |
+
#: includes/providers/class-base.php:903
|
766 |
msgid "Add New"
|
767 |
msgstr ""
|
768 |
|
772 |
|
773 |
#: includes/admin/class-menu.php:69
|
774 |
#: includes/admin/overview/class-overview-table.php:152
|
775 |
+
#: pro/includes/admin/entries/class-entries.php:411 pro/wpforms-pro.php:208
|
776 |
msgid "Entries"
|
777 |
msgstr ""
|
778 |
|
852 |
msgstr ""
|
853 |
|
854 |
#: includes/admin/overview/class-overview-table.php:53
|
855 |
+
#: includes/fields/class-name.php:21 includes/fields/class-name.php:276
|
856 |
#: includes/templates/class-contact.php:32
|
857 |
#: includes/templates/class-subscribe.php:35
|
858 |
#: includes/templates/class-suggestion.php:32
|
940 |
msgid "Forms Overview"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: includes/class-conditional-logic-core.php:158
|
944 |
+
msgid "this field if"
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: includes/class-conditional-logic-core.php:165
|
948 |
+
msgid "Show"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: includes/class-conditional-logic-core.php:166
|
952 |
+
msgid "Hide"
|
953 |
+
msgstr ""
|
954 |
+
|
955 |
+
#: includes/class-conditional-logic-core.php:201
|
956 |
+
#: includes/class-conditional-logic-core.php:258
|
957 |
+
msgid "Enable conditional logic"
|
958 |
+
msgstr ""
|
959 |
+
|
960 |
+
#: includes/class-conditional-logic-core.php:202
|
961 |
+
msgid "Check this option to enable conditional logic on this field."
|
962 |
+
msgstr ""
|
963 |
+
|
964 |
+
#: includes/class-conditional-logic-core.php:260
|
965 |
+
msgid "Check this option to enable conditional logic."
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: includes/class-conditional-logic-core.php:457
|
969 |
+
msgid "Add rule group"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: includes/class-frontend.php:969 lite/includes/admin/class-settings.php:373
|
973 |
+
#: pro/includes/admin/class-settings.php:448
|
974 |
msgid "This field is required."
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: includes/class-frontend.php:970 lite/includes/admin/class-settings.php:381
|
978 |
+
#: pro/includes/admin/class-settings.php:456
|
979 |
msgid "Please enter a valid URL."
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: includes/class-frontend.php:971 lite/includes/admin/class-settings.php:389
|
983 |
+
#: pro/includes/admin/class-settings.php:464
|
984 |
msgid "Please enter a valid email address."
|
985 |
msgstr ""
|
986 |
|
987 |
+
#: includes/class-frontend.php:972 includes/fields/class-number.php:157
|
988 |
+
#: lite/includes/admin/class-settings.php:397
|
989 |
+
#: pro/includes/admin/class-settings.php:472
|
990 |
msgid "Please enter a valid number."
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: includes/class-frontend.php:973 lite/includes/admin/class-settings.php:405
|
994 |
+
#: pro/includes/admin/class-settings.php:480
|
995 |
#: pro/includes/fields/class-password.php:394
|
996 |
msgid "Field values do not match."
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: includes/class-frontend.php:974 pro/includes/admin/class-settings.php:488
|
1000 |
+
#: pro/includes/fields/class-file-upload.php:367
|
1001 |
+
#: pro/includes/fields/class-file-upload.php:383
|
1002 |
+
#: pro/includes/fields/class-file-upload.php:400
|
1003 |
msgid "File type is not allowed."
|
1004 |
msgstr ""
|
1005 |
|
1006 |
+
#: includes/class-frontend.php:975 pro/includes/admin/class-settings.php:496
|
1007 |
msgid "File exceeds max size allowed."
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: includes/class-frontend.php:976 pro/includes/admin/class-settings.php:504
|
1011 |
msgid "Please enter time in 12-hour AM/PM format (eg 8:45 AM)."
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: includes/class-frontend.php:977 pro/includes/admin/class-settings.php:512
|
1015 |
msgid "Please enter time in 24-hour format (eg 22:45)."
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: includes/class-frontend.php:978 pro/includes/admin/class-settings.php:520
|
1019 |
msgid "Payment is required."
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: includes/class-frontend.php:979 pro/includes/admin/class-settings.php:528
|
1023 |
msgid "Please enter a valid credit card number."
|
1024 |
msgstr ""
|
1025 |
|
1090 |
msgid "reCAPTCHA is required."
|
1091 |
msgstr ""
|
1092 |
|
1093 |
+
#: includes/class-process.php:126 includes/class-process.php:174
|
1094 |
msgid "Form has not been submitted, please see the errors below."
|
1095 |
msgstr ""
|
1096 |
|
1097 |
+
#: includes/class-process.php:135
|
1098 |
msgid "WPForms honeypot field triggered."
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: includes/class-process.php:354 lite/wpforms-lite.php:56
|
1102 |
+
#: pro/wpforms-pro.php:248
|
1103 |
msgid "New %s Entry"
|
1104 |
msgstr ""
|
1105 |
|
1190 |
msgid "Lost Password URL"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
+
#: includes/class-widget.php:127 pro/includes/admin/class-settings.php:684
|
1194 |
msgid "No forms"
|
1195 |
msgstr ""
|
1196 |
|
1222 |
msgid "Sent from <a href=\"%s\" style=\"color:#bbbbbb;\">%s</a>"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
+
#: includes/fields/class-base.php:313
|
1226 |
msgid ""
|
1227 |
"Enter text for the form field label. Field labels are recommended and can be "
|
1228 |
"hidden in the Advanced Settings."
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: includes/fields/class-base.php:314
|
1232 |
msgid "Label"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: includes/fields/class-base.php:323
|
1236 |
msgid "Enter text for the form field description."
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: includes/fields/class-base.php:324
|
1240 |
msgid "Description"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: includes/fields/class-base.php:334
|
1244 |
msgid ""
|
1245 |
"Check this option to mark the field required. A form will not submit unless "
|
1246 |
"all required fields are provided."
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: includes/fields/class-base.php:335
|
1250 |
+
#: lite/includes/admin/class-settings.php:370
|
1251 |
+
#: pro/includes/admin/class-settings.php:445
|
1252 |
msgid "Required"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: includes/fields/class-base.php:351
|
1256 |
msgid "Enter code for the form field."
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: includes/fields/class-base.php:352
|
1260 |
msgid "Code"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: includes/fields/class-base.php:361 includes/fields/class-base.php:435
|
1264 |
msgid "Add choices for the form field."
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: includes/fields/class-base.php:374
|
1268 |
msgid "Choices"
|
1269 |
msgstr ""
|
1270 |
|
1271 |
+
#: includes/fields/class-base.php:417
|
1272 |
msgid ""
|
1273 |
"Choices are dynamically populated from the <span class=\"dynamic-name\">%s</"
|
1274 |
"span> <span class=\"dynamic-type\">%s</span>"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: includes/fields/class-base.php:444
|
1278 |
msgid "Items"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
+
#: includes/fields/class-base.php:486
|
1282 |
msgid "Enter text for the default form field value."
|
1283 |
msgstr ""
|
1284 |
|
1285 |
+
#: includes/fields/class-base.php:488 includes/fields/class-name.php:283
|
1286 |
+
#: includes/fields/class-name.php:298 includes/fields/class-name.php:313
|
1287 |
+
#: includes/fields/class-name.php:328 pro/includes/fields/class-address.php:117
|
1288 |
#: pro/includes/fields/class-address.php:133
|
1289 |
#: pro/includes/fields/class-address.php:151
|
1290 |
#: pro/includes/fields/class-address.php:166
|
1293 |
msgid "Default Value"
|
1294 |
msgstr ""
|
1295 |
|
1296 |
+
#: includes/fields/class-base.php:498
|
1297 |
msgid "Select the default form field size."
|
1298 |
msgstr ""
|
1299 |
|
1300 |
+
#: includes/fields/class-base.php:500
|
1301 |
msgid "Small"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
+
#: includes/fields/class-base.php:501
|
1305 |
msgid "Medium"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: includes/fields/class-base.php:502
|
1309 |
msgid "Large"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: includes/fields/class-base.php:504
|
1313 |
msgid "Field Size"
|
1314 |
msgstr ""
|
1315 |
|
1316 |
+
#: includes/fields/class-base.php:517
|
1317 |
msgid "Advanced Options"
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: includes/fields/class-base.php:528
|
1321 |
msgid "Enter text for the form field placeholder."
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: includes/fields/class-base.php:529
|
1325 |
msgid "Placeholder Text"
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: includes/fields/class-base.php:538
|
1329 |
msgid ""
|
1330 |
"Enter CSS class names for the form field container. Class names should be "
|
1331 |
"separated with spaces."
|
1332 |
msgstr ""
|
1333 |
|
1334 |
+
#: includes/fields/class-base.php:541
|
1335 |
msgid "CSS Classes"
|
1336 |
msgstr ""
|
1337 |
|
1338 |
+
#: includes/fields/class-base.php:550
|
1339 |
msgid "Check this option to hide the form field label."
|
1340 |
msgstr ""
|
1341 |
|
1342 |
+
#: includes/fields/class-base.php:552
|
1343 |
msgid "Hide Label"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
+
#: includes/fields/class-base.php:560
|
1347 |
msgid "Check this option to hide the form field sub-label."
|
1348 |
msgstr ""
|
1349 |
|
1350 |
+
#: includes/fields/class-base.php:562
|
1351 |
msgid "Hide Sub-Labels"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: includes/fields/class-base.php:570
|
1355 |
msgid "Select the layout for displaying field choices."
|
1356 |
msgstr ""
|
1357 |
|
1358 |
+
#: includes/fields/class-base.php:572
|
1359 |
msgid "One Column"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
+
#: includes/fields/class-base.php:573
|
1363 |
msgid "Two Columns"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
+
#: includes/fields/class-base.php:574
|
1367 |
msgid "Three Columns"
|
1368 |
msgstr ""
|
1369 |
|
1370 |
+
#: includes/fields/class-base.php:576
|
1371 |
msgid "Choice Layout"
|
1372 |
msgstr ""
|
1373 |
|
1374 |
+
#: includes/fields/class-base.php:585
|
1375 |
msgid "Select auto-populate method to use."
|
1376 |
msgstr ""
|
1377 |
|
1378 |
+
#: includes/fields/class-base.php:588 includes/fields/class-base.php:607
|
1379 |
msgid "Post Type"
|
1380 |
msgstr ""
|
1381 |
|
1382 |
+
#: includes/fields/class-base.php:589 includes/fields/class-base.php:613
|
1383 |
msgid "Taxonomy"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
+
#: includes/fields/class-base.php:591
|
1387 |
msgid "Dynamic Choices"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: includes/fields/class-base.php:618
|
1391 |
msgid "Select %s to use for auto-populating field choices."
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: includes/fields/class-base.php:619
|
1395 |
msgid "Dynamic %s Source"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: includes/fields/class-base.php:736
|
1399 |
msgid "No form ID found"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
+
#: includes/fields/class-base.php:741
|
1403 |
msgid "No field type found"
|
1404 |
msgstr ""
|
1405 |
|
1406 |
+
#: includes/fields/class-base.php:869 includes/fields/class-name.php:485
|
1407 |
#: includes/fields/class-number.php:152
|
1408 |
#: pro/includes/fields/class-address.php:624
|
1409 |
#: pro/includes/fields/class-date-time.php:532
|
1410 |
+
#: pro/includes/fields/class-file-upload.php:332
|
1411 |
#: pro/includes/fields/class-password.php:371
|
1412 |
#: pro/includes/fields/class-payment-dropdown.php:208
|
1413 |
#: pro/includes/fields/class-payment-multiple.php:175
|
1453 |
#: includes/fields/class-email.php:21 includes/fields/class-email.php:68
|
1454 |
#: includes/fields/class-email.php:306
|
1455 |
#: includes/templates/class-subscribe.php:42
|
1456 |
+
#: lite/includes/admin/class-settings.php:263
|
1457 |
+
#: lite/includes/admin/class-settings.php:386
|
1458 |
+
#: pro/includes/admin/class-settings.php:338
|
1459 |
+
#: pro/includes/admin/class-settings.php:461
|
1460 |
#: pro/includes/templates/class-donation.php:42
|
1461 |
#: pro/includes/templates/class-order.php:42
|
1462 |
#: pro/includes/templates/class-request-quote.php:46
|
1487 |
msgid "Enter text for the confirmation field placeholder."
|
1488 |
msgstr ""
|
1489 |
|
1490 |
+
#: includes/fields/class-name.php:82 includes/fields/class-name.php:377
|
1491 |
+
#: includes/providers/class-base.php:369
|
1492 |
msgid "First"
|
1493 |
msgstr ""
|
1494 |
|
1495 |
+
#: includes/fields/class-name.php:103 includes/fields/class-name.php:382
|
1496 |
+
#: includes/providers/class-base.php:381
|
1497 |
msgid "Middle"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: includes/fields/class-name.php:124 includes/fields/class-name.php:387
|
1501 |
+
#: includes/providers/class-base.php:393
|
1502 |
msgid "Last"
|
1503 |
msgstr ""
|
1504 |
|
1505 |
+
#: includes/fields/class-name.php:220
|
1506 |
#: pro/includes/fields/class-date-time.php:56
|
1507 |
#: pro/includes/fields/class-date-time.php:132
|
1508 |
#: pro/includes/fields/class-date-time.php:168
|
1510 |
msgid "Format"
|
1511 |
msgstr ""
|
1512 |
|
1513 |
+
#: includes/fields/class-name.php:221
|
1514 |
msgid "Select format to use for the name form field"
|
1515 |
msgstr ""
|
1516 |
|
1517 |
+
#: includes/fields/class-name.php:232
|
1518 |
msgid "Simple"
|
1519 |
msgstr ""
|
1520 |
|
1521 |
+
#: includes/fields/class-name.php:233
|
1522 |
msgid "First Last"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
+
#: includes/fields/class-name.php:234
|
1526 |
msgid "First Middle Last"
|
1527 |
msgstr ""
|
1528 |
|
1529 |
+
#: includes/fields/class-name.php:276
|
1530 |
msgid "Name field advanced options."
|
1531 |
msgstr ""
|
1532 |
|
1533 |
+
#: includes/fields/class-name.php:279 includes/fields/class-name.php:294
|
1534 |
+
#: includes/fields/class-name.php:309 includes/fields/class-name.php:324
|
1535 |
#: pro/includes/fields/class-address.php:113
|
1536 |
#: pro/includes/fields/class-address.php:129
|
1537 |
#: pro/includes/fields/class-address.php:147
|
1543 |
msgid "Placeholder"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
+
#: includes/fields/class-name.php:291
|
1547 |
msgid "First Name"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
+
#: includes/fields/class-name.php:291
|
1551 |
msgid "First name field advanced options."
|
1552 |
msgstr ""
|
1553 |
|
1554 |
+
#: includes/fields/class-name.php:306
|
1555 |
msgid "Middle Name"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
+
#: includes/fields/class-name.php:306
|
1559 |
msgid "Middle name field advanced options."
|
1560 |
msgstr ""
|
1561 |
|
1562 |
+
#: includes/fields/class-name.php:321
|
1563 |
msgid "Last Name"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
+
#: includes/fields/class-name.php:321
|
1567 |
msgid "Last name field advanced options."
|
1568 |
msgstr ""
|
1569 |
|
1643 |
msgid "Connection"
|
1644 |
msgstr ""
|
1645 |
|
1646 |
+
#: includes/providers/class-base.php:149 includes/providers/class-base.php:966
|
1647 |
+
#: includes/providers/class-base.php:1001
|
1648 |
msgid "You do not have permission"
|
1649 |
msgstr ""
|
1650 |
|
1651 |
+
#: includes/providers/class-base.php:358
|
1652 |
msgid "Full"
|
1653 |
msgstr ""
|
1654 |
|
1655 |
+
#: includes/providers/class-base.php:580
|
1656 |
msgid "Select Account"
|
1657 |
msgstr ""
|
1658 |
|
1659 |
+
#: includes/providers/class-base.php:592 includes/providers/class-base.php:1094
|
1660 |
#: includes/providers/class-constant-contact.php:476
|
1661 |
msgid "Add New Account"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: includes/providers/class-base.php:622
|
1665 |
msgid "Select List"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
+
#: includes/providers/class-base.php:664
|
1669 |
msgid "Select Groups"
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: includes/providers/class-base.php:666
|
1673 |
msgid ""
|
1674 |
"We also noticed that you have some segments in your list. You can select "
|
1675 |
"specific list segments below if needed. This is optional."
|
1676 |
msgstr ""
|
1677 |
|
1678 |
+
#: includes/providers/class-base.php:722 includes/providers/class-base.php:727
|
1679 |
msgid "List Fields"
|
1680 |
msgstr ""
|
1681 |
|
1682 |
+
#: includes/providers/class-base.php:727
|
1683 |
msgid "Available Form Fields"
|
1684 |
msgstr ""
|
1685 |
|
1686 |
+
#: includes/providers/class-base.php:796
|
1687 |
+
msgid "Process"
|
1688 |
msgstr ""
|
1689 |
|
1690 |
+
#: includes/providers/class-base.php:797
|
1691 |
+
msgid "Don't process"
|
|
|
|
|
|
|
|
|
1692 |
msgstr ""
|
1693 |
|
1694 |
+
#: includes/providers/class-base.php:799
|
1695 |
+
msgid "this connection if"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
+
#: includes/providers/class-base.php:800
|
1699 |
+
msgid "Marketing provider connection"
|
|
|
|
|
|
|
|
|
1700 |
msgstr ""
|
1701 |
|
1702 |
+
#: includes/providers/class-base.php:970 includes/providers/class-base.php:1005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1703 |
msgid "Missing data"
|
1704 |
msgstr ""
|
1705 |
|
1706 |
+
#: includes/providers/class-base.php:982
|
1707 |
msgid "Connection missing"
|
1708 |
msgstr ""
|
1709 |
|
1710 |
+
#: includes/providers/class-base.php:1022
|
1711 |
+
#: includes/providers/class-base.php:1084
|
1712 |
msgid "Connected on: "
|
1713 |
msgstr ""
|
1714 |
|
1715 |
+
#: includes/providers/class-base.php:1023
|
1716 |
+
#: includes/providers/class-base.php:1085
|
1717 |
msgid "Disconnect "
|
1718 |
msgstr ""
|
1719 |
|
1720 |
+
#: includes/providers/class-base.php:1069
|
1721 |
msgid "Integrate %s with WPForms"
|
1722 |
msgstr ""
|
1723 |
|
1724 |
+
#: includes/providers/class-base.php:1070
|
1725 |
msgid "Connected"
|
1726 |
msgstr ""
|
1727 |
|
1728 |
+
#: includes/providers/class-base.php:1100
|
1729 |
msgid ""
|
1730 |
"Please fill out all of the fields below to add your new provider account."
|
1731 |
msgstr ""
|
1732 |
|
1733 |
+
#: includes/providers/class-base.php:1106
|
1734 |
msgid "Connect to"
|
1735 |
msgstr ""
|
1736 |
|
2134 |
|
2135 |
#: lite/includes/admin/class-settings.php:195
|
2136 |
#: pro/includes/admin/class-settings.php:208
|
2137 |
+
#: pro/includes/admin/class-settings.php:556
|
2138 |
msgid "Settings check failed."
|
2139 |
msgstr ""
|
2140 |
|
2141 |
+
#: lite/includes/admin/class-settings.php:223
|
2142 |
+
#: pro/includes/admin/class-settings.php:242
|
2143 |
msgid "General settings updated."
|
2144 |
msgstr ""
|
2145 |
|
2146 |
+
#: lite/includes/admin/class-settings.php:240
|
2147 |
+
#: pro/includes/admin/class-settings.php:315
|
2148 |
msgid "Include Form Styling"
|
2149 |
msgstr ""
|
2150 |
|
|
|
|
|
|
|
|
|
|
|
2151 |
#: lite/includes/admin/class-settings.php:244
|
2152 |
#: pro/includes/admin/class-settings.php:319
|
2153 |
+
msgid "Base and form theme styling"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
#: lite/includes/admin/class-settings.php:245
|
2157 |
#: pro/includes/admin/class-settings.php:320
|
2158 |
+
msgid "Base styling only"
|
2159 |
+
msgstr ""
|
2160 |
+
|
2161 |
+
#: lite/includes/admin/class-settings.php:246
|
2162 |
+
#: pro/includes/admin/class-settings.php:321
|
2163 |
#: pro/includes/fields/class-page-break.php:274
|
2164 |
msgid "None"
|
2165 |
msgstr ""
|
2166 |
|
2167 |
+
#: lite/includes/admin/class-settings.php:248
|
2168 |
+
#: pro/includes/admin/class-settings.php:323
|
2169 |
msgid "Determines which CSS files to load for the site."
|
2170 |
msgstr ""
|
2171 |
|
2172 |
+
#: lite/includes/admin/class-settings.php:253
|
2173 |
+
#: pro/includes/admin/class-settings.php:328
|
2174 |
msgid "Load Assets Globally"
|
2175 |
msgstr ""
|
2176 |
|
2177 |
+
#: lite/includes/admin/class-settings.php:257
|
2178 |
+
#: pro/includes/admin/class-settings.php:332
|
2179 |
msgid ""
|
2180 |
"Check this if you would like to load WPForms assets site-wide. Only check if "
|
2181 |
"your site is having compatibility issues or instructed to by support."
|
2182 |
msgstr ""
|
2183 |
|
2184 |
+
#: lite/includes/admin/class-settings.php:268
|
2185 |
+
#: pro/includes/admin/class-settings.php:343
|
2186 |
msgid "Email Template"
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: lite/includes/admin/class-settings.php:272
|
2190 |
+
#: pro/includes/admin/class-settings.php:347
|
2191 |
msgid "Default HTML template"
|
2192 |
msgstr ""
|
2193 |
|
2194 |
+
#: lite/includes/admin/class-settings.php:273
|
2195 |
+
#: pro/includes/admin/class-settings.php:348
|
2196 |
msgid "Plain Text"
|
2197 |
msgstr ""
|
2198 |
|
2199 |
+
#: lite/includes/admin/class-settings.php:275
|
2200 |
+
#: pro/includes/admin/class-settings.php:350
|
2201 |
msgid "Determines how email notifications will be formatted."
|
2202 |
msgstr ""
|
2203 |
|
2204 |
+
#: lite/includes/admin/class-settings.php:280
|
2205 |
+
#: pro/includes/admin/class-settings.php:355
|
2206 |
msgid "Email Header Image "
|
2207 |
msgstr ""
|
2208 |
|
2209 |
+
#: lite/includes/admin/class-settings.php:292
|
2210 |
+
#: pro/includes/admin/class-settings.php:367
|
2211 |
msgid "Upload Image"
|
2212 |
msgstr ""
|
2213 |
|
2214 |
+
#: lite/includes/admin/class-settings.php:294
|
2215 |
+
#: pro/includes/admin/class-settings.php:369
|
2216 |
msgid ""
|
2217 |
"Upload or choose a logo to be displayed at the top of email notifications."
|
2218 |
msgstr ""
|
2219 |
|
2220 |
+
#: lite/includes/admin/class-settings.php:295
|
2221 |
+
#: pro/includes/admin/class-settings.php:370
|
2222 |
msgid "Recommended size is 300x100 or smaller for best support on all devices."
|
2223 |
msgstr ""
|
2224 |
|
2225 |
+
#: lite/includes/admin/class-settings.php:301
|
2226 |
+
#: pro/includes/admin/class-settings.php:376
|
2227 |
msgid "Email Background Color"
|
2228 |
msgstr ""
|
2229 |
|
2230 |
+
#: lite/includes/admin/class-settings.php:305
|
2231 |
+
#: pro/includes/admin/class-settings.php:380
|
2232 |
msgid "Customize the background color of the HTML email template."
|
2233 |
msgstr ""
|
2234 |
|
2235 |
+
#: lite/includes/admin/class-settings.php:310
|
2236 |
+
#: pro/includes/admin/class-settings.php:385
|
2237 |
msgid "Email Carbon Copy"
|
2238 |
msgstr ""
|
2239 |
|
2240 |
+
#: lite/includes/admin/class-settings.php:314
|
2241 |
+
#: pro/includes/admin/class-settings.php:389
|
2242 |
msgid ""
|
2243 |
"Check this if you would like to enable the ability to CC: email addresses in "
|
2244 |
"the form notification settings."
|
2245 |
msgstr ""
|
2246 |
|
2247 |
+
#: lite/includes/admin/class-settings.php:320
|
2248 |
+
#: pro/includes/admin/class-settings.php:395
|
2249 |
msgid "reCAPTCHA"
|
2250 |
msgstr ""
|
2251 |
|
2252 |
+
#: lite/includes/admin/class-settings.php:321
|
2253 |
+
#: pro/includes/admin/class-settings.php:396
|
2254 |
msgid ""
|
2255 |
"reCAPTCHA is a free anti-spam service from Google which helps to protect "
|
2256 |
"your website from spam and abuse while letting real people pass through with "
|
2257 |
"ease."
|
2258 |
msgstr ""
|
2259 |
|
2260 |
+
#: lite/includes/admin/class-settings.php:322
|
2261 |
+
#: pro/includes/admin/class-settings.php:397
|
2262 |
msgid ""
|
2263 |
"Google's original <a href=\"https://www.google.com/recaptcha/intro/\" rel="
|
2264 |
"\"noopener noreferrer\">v2 reCAPTCHA</a> prompts users to check a box to "
|
2267 |
"uses advanced technology to detect real users without requiring any input."
|
2268 |
msgstr ""
|
2269 |
|
2270 |
+
#: lite/includes/admin/class-settings.php:323
|
2271 |
+
#: pro/includes/admin/class-settings.php:398
|
2272 |
msgid ""
|
2273 |
"Sites already using v2 reCAPTCHA will need to create new site keys before "
|
2274 |
"switching to the Invisible reCAPTCHA."
|
2275 |
msgstr ""
|
2276 |
|
2277 |
+
#: lite/includes/admin/class-settings.php:324
|
2278 |
+
#: pro/includes/admin/class-settings.php:399
|
2279 |
msgid ""
|
2280 |
"<a href=\"https://wpforms.com/docs/setup-captcha-wpforms/\" rel=\"noopener "
|
2281 |
"noreferrer\">Read our walk through</a> to learn more and for step-by-step "
|
2282 |
"directions."
|
2283 |
msgstr ""
|
2284 |
|
2285 |
+
#: lite/includes/admin/class-settings.php:329
|
2286 |
+
#: pro/includes/admin/class-settings.php:404
|
2287 |
msgid "reCAPTCHA Type"
|
2288 |
msgstr ""
|
2289 |
|
2290 |
+
#: lite/includes/admin/class-settings.php:348
|
2291 |
+
#: pro/includes/admin/class-settings.php:423
|
2292 |
msgid "reCAPTCHA Site key"
|
2293 |
msgstr ""
|
2294 |
|
2295 |
+
#: lite/includes/admin/class-settings.php:356
|
2296 |
+
#: pro/includes/admin/class-settings.php:431
|
2297 |
msgid "reCAPTCHA Secret key"
|
2298 |
msgstr ""
|
2299 |
|
2300 |
+
#: lite/includes/admin/class-settings.php:365
|
2301 |
+
#: pro/includes/admin/class-settings.php:440
|
2302 |
msgid "Validation Messages"
|
2303 |
msgstr ""
|
2304 |
|
2305 |
+
#: lite/includes/admin/class-settings.php:378
|
2306 |
+
#: pro/includes/admin/class-settings.php:453
|
2307 |
msgid "Website URL"
|
2308 |
msgstr ""
|
2309 |
|
2310 |
+
#: lite/includes/admin/class-settings.php:394
|
2311 |
+
#: pro/includes/admin/class-settings.php:469
|
2312 |
msgid "Number"
|
2313 |
msgstr ""
|
2314 |
|
2315 |
+
#: lite/includes/admin/class-settings.php:402
|
2316 |
+
#: pro/includes/admin/class-settings.php:477
|
2317 |
msgid "Confirm Value"
|
2318 |
msgstr ""
|
2319 |
|
2320 |
+
#: lite/includes/admin/class-settings.php:411
|
2321 |
+
#: pro/includes/admin/class-settings.php:534
|
2322 |
msgid "Save General Settings"
|
2323 |
msgstr ""
|
2324 |
|
2325 |
+
#: lite/includes/admin/class-settings.php:431
|
2326 |
+
#: pro/includes/admin/class-settings.php:624
|
2327 |
msgid ""
|
2328 |
"You do not have any marketing add-ons activated. You can head over to the <a "
|
2329 |
"href=\"%s\">Add-Ons page</a> to install and activate the add-on for your "
|
2330 |
"provider."
|
2331 |
msgstr ""
|
2332 |
|
2333 |
+
#: lite/includes/admin/class-settings.php:556
|
2334 |
+
#: lite/includes/admin/class-settings.php:560
|
2335 |
+
#: pro/includes/admin/class-settings.php:995
|
2336 |
+
#: pro/includes/admin/class-settings.php:999
|
2337 |
#: pro/includes/admin/entries/class-entries.php:1105
|
2338 |
#: pro/includes/admin/entries/class-entries.php:1427
|
2339 |
msgid "M j, Y @ g:ia"
|
2340 |
msgstr ""
|
2341 |
|
2342 |
+
#: lite/wpforms-lite.php:87 pro/wpforms-pro.php:276
|
2343 |
msgid "Default Notification"
|
2344 |
msgstr ""
|
2345 |
|
2346 |
+
#: lite/wpforms-lite.php:95 pro/wpforms-pro.php:291
|
2347 |
msgid "Send To Email Address"
|
2348 |
msgstr ""
|
2349 |
|
2350 |
+
#: lite/wpforms-lite.php:98 pro/wpforms-pro.php:294
|
2351 |
msgid ""
|
2352 |
"Enter the email address to receive form entry notifications. For multiple "
|
2353 |
"notifications, separate email addresses with a comma."
|
2354 |
msgstr ""
|
2355 |
|
2356 |
+
#: lite/wpforms-lite.php:114 pro/wpforms-pro.php:310
|
2357 |
msgid "CC"
|
2358 |
msgstr ""
|
2359 |
|
2360 |
+
#: lite/wpforms-lite.php:130 pro/wpforms-pro.php:326
|
2361 |
msgid "Email Subject"
|
2362 |
msgstr ""
|
2363 |
|
2364 |
+
#: lite/wpforms-lite.php:132 pro/wpforms-pro.php:328
|
2365 |
msgid "New Entry: "
|
2366 |
msgstr ""
|
2367 |
|
2368 |
+
#: lite/wpforms-lite.php:145 pro/wpforms-pro.php:341
|
2369 |
msgid "From Name"
|
2370 |
msgstr ""
|
2371 |
|
2372 |
+
#: lite/wpforms-lite.php:161 pro/wpforms-pro.php:357
|
2373 |
msgid "From Email"
|
2374 |
msgstr ""
|
2375 |
|
2376 |
+
#: lite/wpforms-lite.php:177 pro/wpforms-pro.php:373
|
2377 |
msgid "Reply-To"
|
2378 |
msgstr ""
|
2379 |
|
2380 |
+
#: lite/wpforms-lite.php:202 pro/wpforms-pro.php:398
|
2381 |
msgid ""
|
2382 |
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
2383 |
msgstr ""
|
2384 |
|
2385 |
+
#: lite/wpforms-lite.php:439
|
2386 |
msgid "is a PRO Feature"
|
2387 |
msgstr ""
|
2388 |
|
2389 |
+
#: lite/wpforms-lite.php:440
|
2390 |
msgid ""
|
2391 |
"We're sorry, %name% is not available on your plan.<br><br>Please upgrade to "
|
2392 |
"the PRO plan to unlock all these awesome features."
|
2393 |
msgstr ""
|
2394 |
|
2395 |
+
#: lite/wpforms-lite.php:441
|
2396 |
msgid "Upgrade to PRO"
|
2397 |
msgstr ""
|
2398 |
|
2569 |
msgid "Import/Export"
|
2570 |
msgstr ""
|
2571 |
|
2572 |
+
#: pro/includes/admin/class-settings.php:249
|
2573 |
msgid "Please enter a license key to verify."
|
2574 |
msgstr ""
|
2575 |
|
2576 |
+
#: pro/includes/admin/class-settings.php:278
|
2577 |
msgid "License"
|
2578 |
msgstr ""
|
2579 |
|
2580 |
+
#: pro/includes/admin/class-settings.php:279
|
2581 |
msgid "Your license key provides access to updates and Add-ons. "
|
2582 |
msgstr ""
|
2583 |
|
2584 |
+
#: pro/includes/admin/class-settings.php:284
|
2585 |
msgid "License Key"
|
2586 |
msgstr ""
|
2587 |
|
2588 |
+
#: pro/includes/admin/class-settings.php:288
|
2589 |
msgid "Verify Key"
|
2590 |
msgstr ""
|
2591 |
|
2592 |
+
#: pro/includes/admin/class-settings.php:290
|
2593 |
msgid "Deactivate Key"
|
2594 |
msgstr ""
|
2595 |
|
2596 |
+
#: pro/includes/admin/class-settings.php:298
|
2597 |
msgid "License Key Type"
|
2598 |
msgstr ""
|
2599 |
|
2600 |
+
#: pro/includes/admin/class-settings.php:301
|
2601 |
msgid "Your license key type for this site is <strong>%s.</strong>"
|
2602 |
msgstr ""
|
2603 |
|
2604 |
+
#: pro/includes/admin/class-settings.php:302
|
2605 |
msgid "Refresh Key"
|
2606 |
msgstr ""
|
2607 |
|
2608 |
+
#: pro/includes/admin/class-settings.php:303
|
2609 |
msgid ""
|
2610 |
"If your license has been upgraded or is incorrect, you may force a refresh."
|
2611 |
msgstr ""
|
2612 |
|
2613 |
+
#: pro/includes/admin/class-settings.php:485
|
2614 |
msgid "File Extension"
|
2615 |
msgstr ""
|
2616 |
|
2617 |
+
#: pro/includes/admin/class-settings.php:493
|
2618 |
msgid "File Size"
|
2619 |
msgstr ""
|
2620 |
|
2621 |
+
#: pro/includes/admin/class-settings.php:501
|
|
|
2622 |
msgid "Time (12 hour)"
|
2623 |
msgstr ""
|
2624 |
|
2625 |
+
#: pro/includes/admin/class-settings.php:509
|
2626 |
+
msgid "Time (24 hour)"
|
2627 |
+
msgstr ""
|
2628 |
+
|
2629 |
+
#: pro/includes/admin/class-settings.php:517
|
2630 |
msgid "Payment Required"
|
2631 |
msgstr ""
|
2632 |
|
2633 |
+
#: pro/includes/admin/class-settings.php:525
|
2634 |
#: pro/includes/fields/class-payment-credit-card.php:21
|
2635 |
msgid "Credit Card"
|
2636 |
msgstr ""
|
2637 |
|
2638 |
+
#: pro/includes/admin/class-settings.php:567
|
2639 |
msgid "Settings updated."
|
2640 |
msgstr ""
|
2641 |
|
2642 |
+
#: pro/includes/admin/class-settings.php:581
|
2643 |
msgid "Currency"
|
2644 |
msgstr ""
|
2645 |
|
2646 |
+
#: pro/includes/admin/class-settings.php:593
|
2647 |
msgid "Determines which currency to use for payments."
|
2648 |
msgstr ""
|
2649 |
|
2650 |
+
#: pro/includes/admin/class-settings.php:643
|
2651 |
msgid "Form(s) imported"
|
2652 |
msgstr ""
|
2653 |
|
2654 |
+
#: pro/includes/admin/class-settings.php:652
|
2655 |
msgid "Form Import"
|
2656 |
msgstr ""
|
2657 |
|
2658 |
+
#: pro/includes/admin/class-settings.php:657
|
2659 |
msgid "Select an export file."
|
2660 |
msgstr ""
|
2661 |
|
2662 |
+
#: pro/includes/admin/class-settings.php:663
|
2663 |
msgid "Import"
|
2664 |
msgstr ""
|
2665 |
|
2666 |
+
#: pro/includes/admin/class-settings.php:670
|
2667 |
msgid "Form Export"
|
2668 |
msgstr ""
|
2669 |
|
2670 |
+
#: pro/includes/admin/class-settings.php:675
|
2671 |
msgid ""
|
2672 |
"Select form(s) to download an export file. This can be imported into another "
|
2673 |
"site."
|
2674 |
msgstr ""
|
2675 |
|
2676 |
+
#: pro/includes/admin/class-settings.php:690
|
2677 |
msgid "Export"
|
2678 |
msgstr ""
|
2679 |
|
2680 |
+
#: pro/includes/admin/class-settings.php:697
|
2681 |
msgid "Form Template Export"
|
2682 |
msgstr ""
|
2683 |
|
2684 |
+
#: pro/includes/admin/class-settings.php:704
|
2685 |
msgid ""
|
2686 |
"The following code can be used to register your custom form template. Copy "
|
2687 |
"and paste the following code to your theme's functions.php file or include "
|
2688 |
"it within an external file."
|
2689 |
msgstr ""
|
2690 |
|
2691 |
+
#: pro/includes/admin/class-settings.php:705
|
2692 |
msgid ""
|
2693 |
"For more information <a href=\"%s\" target=\"blank\" rel=\"noopener "
|
2694 |
"noreferrer\">see our documentation</a> for additional details."
|
2695 |
msgstr ""
|
2696 |
|
2697 |
+
#: pro/includes/admin/class-settings.php:709
|
2698 |
msgid ""
|
2699 |
"Select a form to generate PHP code that can be used to register a custom "
|
2700 |
"form template."
|
2701 |
msgstr ""
|
2702 |
|
2703 |
+
#: pro/includes/admin/class-settings.php:724
|
2704 |
msgid "Generate template code"
|
2705 |
msgstr ""
|
2706 |
|
2707 |
+
#: pro/includes/admin/class-settings.php:789
|
2708 |
msgid "Please upload a valid .json form export file."
|
2709 |
msgstr ""
|
2710 |
|
2711 |
+
#: pro/includes/admin/class-settings.php:789
|
2712 |
#: pro/includes/admin/entries/class-entries-export.php:305
|
2713 |
msgid "Error"
|
2714 |
msgstr ""
|
3070 |
msgid "(Abandoned)"
|
3071 |
msgstr ""
|
3072 |
|
3073 |
+
#: pro/includes/class-conditional-logic-fields.php:95
|
3074 |
+
msgid "Conditionals"
|
3075 |
+
msgstr ""
|
3076 |
+
|
3077 |
+
#: pro/includes/class-conditional-logic-fields.php:364
|
3078 |
+
msgid "Entry Notification stopped by conditional logic"
|
3079 |
+
msgstr ""
|
3080 |
+
|
3081 |
#: pro/includes/fields/class-address.php:21
|
3082 |
#: pro/includes/templates/class-order.php:57
|
3083 |
msgid "Address"
|
3084 |
msgstr ""
|
3085 |
|
3086 |
#: pro/includes/fields/class-address.php:28
|
3087 |
+
#: pro/includes/fields/class-phone.php:90
|
3088 |
msgid "US"
|
3089 |
msgstr ""
|
3090 |
|
3117 |
msgstr ""
|
3118 |
|
3119 |
#: pro/includes/fields/class-address.php:38
|
3120 |
+
#: pro/includes/fields/class-phone.php:91
|
3121 |
msgid "International"
|
3122 |
msgstr ""
|
3123 |
|
3214 |
msgid "File Upload"
|
3215 |
msgstr ""
|
3216 |
|
3217 |
+
#: pro/includes/fields/class-file-upload.php:152
|
3218 |
msgid "Allowed File Extensions"
|
3219 |
msgstr ""
|
3220 |
|
3221 |
+
#: pro/includes/fields/class-file-upload.php:153
|
3222 |
msgid "Enter the extensions you would like to allow, comma separated."
|
3223 |
msgstr ""
|
3224 |
|
3225 |
+
#: pro/includes/fields/class-file-upload.php:178
|
3226 |
msgid "Max File Size"
|
3227 |
msgstr ""
|
3228 |
|
3229 |
+
#: pro/includes/fields/class-file-upload.php:179
|
3230 |
msgid ""
|
3231 |
"Enter the max file size, in megabytyes, to allow. If left blank, the value "
|
3232 |
"defaults to the maximum size the server allows which is "
|
3233 |
msgstr ""
|
3234 |
|
3235 |
+
#: pro/includes/fields/class-file-upload.php:227
|
3236 |
msgid "Store file in WordPress Media Library"
|
3237 |
msgstr ""
|
3238 |
|
3239 |
+
#: pro/includes/fields/class-file-upload.php:228
|
3240 |
msgid ""
|
3241 |
"Check this option to store the final uploaded file in the WordPress Media "
|
3242 |
"Library"
|
3243 |
msgstr ""
|
3244 |
|
3245 |
+
#: pro/includes/fields/class-file-upload.php:314
|
3246 |
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
|
3247 |
msgstr ""
|
3248 |
|
3249 |
+
#: pro/includes/fields/class-file-upload.php:315
|
3250 |
msgid ""
|
3251 |
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
|
3252 |
"the HTML form."
|
3253 |
msgstr ""
|
3254 |
|
3255 |
+
#: pro/includes/fields/class-file-upload.php:316
|
3256 |
msgid "The uploaded file was only partially uploaded."
|
3257 |
msgstr ""
|
3258 |
|
3259 |
+
#: pro/includes/fields/class-file-upload.php:317
|
3260 |
msgid "No file was uploaded."
|
3261 |
msgstr ""
|
3262 |
|
3263 |
+
#: pro/includes/fields/class-file-upload.php:319
|
3264 |
msgid "Missing a temporary folder."
|
3265 |
msgstr ""
|
3266 |
|
3267 |
+
#: pro/includes/fields/class-file-upload.php:320
|
3268 |
msgid "Failed to write file to disk."
|
3269 |
msgstr ""
|
3270 |
|
3271 |
+
#: pro/includes/fields/class-file-upload.php:321
|
3272 |
msgid "File upload stopped by extension."
|
3273 |
msgstr ""
|
3274 |
|
3275 |
+
#: pro/includes/fields/class-file-upload.php:323
|
3276 |
msgid "File upload error. "
|
3277 |
msgstr ""
|
3278 |
|
3279 |
+
#: pro/includes/fields/class-file-upload.php:342
|
3280 |
msgid "File exceeds max size allowed"
|
3281 |
msgstr ""
|
3282 |
|
3283 |
+
#: pro/includes/fields/class-file-upload.php:358
|
3284 |
msgid "File must have an extension."
|
3285 |
msgstr ""
|
3286 |
|
3712 |
msgid "Request"
|
3713 |
msgstr ""
|
3714 |
|
3715 |
+
#: pro/wpforms-pro.php:195
|
3716 |
msgid "Disable storing entry information in WordPress"
|
3717 |
msgstr ""
|
3718 |
|
3719 |
+
#: pro/wpforms-pro.php:256
|
3720 |
msgid "Add New Notification"
|
3721 |
msgstr ""
|
3722 |
|
3723 |
+
#: pro/wpforms-pro.php:411
|
3724 |
msgid "Send"
|
3725 |
msgstr ""
|
3726 |
|
3727 |
+
#: pro/wpforms-pro.php:412
|
3728 |
msgid "Don't send"
|
3729 |
msgstr ""
|
3730 |
|
3731 |
+
#: pro/wpforms-pro.php:414
|
3732 |
msgid "this notification if"
|
3733 |
msgstr ""
|
3734 |
|
3735 |
+
#: pro/wpforms-pro.php:415
|
3736 |
msgid "Email notifications"
|
3737 |
msgstr ""
|
3738 |
|
3739 |
+
#: pro/wpforms-pro.php:418
|
3740 |
msgid ""
|
3741 |
"Install the <a href=\"%s\">Conditional Logic add-on</a> to enable "
|
3742 |
"conditional logic for Email Notifications."
|
3743 |
msgstr ""
|
3744 |
|
3745 |
+
#: pro/wpforms-pro.php:461
|
3746 |
+
msgid ""
|
3747 |
+
"Conditional logic functionality is now included in the core WPForms plugin! "
|
3748 |
+
"The WPForms Conditional Logic addon can be removed without affecting your "
|
3749 |
+
"forms. For more details <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
3750 |
+
"noreferrer\">read our annoucement</a>."
|
3751 |
+
msgstr ""
|
3752 |
+
|
3753 |
#: wpforms.php:54
|
3754 |
msgid "Please deactivate WPForms Lite before activating WPForms"
|
3755 |
msgstr ""
|
3756 |
|
3757 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.3.8) #-#-#-#-#
|
3758 |
#. Plugin URI of the plugin/theme
|
3759 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.3.8) #-#-#-#-#
|
3760 |
#. Author URI of the plugin/theme
|
3761 |
msgid "https://wpforms.com"
|
3762 |
msgstr ""
|
lite/assets/js/admin-builder-lite.js
CHANGED
@@ -81,11 +81,19 @@
|
|
81 |
title: feature+' '+wpforms_builder_lite.upgrade_title,
|
82 |
icon: 'fa fa-lock',
|
83 |
content: message,
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
});
|
90 |
},
|
91 |
};
|
81 |
title: feature+' '+wpforms_builder_lite.upgrade_title,
|
82 |
icon: 'fa fa-lock',
|
83 |
content: message,
|
84 |
+
buttons: {
|
85 |
+
confirm: {
|
86 |
+
text: wpforms_builder_lite.upgrade_button,
|
87 |
+
btnClass: 'btn-confirm',
|
88 |
+
keys: ['enter'],
|
89 |
+
action: function () {
|
90 |
+
window.open(wpforms_builder_lite.upgrade_url,'_blank');
|
91 |
+
}
|
92 |
+
},
|
93 |
+
cancel: {
|
94 |
+
text: wpforms_builder.ok
|
95 |
+
}
|
96 |
+
}
|
97 |
});
|
98 |
},
|
99 |
};
|
lite/includes/admin/class-settings.php
CHANGED
@@ -212,6 +212,7 @@ class WPForms_Settings {
|
|
212 |
$this->options['validation-required'] = ! empty( $_POST['validation-required'] ) ? sanitize_text_field( $_POST['validation-required'] ) : '';
|
213 |
$this->options['validation-url'] = ! empty( $_POST['validation-url'] ) ? sanitize_text_field( $_POST['validation-url'] ) : '';
|
214 |
$this->options['validation-email'] = ! empty( $_POST['validation-email'] ) ? sanitize_text_field( $_POST['validation-email'] ) : '';
|
|
|
215 |
$this->options['validation-confirm'] = ! empty( $_POST['validation-confirm'] ) ? sanitize_text_field( $_POST['validation-confirm'] ) : '';
|
216 |
|
217 |
$this->options = apply_filters( 'wpforms_settings_save', $this->options, $_POST, 'general' );
|
212 |
$this->options['validation-required'] = ! empty( $_POST['validation-required'] ) ? sanitize_text_field( $_POST['validation-required'] ) : '';
|
213 |
$this->options['validation-url'] = ! empty( $_POST['validation-url'] ) ? sanitize_text_field( $_POST['validation-url'] ) : '';
|
214 |
$this->options['validation-email'] = ! empty( $_POST['validation-email'] ) ? sanitize_text_field( $_POST['validation-email'] ) : '';
|
215 |
+
$this->options['validation-number'] = ! empty( $_POST['validation-number'] ) ? sanitize_text_field( $_POST['validation-number'] ) : '';
|
216 |
$this->options['validation-confirm'] = ! empty( $_POST['validation-confirm'] ) ? sanitize_text_field( $_POST['validation-confirm'] ) : '';
|
217 |
|
218 |
$this->options = apply_filters( 'wpforms_settings_save', $this->options, $_POST, 'general' );
|
lite/wpforms-lite.php
CHANGED
@@ -447,7 +447,7 @@ class WPForms_Lite {
|
|
447 |
/**
|
448 |
* Display other providers available with paid license.
|
449 |
*
|
450 |
-
* @since 1.3.
|
451 |
*/
|
452 |
public function builder_provider_sidebar() {
|
453 |
|
@@ -488,6 +488,7 @@ class WPForms_Lite {
|
|
488 |
}
|
489 |
}
|
490 |
|
|
|
491 |
/**
|
492 |
* Notify user that entries is a pro feature.
|
493 |
*
|
447 |
/**
|
448 |
* Display other providers available with paid license.
|
449 |
*
|
450 |
+
* @since 1.3.8
|
451 |
*/
|
452 |
public function builder_provider_sidebar() {
|
453 |
|
488 |
}
|
489 |
}
|
490 |
|
491 |
+
|
492 |
/**
|
493 |
* Notify user that entries is a pro feature.
|
494 |
*
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: wpforms, jaredatch, smub
|
3 |
Tags: contact form, contact form plugin, forms, form builder, custom form, contact button, contact me, custom contact form, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 4.
|
6 |
Stable tag: trunk
|
7 |
License: GNU General Public License v2.0 or later
|
8 |
|
@@ -44,7 +44,7 @@ Building contact forms in WordPress can be time consuming. Why?
|
|
44 |
|
45 |
Because every other WordPress contact form builder plugin requires you to build your contact form from scratch. The truth is it's often not necessary to create a contact form completely from scratch unless you really want to.
|
46 |
|
47 |
-
Whether you
|
48 |
|
49 |
WPForms comes with <a href="https://wpforms.com/features/form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">pre-built form templates</a> to help you save time. You can add, remove, or re-arrange fields as necessary.
|
50 |
|
@@ -209,8 +209,15 @@ Syed Balkhi
|
|
209 |
|
210 |
== Changelog ==
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
= 1.3.7.4 =
|
213 |
-
-
|
214 |
|
215 |
= 1.3.7.3 =
|
216 |
- Fixed: Required setting checkbox getting out of sync when duplicating fields
|
@@ -229,7 +236,7 @@ Syed Balkhi
|
|
229 |
- Added: Google Invisible reCAPTCHA support
|
230 |
- Added: Custom field validation messages (see WPForms Settings page)
|
231 |
- Added: Bulk add choices for Checkbox, Multiple Choice, and Dropdown fields
|
232 |
-
-
|
233 |
- Added: Field CSS layout selector
|
234 |
- Changed: Leverage `wp_json_encode` instead of native PHP function
|
235 |
- Changed: Various WordPress coding standard improvements (work in progress)
|
2 |
Contributors: wpforms, jaredatch, smub
|
3 |
Tags: contact form, contact form plugin, forms, form builder, custom form, contact button, contact me, custom contact form, form manager, form, forms builder, forms creator, captcha, recaptcha, Akismet, email form, web form, feedback form, payment form, survey form, donation form, email submit form, message form, mailchimp, mailchimp form, aweber, aweber form, paypal, paypal form, stripe, stripe form, getresponse, getresponse form, email subscription, contact form widget, user registration form, wordpress registration, wordpress login form
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 4.8
|
6 |
Stable tag: trunk
|
7 |
License: GNU General Public License v2.0 or later
|
8 |
|
44 |
|
45 |
Because every other WordPress contact form builder plugin requires you to build your contact form from scratch. The truth is it's often not necessary to create a contact form completely from scratch unless you really want to.
|
46 |
|
47 |
+
Whether you’re looking to create a simple contact form, request a quote form, donation form, payment order form, or a subscription form, we have a form template for you inside our contact form builder.
|
48 |
|
49 |
WPForms comes with <a href="https://wpforms.com/features/form-templates/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion" rel="friend">pre-built form templates</a> to help you save time. You can add, remove, or re-arrange fields as necessary.
|
50 |
|
209 |
|
210 |
== Changelog ==
|
211 |
|
212 |
+
= 1.3.8 =
|
213 |
+
- Changed: Available conditional logic rules/functionality with Providers have been updated
|
214 |
+
- Changed: Updated form builder modals (jquery-confirm.js)
|
215 |
+
- Changed: Many Form Builder performance enhancements
|
216 |
+
- Fixed: Number field validation message not saving
|
217 |
+
- Fixed: Email confirmation setting not displaying correctly with Small field size
|
218 |
+
|
219 |
= 1.3.7.4 =
|
220 |
+
- Added: Marketing tab in the form builder shows all possible providers.
|
221 |
|
222 |
= 1.3.7.3 =
|
223 |
- Fixed: Required setting checkbox getting out of sync when duplicating fields
|
236 |
- Added: Google Invisible reCAPTCHA support
|
237 |
- Added: Custom field validation messages (see WPForms Settings page)
|
238 |
- Added: Bulk add choices for Checkbox, Multiple Choice, and Dropdown fields
|
239 |
+
- Added: Filter to allow email notifications to include empty fields, `wpforms_email_display_empty_fields`
|
240 |
- Added: Field CSS layout selector
|
241 |
- Changed: Leverage `wp_json_encode` instead of native PHP function
|
242 |
- Changed: Various WordPress coding standard improvements (work in progress)
|
wpforms.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
|
6 |
* Author: WPForms
|
7 |
* Author URI: https://wpforms.com
|
8 |
-
* Version: 1.3.
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -81,7 +81,7 @@ final class WPForms {
|
|
81 |
* @since 1.0.0
|
82 |
* @var sting
|
83 |
*/
|
84 |
-
public $version = '1.3.
|
85 |
|
86 |
/**
|
87 |
* The form data handler instance.
|
@@ -171,6 +171,7 @@ final class WPForms {
|
|
171 |
self::$instance = new WPForms;
|
172 |
self::$instance->constants();
|
173 |
self::$instance->load_textdomain();
|
|
|
174 |
self::$instance->includes();
|
175 |
|
176 |
// Load Pro or Lite specific files
|
@@ -185,6 +186,62 @@ final class WPForms {
|
|
185 |
return self::$instance;
|
186 |
}
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
/**
|
189 |
* Include files.
|
190 |
*
|
@@ -205,6 +262,7 @@ final class WPForms {
|
|
205 |
require_once WPFORMS_PLUGIN_DIR . 'includes/class-logging.php';
|
206 |
require_once WPFORMS_PLUGIN_DIR . 'includes/class-widget.php';
|
207 |
require_once WPFORMS_PLUGIN_DIR . 'includes/class-preview.php';
|
|
|
208 |
require_once WPFORMS_PLUGIN_DIR . 'includes/emails/class-emails.php';
|
209 |
require_once WPFORMS_PLUGIN_DIR . 'includes/integrations.php';
|
210 |
|
@@ -238,44 +296,6 @@ final class WPForms {
|
|
238 |
// Hook now that all of the WPForms stuff is loaded.
|
239 |
do_action( 'wpforms_loaded' );
|
240 |
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Setup plugin constants.
|
244 |
-
*
|
245 |
-
* @since 1.0.0
|
246 |
-
*/
|
247 |
-
private function constants() {
|
248 |
-
|
249 |
-
// Plugin version
|
250 |
-
if ( ! defined( 'WPFORMS_VERSION' ) ) {
|
251 |
-
define( 'WPFORMS_VERSION', $this->version );
|
252 |
-
}
|
253 |
-
|
254 |
-
// Plugin Folder Path
|
255 |
-
if ( ! defined( 'WPFORMS_PLUGIN_DIR' ) ) {
|
256 |
-
define( 'WPFORMS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
257 |
-
}
|
258 |
-
|
259 |
-
// Plugin Folder URL
|
260 |
-
if ( ! defined( 'WPFORMS_PLUGIN_URL' ) ) {
|
261 |
-
define( 'WPFORMS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
262 |
-
}
|
263 |
-
|
264 |
-
// Plugin Root File
|
265 |
-
if ( ! defined( 'WPFORMS_PLUGIN_FILE' ) ) {
|
266 |
-
define( 'WPFORMS_PLUGIN_FILE', __FILE__ );
|
267 |
-
}
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Loads the plugin language files.
|
272 |
-
*
|
273 |
-
* @since 1.0.0
|
274 |
-
*/
|
275 |
-
public function load_textdomain() {
|
276 |
-
|
277 |
-
load_plugin_textdomain( 'wpforms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
278 |
-
}
|
279 |
}
|
280 |
|
281 |
/**
|
5 |
* Description: Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
|
6 |
* Author: WPForms
|
7 |
* Author URI: https://wpforms.com
|
8 |
+
* Version: 1.3.8
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
81 |
* @since 1.0.0
|
82 |
* @var sting
|
83 |
*/
|
84 |
+
public $version = '1.3.8';
|
85 |
|
86 |
/**
|
87 |
* The form data handler instance.
|
171 |
self::$instance = new WPForms;
|
172 |
self::$instance->constants();
|
173 |
self::$instance->load_textdomain();
|
174 |
+
self::$instance->conditional_logic_addon_check();
|
175 |
self::$instance->includes();
|
176 |
|
177 |
// Load Pro or Lite specific files
|
186 |
return self::$instance;
|
187 |
}
|
188 |
|
189 |
+
/**
|
190 |
+
* Setup plugin constants.
|
191 |
+
*
|
192 |
+
* @since 1.0.0
|
193 |
+
*/
|
194 |
+
private function constants() {
|
195 |
+
|
196 |
+
// Plugin version
|
197 |
+
if ( ! defined( 'WPFORMS_VERSION' ) ) {
|
198 |
+
define( 'WPFORMS_VERSION', $this->version );
|
199 |
+
}
|
200 |
+
|
201 |
+
// Plugin Folder Path
|
202 |
+
if ( ! defined( 'WPFORMS_PLUGIN_DIR' ) ) {
|
203 |
+
define( 'WPFORMS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
204 |
+
}
|
205 |
+
|
206 |
+
// Plugin Folder URL
|
207 |
+
if ( ! defined( 'WPFORMS_PLUGIN_URL' ) ) {
|
208 |
+
define( 'WPFORMS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
209 |
+
}
|
210 |
+
|
211 |
+
// Plugin Root File
|
212 |
+
if ( ! defined( 'WPFORMS_PLUGIN_FILE' ) ) {
|
213 |
+
define( 'WPFORMS_PLUGIN_FILE', __FILE__ );
|
214 |
+
}
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Loads the plugin language files.
|
219 |
+
*
|
220 |
+
* @since 1.0.0
|
221 |
+
*/
|
222 |
+
public function load_textdomain() {
|
223 |
+
|
224 |
+
load_plugin_textdomain( 'wpforms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Check to see if the conditional logic addon is running, if so then
|
229 |
+
* deactivate the plugin to prevent conflicts.
|
230 |
+
*
|
231 |
+
* @since 1.3.8
|
232 |
+
*/
|
233 |
+
private function conditional_logic_addon_check() {
|
234 |
+
|
235 |
+
if ( function_exists( 'wpforms_conditional_logic' ) ) {
|
236 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
237 |
+
require_once( ABSPATH . 'wp-includes/pluggable.php' );
|
238 |
+
deactivate_plugins( 'wpforms-conditional-logic/wpforms-conditional-logic.php' );
|
239 |
+
$url = esc_url_raw( remove_query_arg( 'wpforms-test' ) );
|
240 |
+
wp_redirect( $url );
|
241 |
+
exit;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
/**
|
246 |
* Include files.
|
247 |
*
|
262 |
require_once WPFORMS_PLUGIN_DIR . 'includes/class-logging.php';
|
263 |
require_once WPFORMS_PLUGIN_DIR . 'includes/class-widget.php';
|
264 |
require_once WPFORMS_PLUGIN_DIR . 'includes/class-preview.php';
|
265 |
+
require_once WPFORMS_PLUGIN_DIR . 'includes/class-conditional-logic-core.php';
|
266 |
require_once WPFORMS_PLUGIN_DIR . 'includes/emails/class-emails.php';
|
267 |
require_once WPFORMS_PLUGIN_DIR . 'includes/integrations.php';
|
268 |
|
296 |
// Hook now that all of the WPForms stuff is loaded.
|
297 |
do_action( 'wpforms_loaded' );
|
298 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
}
|
300 |
|
301 |
/**
|