Version Description
- Changed: Improved the loading order of javascript files for forms builder
- Changed: Update some strings for Russian translation
Download this release
Release Info
Developer | jaredatch |
Plugin | Contact Form by WPForms – Drag & Drop Form Builder for WordPress |
Version | 1.4.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.0.1 to 1.4.1.1
- assets/css/admin-builder-settings.css +1 -39
- assets/css/jquery-confirm.min.css +2 -2
- assets/css/wpforms-base.css +140 -0
- assets/css/wpforms-full.css +140 -0
- assets/js/admin-builder.js +244 -99
- assets/js/admin-utils.js +34 -23
- assets/js/jquery.jquery-confirm.min.js +2 -2
- assets/js/wpforms-confirmation.js +4 -3
- assets/js/wpforms.js +79 -64
- changelog.txt +34 -14
- includes/admin/admin.php +5 -4
- includes/admin/ajax-actions.php +127 -67
- includes/admin/builder/class-builder.php +42 -41
- includes/admin/builder/functions.php +100 -66
- includes/admin/builder/panels/class-providers.php +12 -9
- includes/admin/builder/panels/class-settings.php +38 -25
- includes/admin/builder/panels/class-setup.php +9 -7
- includes/admin/class-am-notification.php +46 -40
- includes/admin/class-editor.php +40 -38
- includes/admin/class-settings.php +6 -6
- includes/admin/class-tools.php +6 -2
- includes/admin/class-welcome.php +4 -3
- includes/admin/overview/class-overview-table.php +137 -55
- includes/admin/overview/class-overview.php +2 -2
- includes/class-conditional-logic-core.php +188 -172
- includes/class-form.php +120 -62
- includes/class-frontend.php +126 -62
- includes/class-preview.php +64 -27
- includes/class-process.php +54 -35
- includes/class-providers.php +4 -2
- includes/class-smart-tags.php +11 -13
- includes/class-templates.php +5 -3
- includes/class-widget.php +8 -8
- includes/emails/class-emails.php +120 -57
- includes/emails/templates/footer-default.php +6 -5
- includes/fields/class-base.php +128 -90
- includes/fields/class-checkbox.php +86 -50
- includes/fields/class-email.php +1 -1
- includes/fields/class-name.php +1 -1
- includes/fields/class-number.php +1 -1
- includes/fields/class-radio.php +109 -73
- includes/fields/class-select.php +117 -81
- includes/fields/class-textarea.php +2 -5
- includes/functions.php +312 -119
- includes/integrations.php +70 -55
- includes/providers/class-base.php +425 -237
- includes/providers/class-constant-contact.php +147 -97
- includes/templates/class-base.php +19 -6
- includes/templates/class-blank.php +3 -1
- includes/templates/class-contact.php +17 -15
- includes/templates/class-subscribe.php +17 -13
- includes/templates/class-suggestion.php +30 -28
- languages/wpforms-ru_RU.mo +0 -0
- languages/wpforms-ru_RU.po +4564 -0
- languages/wpforms.pot +985 -961
- lite/wpforms-lite.php +54 -49
- readme.txt +26 -2
- wpforms.php +32 -15
assets/css/admin-builder-settings.css
CHANGED
@@ -1,40 +1,2 @@
|
|
1 |
-
|
2 |
-
Admin Form Builder - Settings panel
|
3 |
-
========================================================================== */
|
4 |
|
5 |
-
#wpforms-panel-settings {
|
6 |
-
}
|
7 |
-
|
8 |
-
#wpforms-panel-settings .wpforms-panel-sidebar {
|
9 |
-
/**/
|
10 |
-
}
|
11 |
-
|
12 |
-
#wpforms-panel-settings .wpforms-panel-content .wpforms-notification {
|
13 |
-
border: 1px solid #d3d3d3;
|
14 |
-
margin: 0 0 20px 0;
|
15 |
-
}
|
16 |
-
|
17 |
-
#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header {
|
18 |
-
background-color: #f1f1f1;
|
19 |
-
padding: 10px 20px;
|
20 |
-
font-size: 16px;
|
21 |
-
margin: 0 0 20px 0;
|
22 |
-
}
|
23 |
-
|
24 |
-
#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-delete {
|
25 |
-
background-color: transparent;
|
26 |
-
color: #fff;
|
27 |
-
cursor: pointer;
|
28 |
-
-webkit-appearance: none;
|
29 |
-
border: none;
|
30 |
-
font-size: 16px;
|
31 |
-
color: #d22222;
|
32 |
-
line-height: 1;
|
33 |
-
margin-top: -2px;
|
34 |
-
float: right;
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
#wpforms-panel-settings .wpforms-panel-content .wpforms-notification .wpforms-panel-field {
|
39 |
-
padding: 0 20px;
|
40 |
-
}
|
1 |
+
#wpforms-panel-settings .wpforms-panel-content .wpforms-notification{border:1px solid #d3d3d3;margin:0 0 20px 0}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification .wpforms-panel-field{padding:0 20px}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header{background-color:#f1f1f1;padding:10px 20px;font-size:16px;margin:0}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header .wpforms-notification-name-edit{display:none;margin-top:-6px;margin-bottom:-6px;width:410px}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header .wpforms-notification-name-edit.active{display:inline-block}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header .wpforms-notification-name-edit input{width:100%}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header .wpforms-notification-actions{display:inline-block;float:right}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header .wpforms-notification-actions button{-webkit-appearance:none;background-color:transparent;border:none;color:inherit;cursor:pointer;font-size:16px;line-height:1}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-header .wpforms-notification-actions button.wpforms-notification-delete{color:#d22222;padding-right:0}#wpforms-panel-settings .wpforms-panel-content .wpforms-notification-content{margin-top:20px}
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/jquery-confirm.min.css
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
/*!
|
2 |
-
* jquery-confirm v3.2
|
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)}
|
1 |
/*!
|
2 |
+
* jquery-confirm v3.3.2 (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{-webkit-perspective:500px;perspective:500px;-webkit-perspective-origin:center;perspective-origin:center;display:table;width:100%;height:100%}.jconfirm .jconfirm-row{display:table-row;width:100%}.jconfirm .jconfirm-cell{display:table-cell;vertical-align:middle}.jconfirm .jconfirm-holder{max-height:100%;padding:50px 0}.jconfirm .jconfirm-box-container{-webkit-transition:-webkit-transform;transition:-webkit-transform;transition:transform;transition:transform,-webkit-transform}.jconfirm .jconfirm-box-container.jconfirm-no-transition{-webkit-transition:none!important;transition:none!important}.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:10px;right:10px;cursor:pointer;opacity:.6;text-align:center;font-size:27px!important;line-height:14px!important;display:none;z-index:1}.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;cursor:default;padding-bottom:15px}.jconfirm .jconfirm-box div.jconfirm-title-c.jconfirm-hand{cursor:move}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{font-size:inherit;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}.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-x:hidden;overflow-y:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane.no-scroll{overflow-y:hidden}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar{width:3px}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-thumb{background:#666;border-radius:3px}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content{overflow:auto}.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;user-select:none;border-radius:4px;min-height:1em;-webkit-transition:opacity .1s ease,background-color .1s ease,color .1s ease,background .1s ease,-webkit-box-shadow .1s ease;transition:opacity .1s ease,background-color .1s ease,color .1s ease,background .1s ease,-webkit-box-shadow .1s ease;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-box-shadow .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{-webkit-box-shadow:0 2px 6px rgba(0,0,0,0.2);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{-webkit-box-shadow:none;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{-webkit-box-shadow:0 2px 6px rgba(0,0,0,0.2);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{-webkit-box-shadow:none;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%{-webkit-box-shadow:0 0 0 red;box-shadow:0 0 0 red}50%{-webkit-box-shadow:0 0 30px red;box-shadow:0 0 30px red}}@keyframes glow{0%,100%{-webkit-box-shadow:0 0 0 red;box-shadow:0 0 0 red}50%{-webkit-box-shadow:0 0 30px red;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);transform:rotate(90deg)}.jconfirm .jconfirm-box.jconfirm-animation-rotatex{-webkit-transform:rotateX(90deg);transform:rotateX(90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatexr{-webkit-transform:rotateX(-90deg);transform:rotateX(-90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatey{-webkit-transform:rotatey(90deg);transform:rotatey(90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotateyr{-webkit-transform:rotatey(-90deg);transform:rotatey(-90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scaley{-webkit-transform:scaley(1.5);transform:scaley(1.5);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scalex{-webkit-transform:scalex(1.5);transform:scalex(1.5);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-top{-webkit-transform:translate(0px,-100px);transform:translate(0px,-100px)}.jconfirm .jconfirm-box.jconfirm-animation-left{-webkit-transform:translate(-100px,0px);transform:translate(-100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-right{-webkit-transform:translate(100px,0px);transform:translate(100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-bottom{-webkit-transform:translate(0px,100px);transform:translate(0px,100px)}.jconfirm .jconfirm-box.jconfirm-animation-zoom{-webkit-transform:scale(1.2);transform:scale(1.2)}.jconfirm .jconfirm-box.jconfirm-animation-scale{-webkit-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;-webkit-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);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;-webkit-box-shadow:0 3px 8px 0 rgba(0,0,0,0.2);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;-webkit-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);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:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;-webkit-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);transform:scale(1)}
|
assets/css/wpforms-base.css
CHANGED
@@ -528,6 +528,146 @@
|
|
528 |
top: 0;
|
529 |
}
|
530 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
|
532 |
/* Misc
|
533 |
----------------------------------------------------------------------------- */
|
528 |
top: 0;
|
529 |
}
|
530 |
|
531 |
+
/* Notices
|
532 |
+
----------------------------------------------------------------------------- */
|
533 |
+
|
534 |
+
div.wpforms-container .wpforms-notice {
|
535 |
+
background-color: #fff;
|
536 |
+
border: 1px solid #ddd;
|
537 |
+
border-left-width: 12px;
|
538 |
+
color: #333;
|
539 |
+
font-size: 16px;
|
540 |
+
line-height: 1.5;
|
541 |
+
margin-bottom: 30px;
|
542 |
+
padding: 20px 36px 20px 26px;
|
543 |
+
position: relative;
|
544 |
+
}
|
545 |
+
|
546 |
+
div.wpforms-container .wpforms-notice .wpforms-delete {
|
547 |
+
-webkit-touch-callout: none;
|
548 |
+
-webkit-user-select: none;
|
549 |
+
-moz-user-select: none;
|
550 |
+
-ms-user-select: none;
|
551 |
+
user-select: none;
|
552 |
+
-moz-appearance: none;
|
553 |
+
-webkit-appearance: none;
|
554 |
+
background-color: rgba(10, 10, 10, 0.2);
|
555 |
+
border: none;
|
556 |
+
border-radius: 290486px;
|
557 |
+
cursor: pointer;
|
558 |
+
display: inline-block;
|
559 |
+
height: 20px;
|
560 |
+
margin: 0;
|
561 |
+
padding: 0;
|
562 |
+
outline: none;
|
563 |
+
vertical-align: top;
|
564 |
+
width: 20px;
|
565 |
+
position: absolute;
|
566 |
+
right: 10px;
|
567 |
+
top: 10px;
|
568 |
+
}
|
569 |
+
|
570 |
+
div.wpforms-container .wpforms-notice .wpforms-delete:before,
|
571 |
+
div.wpforms-container .wpforms-notice .wpforms-delete:after {
|
572 |
+
background-color: #fff;
|
573 |
+
content: "";
|
574 |
+
display: block;
|
575 |
+
left: 50%;
|
576 |
+
position: absolute;
|
577 |
+
top: 50%;
|
578 |
+
-webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
|
579 |
+
transform: translateX(-50%) translateY(-50%) rotate(45deg);
|
580 |
+
-webkit-transform-origin: center center;
|
581 |
+
transform-origin: center center;
|
582 |
+
}
|
583 |
+
|
584 |
+
div.wpforms-container .wpforms-notice .wpforms-delete:before {
|
585 |
+
height: 2px;
|
586 |
+
width: 50%;
|
587 |
+
}
|
588 |
+
|
589 |
+
div.wpforms-container .wpforms-notice .wpforms-delete:after {
|
590 |
+
height: 50%;
|
591 |
+
width: 2px;
|
592 |
+
}
|
593 |
+
|
594 |
+
div.wpforms-container .wpforms-notice .wpforms-delete:hover,
|
595 |
+
div.wpforms-container .wpforms-notice .wpforms-delete:focus {
|
596 |
+
background-color: rgba(10, 10, 10, 0.3);
|
597 |
+
}
|
598 |
+
|
599 |
+
div.wpforms-container .wpforms-notice a {
|
600 |
+
text-decoration: underline;
|
601 |
+
}
|
602 |
+
|
603 |
+
div.wpforms-container .wpforms-notice p {
|
604 |
+
margin: 0 0 20px 0;
|
605 |
+
}
|
606 |
+
|
607 |
+
div.wpforms-container .wpforms-notice p:last-of-type {
|
608 |
+
margin-bottom: 0;
|
609 |
+
}
|
610 |
+
|
611 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action,
|
612 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info {
|
613 |
+
border-color: #3273dc
|
614 |
+
}
|
615 |
+
|
616 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action,
|
617 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success {
|
618 |
+
border-color: #23d160
|
619 |
+
}
|
620 |
+
|
621 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action,
|
622 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning {
|
623 |
+
border-color: #ffdd57
|
624 |
+
}
|
625 |
+
|
626 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action,
|
627 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error {
|
628 |
+
border-color: #ff3860
|
629 |
+
}
|
630 |
+
|
631 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-actions {
|
632 |
+
margin-top: 20px;
|
633 |
+
}
|
634 |
+
|
635 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action {
|
636 |
+
border: 2px solid;
|
637 |
+
margin-right: 20px;
|
638 |
+
padding: 5px;
|
639 |
+
text-decoration: none;
|
640 |
+
}
|
641 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action:hover,
|
642 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action:focus,
|
643 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action:active {
|
644 |
+
color: #fff;
|
645 |
+
}
|
646 |
+
|
647 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action:hover,
|
648 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action:focus,
|
649 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action:active {
|
650 |
+
background-color: #3273dc;
|
651 |
+
}
|
652 |
+
|
653 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action:hover,
|
654 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action:focus,
|
655 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action:active {
|
656 |
+
background-color: #23d160;
|
657 |
+
}
|
658 |
+
|
659 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action:hover,
|
660 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action:focus,
|
661 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action:active {
|
662 |
+
background-color: #ffdd57;
|
663 |
+
color: inherit;
|
664 |
+
}
|
665 |
+
|
666 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action:hover,
|
667 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action:focus,
|
668 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action:active {
|
669 |
+
background-color: #ff3860;
|
670 |
+
}
|
671 |
|
672 |
/* Misc
|
673 |
----------------------------------------------------------------------------- */
|
assets/css/wpforms-full.css
CHANGED
@@ -775,6 +775,146 @@ div.wpforms-container-full .wpforms-form .wpforms-page-indicator.progress .wpfor
|
|
775 |
top: 0;
|
776 |
}
|
777 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
|
779 |
/* Misc
|
780 |
----------------------------------------------------------------------------- */
|
775 |
top: 0;
|
776 |
}
|
777 |
|
778 |
+
/* Notices
|
779 |
+
----------------------------------------------------------------------------- */
|
780 |
+
|
781 |
+
div.wpforms-container-full .wpforms-notice {
|
782 |
+
background-color: #fff;
|
783 |
+
border: 1px solid #ddd;
|
784 |
+
border-left-width: 12px;
|
785 |
+
color: #333;
|
786 |
+
font-size: 16px;
|
787 |
+
line-height: 1.5;
|
788 |
+
margin-bottom: 30px;
|
789 |
+
padding: 20px 36px 20px 26px;
|
790 |
+
position: relative;
|
791 |
+
}
|
792 |
+
|
793 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete {
|
794 |
+
-webkit-touch-callout: none;
|
795 |
+
-webkit-user-select: none;
|
796 |
+
-moz-user-select: none;
|
797 |
+
-ms-user-select: none;
|
798 |
+
user-select: none;
|
799 |
+
-moz-appearance: none;
|
800 |
+
-webkit-appearance: none;
|
801 |
+
background-color: rgba(10, 10, 10, 0.2);
|
802 |
+
border: none;
|
803 |
+
border-radius: 290486px;
|
804 |
+
cursor: pointer;
|
805 |
+
display: inline-block;
|
806 |
+
height: 20px;
|
807 |
+
margin: 0;
|
808 |
+
padding: 0;
|
809 |
+
outline: none;
|
810 |
+
vertical-align: top;
|
811 |
+
width: 20px;
|
812 |
+
position: absolute;
|
813 |
+
right: 10px;
|
814 |
+
top: 10px;
|
815 |
+
}
|
816 |
+
|
817 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete:before,
|
818 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete:after {
|
819 |
+
background-color: #fff;
|
820 |
+
content: "";
|
821 |
+
display: block;
|
822 |
+
left: 50%;
|
823 |
+
position: absolute;
|
824 |
+
top: 50%;
|
825 |
+
-webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
|
826 |
+
transform: translateX(-50%) translateY(-50%) rotate(45deg);
|
827 |
+
-webkit-transform-origin: center center;
|
828 |
+
transform-origin: center center;
|
829 |
+
}
|
830 |
+
|
831 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete:before {
|
832 |
+
height: 2px;
|
833 |
+
width: 50%;
|
834 |
+
}
|
835 |
+
|
836 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete:after {
|
837 |
+
height: 50%;
|
838 |
+
width: 2px;
|
839 |
+
}
|
840 |
+
|
841 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete:hover,
|
842 |
+
div.wpforms-container-full .wpforms-notice .wpforms-delete:focus {
|
843 |
+
background-color: rgba(10, 10, 10, 0.3);
|
844 |
+
}
|
845 |
+
|
846 |
+
div.wpforms-container-full .wpforms-notice a {
|
847 |
+
text-decoration: underline;
|
848 |
+
}
|
849 |
+
|
850 |
+
div.wpforms-container-full .wpforms-notice p {
|
851 |
+
margin: 0 0 20px 0;
|
852 |
+
}
|
853 |
+
|
854 |
+
div.wpforms-container-full .wpforms-notice p:last-of-type {
|
855 |
+
margin-bottom: 0;
|
856 |
+
}
|
857 |
+
|
858 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action,
|
859 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info {
|
860 |
+
border-color: #3273dc
|
861 |
+
}
|
862 |
+
|
863 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action,
|
864 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success {
|
865 |
+
border-color: #23d160
|
866 |
+
}
|
867 |
+
|
868 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action,
|
869 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning {
|
870 |
+
border-color: #ffdd57
|
871 |
+
}
|
872 |
+
|
873 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action,
|
874 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error {
|
875 |
+
border-color: #ff3860
|
876 |
+
}
|
877 |
+
|
878 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-actions {
|
879 |
+
margin-top: 20px;
|
880 |
+
}
|
881 |
+
|
882 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action {
|
883 |
+
border: 2px solid;
|
884 |
+
margin-right: 20px;
|
885 |
+
padding: 5px;
|
886 |
+
text-decoration: none;
|
887 |
+
}
|
888 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action:hover,
|
889 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action:focus,
|
890 |
+
div.wpforms-container-full .wpforms-notice .wpforms-notice-action:active {
|
891 |
+
color: #fff;
|
892 |
+
}
|
893 |
+
|
894 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action:hover,
|
895 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action:focus,
|
896 |
+
div.wpforms-container-full .wpforms-notice.wpforms-info .wpforms-notice-action:active {
|
897 |
+
background-color: #3273dc;
|
898 |
+
}
|
899 |
+
|
900 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action:hover,
|
901 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action:focus,
|
902 |
+
div.wpforms-container-full .wpforms-notice.wpforms-success .wpforms-notice-action:active {
|
903 |
+
background-color: #23d160;
|
904 |
+
}
|
905 |
+
|
906 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action:hover,
|
907 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action:focus,
|
908 |
+
div.wpforms-container-full .wpforms-notice.wpforms-warning .wpforms-notice-action:active {
|
909 |
+
background-color: #ffdd57;
|
910 |
+
color: inherit;
|
911 |
+
}
|
912 |
+
|
913 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action:hover,
|
914 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action:focus,
|
915 |
+
div.wpforms-container-full .wpforms-notice.wpforms-error .wpforms-notice-action:active {
|
916 |
+
background-color: #ff3860;
|
917 |
+
}
|
918 |
|
919 |
/* Misc
|
920 |
----------------------------------------------------------------------------- */
|
assets/js/admin-builder.js
CHANGED
@@ -467,7 +467,7 @@
|
|
467 |
|
468 |
// New field choices should be sortable
|
469 |
$(document).on('wpformsFieldAdd', function(event, id, type) {
|
470 |
-
if (type
|
471 |
WPFormsBuilder.fieldChoiceSortable(type,'#wpforms-field-option-row-' + id + '-choices ul');
|
472 |
}
|
473 |
});
|
@@ -863,7 +863,7 @@
|
|
863 |
*/
|
864 |
fieldGroupToggle: function(el, action) {
|
865 |
|
866 |
-
if ( 'click'
|
867 |
|
868 |
var $this = $(el),
|
869 |
$buttons = $this.next('.wpforms-add-fields-buttons'),
|
@@ -881,7 +881,7 @@
|
|
881 |
$buttons.slideToggle();
|
882 |
$group.toggleClass('wpforms-hide');
|
883 |
|
884 |
-
} else if ( 'load'
|
885 |
|
886 |
var $this = $(el),
|
887 |
$buttons = $this.find('.wpforms-add-fields-buttons'),
|
@@ -959,8 +959,8 @@
|
|
959 |
*/
|
960 |
fieldDuplicate: function(id) {
|
961 |
|
962 |
-
var $field
|
963 |
-
type
|
964 |
|
965 |
if ($field.hasClass('no-duplicate')) {
|
966 |
$.alert({
|
@@ -972,7 +972,7 @@
|
|
972 |
confirm : {
|
973 |
text: wpforms_builder.close,
|
974 |
btnClass: 'btn-confirm',
|
975 |
-
keys: ['enter']
|
976 |
}
|
977 |
}
|
978 |
});
|
@@ -1251,7 +1251,7 @@
|
|
1251 |
}
|
1252 |
});
|
1253 |
|
1254 |
-
$('.wpforms-add-fields-button').draggable({
|
1255 |
connectToSortable: '.wpforms-field-wrap',
|
1256 |
delay: 200,
|
1257 |
helper: function(event) {
|
@@ -1338,7 +1338,7 @@
|
|
1338 |
/**
|
1339 |
* Make field choices sortable.
|
1340 |
*
|
1341 |
-
*
|
1342 |
*
|
1343 |
* @since 1.0.0
|
1344 |
*/
|
@@ -1365,7 +1365,7 @@
|
|
1365 |
/**
|
1366 |
* Update field choices in preview area, for the Fields panel.
|
1367 |
*
|
1368 |
-
*
|
1369 |
*
|
1370 |
* @since 1.0.0
|
1371 |
*/
|
@@ -1374,18 +1374,18 @@
|
|
1374 |
var new_choice;
|
1375 |
|
1376 |
// Multiple payment choices are radio buttons
|
1377 |
-
if ( type
|
1378 |
type = 'radio';
|
1379 |
}
|
1380 |
// Dropdown payment choices are selects
|
1381 |
-
if ( type
|
1382 |
type = 'select';
|
1383 |
}
|
1384 |
|
1385 |
-
if (type
|
1386 |
$('#wpforms-field-'+id+' .primary-input option' ).not('.placeholder').remove();
|
1387 |
new_choice = '<option>{label}</option>';
|
1388 |
-
} else if (type
|
1389 |
$('#wpforms-field-'+id+' .primary-input li' ).remove();
|
1390 |
new_choice = '<li><input type="'+type+'" disabled>{label}</li>';
|
1391 |
}
|
@@ -1395,7 +1395,7 @@
|
|
1395 |
selected = $this.find('input.default').is(':checked'),
|
1396 |
choice = $( new_choice.replace('{label}',label) );
|
1397 |
$('#wpforms-field-'+id+' .primary-input').append(choice);
|
1398 |
-
if ( selected
|
1399 |
switch (type) {
|
1400 |
case 'select':
|
1401 |
choice.prop('selected', 'true');
|
@@ -1416,8 +1416,8 @@
|
|
1416 |
*/
|
1417 |
fieldChoiceBulkAddToggle: function(el) {
|
1418 |
|
1419 |
-
var $this
|
1420 |
-
$label
|
1421 |
|
1422 |
if ( $this.hasClass('bulk-add-showing') ) {
|
1423 |
|
@@ -1501,13 +1501,13 @@
|
|
1501 |
$('.wpforms-tab a').removeClass('active').find('i').removeClass('fa-angle-down').addClass('fa-angle-right');
|
1502 |
$('.wpforms-field, .wpforms-title-desc').removeClass('active');
|
1503 |
|
1504 |
-
if (id
|
1505 |
$('#add-fields').find('a').addClass('active').find('i').addClass('fa-angle-down');
|
1506 |
$('.wpforms-field-options').hide();
|
1507 |
$('.wpforms-add-fields').show()
|
1508 |
} else {
|
1509 |
$('#field-options').find('a').addClass('active').find('i').addClass('fa-angle-down');
|
1510 |
-
if (id
|
1511 |
$('.wpforms-field').first().addClass('active');
|
1512 |
id = $('.wpforms-field').first().data('field-id');
|
1513 |
} else {
|
@@ -1622,7 +1622,7 @@
|
|
1622 |
$thisOption = $this.parent(),
|
1623 |
value = $this.val(),
|
1624 |
id = $thisOption.data('field-id'),
|
1625 |
-
$field = $('#wpforms-field-'+id)
|
1626 |
$choices = $('#wpforms-field-option-row-'+id+'-choices');
|
1627 |
|
1628 |
// Loading
|
@@ -1632,7 +1632,7 @@
|
|
1632 |
$('#wpforms-field-option-row-'+id+'-dynamic_post_type').remove();
|
1633 |
$('#wpforms-field-option-row-'+id+'-dynamic_taxonomy').remove();
|
1634 |
|
1635 |
-
if ( ''
|
1636 |
// "Off" - no dynamic populating
|
1637 |
|
1638 |
// Get original field choices
|
@@ -1677,7 +1677,7 @@
|
|
1677 |
field_id: id,
|
1678 |
action : 'wpforms_builder_dynamic_choices',
|
1679 |
nonce : wpforms_builder.nonce
|
1680 |
-
}
|
1681 |
$.post(wpforms_builder.ajax_url, data, function(res) {
|
1682 |
if (res.success){
|
1683 |
// New option markup
|
@@ -1714,7 +1714,7 @@
|
|
1714 |
id = $thisOption.data('field-id'),
|
1715 |
form_id = $('#wpforms-builder-form').data('id'),
|
1716 |
$choices = $('#wpforms-field-option-row-'+id+'-choices'),
|
1717 |
-
$field = $('#wpforms-field-'+id)
|
1718 |
type = $('#wpforms-field-option-'+id+'-dynamic_choices option:selected').val(),
|
1719 |
limit = 20;
|
1720 |
|
@@ -1728,7 +1728,7 @@
|
|
1728 |
form_id : form_id,
|
1729 |
action : 'wpforms_builder_dynamic_source',
|
1730 |
nonce : wpforms_builder.nonce
|
1731 |
-
}
|
1732 |
$.post(wpforms_builder.ajax_url, data, function(res) {
|
1733 |
if (res.success){
|
1734 |
|
@@ -2001,17 +2001,17 @@
|
|
2001 |
WPFormsBuilder.panelSwitch('settings');
|
2002 |
});
|
2003 |
|
2004 |
-
// Clicking form
|
2005 |
$(document).on('click', '.wpforms-field-pagebreak-last button', function(e) {
|
2006 |
e.preventDefault();
|
2007 |
WPFormsBuilder.panelSwitch('settings');
|
2008 |
$('#wpforms-panel-field-settings-pagebreak_prev').focus();
|
2009 |
});
|
2010 |
|
2011 |
-
//
|
2012 |
$(document).on('input', '#wpforms-panel-field-settings-pagebreak_prev', function(){
|
2013 |
$('.wpforms-field-pagebreak-last button').text( $(this).val() );
|
2014 |
-
})
|
2015 |
|
2016 |
// Real-time updates for editing the form title
|
2017 |
$(document).on('input', '#wpforms-panel-field-settings-form_title, #wpforms-setup-name', function(){
|
@@ -2020,35 +2020,35 @@
|
|
2020 |
title = $.trim(title).substring(0, 38).split(" ").slice(0, -1).join(" ") + "..."
|
2021 |
}
|
2022 |
$('.wpforms-form-name').text( title );
|
2023 |
-
})
|
2024 |
|
2025 |
// Real-time updates for editing the form description
|
2026 |
$(document).on('input', '#wpforms-panel-field-settings-form_desc', function(){
|
2027 |
$('.wpforms-form-desc').text( $(this).val() );
|
2028 |
-
})
|
2029 |
|
2030 |
// Real-time updates for editing the form submit button
|
2031 |
$(document).on('input', '#wpforms-panel-field-settings-submit_text', function(){
|
2032 |
$('.wpforms-field-submit input[type=submit]').val( $(this).val() );
|
2033 |
-
})
|
2034 |
|
2035 |
// Toggle form reCAPTCHA setting
|
2036 |
-
$(document).on('change', '#wpforms-settings-recaptcha', function(
|
2037 |
WPFormsBuilder.recaptchaToggle();
|
2038 |
});
|
2039 |
|
2040 |
// Toggle form title area
|
2041 |
-
$(document).on('change', '#wpforms-panel-field-settings-hide_title_desc', function(
|
2042 |
WPFormsBuilder.titleAreaToggle();
|
2043 |
});
|
2044 |
|
2045 |
// Toggle form confirmation setting fields
|
2046 |
-
$(document).on('change', '#wpforms-panel-field-settings-confirmation_type', function(
|
2047 |
WPFormsBuilder.confirmationToggle();
|
2048 |
});
|
2049 |
|
2050 |
// Toggle form notification setting fields
|
2051 |
-
$(document).on('change', '#wpforms-panel-field-settings-notification_enable', function(
|
2052 |
WPFormsBuilder.notificationToggle();
|
2053 |
});
|
2054 |
|
@@ -2058,7 +2058,46 @@
|
|
2058 |
WPFormsBuilder.notificationAdd();
|
2059 |
});
|
2060 |
|
2061 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2062 |
$(document).on('click', '.wpforms-notification-delete', function(e) {
|
2063 |
e.preventDefault();
|
2064 |
WPFormsBuilder.notificationDelete($(this));
|
@@ -2105,7 +2144,7 @@
|
|
2105 |
var type = $confirmation.val();
|
2106 |
$confirmation.parent().parent().find('.wpforms-panel-field').not($confirmation.parent()).hide();
|
2107 |
$('#wpforms-panel-field-settings-confirmation_'+type+'-wrap').show();
|
2108 |
-
if (type
|
2109 |
$('#wpforms-panel-field-settings-confirmation_message_scroll-wrap').show();
|
2110 |
}
|
2111 |
}
|
@@ -2137,9 +2176,9 @@
|
|
2137 |
namePrompt = wpforms_builder.notification_prompt,
|
2138 |
nameField = '<input autofocus="" type="text" id="notification-name" placeholder="'+wpforms_builder.notification_ph+'">',
|
2139 |
nameError = '<p class="error">'+wpforms_builder.notification_error+'</p>',
|
2140 |
-
modalContent = namePrompt+nameField+nameError;
|
2141 |
|
2142 |
-
$.confirm({
|
2143 |
title: false,
|
2144 |
content: modalContent,
|
2145 |
icon: 'fa fa-info-circle',
|
@@ -2150,17 +2189,18 @@
|
|
2150 |
btnClass: 'btn-confirm',
|
2151 |
keys: ['enter'],
|
2152 |
action: function() {
|
2153 |
-
var
|
2154 |
error = this.$content.find('.error');
|
2155 |
-
|
|
|
2156 |
error.show();
|
2157 |
return false;
|
2158 |
} else {
|
2159 |
var $firstNotification = $('.wpforms-notification').first(),
|
2160 |
$newNotification = $firstNotification.clone(),
|
2161 |
-
newNotification
|
2162 |
|
2163 |
-
$newNotification.find('.wpforms-notification-header span').text(
|
2164 |
$newNotification.find('input, textarea, select').each(function(index, el) {
|
2165 |
if ($(this).attr('name')) {
|
2166 |
$(this).val('').attr('name', $(this).attr('name').replace(/\[(\d+)\]/, '['+nextID+']'));
|
@@ -2174,15 +2214,17 @@
|
|
2174 |
}
|
2175 |
}
|
2176 |
});
|
2177 |
-
$newNotification.find('.wpforms-notification-header input').val(
|
2178 |
-
$newNotification.find('.email-msg textarea').val('{all_fields}').attr('value','{all_fields}')
|
2179 |
$newNotification.find('.email-recipient input').val('{admin_email}').attr('value','{admin_email}');
|
|
|
2180 |
// Conditional logic, if present
|
2181 |
var $conditionalLogic = $newNotification.find('.wpforms-conditional-block');
|
2182 |
if ($conditionalLogic.length) {
|
2183 |
$conditionalLogic.find('.wpforms-conditionals-enable-toggle input').attr('data-name', 'settings[notifications]['+nextID+']');
|
2184 |
$conditionalLogic.find('.wpforms-conditional-groups').remove();
|
2185 |
}
|
|
|
2186 |
newNotification = $newNotification.wrap('<div>').parent().html();
|
2187 |
newNotification = newNotification.replace( /wpforms-panel-field-notifications-(\d+)/g, 'wpforms-panel-field-notifications-'+nextID );
|
2188 |
newNotification = newNotification.replace( /\[conditionals\]\[(\d+)\]\[(\d+)\]/g, '[conditionals][0][0]' );
|
@@ -2198,6 +2240,96 @@
|
|
2198 |
}
|
2199 |
}
|
2200 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2201 |
},
|
2202 |
|
2203 |
/**
|
@@ -2221,6 +2353,7 @@
|
|
2221 |
keys: ['enter'],
|
2222 |
action: function () {
|
2223 |
var notifications = $('.wpforms-notification');
|
|
|
2224 |
if ( notifications.length <= 1 ) {
|
2225 |
$.alert({
|
2226 |
title: false,
|
@@ -2236,7 +2369,17 @@
|
|
2236 |
}
|
2237 |
});
|
2238 |
} else {
|
2239 |
-
$this.closest('.wpforms-notification')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2240 |
}
|
2241 |
}
|
2242 |
},
|
@@ -2258,7 +2401,7 @@
|
|
2258 |
*/
|
2259 |
bindUIActionsSaveExit: function() {
|
2260 |
|
2261 |
-
//
|
2262 |
$(document).on('click', '#wpforms-embed', function(e) {
|
2263 |
e.preventDefault();
|
2264 |
var content = wpforms_builder.embed_modal;
|
@@ -2317,7 +2460,7 @@
|
|
2317 |
data : JSON.stringify($('#wpforms-builder-form').serializeArray()),
|
2318 |
id : s.formID,
|
2319 |
nonce : wpforms_builder.nonce
|
2320 |
-
}
|
2321 |
$.post(wpforms_builder.ajax_url, data, function(res) {
|
2322 |
if (res.success) {
|
2323 |
$label.text(text);
|
@@ -2411,12 +2554,12 @@
|
|
2411 |
// Field map table, update key source
|
2412 |
$(document).on('input', '.wpforms-field-map-table .key-source', function(){
|
2413 |
var value = $(this).val(),
|
2414 |
-
$dest = $(this).parent().parent().find('.key-destination')
|
2415 |
name = $dest.data('name');
|
2416 |
if (value) {
|
2417 |
$dest.attr('name', name.replace('{source}', value.replace(/[^0-9a-zA-Z_-]/gi, '')));
|
2418 |
}
|
2419 |
-
})
|
2420 |
|
2421 |
// Field map table, delete row
|
2422 |
$(document).on('click', '.wpforms-field-map-table .remove', function(e) {
|
@@ -2469,7 +2612,7 @@
|
|
2469 |
buttons: {
|
2470 |
confirm: {
|
2471 |
text: wpforms_builder.ok,
|
2472 |
-
btnClass: 'btn-confirm'
|
2473 |
}
|
2474 |
}
|
2475 |
});
|
@@ -2477,7 +2620,6 @@
|
|
2477 |
}
|
2478 |
}
|
2479 |
});
|
2480 |
-
|
2481 |
},
|
2482 |
|
2483 |
/**
|
@@ -2487,62 +2629,68 @@
|
|
2487 |
*/
|
2488 |
smartTagToggle: function(el) {
|
2489 |
|
2490 |
-
var $this
|
2491 |
-
$label
|
2492 |
|
2493 |
-
if ( $this.hasClass('smart-tag-showing') ) {
|
2494 |
|
2495 |
// Smart tags are showing, so hide/remove them
|
2496 |
-
var $list = $label.next('.smart-tags-list-display');
|
2497 |
-
$list.slideUp(400, function() {
|
2498 |
$list.remove();
|
2499 |
-
});
|
2500 |
-
$this.find('span').text(wpforms_builder.smart_tags_show);
|
2501 |
-
}
|
|
|
2502 |
|
2503 |
// Show all fields or narrow to specific field types
|
2504 |
-
var allowed = $this.data('fields'),
|
2505 |
-
type
|
|
|
2506 |
if ( allowed && allowed.length ) {
|
2507 |
-
|
2508 |
-
}
|
2509 |
-
|
|
|
2510 |
}
|
2511 |
|
2512 |
// Create smart tags list
|
2513 |
var smartTagList = '<ul class="smart-tags-list-display">';
|
2514 |
|
2515 |
-
if (type === 'fields' || type === 'all') {
|
2516 |
-
if (!fields) {
|
2517 |
-
smartTagList += '<li class="heading">'+wpforms_builder.fields_unavailable+'</li>';
|
2518 |
-
}
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
|
|
|
|
|
|
2525 |
}
|
2526 |
-
smartTagList += '<li><a href="#" data-type="field" data-meta=\'' + fields[
|
2527 |
}
|
2528 |
}
|
2529 |
}
|
2530 |
|
2531 |
-
if (type === 'other' || type === 'all') {
|
2532 |
-
smartTagList += '<li class="heading">'+wpforms_builder.other+'</li>';
|
2533 |
-
for(var
|
2534 |
-
smartTagList += '<li><a href="#" data-type="other" data-meta=\'' +
|
2535 |
}
|
2536 |
}
|
2537 |
|
2538 |
smartTagList += '</ul>';
|
2539 |
|
2540 |
-
$label.after(smartTagList);
|
2541 |
-
$label.next('.smart-tags-list-display').slideDown();
|
2542 |
-
$this.find('span').text(wpforms_builder.smart_tags_hide);
|
2543 |
}
|
2544 |
|
2545 |
-
$this.toggleClass('smart-tag-showing');
|
2546 |
},
|
2547 |
|
2548 |
/**
|
@@ -2589,7 +2737,7 @@
|
|
2589 |
|
2590 |
var $this = $(el),
|
2591 |
$row = $this.closest('tr'),
|
2592 |
-
$table = $this.closest('table')
|
2593 |
total = $table.find('tr').length;
|
2594 |
|
2595 |
if (total > '1') {
|
@@ -2606,7 +2754,7 @@
|
|
2606 |
|
2607 |
var $this = $(el),
|
2608 |
$row = $this.closest('tr'),
|
2609 |
-
$table = $this.closest('tbody')
|
2610 |
choice = $row.clone().insertAfter($row);
|
2611 |
|
2612 |
choice.find('input').val('');
|
@@ -2618,12 +2766,10 @@
|
|
2618 |
* Update field mapped select items on form updates.
|
2619 |
*
|
2620 |
* @since 1.2.0
|
2621 |
-
* @param object event
|
2622 |
-
* @param object fields
|
2623 |
*/
|
2624 |
fieldMapSelect: function(e, fields) {
|
2625 |
|
2626 |
-
// Apply to all selects with
|
2627 |
$('.wpforms-field-map-select').each(function(index, el) {
|
2628 |
|
2629 |
var $this = $(this),
|
@@ -2652,18 +2798,18 @@
|
|
2652 |
}
|
2653 |
|
2654 |
// Loop through the current fields
|
2655 |
-
for(var
|
2656 |
-
|
2657 |
// Compile the label
|
2658 |
-
if (typeof fields[
|
2659 |
-
|
2660 |
} else {
|
2661 |
-
|
2662 |
}
|
2663 |
|
2664 |
// Add to select if it is a field type allowed
|
2665 |
-
if ($.inArray(fields[
|
2666 |
-
$this.append($('<option>', { value: fields[
|
2667 |
}
|
2668 |
}
|
2669 |
|
@@ -2726,20 +2872,19 @@
|
|
2726 |
var ctrlDown = false;
|
2727 |
|
2728 |
$(document).keydown(function(e) {
|
2729 |
-
if (e.keyCode
|
2730 |
ctrlDown = true;
|
2731 |
-
} else if (ctrlDown && e.keyCode
|
2732 |
window.open(wpforms_builder.preview_url);
|
2733 |
ctrlDown = false;
|
2734 |
return false;
|
2735 |
-
} else if (ctrlDown && e.keyCode
|
2736 |
-
console.log('weee');
|
2737 |
window.open(wpforms_builder.entries_url);
|
2738 |
ctrlDown = false;
|
2739 |
return false;
|
2740 |
}
|
2741 |
}).keyup(function(e) {
|
2742 |
-
if (e.keyCode
|
2743 |
ctrlDown = false;
|
2744 |
}
|
2745 |
});
|
467 |
|
468 |
// New field choices should be sortable
|
469 |
$(document).on('wpformsFieldAdd', function(event, id, type) {
|
470 |
+
if (type === 'select' || type === 'radio' || type === 'checkbox' || type === 'payment-multiple' || type === 'payment-select' ) {
|
471 |
WPFormsBuilder.fieldChoiceSortable(type,'#wpforms-field-option-row-' + id + '-choices ul');
|
472 |
}
|
473 |
});
|
863 |
*/
|
864 |
fieldGroupToggle: function(el, action) {
|
865 |
|
866 |
+
if ( 'click' === action ) {
|
867 |
|
868 |
var $this = $(el),
|
869 |
$buttons = $this.next('.wpforms-add-fields-buttons'),
|
881 |
$buttons.slideToggle();
|
882 |
$group.toggleClass('wpforms-hide');
|
883 |
|
884 |
+
} else if ( 'load' === action ) {
|
885 |
|
886 |
var $this = $(el),
|
887 |
$buttons = $this.find('.wpforms-add-fields-buttons'),
|
959 |
*/
|
960 |
fieldDuplicate: function(id) {
|
961 |
|
962 |
+
var $field = $('#wpforms-field-'+id),
|
963 |
+
type = $field.data('field-type');
|
964 |
|
965 |
if ($field.hasClass('no-duplicate')) {
|
966 |
$.alert({
|
972 |
confirm : {
|
973 |
text: wpforms_builder.close,
|
974 |
btnClass: 'btn-confirm',
|
975 |
+
keys: ['enter']
|
976 |
}
|
977 |
}
|
978 |
});
|
1251 |
}
|
1252 |
});
|
1253 |
|
1254 |
+
$('.wpforms-add-fields-button').not('.upgrade-modal').draggable({
|
1255 |
connectToSortable: '.wpforms-field-wrap',
|
1256 |
delay: 200,
|
1257 |
helper: function(event) {
|
1338 |
/**
|
1339 |
* Make field choices sortable.
|
1340 |
*
|
1341 |
+
* Currently used for select, radio, and checkboxes field types
|
1342 |
*
|
1343 |
* @since 1.0.0
|
1344 |
*/
|
1365 |
/**
|
1366 |
* Update field choices in preview area, for the Fields panel.
|
1367 |
*
|
1368 |
+
* Currently used for select, radio, and checkboxes field types
|
1369 |
*
|
1370 |
* @since 1.0.0
|
1371 |
*/
|
1374 |
var new_choice;
|
1375 |
|
1376 |
// Multiple payment choices are radio buttons
|
1377 |
+
if ( type === 'payment-multiple') {
|
1378 |
type = 'radio';
|
1379 |
}
|
1380 |
// Dropdown payment choices are selects
|
1381 |
+
if ( type === 'payment-select') {
|
1382 |
type = 'select';
|
1383 |
}
|
1384 |
|
1385 |
+
if (type === 'select') {
|
1386 |
$('#wpforms-field-'+id+' .primary-input option' ).not('.placeholder').remove();
|
1387 |
new_choice = '<option>{label}</option>';
|
1388 |
+
} else if (type === 'radio' || type === 'checkbox' ) {
|
1389 |
$('#wpforms-field-'+id+' .primary-input li' ).remove();
|
1390 |
new_choice = '<li><input type="'+type+'" disabled>{label}</li>';
|
1391 |
}
|
1395 |
selected = $this.find('input.default').is(':checked'),
|
1396 |
choice = $( new_choice.replace('{label}',label) );
|
1397 |
$('#wpforms-field-'+id+' .primary-input').append(choice);
|
1398 |
+
if ( selected === true ) {
|
1399 |
switch (type) {
|
1400 |
case 'select':
|
1401 |
choice.prop('selected', 'true');
|
1416 |
*/
|
1417 |
fieldChoiceBulkAddToggle: function(el) {
|
1418 |
|
1419 |
+
var $this = $(el),
|
1420 |
+
$label = $this.closest('label');
|
1421 |
|
1422 |
if ( $this.hasClass('bulk-add-showing') ) {
|
1423 |
|
1501 |
$('.wpforms-tab a').removeClass('active').find('i').removeClass('fa-angle-down').addClass('fa-angle-right');
|
1502 |
$('.wpforms-field, .wpforms-title-desc').removeClass('active');
|
1503 |
|
1504 |
+
if (id === 'add-fields') {
|
1505 |
$('#add-fields').find('a').addClass('active').find('i').addClass('fa-angle-down');
|
1506 |
$('.wpforms-field-options').hide();
|
1507 |
$('.wpforms-add-fields').show()
|
1508 |
} else {
|
1509 |
$('#field-options').find('a').addClass('active').find('i').addClass('fa-angle-down');
|
1510 |
+
if (id === 'field-options') {
|
1511 |
$('.wpforms-field').first().addClass('active');
|
1512 |
id = $('.wpforms-field').first().data('field-id');
|
1513 |
} else {
|
1622 |
$thisOption = $this.parent(),
|
1623 |
value = $this.val(),
|
1624 |
id = $thisOption.data('field-id'),
|
1625 |
+
$field = $('#wpforms-field-'+id),
|
1626 |
$choices = $('#wpforms-field-option-row-'+id+'-choices');
|
1627 |
|
1628 |
// Loading
|
1632 |
$('#wpforms-field-option-row-'+id+'-dynamic_post_type').remove();
|
1633 |
$('#wpforms-field-option-row-'+id+'-dynamic_taxonomy').remove();
|
1634 |
|
1635 |
+
if ( '' === value ) {
|
1636 |
// "Off" - no dynamic populating
|
1637 |
|
1638 |
// Get original field choices
|
1677 |
field_id: id,
|
1678 |
action : 'wpforms_builder_dynamic_choices',
|
1679 |
nonce : wpforms_builder.nonce
|
1680 |
+
};
|
1681 |
$.post(wpforms_builder.ajax_url, data, function(res) {
|
1682 |
if (res.success){
|
1683 |
// New option markup
|
1714 |
id = $thisOption.data('field-id'),
|
1715 |
form_id = $('#wpforms-builder-form').data('id'),
|
1716 |
$choices = $('#wpforms-field-option-row-'+id+'-choices'),
|
1717 |
+
$field = $('#wpforms-field-'+id),
|
1718 |
type = $('#wpforms-field-option-'+id+'-dynamic_choices option:selected').val(),
|
1719 |
limit = 20;
|
1720 |
|
1728 |
form_id : form_id,
|
1729 |
action : 'wpforms_builder_dynamic_source',
|
1730 |
nonce : wpforms_builder.nonce
|
1731 |
+
};
|
1732 |
$.post(wpforms_builder.ajax_url, data, function(res) {
|
1733 |
if (res.success){
|
1734 |
|
2001 |
WPFormsBuilder.panelSwitch('settings');
|
2002 |
});
|
2003 |
|
2004 |
+
// Clicking form previous page break button
|
2005 |
$(document).on('click', '.wpforms-field-pagebreak-last button', function(e) {
|
2006 |
e.preventDefault();
|
2007 |
WPFormsBuilder.panelSwitch('settings');
|
2008 |
$('#wpforms-panel-field-settings-pagebreak_prev').focus();
|
2009 |
});
|
2010 |
|
2011 |
+
// Clicking form last page break button
|
2012 |
$(document).on('input', '#wpforms-panel-field-settings-pagebreak_prev', function(){
|
2013 |
$('.wpforms-field-pagebreak-last button').text( $(this).val() );
|
2014 |
+
});
|
2015 |
|
2016 |
// Real-time updates for editing the form title
|
2017 |
$(document).on('input', '#wpforms-panel-field-settings-form_title, #wpforms-setup-name', function(){
|
2020 |
title = $.trim(title).substring(0, 38).split(" ").slice(0, -1).join(" ") + "..."
|
2021 |
}
|
2022 |
$('.wpforms-form-name').text( title );
|
2023 |
+
});
|
2024 |
|
2025 |
// Real-time updates for editing the form description
|
2026 |
$(document).on('input', '#wpforms-panel-field-settings-form_desc', function(){
|
2027 |
$('.wpforms-form-desc').text( $(this).val() );
|
2028 |
+
});
|
2029 |
|
2030 |
// Real-time updates for editing the form submit button
|
2031 |
$(document).on('input', '#wpforms-panel-field-settings-submit_text', function(){
|
2032 |
$('.wpforms-field-submit input[type=submit]').val( $(this).val() );
|
2033 |
+
});
|
2034 |
|
2035 |
// Toggle form reCAPTCHA setting
|
2036 |
+
$(document).on('change', '#wpforms-settings-recaptcha', function() {
|
2037 |
WPFormsBuilder.recaptchaToggle();
|
2038 |
});
|
2039 |
|
2040 |
// Toggle form title area
|
2041 |
+
$(document).on('change', '#wpforms-panel-field-settings-hide_title_desc', function() {
|
2042 |
WPFormsBuilder.titleAreaToggle();
|
2043 |
});
|
2044 |
|
2045 |
// Toggle form confirmation setting fields
|
2046 |
+
$(document).on('change', '#wpforms-panel-field-settings-confirmation_type', function() {
|
2047 |
WPFormsBuilder.confirmationToggle();
|
2048 |
});
|
2049 |
|
2050 |
// Toggle form notification setting fields
|
2051 |
+
$(document).on('change', '#wpforms-panel-field-settings-notification_enable', function() {
|
2052 |
WPFormsBuilder.notificationToggle();
|
2053 |
});
|
2054 |
|
2058 |
WPFormsBuilder.notificationAdd();
|
2059 |
});
|
2060 |
|
2061 |
+
// Edit notification settings block name
|
2062 |
+
$(document).on('click', '.wpforms-notification-edit', function(e) {
|
2063 |
+
e.preventDefault();
|
2064 |
+
|
2065 |
+
var $el = $(this);
|
2066 |
+
|
2067 |
+
if ( $el.parents('.wpforms-notification-header').find('.wpforms-notification-name').hasClass('editing') ) {
|
2068 |
+
WPFormsBuilder.notificationNameEditingHide( $el );
|
2069 |
+
} else {
|
2070 |
+
WPFormsBuilder.notificationNameEditingShow( $el );
|
2071 |
+
}
|
2072 |
+
});
|
2073 |
+
|
2074 |
+
// Update notification settings block name and close editing interface
|
2075 |
+
$(document).on('blur', '.wpforms-notification-name-edit input', function(e) {
|
2076 |
+
// Do not fire if for onBlur user clicked on edit button - it has own event processing.
|
2077 |
+
if ( ! $(e.relatedTarget).hasClass('wpforms-notification-edit')) {
|
2078 |
+
WPFormsBuilder.notificationNameEditingHide( $(this) );
|
2079 |
+
}
|
2080 |
+
});
|
2081 |
+
|
2082 |
+
// Close notifications editing interface with pressed Enter
|
2083 |
+
$(document).on('keypress', '.wpforms-notification-name-edit input', function(e) {
|
2084 |
+
// On Enter - hide editing interface.
|
2085 |
+
if (e.keyCode === 13) {
|
2086 |
+
WPFormsBuilder.notificationNameEditingHide( $(this) );
|
2087 |
+
|
2088 |
+
// We need this preventDefault() to stop jumping to form name editing input.
|
2089 |
+
e.preventDefault();
|
2090 |
+
}
|
2091 |
+
});
|
2092 |
+
|
2093 |
+
// Toggle notification settings block - slide up or down
|
2094 |
+
$(document).on('click', '.wpforms-notification-toggle', function(e) {
|
2095 |
+
e.preventDefault();
|
2096 |
+
|
2097 |
+
WPFormsBuilder.notificationPanelToggle($(this));
|
2098 |
+
});
|
2099 |
+
|
2100 |
+
// Remove notification settings block
|
2101 |
$(document).on('click', '.wpforms-notification-delete', function(e) {
|
2102 |
e.preventDefault();
|
2103 |
WPFormsBuilder.notificationDelete($(this));
|
2144 |
var type = $confirmation.val();
|
2145 |
$confirmation.parent().parent().find('.wpforms-panel-field').not($confirmation.parent()).hide();
|
2146 |
$('#wpforms-panel-field-settings-confirmation_'+type+'-wrap').show();
|
2147 |
+
if (type === 'message') {
|
2148 |
$('#wpforms-panel-field-settings-confirmation_message_scroll-wrap').show();
|
2149 |
}
|
2150 |
}
|
2176 |
namePrompt = wpforms_builder.notification_prompt,
|
2177 |
nameField = '<input autofocus="" type="text" id="notification-name" placeholder="'+wpforms_builder.notification_ph+'">',
|
2178 |
nameError = '<p class="error">'+wpforms_builder.notification_error+'</p>',
|
2179 |
+
modalContent = namePrompt + nameField + nameError;
|
2180 |
|
2181 |
+
var modal = $.confirm({
|
2182 |
title: false,
|
2183 |
content: modalContent,
|
2184 |
icon: 'fa fa-info-circle',
|
2189 |
btnClass: 'btn-confirm',
|
2190 |
keys: ['enter'],
|
2191 |
action: function() {
|
2192 |
+
var notification_name = $.trim(this.$content.find('input#notification-name').val()),
|
2193 |
error = this.$content.find('.error');
|
2194 |
+
|
2195 |
+
if (notification_name === '') {
|
2196 |
error.show();
|
2197 |
return false;
|
2198 |
} else {
|
2199 |
var $firstNotification = $('.wpforms-notification').first(),
|
2200 |
$newNotification = $firstNotification.clone(),
|
2201 |
+
newNotification;
|
2202 |
|
2203 |
+
$newNotification.find('.wpforms-notification-header span').text(notification_name);
|
2204 |
$newNotification.find('input, textarea, select').each(function(index, el) {
|
2205 |
if ($(this).attr('name')) {
|
2206 |
$(this).val('').attr('name', $(this).attr('name').replace(/\[(\d+)\]/, '['+nextID+']'));
|
2214 |
}
|
2215 |
}
|
2216 |
});
|
2217 |
+
$newNotification.find('.wpforms-notification-header input').val(notification_name).attr('value',notification_name);
|
2218 |
+
$newNotification.find('.email-msg textarea').val('{all_fields}').attr('value','{all_fields}');
|
2219 |
$newNotification.find('.email-recipient input').val('{admin_email}').attr('value','{admin_email}');
|
2220 |
+
|
2221 |
// Conditional logic, if present
|
2222 |
var $conditionalLogic = $newNotification.find('.wpforms-conditional-block');
|
2223 |
if ($conditionalLogic.length) {
|
2224 |
$conditionalLogic.find('.wpforms-conditionals-enable-toggle input').attr('data-name', 'settings[notifications]['+nextID+']');
|
2225 |
$conditionalLogic.find('.wpforms-conditional-groups').remove();
|
2226 |
}
|
2227 |
+
|
2228 |
newNotification = $newNotification.wrap('<div>').parent().html();
|
2229 |
newNotification = newNotification.replace( /wpforms-panel-field-notifications-(\d+)/g, 'wpforms-panel-field-notifications-'+nextID );
|
2230 |
newNotification = newNotification.replace( /\[conditionals\]\[(\d+)\]\[(\d+)\]/g, '[conditionals][0][0]' );
|
2240 |
}
|
2241 |
}
|
2242 |
});
|
2243 |
+
|
2244 |
+
// We need to process this event here, because we need a confirm modal object defined, so we can intrude into it.
|
2245 |
+
// Pressing Enter will click the Ok button.
|
2246 |
+
$(document).on('keypress', '#notification-name', function(e) {
|
2247 |
+
if (e.keyCode === 13) {
|
2248 |
+
$(modal.buttons.confirm.el).trigger('click');
|
2249 |
+
}
|
2250 |
+
});
|
2251 |
+
},
|
2252 |
+
|
2253 |
+
/**
|
2254 |
+
* Show notification editing interface.
|
2255 |
+
*
|
2256 |
+
* @since 1.4.1
|
2257 |
+
*/
|
2258 |
+
notificationNameEditingShow: function (el) {
|
2259 |
+
|
2260 |
+
var header_holder = el.parents('.wpforms-notification-header'),
|
2261 |
+
name_holder = header_holder.find('.wpforms-notification-name');
|
2262 |
+
|
2263 |
+
name_holder
|
2264 |
+
.addClass('editing')
|
2265 |
+
.hide();
|
2266 |
+
|
2267 |
+
// Make the editing interface active and in focus
|
2268 |
+
header_holder.find('.wpforms-notification-name-edit').addClass('active');
|
2269 |
+
wpf.focusCaretToEnd(header_holder.find('input'));
|
2270 |
+
},
|
2271 |
+
|
2272 |
+
/**
|
2273 |
+
* Update notification name and hide editing interface.
|
2274 |
+
*
|
2275 |
+
* @since 1.4.1
|
2276 |
+
*/
|
2277 |
+
notificationNameEditingHide: function (el) {
|
2278 |
+
|
2279 |
+
var header_holder = el.parents('.wpforms-notification-header'),
|
2280 |
+
name_holder = header_holder.find('.wpforms-notification-name'),
|
2281 |
+
edit_holder = header_holder.find('.wpforms-notification-name-edit'),
|
2282 |
+
current_name = edit_holder.find('input').val().trim();
|
2283 |
+
|
2284 |
+
// Provide a default value for empty notification name.
|
2285 |
+
if (! current_name.length) {
|
2286 |
+
current_name = wpforms_builder.notification_def_name;
|
2287 |
+
}
|
2288 |
+
|
2289 |
+
// This is done for sanitizing.
|
2290 |
+
edit_holder.find('input').val(current_name);
|
2291 |
+
name_holder.text(current_name);
|
2292 |
+
|
2293 |
+
// Editing should be hidden, displaying - active.
|
2294 |
+
name_holder
|
2295 |
+
.removeClass('editing')
|
2296 |
+
.show();
|
2297 |
+
edit_holder.removeClass('active');
|
2298 |
+
},
|
2299 |
+
|
2300 |
+
/**
|
2301 |
+
* Show or hide notification panel content.
|
2302 |
+
*
|
2303 |
+
* @since 1.4.1
|
2304 |
+
*/
|
2305 |
+
notificationPanelToggle: function(el) {
|
2306 |
+
|
2307 |
+
var $notification = el.closest('.wpforms-notification'),
|
2308 |
+
notification_id = /settings\[notifications\]\[(\d+)\]\[notification_name\]/g.exec($notification.find('.wpforms-notification-name-edit input').attr('name'))[1],
|
2309 |
+
$content = $notification.find('.wpforms-notification-content'),
|
2310 |
+
is_visible = $content.is(':visible');
|
2311 |
+
|
2312 |
+
$content.slideToggle({
|
2313 |
+
duration: 400,
|
2314 |
+
start: function () {
|
2315 |
+
// Send early to save fast.
|
2316 |
+
// It's animation start, so we should save the state for animation end (reversed).
|
2317 |
+
$.post(wpforms_builder.ajax_url, {
|
2318 |
+
action: 'wpforms_builder_notification_state_save',
|
2319 |
+
state: is_visible ? 'closed' : 'opened',
|
2320 |
+
form_id: s.formID,
|
2321 |
+
notification_id: notification_id,
|
2322 |
+
nonce : wpforms_builder.nonce
|
2323 |
+
});
|
2324 |
+
},
|
2325 |
+
always: function() {
|
2326 |
+
if ($content.is(':visible')) {
|
2327 |
+
el.html('<i class="fa fa-chevron-up"></i>');
|
2328 |
+
} else {
|
2329 |
+
el.html('<i class="fa fa-chevron-down"></i>');
|
2330 |
+
}
|
2331 |
+
}
|
2332 |
+
});
|
2333 |
},
|
2334 |
|
2335 |
/**
|
2353 |
keys: ['enter'],
|
2354 |
action: function () {
|
2355 |
var notifications = $('.wpforms-notification');
|
2356 |
+
|
2357 |
if ( notifications.length <= 1 ) {
|
2358 |
$.alert({
|
2359 |
title: false,
|
2369 |
}
|
2370 |
});
|
2371 |
} else {
|
2372 |
+
var $current_notification = $this.closest('.wpforms-notification'),
|
2373 |
+
notification_id = /settings\[notifications\]\[(\d+)\]\[notification_name\]/g.exec($current_notification.find('.wpforms-notification-name-edit input').attr('name'))[1];
|
2374 |
+
|
2375 |
+
$.post(wpforms_builder.ajax_url, {
|
2376 |
+
action: 'wpforms_builder_notification_state_remove',
|
2377 |
+
nonce: wpforms_builder.nonce,
|
2378 |
+
notification_id: notification_id,
|
2379 |
+
form_id: s.formID
|
2380 |
+
} );
|
2381 |
+
|
2382 |
+
$current_notification.remove();
|
2383 |
}
|
2384 |
}
|
2385 |
},
|
2401 |
*/
|
2402 |
bindUIActionsSaveExit: function() {
|
2403 |
|
2404 |
+
// Embed form
|
2405 |
$(document).on('click', '#wpforms-embed', function(e) {
|
2406 |
e.preventDefault();
|
2407 |
var content = wpforms_builder.embed_modal;
|
2460 |
data : JSON.stringify($('#wpforms-builder-form').serializeArray()),
|
2461 |
id : s.formID,
|
2462 |
nonce : wpforms_builder.nonce
|
2463 |
+
};
|
2464 |
$.post(wpforms_builder.ajax_url, data, function(res) {
|
2465 |
if (res.success) {
|
2466 |
$label.text(text);
|
2554 |
// Field map table, update key source
|
2555 |
$(document).on('input', '.wpforms-field-map-table .key-source', function(){
|
2556 |
var value = $(this).val(),
|
2557 |
+
$dest = $(this).parent().parent().find('.key-destination'),
|
2558 |
name = $dest.data('name');
|
2559 |
if (value) {
|
2560 |
$dest.attr('name', name.replace('{source}', value.replace(/[^0-9a-zA-Z_-]/gi, '')));
|
2561 |
}
|
2562 |
+
});
|
2563 |
|
2564 |
// Field map table, delete row
|
2565 |
$(document).on('click', '.wpforms-field-map-table .remove', function(e) {
|
2612 |
buttons: {
|
2613 |
confirm: {
|
2614 |
text: wpforms_builder.ok,
|
2615 |
+
btnClass: 'btn-confirm'
|
2616 |
}
|
2617 |
}
|
2618 |
});
|
2620 |
}
|
2621 |
}
|
2622 |
});
|
|
|
2623 |
},
|
2624 |
|
2625 |
/**
|
2629 |
*/
|
2630 |
smartTagToggle: function(el) {
|
2631 |
|
2632 |
+
var $this = $( el ),
|
2633 |
+
$label = $this.closest( 'label' );
|
2634 |
|
2635 |
+
if ( $this.hasClass( 'smart-tag-showing' ) ) {
|
2636 |
|
2637 |
// Smart tags are showing, so hide/remove them
|
2638 |
+
var $list = $label.next( '.smart-tags-list-display' );
|
2639 |
+
$list.slideUp( 400, function () {
|
2640 |
$list.remove();
|
2641 |
+
} );
|
2642 |
+
$this.find( 'span' ).text( wpforms_builder.smart_tags_show );
|
2643 |
+
}
|
2644 |
+
else {
|
2645 |
|
2646 |
// Show all fields or narrow to specific field types
|
2647 |
+
var allowed = $this.data( 'fields' ),
|
2648 |
+
type = $this.data( 'type' ),
|
2649 |
+
fields = [];
|
2650 |
if ( allowed && allowed.length ) {
|
2651 |
+
fields = wpf.getFields( allowed.split( ',' ), true );
|
2652 |
+
}
|
2653 |
+
else {
|
2654 |
+
fields = wpf.getFields( false, true );
|
2655 |
}
|
2656 |
|
2657 |
// Create smart tags list
|
2658 |
var smartTagList = '<ul class="smart-tags-list-display">';
|
2659 |
|
2660 |
+
if ( type === 'fields' || type === 'all' ) {
|
2661 |
+
if ( ! fields ) {
|
2662 |
+
smartTagList += '<li class="heading">' + wpforms_builder.fields_unavailable + '</li>';
|
2663 |
+
}
|
2664 |
+
else {
|
2665 |
+
smartTagList += '<li class="heading">' + wpforms_builder.fields_available + '</li>';
|
2666 |
+
for ( var field_key in fields ) {
|
2667 |
+
var label = '';
|
2668 |
+
if ( fields[ field_key ].label ) {
|
2669 |
+
label = wpf.sanitizeString( fields[ field_key ].label );
|
2670 |
+
}
|
2671 |
+
else {
|
2672 |
+
label = wpforms_builder.field + ' #' + fields[ field_key ].id;
|
2673 |
}
|
2674 |
+
smartTagList += '<li><a href="#" data-type="field" data-meta=\'' + fields[ field_key ].id + '\'>' + label + '</a></li>';
|
2675 |
}
|
2676 |
}
|
2677 |
}
|
2678 |
|
2679 |
+
if ( type === 'other' || type === 'all' ) {
|
2680 |
+
smartTagList += '<li class="heading">' + wpforms_builder.other + '</li>';
|
2681 |
+
for ( var smarttag_key in wpforms_builder.smart_tags ) {
|
2682 |
+
smartTagList += '<li><a href="#" data-type="other" data-meta=\'' + smarttag_key + '\'>' + wpforms_builder.smart_tags[ smarttag_key ] + '</a></li>';
|
2683 |
}
|
2684 |
}
|
2685 |
|
2686 |
smartTagList += '</ul>';
|
2687 |
|
2688 |
+
$label.after( smartTagList );
|
2689 |
+
$label.next( '.smart-tags-list-display' ).slideDown();
|
2690 |
+
$this.find( 'span' ).text( wpforms_builder.smart_tags_hide );
|
2691 |
}
|
2692 |
|
2693 |
+
$this.toggleClass( 'smart-tag-showing' );
|
2694 |
},
|
2695 |
|
2696 |
/**
|
2737 |
|
2738 |
var $this = $(el),
|
2739 |
$row = $this.closest('tr'),
|
2740 |
+
$table = $this.closest('table'),
|
2741 |
total = $table.find('tr').length;
|
2742 |
|
2743 |
if (total > '1') {
|
2754 |
|
2755 |
var $this = $(el),
|
2756 |
$row = $this.closest('tr'),
|
2757 |
+
$table = $this.closest('tbody'),
|
2758 |
choice = $row.clone().insertAfter($row);
|
2759 |
|
2760 |
choice.find('input').val('');
|
2766 |
* Update field mapped select items on form updates.
|
2767 |
*
|
2768 |
* @since 1.2.0
|
|
|
|
|
2769 |
*/
|
2770 |
fieldMapSelect: function(e, fields) {
|
2771 |
|
2772 |
+
// Apply to all selects with identifier class
|
2773 |
$('.wpforms-field-map-select').each(function(index, el) {
|
2774 |
|
2775 |
var $this = $(this),
|
2798 |
}
|
2799 |
|
2800 |
// Loop through the current fields
|
2801 |
+
for(var field_key in fields) {
|
2802 |
+
var label = '';
|
2803 |
// Compile the label
|
2804 |
+
if (typeof fields[field_key].label !== 'undefined' && fields[field_key].label.length) {
|
2805 |
+
label = wpf.sanitizeString(fields[field_key].label);
|
2806 |
} else {
|
2807 |
+
label = wpforms_builder.field + ' #' + fields[field_key].val;
|
2808 |
}
|
2809 |
|
2810 |
// Add to select if it is a field type allowed
|
2811 |
+
if ($.inArray(fields[field_key].type, allowedFields) >= 0 || $.inArray('all-fields', allowedFields) >= 0) {
|
2812 |
+
$this.append($('<option>', { value: fields[field_key].id, text : label }));
|
2813 |
}
|
2814 |
}
|
2815 |
|
2872 |
var ctrlDown = false;
|
2873 |
|
2874 |
$(document).keydown(function(e) {
|
2875 |
+
if (e.keyCode === 17) {
|
2876 |
ctrlDown = true;
|
2877 |
+
} else if (ctrlDown && e.keyCode === 80) {
|
2878 |
window.open(wpforms_builder.preview_url);
|
2879 |
ctrlDown = false;
|
2880 |
return false;
|
2881 |
+
} else if (ctrlDown && e.keyCode === 69) {
|
|
|
2882 |
window.open(wpforms_builder.entries_url);
|
2883 |
ctrlDown = false;
|
2884 |
return false;
|
2885 |
}
|
2886 |
}).keyup(function(e) {
|
2887 |
+
if (e.keyCode === 17) {
|
2888 |
ctrlDown = false;
|
2889 |
}
|
2890 |
});
|
assets/js/admin-utils.js
CHANGED
@@ -270,7 +270,7 @@ var wpf = {
|
|
270 |
*/
|
271 |
getQueryString: function(name) {
|
272 |
|
273 |
-
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
|
274 |
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
|
275 |
},
|
276 |
|
@@ -343,26 +343,26 @@ var wpf = {
|
|
343 |
*/
|
344 |
numberFormat: function (number, decimals, decimalSep, thousandsSep) {
|
345 |
|
346 |
-
number = (number + '').replace(/[^0-9+\-Ee.]/g, '')
|
347 |
-
var n = !isFinite(+number) ? 0 : +number
|
348 |
-
var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals)
|
349 |
-
var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep
|
350 |
-
var dec = (typeof decimalSep === 'undefined') ? '.' : decimalSep
|
351 |
-
var s = ''
|
352 |
|
353 |
var toFixedFix = function (n, prec) {
|
354 |
-
var k = Math.pow(10, prec)
|
355 |
return '' + (Math.round(n * k) / k).toFixed(prec)
|
356 |
-
}
|
357 |
|
358 |
// @todo: for IE parseFloat(0.55).toFixed(0) = 0;
|
359 |
-
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.')
|
360 |
if (s[0].length > 3) {
|
361 |
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
|
362 |
}
|
363 |
if ((s[1] || '').length < prec) {
|
364 |
-
s[1] = s[1] || ''
|
365 |
-
s[1] += new Array(prec - s[1].length + 1).join('0')
|
366 |
}
|
367 |
|
368 |
return s.join(dec)
|
@@ -376,35 +376,35 @@ var wpf = {
|
|
376 |
*/
|
377 |
empty: function(mixedVar) {
|
378 |
|
379 |
-
var undef
|
380 |
-
var key
|
381 |
-
var i
|
382 |
-
var len
|
383 |
-
var emptyValues = [undef, null, false, 0, '', '0']
|
384 |
|
385 |
for (i = 0, len = emptyValues.length; i < len; i++) {
|
386 |
if (mixedVar === emptyValues[i]) {
|
387 |
-
return true
|
388 |
}
|
389 |
}
|
390 |
|
391 |
if (typeof mixedVar === 'object') {
|
392 |
for (key in mixedVar) {
|
393 |
if (mixedVar.hasOwnProperty(key)) {
|
394 |
-
return false
|
395 |
}
|
396 |
}
|
397 |
-
return true
|
398 |
}
|
399 |
|
400 |
-
return false
|
401 |
},
|
402 |
|
403 |
/**
|
404 |
* Debug output helper.
|
405 |
*
|
406 |
* @since 1.3.8
|
407 |
-
* @param
|
408 |
*/
|
409 |
debug: function( msg ) {
|
410 |
|
@@ -426,6 +426,17 @@ var wpf = {
|
|
426 |
isDebug: function() {
|
427 |
|
428 |
return ( ( window.location.hash && '#wpformsdebug' === window.location.hash ) || wpforms_builder.debug );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
}
|
430 |
-
}
|
431 |
wpf.init();
|
270 |
*/
|
271 |
getQueryString: function(name) {
|
272 |
|
273 |
+
var match = new RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
|
274 |
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
|
275 |
},
|
276 |
|
343 |
*/
|
344 |
numberFormat: function (number, decimals, decimalSep, thousandsSep) {
|
345 |
|
346 |
+
number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
|
347 |
+
var n = !isFinite(+number) ? 0 : +number;
|
348 |
+
var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
|
349 |
+
var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep;
|
350 |
+
var dec = (typeof decimalSep === 'undefined') ? '.' : decimalSep;
|
351 |
+
var s = '';
|
352 |
|
353 |
var toFixedFix = function (n, prec) {
|
354 |
+
var k = Math.pow(10, prec);
|
355 |
return '' + (Math.round(n * k) / k).toFixed(prec)
|
356 |
+
};
|
357 |
|
358 |
// @todo: for IE parseFloat(0.55).toFixed(0) = 0;
|
359 |
+
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
|
360 |
if (s[0].length > 3) {
|
361 |
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
|
362 |
}
|
363 |
if ((s[1] || '').length < prec) {
|
364 |
+
s[1] = s[1] || '';
|
365 |
+
s[1] += new Array(prec - s[1].length + 1).join('0');
|
366 |
}
|
367 |
|
368 |
return s.join(dec)
|
376 |
*/
|
377 |
empty: function(mixedVar) {
|
378 |
|
379 |
+
var undef;
|
380 |
+
var key;
|
381 |
+
var i;
|
382 |
+
var len;
|
383 |
+
var emptyValues = [undef, null, false, 0, '', '0'];
|
384 |
|
385 |
for (i = 0, len = emptyValues.length; i < len; i++) {
|
386 |
if (mixedVar === emptyValues[i]) {
|
387 |
+
return true;
|
388 |
}
|
389 |
}
|
390 |
|
391 |
if (typeof mixedVar === 'object') {
|
392 |
for (key in mixedVar) {
|
393 |
if (mixedVar.hasOwnProperty(key)) {
|
394 |
+
return false;
|
395 |
}
|
396 |
}
|
397 |
+
return true;
|
398 |
}
|
399 |
|
400 |
+
return false;
|
401 |
},
|
402 |
|
403 |
/**
|
404 |
* Debug output helper.
|
405 |
*
|
406 |
* @since 1.3.8
|
407 |
+
* @param msg
|
408 |
*/
|
409 |
debug: function( msg ) {
|
410 |
|
426 |
isDebug: function() {
|
427 |
|
428 |
return ( ( window.location.hash && '#wpformsdebug' === window.location.hash ) || wpforms_builder.debug );
|
429 |
+
},
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Focus the input/textarea and put the caret at the end of the text.
|
433 |
+
*
|
434 |
+
* @since 1.4.1
|
435 |
+
*/
|
436 |
+
focusCaretToEnd: function(el ) {
|
437 |
+
el.focus();
|
438 |
+
var $thisVal = el.val();
|
439 |
+
el.val('').val($thisVal);
|
440 |
}
|
441 |
+
};
|
442 |
wpf.init();
|
assets/js/jquery.jquery-confirm.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* jquery-confirm v3.2
|
3 |
* Author: Boniface Pereira
|
4 |
* Website: www.craftpip.com
|
5 |
* Contact: hey@craftpip.com
|
@@ -7,4 +7,4 @@
|
|
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);
|
1 |
/*!
|
2 |
+
* jquery-confirm v3.3.2 (http://craftpip.github.io/jquery-confirm/)
|
3 |
* Author: Boniface Pereira
|
4 |
* Website: www.craftpip.com
|
5 |
* Contact: hey@craftpip.com
|
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);if($this.attr("jc-attached")){console.warn("jConfirm has already been attached to this element ",$this[0]);return;}$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;var instance=$.confirm(jcOption);});$this.attr("jc-attached",true);});return $(this);};$.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}var putDefaultButtons=!(options.buttons==false);if(typeof options.buttons!="object"){options.buttons={};}if(Object.keys(options.buttons).length==0&&putDefaultButtons){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};}var putDefaultButtons=!(options.buttons==false);if(typeof options.buttons!="object"){options.buttons={};}if(Object.keys(options.buttons).length==0&&putDefaultButtons){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);this.contentParsed=$(document.createElement("div"));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.$holder=this.$el.find(".jconfirm-holder");this.$btnc=this.$el.find(".jconfirm-buttons");this.$scrollPane=this.$el.find(".jconfirm-scrollpane");that.setStartingPoint();this._contentReady=$.Deferred();this._modalReady=$.Deferred();this.$holder.css({"padding-top":this.offsetTop,"padding-bottom":this.offsetBottom,});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);that._updateContentMaxHeight();},100);if(typeof that.onContentReady==="function"){that.onContentReady();}},50);}else{that._updateContentMaxHeight();that.setTitle();that.setIcon();if(typeof that.onContentReady==="function"){that.onContentReady();}}if(that.autoClose){that._startCountDown();}});this._watchContent();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));this.$jconfirmBoxContainer.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);},_updateContentMaxHeight:function(){var height=$(window).height()-(this.$jconfirmBox.outerHeight()-this.$contentPane.outerHeight())-(this.offsetTop+this.offsetBottom);this.$contentPane.css({"max-height":height+"px"});},setBoxWidth:function(width){if(this.useBootstrap){console.warn("cannot set boxWidth, useBootstrap is set to true");return;}this.boxWidth=width;this.$jconfirmBox.css("width",width);},_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.on("mousedown",function(e){$t.addClass("jconfirm-hand");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(){$t.removeClass("jconfirm-hand");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.mouseX=0;this.mouseY=0;this.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");},setDrag:function(){if(!this.draggable){return;}this.alignMiddle=false;var boxWidth=this.$jconfirmBox.outerWidth();var boxHeight=this.$jconfirmBox.outerHeight();var windowWidth=$(window).width();var windowHeight=$(window).height();var that=this;var dragUpdate=1;if(that.movingX%dragUpdate===0||that.movingY%dragUpdate===0){if(that.dragWindowBorder){var leftDistance=(windowWidth/2)-boxWidth/2;var topDistance=(windowHeight/2)-boxHeight/2;topDistance-=that.dragWindowGap;leftDistance-=that.dragWindowGap;if(leftDistance+that.movingX<0){that.movingX=-leftDistance;}else{if(leftDistance-that.movingX<0){that.movingX=leftDistance;}}if(topDistance+that.movingY<0){that.movingY=-topDistance;}else{if(topDistance-that.movingY<0){that.movingY=topDistance;}}}that.$jconfirmBoxContainer.css("transform","translate("+that.movingX+"px, "+that.movingY+"px)");}},_scrollTop:function(){if(typeof pageYOffset!=="undefined"){return pageYOffset;}else{var B=document.body;var D=document.documentElement;D=(D.clientHeight)?D:B;return D.scrollTop;}},_watchContent:function(){var that=this;if(this._timer){clearInterval(this._timer);}var prevContentHeight=0;this._timer=setInterval(function(){if(that.smoothContent){var contentHeight=that.$content.outerHeight()||0;if(contentHeight!==prevContentHeight){that.$contentPane.css({height:contentHeight}).scrollTop(0);prevContentHeight=contentHeight;}var wh=$(window).height();var total=that.offsetTop+that.offsetBottom+that.$jconfirmBox.height()-that.$contentPane.height()+that.$content.height();if(total<wh){that.$contentPane.addClass("no-scroll");}else{that.$contentPane.removeClass("no-scroll");}}},this.watchInterval);},_overflowClass:"jconfirm-overflow",_hilightAnimating:false,highlight:function(){this.hiLightModal();},hiLightModal:function(){var that=this;if(this._hilightAnimating){return;}that.$body.addClass("hilight");var duration=parseFloat(that.$body.css("animation-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._updateContentMaxHeight();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+")"};},_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.buttons[key]]);that.onAction.apply(that,[key,that.buttons[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.buttons[key].hide=function(){that.buttons[key].isHidden=true;button_element.css("display","none");};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||"");this.updateTitleContainer();},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>':"");this.updateTitleContainer();},updateTitleContainer:function(){if(!this.title&&!this.icon){this.$titleContainer.hide();}else{this.$titleContainer.show();}},setContentPrepend:function(content,force){if(!content){return;}this.contentParsed.prepend(content);},setContentAppend:function(content){if(!content){return;}this.contentParsed.append(content);},setContent:function(content,force){force=!!force;var that=this;if(content){this.contentParsed.html("").append(content);}if(this.isAjaxLoading&&!force){return;}this.$content.html("");this.$content.append(this.contentParsed);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);}},hideLoading:function(enableButtons){this.loadingSpinner=false;this.$jconfirmBox.removeClass("loading");if(enableButtons){this.$btnc.find("button").prop("disabled",false);}},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(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.html(this.content);this.setContent();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");}});},setDialogCenter:function(){console.info("setDialogCenter is deprecated, dialogs are centered with CSS3 tables");},_unwatchContent:function(){clearInterval(this._timer);},close:function(onClosePayload){var that=this;if(typeof this.onClose==="function"){this.onClose(onClosePayload);}this._unwatchContent();$(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");}that.$el.removeClass(that.loadedClass);$("body").removeClass("jconfirm-no-scroll-"+that._id);that.$jconfirmBoxContainer.removeClass("jconfirm-no-transition");setTimeout(function(){that.$body.addClass(that.closeAnimationParsed);that.$jconfirmBg.addClass("jconfirm-bg-h");var closeTimer=(that.closeAnimation==="none")?1:that.animationSpeed;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);},50);return true;},open:function(){if(this.isOpen()){return false;}this._buildHTML();this._bindEvents();this._open();return true;},setStartingPoint:function(){var el=false;if(this.animateFromElement!==true&&this.animateFromElement){el=this.animateFromElement;jconfirm.lastClicked=false;}else{if(jconfirm.lastClicked&&this.animateFromElement===true){el=jconfirm.lastClicked;jconfirm.lastClicked=false;}else{return false;}}if(!el){return false;}var offset=el.offset();var iTop=el.outerHeight()/2;var iLeft=el.outerWidth()/2;iTop-=this.$jconfirmBox.outerHeight()/2;iLeft-=this.$jconfirmBox.outerWidth()/2;var sourceTop=offset.top+iTop;sourceTop=sourceTop-this._scrollTop();var sourceLeft=offset.left+iLeft;var wh=$(window).height()/2;var ww=$(window).width()/2;var targetH=wh-this.$jconfirmBox.outerHeight()/2;var targetW=ww-this.$jconfirmBox.outerWidth()/2;sourceTop-=targetH;sourceLeft-=targetW;if(Math.abs(sourceTop)>wh||Math.abs(sourceLeft)>ww){return false;}this.$jconfirmBoxContainer.css("transform","translate("+sourceLeft+"px, "+sourceTop+"px)");},_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();that.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");setTimeout(function(){that.$body.css(that._getCSS(that.animationSpeed,1));that.$body.css({"transition-property":that.$body.css("transition-property")+", margin"});that.$jconfirmBoxContainer.addClass("jconfirm-no-transition");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="jconfirm-row"><div class="jconfirm-cell"><div class="jconfirm-holder"><div class="jc-bs3-container"><div class="jc-bs3-row"><div class="jconfirm-box-container jconfirm-animated"><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></div></div></div>',title:"Hello",titleClass:"",type:"default",typeAnimated:true,draggable:true,dragWindowGap:15,dragWindowBorder:true,animateFromElement:true,alignMiddle:true,smoothContent: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:"scale",closeAnimation:"scale",animationSpeed:400,animationBounce:1,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:40,offsetBottom:40,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(){keyDown=false;});jconfirm.lastClicked=false;$(document).on("mousedown","button, a",function(){jconfirm.lastClicked=$(this);});})(jQuery,window);
|
assets/js/wpforms-confirmation.js
CHANGED
@@ -1,10 +1,11 @@
|
|
|
|
1 |
;(function($){
|
2 |
$(function(){
|
3 |
if (window.location.hash) {
|
4 |
var hash = window.location.hash.substring(1),
|
5 |
-
form;
|
6 |
hash = hash.split('-');
|
7 |
-
if ( undefined
|
8 |
$form = $('#wpforms-confirmation-'+hash[1]);
|
9 |
$('html,body').animate({
|
10 |
scrollTop: ($form.offset().top)-100
|
@@ -12,4 +13,4 @@
|
|
12 |
}
|
13 |
}
|
14 |
});
|
15 |
-
}(jQuery));
|
1 |
+
/* globals jQuery */
|
2 |
;(function($){
|
3 |
$(function(){
|
4 |
if (window.location.hash) {
|
5 |
var hash = window.location.hash.substring(1),
|
6 |
+
$form;
|
7 |
hash = hash.split('-');
|
8 |
+
if ( 'undefined' !== hash[0] && 'wpforms' === hash[0] && 'undefined' !== hash[1] ) {
|
9 |
$form = $('#wpforms-confirmation-'+hash[1]);
|
10 |
$('html,body').animate({
|
11 |
scrollTop: ($form.offset().top)-100
|
13 |
}
|
14 |
}
|
15 |
});
|
16 |
+
}(jQuery));
|
assets/js/wpforms.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
;(function($) {
|
2 |
|
3 |
var WPForms = {
|
@@ -63,7 +64,7 @@
|
|
63 |
// jQuery Validation library will not correctly validate
|
64 |
// fields that do not have a name attribute, so we use the
|
65 |
// `wpforms-input-temp-name` class to add a temporary name
|
66 |
-
// attribute before validation is
|
67 |
// before the form submits.
|
68 |
$( '.wpforms-input-temp-name' ).each(function( index, el ) {
|
69 |
var random = Math.floor( Math.random() * 9999 ) + 1;
|
@@ -115,7 +116,7 @@
|
|
115 |
// Validate email addresses
|
116 |
$.validator.methods.email = function( value, element ) {
|
117 |
return this.optional( element ) || /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/i.test( value );
|
118 |
-
}
|
119 |
|
120 |
// Validate confirmations
|
121 |
$.validator.addMethod("confirm", function(value, element, param) {
|
@@ -140,18 +141,20 @@
|
|
140 |
// Finally load jQuery Validation library for our forms
|
141 |
$('.wpforms-validate').each(function() {
|
142 |
var form = $(this),
|
143 |
-
formID = form.data('formid')
|
|
|
144 |
|
145 |
-
|
|
|
146 |
properties = window['wpforms_'+formID].validate;
|
147 |
-
} else if ( typeof wpforms_validate
|
148 |
properties = wpforms_validate;
|
149 |
} else {
|
150 |
properties = {
|
151 |
errorClass: 'wpforms-error',
|
152 |
validClass: 'wpforms-valid',
|
153 |
errorPlacement: function(error, element) {
|
154 |
-
if (element.attr('type')
|
155 |
element.parent().parent().parent().append(error);
|
156 |
} else if (element.is('select') && element.attr('class').match(/date-month|date-day|date-year/)) {
|
157 |
if (element.parent().find('label.wpforms-error:visible').length === 0) {
|
@@ -211,13 +214,14 @@
|
|
211 |
var element = $(this),
|
212 |
form = element.closest('.wpforms-form'),
|
213 |
formID = form.data('formid'),
|
214 |
-
fieldID = element.closest('.wpforms-field').data('field-id')
|
|
|
215 |
|
216 |
-
if (typeof window['wpforms_'+formID+'_'+fieldID]
|
217 |
properties = window['wpforms_'+formID+'_'+fieldID].datepicker;
|
218 |
-
} else if (typeof window['wpforms_'+formID]
|
219 |
properties = window['wpforms_'+formID].datepicker;
|
220 |
-
} else if (typeof wpforms_datepicker
|
221 |
properties = wpforms_datepicker;
|
222 |
} else {
|
223 |
properties = {
|
@@ -226,7 +230,7 @@
|
|
226 |
}
|
227 |
element.flatpickr(properties)
|
228 |
});
|
229 |
-
}
|
230 |
},
|
231 |
|
232 |
/**
|
@@ -242,20 +246,28 @@
|
|
242 |
var element = $(this),
|
243 |
form = element.closest('.wpforms-form'),
|
244 |
formID = form.data('formid'),
|
245 |
-
fieldID = element.closest('.wpforms-field').data('field-id')
|
|
|
246 |
|
247 |
-
if (
|
|
|
|
|
|
|
248 |
properties = window['wpforms_'+formID+'_'+fieldID].timepicker;
|
249 |
-
} else if (
|
|
|
|
|
|
|
250 |
properties = window['wpforms_'+formID].timepicker;
|
251 |
-
} else if ( typeof wpforms_timepicker
|
252 |
properties = wpforms_timepicker;
|
253 |
} else {
|
254 |
properties = {
|
255 |
scrollDefault: 'now',
|
256 |
forceRoundTime: true
|
257 |
-
}
|
258 |
}
|
|
|
259 |
element.timepicker(properties);
|
260 |
});
|
261 |
}
|
@@ -271,7 +283,7 @@
|
|
271 |
// Only load if jQuery input mask library exists
|
272 |
if (typeof $.fn.inputmask !== 'undefined') {
|
273 |
$('.wpforms-masked-input').inputmask();
|
274 |
-
}
|
275 |
},
|
276 |
|
277 |
/**
|
@@ -284,13 +296,13 @@
|
|
284 |
// Update Total field(s) with latest calculation
|
285 |
$('.wpforms-payment-total').each(function(index, el) {
|
286 |
WPForms.amountTotal(this);
|
287 |
-
})
|
288 |
|
289 |
-
// Credit card
|
290 |
if(typeof $.fn.payment !== 'undefined') {
|
291 |
$('.wpforms-field-credit-card-cardnumber').payment('formatCardNumber');
|
292 |
$('.wpforms-field-credit-card-cardcvc').payment('formatCardCVC');
|
293 |
-
}
|
294 |
},
|
295 |
|
296 |
//--------------------------------------------------------------------//
|
@@ -311,19 +323,19 @@
|
|
311 |
});
|
312 |
|
313 |
// Payments: Update Total field(s) when latest calculation.
|
314 |
-
$(document).on('change input', '.wpforms-payment-price', function(
|
315 |
WPForms.amountTotal(this, true);
|
316 |
});
|
317 |
|
318 |
// Payments: Restrict user input payment fields
|
319 |
-
$(document).on('input', '.wpforms-payment-user-input', function(
|
320 |
var $this = $(this),
|
321 |
amount = $this.val();
|
322 |
$this.val(amount.replace(/[^0-9.,]/g, ''));
|
323 |
});
|
324 |
|
325 |
// Payments: Sanitize/format user input amounts
|
326 |
-
$(document).on('focusout', '.wpforms-payment-user-input', function(
|
327 |
var $this = $(this),
|
328 |
amount = $this.val(),
|
329 |
sanitized = WPForms.amountSanitize(amount),
|
@@ -332,8 +344,8 @@
|
|
332 |
});
|
333 |
|
334 |
// OptinMonster: initialize again after OM is finished.
|
335 |
-
// This is to
|
336 |
-
$(document).on('OptinMonsterAfterInject', function(
|
337 |
WPForms.ready();
|
338 |
});
|
339 |
},
|
@@ -349,7 +361,7 @@
|
|
349 |
valid = true,
|
350 |
action = $this.data('action'),
|
351 |
page = $this.data('page'),
|
352 |
-
page2 = page
|
353 |
next = page+1,
|
354 |
prev = page-1,
|
355 |
formID = $this.data('formid'),
|
@@ -361,6 +373,7 @@
|
|
361 |
pageScroll = false;
|
362 |
|
363 |
// Page scroll
|
|
|
364 |
if ( window.wpforms_pageScroll === false ) {
|
365 |
pageScroll = false;
|
366 |
} else if ( !WPForms.empty( window.wpform_pageScroll ) ) {
|
@@ -370,7 +383,7 @@
|
|
370 |
}
|
371 |
|
372 |
// Toggling between pages
|
373 |
-
if ( action
|
374 |
// Validate
|
375 |
if (typeof $.fn.validate !== 'undefined') {
|
376 |
$page.find('input.wpforms-field-required, select.wpforms-field-required, textarea.wpforms-field-required, .wpforms-field-required input').each(function(index, el) {
|
@@ -408,7 +421,7 @@
|
|
408 |
}
|
409 |
$this.trigger('wpformsPageChange', [ page2, $form ] );
|
410 |
}
|
411 |
-
} else if ( action
|
412 |
// Move to prev page
|
413 |
page2 = prev;
|
414 |
$page.hide();
|
@@ -432,14 +445,14 @@
|
|
432 |
$indicator.find('.wpforms-page-indicator-page-'+page2).addClass('active');
|
433 |
$indicator.find('.wpforms-page-indicator-page-number').removeAttr('style');
|
434 |
$indicator.find('.active .wpforms-page-indicator-page-number').css('background-color', color);
|
435 |
-
if ( 'connector'
|
436 |
$indicator.find('.wpforms-page-indicator-page-triangle').removeAttr('style');
|
437 |
$indicator.find('.active .wpforms-page-indicator-page-triangle').css('border-top-color', color);
|
438 |
}
|
439 |
} else if ('progress' === theme) {
|
440 |
var $pageTitle = $indicator.find('.wpforms-page-indicator-page-title'),
|
441 |
$pageSep = $indicator.find('.wpforms-page-indicator-page-title-sep'),
|
442 |
-
totalPages =
|
443 |
width = (page2/totalPages)*100;
|
444 |
$indicator.find('.wpforms-page-indicator-page-progress').css('width', width+'%');
|
445 |
$indicator.find('.wpforms-page-indicator-steps-current').text(page2);
|
@@ -492,7 +505,7 @@
|
|
492 |
|
493 |
totalFormatted = WPForms.amountFormat(total);
|
494 |
|
495 |
-
if ( 'left'
|
496 |
totalFormattedSymbol = currency.symbol+' '+totalFormatted;
|
497 |
} else {
|
498 |
totalFormattedSymbol = totalFormatted+' '+currency.symbol;
|
@@ -521,14 +534,14 @@
|
|
521 |
|
522 |
amount = amount.toString().replace(/[^0-9.,]/g,'');
|
523 |
|
524 |
-
if ( currency.decimal_sep
|
525 |
-
if ( currency.thousands_sep
|
526 |
amount = amount.replace(currency.thousands_sep,'');
|
527 |
-
} else if( currency.thousands_sep
|
528 |
amount = amount.replace('.','');
|
529 |
}
|
530 |
amount = amount.replace(currency.decimal_sep,'.');
|
531 |
-
} else if ( currency.thousands_sep
|
532 |
amount = amount.replace(currency.thousands_sep,'');
|
533 |
}
|
534 |
|
@@ -547,15 +560,15 @@
|
|
547 |
amount = String(amount);
|
548 |
|
549 |
// Format the amount
|
550 |
-
if ( currency.decimal_sep
|
551 |
-
var sepFound = amount.indexOf(currency.decimal_sep)
|
552 |
-
whole = amount.substr(0, sepFound)
|
553 |
part = amount.substr(sepFound+1, amount.strlen-1);
|
554 |
amount = whole + '.' + part;
|
555 |
}
|
556 |
|
557 |
// Strip , from the amount (if set as the thousands separator)
|
558 |
-
if ( currency.thousands_sep
|
559 |
amount = amount.replace(',','');
|
560 |
}
|
561 |
|
@@ -579,7 +592,7 @@
|
|
579 |
decimal_sep: '.',
|
580 |
symbol: '$',
|
581 |
symbol_pos: 'left'
|
582 |
-
}
|
583 |
|
584 |
// Backwards compatibility.
|
585 |
if ( typeof wpforms_settings.currency_code !== 'undefined' ) {
|
@@ -609,25 +622,25 @@
|
|
609 |
*/
|
610 |
numberFormat: function (number, decimals, decimalSep, thousandsSep) {
|
611 |
|
612 |
-
number = (number + '').replace(/[^0-9+\-Ee.]/g, '')
|
613 |
-
var n = !isFinite(+number) ? 0 : +number
|
614 |
-
var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals)
|
615 |
-
var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep
|
616 |
-
var dec = (typeof decimalSep === 'undefined') ? '.' : decimalSep
|
617 |
-
var s
|
618 |
|
619 |
var toFixedFix = function (n, prec) {
|
620 |
-
var k = Math.pow(10, prec)
|
621 |
return '' + (Math.round(n * k) / k).toFixed(prec)
|
622 |
-
}
|
623 |
|
624 |
// @todo: for IE parseFloat(0.55).toFixed(0) = 0;
|
625 |
-
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.')
|
626 |
if (s[0].length > 3) {
|
627 |
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
|
628 |
}
|
629 |
if ((s[1] || '').length < prec) {
|
630 |
-
s[1] = s[1] || ''
|
631 |
s[1] += new Array(prec - s[1].length + 1).join('0')
|
632 |
}
|
633 |
|
@@ -642,11 +655,11 @@
|
|
642 |
*/
|
643 |
empty: function(mixedVar) {
|
644 |
|
645 |
-
var undef
|
646 |
-
var key
|
647 |
-
var i
|
648 |
-
var len
|
649 |
-
var emptyValues = [undef, null, false, 0, '', '0']
|
650 |
|
651 |
for (i = 0, len = emptyValues.length; i < len; i++) {
|
652 |
if (mixedVar === emptyValues[i]) {
|
@@ -657,13 +670,13 @@
|
|
657 |
if (typeof mixedVar === 'object') {
|
658 |
for (key in mixedVar) {
|
659 |
if (mixedVar.hasOwnProperty(key)) {
|
660 |
-
return false
|
661 |
}
|
662 |
}
|
663 |
-
return true
|
664 |
}
|
665 |
|
666 |
-
return false
|
667 |
},
|
668 |
|
669 |
/**
|
@@ -700,18 +713,20 @@
|
|
700 |
*/
|
701 |
createCookie: function(name, value, days) {
|
702 |
|
|
|
|
|
703 |
// If we have a days value, set it in the expiry of the cookie.
|
704 |
if ( days ) {
|
705 |
// If -1 is our value, set a session based cookie instead of a persistent cookie.
|
706 |
-
if ( '-1'
|
707 |
-
|
708 |
} else {
|
709 |
var date = new Date();
|
710 |
date.setTime(date.getTime() + (days*24*60*60*1000));
|
711 |
-
|
712 |
}
|
713 |
} else {
|
714 |
-
|
715 |
}
|
716 |
|
717 |
// Write the cookie.
|
@@ -730,7 +745,7 @@
|
|
730 |
|
731 |
for ( var i = 0; i < ca.length; i++ ) {
|
732 |
var c = ca[i];
|
733 |
-
while ( c.charAt(0)
|
734 |
c = c.substring(1, c.length);
|
735 |
}
|
736 |
if ( c.indexOf(nameEQ) == 0 ) {
|
@@ -748,7 +763,7 @@
|
|
748 |
|
749 |
WPForms.createCookie(name, '',-1);
|
750 |
}
|
751 |
-
}
|
752 |
|
753 |
WPForms.init();
|
754 |
|
1 |
+
/* global wpforms_settings,grecaptcha,wpforms_validate,wpforms_timepicker */
|
2 |
;(function($) {
|
3 |
|
4 |
var WPForms = {
|
64 |
// jQuery Validation library will not correctly validate
|
65 |
// fields that do not have a name attribute, so we use the
|
66 |
// `wpforms-input-temp-name` class to add a temporary name
|
67 |
+
// attribute before validation is initialized, then remove it
|
68 |
// before the form submits.
|
69 |
$( '.wpforms-input-temp-name' ).each(function( index, el ) {
|
70 |
var random = Math.floor( Math.random() * 9999 ) + 1;
|
116 |
// Validate email addresses
|
117 |
$.validator.methods.email = function( value, element ) {
|
118 |
return this.optional( element ) || /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/i.test( value );
|
119 |
+
};
|
120 |
|
121 |
// Validate confirmations
|
122 |
$.validator.addMethod("confirm", function(value, element, param) {
|
141 |
// Finally load jQuery Validation library for our forms
|
142 |
$('.wpforms-validate').each(function() {
|
143 |
var form = $(this),
|
144 |
+
formID = form.data('formid'),
|
145 |
+
properties;
|
146 |
|
147 |
+
// TODO: cleanup this BC with wpforms_validate.
|
148 |
+
if (typeof window['wpforms_'+formID] !== 'undefined' && window['wpforms_'+formID].hasOwnProperty('validate')) {
|
149 |
properties = window['wpforms_'+formID].validate;
|
150 |
+
} else if ( typeof wpforms_validate !== 'undefined') {
|
151 |
properties = wpforms_validate;
|
152 |
} else {
|
153 |
properties = {
|
154 |
errorClass: 'wpforms-error',
|
155 |
validClass: 'wpforms-valid',
|
156 |
errorPlacement: function(error, element) {
|
157 |
+
if (element.attr('type') === 'radio' || element.attr('type') === 'checkbox' ) {
|
158 |
element.parent().parent().parent().append(error);
|
159 |
} else if (element.is('select') && element.attr('class').match(/date-month|date-day|date-year/)) {
|
160 |
if (element.parent().find('label.wpforms-error:visible').length === 0) {
|
214 |
var element = $(this),
|
215 |
form = element.closest('.wpforms-form'),
|
216 |
formID = form.data('formid'),
|
217 |
+
fieldID = element.closest('.wpforms-field').data('field-id'),
|
218 |
+
properties;
|
219 |
|
220 |
+
if (typeof window['wpforms_'+formID+'_'+fieldID] !== 'undefined' && window['wpforms_'+formID+'_'+fieldID].hasOwnProperty('datepicker')) {
|
221 |
properties = window['wpforms_'+formID+'_'+fieldID].datepicker;
|
222 |
+
} else if (typeof window['wpforms_'+formID] !== 'undefined' && window['wpforms_'+formID].hasOwnProperty('datepicker')) {
|
223 |
properties = window['wpforms_'+formID].datepicker;
|
224 |
+
} else if (typeof wpforms_datepicker !== 'undefined') {
|
225 |
properties = wpforms_datepicker;
|
226 |
} else {
|
227 |
properties = {
|
230 |
}
|
231 |
element.flatpickr(properties)
|
232 |
});
|
233 |
+
}
|
234 |
},
|
235 |
|
236 |
/**
|
246 |
var element = $(this),
|
247 |
form = element.closest('.wpforms-form'),
|
248 |
formID = form.data('formid'),
|
249 |
+
fieldID = element.closest('.wpforms-field').data('field-id'),
|
250 |
+
properties;
|
251 |
|
252 |
+
if (
|
253 |
+
typeof window['wpforms_'+formID+'_'+fieldID] !== 'undefined' &&
|
254 |
+
window['wpforms_'+formID+'_'+fieldID].hasOwnProperty('timepicker')
|
255 |
+
) {
|
256 |
properties = window['wpforms_'+formID+'_'+fieldID].timepicker;
|
257 |
+
} else if (
|
258 |
+
typeof window['wpforms_'+formID] !== 'undefined' &&
|
259 |
+
window['wpforms_'+formID].hasOwnProperty('timepicker')
|
260 |
+
) {
|
261 |
properties = window['wpforms_'+formID].timepicker;
|
262 |
+
} else if ( typeof wpforms_timepicker !== 'undefined') {
|
263 |
properties = wpforms_timepicker;
|
264 |
} else {
|
265 |
properties = {
|
266 |
scrollDefault: 'now',
|
267 |
forceRoundTime: true
|
268 |
+
};
|
269 |
}
|
270 |
+
|
271 |
element.timepicker(properties);
|
272 |
});
|
273 |
}
|
283 |
// Only load if jQuery input mask library exists
|
284 |
if (typeof $.fn.inputmask !== 'undefined') {
|
285 |
$('.wpforms-masked-input').inputmask();
|
286 |
+
}
|
287 |
},
|
288 |
|
289 |
/**
|
296 |
// Update Total field(s) with latest calculation
|
297 |
$('.wpforms-payment-total').each(function(index, el) {
|
298 |
WPForms.amountTotal(this);
|
299 |
+
});
|
300 |
|
301 |
+
// Credit card validation
|
302 |
if(typeof $.fn.payment !== 'undefined') {
|
303 |
$('.wpforms-field-credit-card-cardnumber').payment('formatCardNumber');
|
304 |
$('.wpforms-field-credit-card-cardcvc').payment('formatCardCVC');
|
305 |
+
}
|
306 |
},
|
307 |
|
308 |
//--------------------------------------------------------------------//
|
323 |
});
|
324 |
|
325 |
// Payments: Update Total field(s) when latest calculation.
|
326 |
+
$(document).on('change input', '.wpforms-payment-price', function() {
|
327 |
WPForms.amountTotal(this, true);
|
328 |
});
|
329 |
|
330 |
// Payments: Restrict user input payment fields
|
331 |
+
$(document).on('input', '.wpforms-payment-user-input', function() {
|
332 |
var $this = $(this),
|
333 |
amount = $this.val();
|
334 |
$this.val(amount.replace(/[^0-9.,]/g, ''));
|
335 |
});
|
336 |
|
337 |
// Payments: Sanitize/format user input amounts
|
338 |
+
$(document).on('focusout', '.wpforms-payment-user-input', function() {
|
339 |
var $this = $(this),
|
340 |
amount = $this.val(),
|
341 |
sanitized = WPForms.amountSanitize(amount),
|
344 |
});
|
345 |
|
346 |
// OptinMonster: initialize again after OM is finished.
|
347 |
+
// This is to accommodate moving the form in the DOM.
|
348 |
+
$(document).on('OptinMonsterAfterInject', function() {
|
349 |
WPForms.ready();
|
350 |
});
|
351 |
},
|
361 |
valid = true,
|
362 |
action = $this.data('action'),
|
363 |
page = $this.data('page'),
|
364 |
+
page2 = page,
|
365 |
next = page+1,
|
366 |
prev = page-1,
|
367 |
formID = $this.data('formid'),
|
373 |
pageScroll = false;
|
374 |
|
375 |
// Page scroll
|
376 |
+
// TODO: cleanup this BC with wpform_pageScroll.
|
377 |
if ( window.wpforms_pageScroll === false ) {
|
378 |
pageScroll = false;
|
379 |
} else if ( !WPForms.empty( window.wpform_pageScroll ) ) {
|
383 |
}
|
384 |
|
385 |
// Toggling between pages
|
386 |
+
if ( action === 'next' ){
|
387 |
// Validate
|
388 |
if (typeof $.fn.validate !== 'undefined') {
|
389 |
$page.find('input.wpforms-field-required, select.wpforms-field-required, textarea.wpforms-field-required, .wpforms-field-required input').each(function(index, el) {
|
421 |
}
|
422 |
$this.trigger('wpformsPageChange', [ page2, $form ] );
|
423 |
}
|
424 |
+
} else if ( action === 'prev' ) {
|
425 |
// Move to prev page
|
426 |
page2 = prev;
|
427 |
$page.hide();
|
445 |
$indicator.find('.wpforms-page-indicator-page-'+page2).addClass('active');
|
446 |
$indicator.find('.wpforms-page-indicator-page-number').removeAttr('style');
|
447 |
$indicator.find('.active .wpforms-page-indicator-page-number').css('background-color', color);
|
448 |
+
if ( 'connector' === theme) {
|
449 |
$indicator.find('.wpforms-page-indicator-page-triangle').removeAttr('style');
|
450 |
$indicator.find('.active .wpforms-page-indicator-page-triangle').css('border-top-color', color);
|
451 |
}
|
452 |
} else if ('progress' === theme) {
|
453 |
var $pageTitle = $indicator.find('.wpforms-page-indicator-page-title'),
|
454 |
$pageSep = $indicator.find('.wpforms-page-indicator-page-title-sep'),
|
455 |
+
totalPages = $form.find('.wpforms-page').length,
|
456 |
width = (page2/totalPages)*100;
|
457 |
$indicator.find('.wpforms-page-indicator-page-progress').css('width', width+'%');
|
458 |
$indicator.find('.wpforms-page-indicator-steps-current').text(page2);
|
505 |
|
506 |
totalFormatted = WPForms.amountFormat(total);
|
507 |
|
508 |
+
if ( 'left' === currency.symbol_pos) {
|
509 |
totalFormattedSymbol = currency.symbol+' '+totalFormatted;
|
510 |
} else {
|
511 |
totalFormattedSymbol = totalFormatted+' '+currency.symbol;
|
534 |
|
535 |
amount = amount.toString().replace(/[^0-9.,]/g,'');
|
536 |
|
537 |
+
if ( currency.decimal_sep === ',' && ( amount.indexOf(currency.decimal_sep) !== -1 ) ) {
|
538 |
+
if ( currency.thousands_sep === '.' && amount.indexOf(currency.thousands_sep) !== -1 ) {
|
539 |
amount = amount.replace(currency.thousands_sep,'');
|
540 |
+
} else if( currency.thousands_sep === '' && amount.indexOf('.') !== -1 ) {
|
541 |
amount = amount.replace('.','');
|
542 |
}
|
543 |
amount = amount.replace(currency.decimal_sep,'.');
|
544 |
+
} else if ( currency.thousands_sep === ',' && ( amount.indexOf(currency.thousands_sep) !== -1 ) ) {
|
545 |
amount = amount.replace(currency.thousands_sep,'');
|
546 |
}
|
547 |
|
560 |
amount = String(amount);
|
561 |
|
562 |
// Format the amount
|
563 |
+
if ( currency.decimal_sep === ',' && ( amount.indexOf(currency.decimal_sep) !== -1 ) ) {
|
564 |
+
var sepFound = amount.indexOf(currency.decimal_sep),
|
565 |
+
whole = amount.substr(0, sepFound),
|
566 |
part = amount.substr(sepFound+1, amount.strlen-1);
|
567 |
amount = whole + '.' + part;
|
568 |
}
|
569 |
|
570 |
// Strip , from the amount (if set as the thousands separator)
|
571 |
+
if ( currency.thousands_sep === ',' && ( amount.indexOf(currency.thousands_sep) !== -1 ) ) {
|
572 |
amount = amount.replace(',','');
|
573 |
}
|
574 |
|
592 |
decimal_sep: '.',
|
593 |
symbol: '$',
|
594 |
symbol_pos: 'left'
|
595 |
+
};
|
596 |
|
597 |
// Backwards compatibility.
|
598 |
if ( typeof wpforms_settings.currency_code !== 'undefined' ) {
|
622 |
*/
|
623 |
numberFormat: function (number, decimals, decimalSep, thousandsSep) {
|
624 |
|
625 |
+
number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
|
626 |
+
var n = !isFinite(+number) ? 0 : +number;
|
627 |
+
var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
|
628 |
+
var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep;
|
629 |
+
var dec = (typeof decimalSep === 'undefined') ? '.' : decimalSep;
|
630 |
+
var s;
|
631 |
|
632 |
var toFixedFix = function (n, prec) {
|
633 |
+
var k = Math.pow(10, prec);
|
634 |
return '' + (Math.round(n * k) / k).toFixed(prec)
|
635 |
+
};
|
636 |
|
637 |
// @todo: for IE parseFloat(0.55).toFixed(0) = 0;
|
638 |
+
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
|
639 |
if (s[0].length > 3) {
|
640 |
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep)
|
641 |
}
|
642 |
if ((s[1] || '').length < prec) {
|
643 |
+
s[1] = s[1] || '';
|
644 |
s[1] += new Array(prec - s[1].length + 1).join('0')
|
645 |
}
|
646 |
|
655 |
*/
|
656 |
empty: function(mixedVar) {
|
657 |
|
658 |
+
var undef;
|
659 |
+
var key;
|
660 |
+
var i;
|
661 |
+
var len;
|
662 |
+
var emptyValues = [undef, null, false, 0, '', '0'];
|
663 |
|
664 |
for (i = 0, len = emptyValues.length; i < len; i++) {
|
665 |
if (mixedVar === emptyValues[i]) {
|
670 |
if (typeof mixedVar === 'object') {
|
671 |
for (key in mixedVar) {
|
672 |
if (mixedVar.hasOwnProperty(key)) {
|
673 |
+
return false;
|
674 |
}
|
675 |
}
|
676 |
+
return true;
|
677 |
}
|
678 |
|
679 |
+
return false;
|
680 |
},
|
681 |
|
682 |
/**
|
713 |
*/
|
714 |
createCookie: function(name, value, days) {
|
715 |
|
716 |
+
var expires = '';
|
717 |
+
|
718 |
// If we have a days value, set it in the expiry of the cookie.
|
719 |
if ( days ) {
|
720 |
// If -1 is our value, set a session based cookie instead of a persistent cookie.
|
721 |
+
if ( '-1' === days ) {
|
722 |
+
expires = '';
|
723 |
} else {
|
724 |
var date = new Date();
|
725 |
date.setTime(date.getTime() + (days*24*60*60*1000));
|
726 |
+
expires = '; expires=' + date.toGMTString();
|
727 |
}
|
728 |
} else {
|
729 |
+
expires = '; expires=Thu, 01 Jan 1970 00:00:01 GMT';
|
730 |
}
|
731 |
|
732 |
// Write the cookie.
|
745 |
|
746 |
for ( var i = 0; i < ca.length; i++ ) {
|
747 |
var c = ca[i];
|
748 |
+
while ( c.charAt(0) === ' ' ) {
|
749 |
c = c.substring(1, c.length);
|
750 |
}
|
751 |
if ( c.indexOf(nameEQ) == 0 ) {
|
763 |
|
764 |
WPForms.createCookie(name, '',-1);
|
765 |
}
|
766 |
+
};
|
767 |
|
768 |
WPForms.init();
|
769 |
|
changelog.txt
CHANGED
@@ -1,10 +1,30 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.4.0.1 =
|
4 |
-
- Added: Non-dismissible Dashboard page admin only notice about PHP 5.2
|
5 |
-
- Changed: Updated FontAwesome library
|
6 |
-
- Fixed: Fatal error with PHP 5.2 due to an anonymous function
|
7 |
-
- Fixed: CSV exports missing line breaks
|
8 |
|
9 |
= 1.4.0 =
|
10 |
- Changed: Core form templates are now displayed separate in the form builder from other custom templates
|
@@ -66,7 +86,7 @@
|
|
66 |
- Changed: Leverage `wp_json_encode` instead of native PHP function
|
67 |
- Changed: Various WordPress coding standard improvements (work in progress)
|
68 |
- Changed: Refactored form front-end code to allow for more customizations
|
69 |
-
- Changed: Refactored text, textarea, email, number,
|
70 |
- Fixed: Welcome page typo
|
71 |
- Fixed: SmartTag selectors getting off sync inside form builder
|
72 |
|
@@ -84,7 +104,7 @@
|
|
84 |
- Fixed: Form builder embed code field not being selectable
|
85 |
|
86 |
= 1.3.5 =
|
87 |
-
- Fixed: Some
|
88 |
- Fixed: Issue with Dropdown field placeholder text
|
89 |
- Fixed: Other plugins loading conflicting scripts in form builder
|
90 |
|
@@ -95,7 +115,7 @@
|
|
95 |
|
96 |
= 1.3.3 =
|
97 |
- Added: Default value support in the email field
|
98 |
-
- Added: Various new hooks and filters for improved
|
99 |
- Fixed: Possible errors if web host had `set_time_limit()` disabled
|
100 |
|
101 |
= 1.3.2 =
|
@@ -123,7 +143,7 @@
|
|
123 |
- Fixed: Dropdown field size not reflecting in builder
|
124 |
|
125 |
= 1.3.0 =
|
126 |
-
- Added: Email field
|
127 |
- Added: Support for Visual Composer
|
128 |
- Added: Field class to force elements to full-width on mobile devices, `wpforms-mobile-full`
|
129 |
- Changed: Placeholders are added/updated in real-time for Dropdown fields in the form builder
|
@@ -132,11 +152,11 @@
|
|
132 |
- Fixed: Field choice defaults not restoring in form builder
|
133 |
- Fixed: Field alignment issues in the form builder when dragging field more than once
|
134 |
- Fixed: PHP fatal erroring if form notification email address provided is not valid upon sending
|
135 |
-
- Fixed: Compatibility
|
136 |
|
137 |
= 1.2.9 =
|
138 |
- Added: Individual fields can be duplicated in the form builder
|
139 |
-
- Changed: How data is stored for fields using
|
140 |
- Fixed: Global assets setting causing errors in some cases
|
141 |
- Fixed: Writing setting ("correct invalidly nested XHTML") breaking forms containing HTML
|
142 |
- Fixed: Forms being displayed/included on the native WordPress Export page
|
@@ -144,7 +164,7 @@
|
|
144 |
- Fixed: Form labels including blank IDs
|
145 |
|
146 |
= 1.2.8.1 =
|
147 |
-
- Fixed: Form javascript email validation being too strict (
|
148 |
|
149 |
= 1.2.8 =
|
150 |
- Added: Dynamic choice feature for Dropdown, Multiple Choice, and Checkbox fields
|
@@ -154,7 +174,7 @@
|
|
154 |
- Fixed: Javascript in the form builder conflicting with certain locales
|
155 |
|
156 |
= 1.2.7 =
|
157 |
-
- Added: Store
|
158 |
- Added: Duplicate form submit protection
|
159 |
- Fixed: Strip slashes from entry data before processing
|
160 |
|
@@ -178,7 +198,7 @@
|
|
178 |
|
179 |
= 1.2.4 =
|
180 |
- Added: Additional logging and error reporting
|
181 |
-
- Changed: Footer asset detection priority, for improved
|
182 |
- Changed: Refactored and refined front-end javascript
|
183 |
- Fixed: Rogue PHP notices
|
184 |
|
@@ -248,7 +268,7 @@
|
|
248 |
* Changed: Removed "New" field name prefix
|
249 |
|
250 |
= 1.1.7 =
|
251 |
-
* Added: Smart Tag for Dropdown/Multiple choice raw values, allowing for conditional email
|
252 |
* Added: Three column CSS field classes (https://wpforms.com/docs/how-to-create-multi-column-form-layouts-in-wpforms/)
|
253 |
* Changed: Checkbox/Multiple Choice fields allow certain HTML to display in choice labels
|
254 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.4.1.1 =
|
4 |
+
- Changed: Improved the loading order of javascript files for forms builder
|
5 |
+
- Changed: Update some strings for Russian translation
|
6 |
+
|
7 |
+
= 1.4.1=
|
8 |
+
- Added: Ability to rename Form>Settings>Notifications>Single notification panels
|
9 |
+
- Added: Define a minimum PHP version support in plugin readme.txt file
|
10 |
+
- Added: Display a friendly link to a full page version, when form is previewed on AMP pages
|
11 |
+
- Added: Ability to collapse Form>Settings>Notifications>Single notification panels
|
12 |
+
- Added: Russian translation
|
13 |
+
- Added: Allow more than 1 default selection for checkboxes fields
|
14 |
+
- Changed: Bump minimum WordPress version to 4.6
|
15 |
+
- Changed: Improved localization support of the plugin
|
16 |
+
- Changed: Improved texts in various places
|
17 |
+
- Changed: Code style improvements throughout the plugin
|
18 |
+
- Changed: Combine WPFORMS_DEBUG and WPFORMS_DEVELOPMENT into one, use `wpforms_debug()` to check
|
19 |
+
- Changed: All HTTP requests now validate target sites SSL certificates with WP bundled certificates (since 3.7)
|
20 |
+
- Fixed: Notification email is empty if submitted form has no user values (displaying user friendly message instead)
|
21 |
+
- Fixed: Pressing enter in "Enter a notification name" popup does nothing
|
22 |
+
- Fixed: Fancy Fields can be dragged into form, but then get stuck
|
23 |
+
- Fixed: Deprecate a misspelled `wpforms_csv_export_seperator` filter, introduced a proper name for it
|
24 |
+
- Fixed: Conditional logic comparison issues if rule contained special characters
|
25 |
+
|
26 |
= 1.4.0.1 =
|
27 |
+
- Added: Non-dismissible Dashboard page admin only notice about PHP 5.2.
|
|
|
|
|
|
|
28 |
|
29 |
= 1.4.0 =
|
30 |
- Changed: Core form templates are now displayed separate in the form builder from other custom templates
|
86 |
- Changed: Leverage `wp_json_encode` instead of native PHP function
|
87 |
- Changed: Various WordPress coding standard improvements (work in progress)
|
88 |
- Changed: Refactored form front-end code to allow for more customizations
|
89 |
+
- Changed: Refactored text, textarea, email, number, and name fields to allow for more customizations (more coming next release)
|
90 |
- Fixed: Welcome page typo
|
91 |
- Fixed: SmartTag selectors getting off sync inside form builder
|
92 |
|
104 |
- Fixed: Form builder embed code field not being selectable
|
105 |
|
106 |
= 1.3.5 =
|
107 |
+
- Fixed: Some browsers allowing unexpected characters inside number input fields
|
108 |
- Fixed: Issue with Dropdown field placeholder text
|
109 |
- Fixed: Other plugins loading conflicting scripts in form builder
|
110 |
|
115 |
|
116 |
= 1.3.3 =
|
117 |
- Added: Default value support in the email field
|
118 |
+
- Added: Various new hooks and filters for improved extendability
|
119 |
- Fixed: Possible errors if web host had `set_time_limit()` disabled
|
120 |
|
121 |
= 1.3.2 =
|
143 |
- Fixed: Dropdown field size not reflecting in builder
|
144 |
|
145 |
= 1.3.0 =
|
146 |
+
- Added: Email field confirmation
|
147 |
- Added: Support for Visual Composer
|
148 |
- Added: Field class to force elements to full-width on mobile devices, `wpforms-mobile-full`
|
149 |
- Changed: Placeholders are added/updated in real-time for Dropdown fields in the form builder
|
152 |
- Fixed: Field choice defaults not restoring in form builder
|
153 |
- Fixed: Field alignment issues in the form builder when dragging field more than once
|
154 |
- Fixed: PHP fatal erroring if form notification email address provided is not valid upon sending
|
155 |
+
- Fixed: Compatibility issues when network activated on a Multisite install
|
156 |
|
157 |
= 1.2.9 =
|
158 |
- Added: Individual fields can be duplicated in the form builder
|
159 |
+
- Changed: How data is stored for fields using Dynamic Choices
|
160 |
- Fixed: Global assets setting causing errors in some cases
|
161 |
- Fixed: Writing setting ("correct invalidly nested XHTML") breaking forms containing HTML
|
162 |
- Fixed: Forms being displayed/included on the native WordPress Export page
|
164 |
- Fixed: Form labels including blank IDs
|
165 |
|
166 |
= 1.2.8.1 =
|
167 |
+
- Fixed: Form javascript email validation being too strict (introduced in 1.2.8)
|
168 |
|
169 |
= 1.2.8 =
|
170 |
- Added: Dynamic choice feature for Dropdown, Multiple Choice, and Checkbox fields
|
174 |
- Fixed: Javascript in the form builder conflicting with certain locales
|
175 |
|
176 |
= 1.2.7 =
|
177 |
+
- Added: Store initial plugin activation date
|
178 |
- Added: Duplicate form submit protection
|
179 |
- Fixed: Strip slashes from entry data before processing
|
180 |
|
198 |
|
199 |
= 1.2.4 =
|
200 |
- Added: Additional logging and error reporting
|
201 |
+
- Changed: Footer asset detection priority, for improved capability with other services
|
202 |
- Changed: Refactored and refined front-end javascript
|
203 |
- Fixed: Rogue PHP notices
|
204 |
|
268 |
* Changed: Removed "New" field name prefix
|
269 |
|
270 |
= 1.1.7 =
|
271 |
+
* Added: Smart Tag for Dropdown/Multiple choice raw values, allowing for conditional email address notifications (https://wpforms.com/docs/how-to-create-conditional-form-notifications-in-wpforms)
|
272 |
* Added: Three column CSS field classes (https://wpforms.com/docs/how-to-create-multi-column-form-layouts-in-wpforms/)
|
273 |
* Changed: Checkbox/Multiple Choice fields allow certain HTML to display in choice labels
|
274 |
|
includes/admin/admin.php
CHANGED
@@ -111,8 +111,9 @@ function wpforms_admin_scripts() {
|
|
111 |
false
|
112 |
);
|
113 |
|
114 |
-
|
115 |
-
$
|
|
|
116 |
|
117 |
// Main admin script.
|
118 |
wp_enqueue_script(
|
@@ -345,10 +346,10 @@ function wpforms_check_php_version() {
|
|
345 |
// Display the notice, finally.
|
346 |
WPForms_Admin_Notice::error(
|
347 |
'<p>' .
|
|
|
348 |
sprintf(
|
349 |
-
|
350 |
'Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. %2$sRead more%3$s for additional information.',
|
351 |
-
'translators: %1$s - WPForms plugin name; %2$s - opening a link tag; %3$s - closing a link tag.',
|
352 |
'wpforms'
|
353 |
),
|
354 |
'<strong>WPForms</strong>',
|
111 |
false
|
112 |
);
|
113 |
|
114 |
+
// TODO: we should use wpforms_get_min_suffix() here.
|
115 |
+
$dir = wpforms_debug() ? '/src' : '';
|
116 |
+
$suffix = wpforms_debug() ? '' : '.min';
|
117 |
|
118 |
// Main admin script.
|
119 |
wp_enqueue_script(
|
346 |
// Display the notice, finally.
|
347 |
WPForms_Admin_Notice::error(
|
348 |
'<p>' .
|
349 |
+
/* translators: %1$s - WPForms plugin name; %2$s - opening a link tag; %3$s - closing a link tag. */
|
350 |
sprintf(
|
351 |
+
__(
|
352 |
'Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. %2$sRead more%3$s for additional information.',
|
|
|
353 |
'wpforms'
|
354 |
),
|
355 |
'<strong>WPForms</strong>',
|
includes/admin/ajax-actions.php
CHANGED
@@ -7,10 +7,10 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
|
12 |
/**
|
13 |
-
* Save a form
|
14 |
*
|
15 |
* @since 1.0.0
|
16 |
*/
|
@@ -20,12 +20,14 @@ function wpforms_save_form() {
|
|
20 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
21 |
|
22 |
// Check for permissions
|
23 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) )
|
24 |
die( __( 'You do not have permission.', 'wpforms' ) );
|
|
|
25 |
|
26 |
// Check for form data
|
27 |
-
if ( empty( $_POST['data'] ) )
|
28 |
die( __( 'No data provided', 'wpforms' ) );
|
|
|
29 |
|
30 |
$form_post = json_decode( stripslashes( $_POST['data'] ) );
|
31 |
$data = array();
|
@@ -46,10 +48,12 @@ function wpforms_save_form() {
|
|
46 |
|
47 |
// Build the new array value from leaf to trunk.
|
48 |
for ( $i = count( $array_bits ) - 1; $i >= 0; $i -- ) {
|
49 |
-
if ( $i
|
50 |
-
|
51 |
} else {
|
52 |
-
|
|
|
|
|
53 |
}
|
54 |
}
|
55 |
|
@@ -62,16 +66,18 @@ function wpforms_save_form() {
|
|
62 |
do_action( 'wpforms_builder_save_form', $form_id, $data );
|
63 |
|
64 |
if ( ! $form_id ) {
|
65 |
-
die( __( 'An error
|
66 |
} else {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
71 |
);
|
72 |
-
wp_send_json_success( $data );
|
73 |
}
|
74 |
}
|
|
|
75 |
add_action( 'wp_ajax_wpforms_save_form', 'wpforms_save_form' );
|
76 |
|
77 |
/**
|
@@ -84,9 +90,10 @@ function wpforms_new_form() {
|
|
84 |
// Run a security check
|
85 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
86 |
|
87 |
-
// Check for form
|
88 |
-
if ( empty( $_POST['title'] ) )
|
89 |
-
die( __( 'No form
|
|
|
90 |
|
91 |
// Create form
|
92 |
$form_title = sanitize_text_field( $_POST['title'] );
|
@@ -95,25 +102,37 @@ function wpforms_new_form() {
|
|
95 |
$form_id = wpforms()->form->add(
|
96 |
$form_title,
|
97 |
array(),
|
98 |
-
array(
|
|
|
|
|
99 |
);
|
100 |
-
if (
|
101 |
-
wp_update_post(
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
105 |
}
|
106 |
|
107 |
if ( $form_id ) {
|
108 |
$data = array(
|
109 |
'id' => $form_id,
|
110 |
-
'redirect' => add_query_arg(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
);
|
112 |
wp_send_json_success( $data );
|
113 |
} else {
|
114 |
die( __( 'Error creating form', 'wpforms' ) );
|
115 |
}
|
116 |
}
|
|
|
117 |
add_action( 'wp_ajax_wpforms_new_form', 'wpforms_new_form' );
|
118 |
|
119 |
/**
|
@@ -123,26 +142,38 @@ add_action( 'wp_ajax_wpforms_new_form', 'wpforms_new_form' );
|
|
123 |
*/
|
124 |
function wpforms_update_form_template() {
|
125 |
|
126 |
-
// Run a security check
|
127 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
128 |
|
129 |
-
// Check for form
|
130 |
-
if ( empty( $_POST['form_id'] ) )
|
131 |
die( __( 'No form ID provided', 'wpforms' ) );
|
|
|
132 |
|
133 |
-
$data = wpforms()->form->get( $_POST['form_id'], array(
|
134 |
-
|
|
|
|
|
|
|
|
|
135 |
|
136 |
if ( $form_id ) {
|
137 |
$data = array(
|
138 |
'id' => $form_id,
|
139 |
-
'redirect' => add_query_arg(
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
);
|
141 |
wp_send_json_success( $data );
|
142 |
} else {
|
143 |
die( __( 'Error updating form template', 'wpforms' ) );
|
144 |
}
|
145 |
}
|
|
|
146 |
add_action( 'wp_ajax_wpforms_update_form_template', 'wpforms_update_form_template' );
|
147 |
|
148 |
/**
|
@@ -152,15 +183,15 @@ add_action( 'wp_ajax_wpforms_update_form_template', 'wpforms_update_form_templat
|
|
152 |
*/
|
153 |
function wpforms_builder_increase_next_field_id() {
|
154 |
|
155 |
-
// Run a security check
|
156 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
157 |
|
158 |
-
// Check for permissions
|
159 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
160 |
wp_send_json_error();
|
161 |
}
|
162 |
|
163 |
-
// Check for required items
|
164 |
if ( empty( $_POST['form_id'] ) ) {
|
165 |
wp_send_json_error();
|
166 |
}
|
@@ -169,27 +200,28 @@ function wpforms_builder_increase_next_field_id() {
|
|
169 |
|
170 |
wp_send_json_success();
|
171 |
}
|
|
|
172 |
add_action( 'wp_ajax_wpforms_builder_increase_next_field_id', 'wpforms_builder_increase_next_field_id' );
|
173 |
|
174 |
/**
|
175 |
* Form Builder Dynamic Choices option toggle.
|
176 |
*
|
177 |
-
* This can be triggered with select/radio/checkbox
|
178 |
*
|
179 |
* @since 1.2.8
|
180 |
*/
|
181 |
function wpforms_builder_dynamic_choices() {
|
182 |
|
183 |
-
// Run a security check
|
184 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
185 |
|
186 |
-
// Check for permissions
|
187 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
188 |
wp_send_json_error();
|
189 |
}
|
190 |
|
191 |
-
// Check for valid/required items
|
192 |
-
if ( !isset( $_POST['field_id'] ) || empty( $_POST['type'] ) || !in_array( $_POST['type'], array( 'post_type', 'taxonomy' ) ) ) {
|
193 |
wp_send_json_error();
|
194 |
}
|
195 |
|
@@ -204,50 +236,66 @@ function wpforms_builder_dynamic_choices() {
|
|
204 |
);
|
205 |
$option_row = $field->field_option( 'dynamic_choices_source', $field_args, array(), false );
|
206 |
|
207 |
-
wp_send_json_success(
|
208 |
-
|
209 |
-
|
|
|
|
|
210 |
}
|
|
|
211 |
add_action( 'wp_ajax_wpforms_builder_dynamic_choices', 'wpforms_builder_dynamic_choices' );
|
212 |
|
213 |
/**
|
214 |
* Form Builder Dynamic Choices Source option toggle.
|
215 |
*
|
216 |
-
* This can be triggered with select/radio/checkbox
|
217 |
*
|
218 |
* @since 1.2.8
|
219 |
*/
|
220 |
function wpforms_builder_dynamic_source() {
|
221 |
|
222 |
-
// Run a security check
|
223 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
224 |
|
225 |
-
// Check for permissions
|
226 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
227 |
wp_send_json_error();
|
228 |
}
|
229 |
|
230 |
-
// Check for required items
|
231 |
-
if ( !isset( $_POST['field_id'] ) || empty( $_POST['form_id'] ) || empty( $_POST['type'] ) || empty( $_POST['source'] ) ) {
|
232 |
wp_send_json_error();
|
233 |
}
|
234 |
|
235 |
-
$type
|
236 |
-
$source
|
237 |
-
$id
|
238 |
-
$form_id
|
239 |
-
$items
|
|
|
|
|
|
|
240 |
|
241 |
-
if ( 'post_type'
|
242 |
|
243 |
$type_name = __( 'post type', 'wpforms' );
|
244 |
$args = array(
|
245 |
'post_type' => $source,
|
246 |
-
'posts_per_page' => -1,
|
247 |
'orderby' => 'title',
|
248 |
'order' => 'ASC',
|
249 |
);
|
250 |
-
$posts = wpforms_get_hierarchical_object(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
$total = wp_count_posts( $source );
|
252 |
$total = $total->publish;
|
253 |
$pt = get_post_type_object( $source );
|
@@ -256,15 +304,24 @@ function wpforms_builder_dynamic_source() {
|
|
256 |
foreach ( $posts as $post ) {
|
257 |
$items[] = $post->post_title;
|
258 |
}
|
259 |
-
|
260 |
-
} elseif ( 'taxonomy' == $type ) {
|
261 |
|
262 |
$type_name = __( 'taxonomy', 'wpforms' );
|
263 |
$args = array(
|
264 |
'taxonomy' => $source,
|
265 |
'hide_empty' => false,
|
266 |
);
|
267 |
-
$terms = wpforms_get_hierarchical_object(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
$total = wp_count_terms( $source );
|
269 |
$tax = get_taxonomy( $source );
|
270 |
$source_name = $tax->labels->name;
|
@@ -274,13 +331,16 @@ function wpforms_builder_dynamic_source() {
|
|
274 |
}
|
275 |
}
|
276 |
|
277 |
-
wp_send_json_success(
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
|
|
|
|
285 |
}
|
|
|
286 |
add_action( 'wp_ajax_wpforms_builder_dynamic_source', 'wpforms_builder_dynamic_source' );
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
|
12 |
/**
|
13 |
+
* Save a form.
|
14 |
*
|
15 |
* @since 1.0.0
|
16 |
*/
|
20 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
21 |
|
22 |
// Check for permissions
|
23 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
24 |
die( __( 'You do not have permission.', 'wpforms' ) );
|
25 |
+
}
|
26 |
|
27 |
// Check for form data
|
28 |
+
if ( empty( $_POST['data'] ) ) {
|
29 |
die( __( 'No data provided', 'wpforms' ) );
|
30 |
+
}
|
31 |
|
32 |
$form_post = json_decode( stripslashes( $_POST['data'] ) );
|
33 |
$data = array();
|
48 |
|
49 |
// Build the new array value from leaf to trunk.
|
50 |
for ( $i = count( $array_bits ) - 1; $i >= 0; $i -- ) {
|
51 |
+
if ( $i === count( $array_bits ) - 1 ) {
|
52 |
+
$new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
|
53 |
} else {
|
54 |
+
$new_post_data = array(
|
55 |
+
$array_bits[ $i ] => $new_post_data,
|
56 |
+
);
|
57 |
}
|
58 |
}
|
59 |
|
66 |
do_action( 'wpforms_builder_save_form', $form_id, $data );
|
67 |
|
68 |
if ( ! $form_id ) {
|
69 |
+
die( __( 'An error occurred and the form could not be saved', 'wpforms' ) );
|
70 |
} else {
|
71 |
+
wp_send_json_success(
|
72 |
+
array(
|
73 |
+
'form_name' => esc_html( $data['settings']['form_title'] ),
|
74 |
+
'form_desc' => $data['settings']['form_desc'],
|
75 |
+
'redirect' => admin_url( 'admin.php?page=wpforms-overview' ),
|
76 |
+
)
|
77 |
);
|
|
|
78 |
}
|
79 |
}
|
80 |
+
|
81 |
add_action( 'wp_ajax_wpforms_save_form', 'wpforms_save_form' );
|
82 |
|
83 |
/**
|
90 |
// Run a security check
|
91 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
92 |
|
93 |
+
// Check for form name.
|
94 |
+
if ( empty( $_POST['title'] ) ) {
|
95 |
+
die( __( 'No form name provided', 'wpforms' ) );
|
96 |
+
}
|
97 |
|
98 |
// Create form
|
99 |
$form_title = sanitize_text_field( $_POST['title'] );
|
102 |
$form_id = wpforms()->form->add(
|
103 |
$form_title,
|
104 |
array(),
|
105 |
+
array(
|
106 |
+
'template' => $form_template,
|
107 |
+
)
|
108 |
);
|
109 |
+
if ( null !== $title_exists ) {
|
110 |
+
wp_update_post(
|
111 |
+
array(
|
112 |
+
'ID' => $form_id,
|
113 |
+
'post_title' => $form_title . ' (ID #' . $form_id . ')',
|
114 |
+
)
|
115 |
+
);
|
116 |
}
|
117 |
|
118 |
if ( $form_id ) {
|
119 |
$data = array(
|
120 |
'id' => $form_id,
|
121 |
+
'redirect' => add_query_arg(
|
122 |
+
array(
|
123 |
+
'view' => 'fields',
|
124 |
+
'form_id' => $form_id,
|
125 |
+
'newform' => '1',
|
126 |
+
),
|
127 |
+
admin_url( 'admin.php?page=wpforms-builder' )
|
128 |
+
),
|
129 |
);
|
130 |
wp_send_json_success( $data );
|
131 |
} else {
|
132 |
die( __( 'Error creating form', 'wpforms' ) );
|
133 |
}
|
134 |
}
|
135 |
+
|
136 |
add_action( 'wp_ajax_wpforms_new_form', 'wpforms_new_form' );
|
137 |
|
138 |
/**
|
142 |
*/
|
143 |
function wpforms_update_form_template() {
|
144 |
|
145 |
+
// Run a security check.
|
146 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
147 |
|
148 |
+
// Check for form name.
|
149 |
+
if ( empty( $_POST['form_id'] ) ) {
|
150 |
die( __( 'No form ID provided', 'wpforms' ) );
|
151 |
+
}
|
152 |
|
153 |
+
$data = wpforms()->form->get( $_POST['form_id'], array(
|
154 |
+
'content_only' => true,
|
155 |
+
) );
|
156 |
+
$form_id = wpforms()->form->update( $_POST['form_id'], $data, array(
|
157 |
+
'template' => $_POST['template'],
|
158 |
+
) );
|
159 |
|
160 |
if ( $form_id ) {
|
161 |
$data = array(
|
162 |
'id' => $form_id,
|
163 |
+
'redirect' => add_query_arg(
|
164 |
+
array(
|
165 |
+
'view' => 'fields',
|
166 |
+
'form_id' => $form_id,
|
167 |
+
),
|
168 |
+
admin_url( 'admin.php?page=wpforms-builder' )
|
169 |
+
),
|
170 |
);
|
171 |
wp_send_json_success( $data );
|
172 |
} else {
|
173 |
die( __( 'Error updating form template', 'wpforms' ) );
|
174 |
}
|
175 |
}
|
176 |
+
|
177 |
add_action( 'wp_ajax_wpforms_update_form_template', 'wpforms_update_form_template' );
|
178 |
|
179 |
/**
|
183 |
*/
|
184 |
function wpforms_builder_increase_next_field_id() {
|
185 |
|
186 |
+
// Run a security check.
|
187 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
188 |
|
189 |
+
// Check for permissions.
|
190 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
191 |
wp_send_json_error();
|
192 |
}
|
193 |
|
194 |
+
// Check for required items.
|
195 |
if ( empty( $_POST['form_id'] ) ) {
|
196 |
wp_send_json_error();
|
197 |
}
|
200 |
|
201 |
wp_send_json_success();
|
202 |
}
|
203 |
+
|
204 |
add_action( 'wp_ajax_wpforms_builder_increase_next_field_id', 'wpforms_builder_increase_next_field_id' );
|
205 |
|
206 |
/**
|
207 |
* Form Builder Dynamic Choices option toggle.
|
208 |
*
|
209 |
+
* This can be triggered with select/radio/checkbox fields.
|
210 |
*
|
211 |
* @since 1.2.8
|
212 |
*/
|
213 |
function wpforms_builder_dynamic_choices() {
|
214 |
|
215 |
+
// Run a security check.
|
216 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
217 |
|
218 |
+
// Check for permissions.
|
219 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
220 |
wp_send_json_error();
|
221 |
}
|
222 |
|
223 |
+
// Check for valid/required items.
|
224 |
+
if ( ! isset( $_POST['field_id'] ) || empty( $_POST['type'] ) || ! in_array( $_POST['type'], array( 'post_type', 'taxonomy' ), true ) ) {
|
225 |
wp_send_json_error();
|
226 |
}
|
227 |
|
236 |
);
|
237 |
$option_row = $field->field_option( 'dynamic_choices_source', $field_args, array(), false );
|
238 |
|
239 |
+
wp_send_json_success(
|
240 |
+
array(
|
241 |
+
'markup' => $option_row,
|
242 |
+
)
|
243 |
+
);
|
244 |
}
|
245 |
+
|
246 |
add_action( 'wp_ajax_wpforms_builder_dynamic_choices', 'wpforms_builder_dynamic_choices' );
|
247 |
|
248 |
/**
|
249 |
* Form Builder Dynamic Choices Source option toggle.
|
250 |
*
|
251 |
+
* This can be triggered with select/radio/checkbox fields.
|
252 |
*
|
253 |
* @since 1.2.8
|
254 |
*/
|
255 |
function wpforms_builder_dynamic_source() {
|
256 |
|
257 |
+
// Run a security check.
|
258 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
259 |
|
260 |
+
// Check for permissions.
|
261 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
262 |
wp_send_json_error();
|
263 |
}
|
264 |
|
265 |
+
// Check for required items.
|
266 |
+
if ( ! isset( $_POST['field_id'] ) || empty( $_POST['form_id'] ) || empty( $_POST['type'] ) || empty( $_POST['source'] ) ) {
|
267 |
wp_send_json_error();
|
268 |
}
|
269 |
|
270 |
+
$type = esc_attr( $_POST['type'] );
|
271 |
+
$source = esc_attr( $_POST['source'] );
|
272 |
+
$id = absint( $_POST['field_id'] );
|
273 |
+
$form_id = absint( $_POST['form_id'] );
|
274 |
+
$items = array();
|
275 |
+
$total = 0;
|
276 |
+
$source_name = '';
|
277 |
+
$type_name = '';
|
278 |
|
279 |
+
if ( 'post_type' === $type ) {
|
280 |
|
281 |
$type_name = __( 'post type', 'wpforms' );
|
282 |
$args = array(
|
283 |
'post_type' => $source,
|
284 |
+
'posts_per_page' => - 1,
|
285 |
'orderby' => 'title',
|
286 |
'order' => 'ASC',
|
287 |
);
|
288 |
+
$posts = wpforms_get_hierarchical_object(
|
289 |
+
apply_filters(
|
290 |
+
'wpforms_dynamic_choice_post_type_args',
|
291 |
+
$args,
|
292 |
+
array(
|
293 |
+
'id' => $id,
|
294 |
+
),
|
295 |
+
$form_id
|
296 |
+
),
|
297 |
+
true
|
298 |
+
);
|
299 |
$total = wp_count_posts( $source );
|
300 |
$total = $total->publish;
|
301 |
$pt = get_post_type_object( $source );
|
304 |
foreach ( $posts as $post ) {
|
305 |
$items[] = $post->post_title;
|
306 |
}
|
307 |
+
} elseif ( 'taxonomy' === $type ) {
|
|
|
308 |
|
309 |
$type_name = __( 'taxonomy', 'wpforms' );
|
310 |
$args = array(
|
311 |
'taxonomy' => $source,
|
312 |
'hide_empty' => false,
|
313 |
);
|
314 |
+
$terms = wpforms_get_hierarchical_object(
|
315 |
+
apply_filters(
|
316 |
+
'wpforms_dynamic_choice_taxonomy_args',
|
317 |
+
$args,
|
318 |
+
array(
|
319 |
+
'id' => $id,
|
320 |
+
),
|
321 |
+
$form_id
|
322 |
+
),
|
323 |
+
true
|
324 |
+
);
|
325 |
$total = wp_count_terms( $source );
|
326 |
$tax = get_taxonomy( $source );
|
327 |
$source_name = $tax->labels->name;
|
331 |
}
|
332 |
}
|
333 |
|
334 |
+
wp_send_json_success(
|
335 |
+
array(
|
336 |
+
'items' => $items,
|
337 |
+
'source' => $source,
|
338 |
+
'source_name' => $source_name,
|
339 |
+
'total' => $total,
|
340 |
+
'type' => $type,
|
341 |
+
'type_name' => $type_name,
|
342 |
+
)
|
343 |
+
);
|
344 |
}
|
345 |
+
|
346 |
add_action( 'wp_ajax_wpforms_builder_dynamic_source', 'wpforms_builder_dynamic_source' );
|
includes/admin/builder/class-builder.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_Builder {
|
12 |
|
13 |
/**
|
@@ -64,7 +64,7 @@ class WPForms_Builder {
|
|
64 |
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
65 |
|
66 |
// Only load if we are actually on the builder
|
67 |
-
if (
|
68 |
|
69 |
// Load form if found
|
70 |
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false;
|
@@ -73,7 +73,7 @@ class WPForms_Builder {
|
|
73 |
// Default view for with an existing form is fields panel
|
74 |
$this->view = isset( $_GET['view'] ) ? $_GET['view'] : 'fields';
|
75 |
} else {
|
76 |
-
//
|
77 |
$this->view = isset( $_GET['view'] ) ? $_GET['view'] : 'setup';
|
78 |
}
|
79 |
|
@@ -93,7 +93,7 @@ class WPForms_Builder {
|
|
93 |
add_action( 'admin_print_footer_scripts', array( $this, 'footer_scripts' ) );
|
94 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
95 |
|
96 |
-
// Provide hook for
|
97 |
do_action( 'wpforms_builder_init', $this->view );
|
98 |
|
99 |
add_filter( 'teeny_mce_plugins', array( $this, 'tinymce_buttons' ) );
|
@@ -104,12 +104,15 @@ class WPForms_Builder {
|
|
104 |
* Define TinyMCE buttons to use with our fancy editor instances.
|
105 |
*
|
106 |
* @since 1.0.3
|
|
|
107 |
* @param array $buttons
|
|
|
108 |
* @return array
|
109 |
*/
|
110 |
public function tinymce_buttons( $buttons ) {
|
111 |
|
112 |
$buttons = array( 'colorpicker', 'lists', 'wordpress', 'wpeditimage', 'wplink' );
|
|
|
113 |
return $buttons;
|
114 |
}
|
115 |
|
@@ -201,80 +204,70 @@ class WPForms_Builder {
|
|
201 |
'serialize-object',
|
202 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.serialize-object.min.js',
|
203 |
array( 'jquery' ),
|
204 |
-
'2.5.0'
|
205 |
-
false
|
206 |
);
|
207 |
|
208 |
wp_enqueue_script(
|
209 |
'tooltipster',
|
210 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.tooltipster.min.js',
|
211 |
array( 'jquery' ),
|
212 |
-
'3.3.0'
|
213 |
-
false
|
214 |
);
|
215 |
|
216 |
wp_enqueue_script(
|
217 |
'jquery-confirm',
|
218 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.jquery-confirm.min.js',
|
219 |
-
array(),
|
220 |
-
'3.2.3'
|
221 |
-
false
|
222 |
);
|
223 |
|
224 |
wp_enqueue_script(
|
225 |
'matchheight',
|
226 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.matchHeight-min.js',
|
227 |
array( 'jquery' ),
|
228 |
-
'0.7.0'
|
229 |
-
false
|
230 |
);
|
231 |
|
232 |
wp_enqueue_script(
|
233 |
'insert-at-caret',
|
234 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.insert-at-caret.min.js',
|
235 |
array( 'jquery' ),
|
236 |
-
'1.1.4'
|
237 |
-
false
|
238 |
);
|
239 |
|
240 |
wp_enqueue_script(
|
241 |
'minicolors',
|
242 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.minicolors.min.js',
|
243 |
array( 'jquery' ),
|
244 |
-
'2.2.6'
|
245 |
-
false
|
246 |
);
|
247 |
|
248 |
wp_enqueue_script(
|
249 |
'conditionals',
|
250 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.conditionals.min.js',
|
251 |
array( 'jquery' ),
|
252 |
-
'1.0.0'
|
253 |
-
false
|
254 |
);
|
255 |
|
256 |
wp_enqueue_script(
|
257 |
'listjs',
|
258 |
WPFORMS_PLUGIN_URL . 'assets/js/list.min.js',
|
259 |
array( 'jquery' ),
|
260 |
-
'1.5.0'
|
261 |
-
false
|
262 |
);
|
263 |
|
264 |
wp_enqueue_script(
|
265 |
'wpforms-utils',
|
266 |
WPFORMS_PLUGIN_URL . 'assets/js/admin-utils.js',
|
267 |
-
array( '
|
268 |
-
WPFORMS_VERSION
|
269 |
-
false
|
270 |
);
|
271 |
|
272 |
wp_enqueue_script(
|
273 |
'wpforms-builder',
|
274 |
WPFORMS_PLUGIN_URL . 'assets/js/admin-builder.js',
|
275 |
-
array( 'jquery', '
|
276 |
-
WPFORMS_VERSION
|
277 |
-
false
|
278 |
);
|
279 |
|
280 |
$strings = array(
|
@@ -287,8 +280,8 @@ class WPForms_Builder {
|
|
287 |
'bulk_add_placeholder' => __( "Blue\nRed\nGreen", 'wpforms '),
|
288 |
'bulk_add_presets_show' => __( 'Show presets', 'wpforms '),
|
289 |
'bulk_add_presets_hide' => __( 'Hide presets', 'wpforms '),
|
290 |
-
'date_select_day' =>
|
291 |
-
'date_select_month' =>
|
292 |
'debug' => wpforms_debug(),
|
293 |
'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' ),
|
294 |
'cancel' => __( 'Cancel', 'wpforms' ),
|
@@ -308,20 +301,23 @@ class WPForms_Builder {
|
|
308 |
'notification_prompt' => __( 'Enter a notification name', 'wpforms' ),
|
309 |
'notification_ph' => __( 'Eg: User Confirmation', 'wpforms' ),
|
310 |
'notification_error' => __( 'You must provide a notification name', 'wpforms' ),
|
311 |
-
'notification_error2' => __( 'Form must contain one notification. To disable all notifications use the
|
|
|
|
|
312 |
'saving' => __( 'Saving ...', 'wpforms' ),
|
313 |
'saved' => __( 'Saved!', 'wpforms' ),
|
314 |
'save_exit' => __( 'Save and Exit', 'wpforms' ),
|
|
|
315 |
'layout_selector_show' => __( 'Show Layouts', 'wpforms' ),
|
316 |
'layout_selector_hide' => __( 'Hide Layouts', 'wpforms' ),
|
317 |
'layout_selector_layout' => __( 'Select your layout', 'wpforms' ),
|
318 |
'layout_selector_column' => __( 'Select your column', 'wpforms' ),
|
319 |
'loading' => __( 'Loading', 'wpforms' ),
|
320 |
-
'template_name' => !empty( $this->template['name'] ) ? $this->template['name'] : '',
|
321 |
-
'template_slug' => !empty( $this->template['slug'] ) ? $this->template['slug'] : '',
|
322 |
-
'template_modal_title' => !empty( $this->template['modal']['title'] ) ? $this->template['modal']['title'] : '',
|
323 |
-
'template_modal_msg' => !empty( $this->template['modal']['message'] ) ? $this->template['modal']['message'] : '',
|
324 |
-
'template_modal_display' => !empty( $this->template['modal_display'] ) ? $this->template['modal_display'] : '',
|
325 |
'template_select' => __( 'Use Template', 'wpforms' ),
|
326 |
'template_confirm' => __( 'Changing templates on an existing form will DELETE existing form fields. Are you sure you want apply the new template?', 'wpforms' ),
|
327 |
'embed_modal' => __( 'You are almost done. To embed this form on your site, please paste the following shortcode inside a post or page.', 'wpforms' ),
|
@@ -332,7 +328,7 @@ class WPForms_Builder {
|
|
332 |
'delete_confirm' => __( 'Are you sure you want to delete this field?', 'wpforms' ),
|
333 |
'duplicate_confirm' => __( 'Are you sure you want to duplicate this field?', 'wpforms' ),
|
334 |
'duplicate_copy' => __( '(copy)', 'wpforms'),
|
335 |
-
'error_title' => __( 'Please enter a form
|
336 |
'error_choice' => __( 'This item must contain at least one choice.', 'wpforms' ),
|
337 |
'off' => __( 'Off', 'wpforms' ),
|
338 |
'on' => __( 'On', 'wpforms' ),
|
@@ -351,7 +347,6 @@ class WPForms_Builder {
|
|
351 |
'rule_create' => __( 'Create new rule', 'wpforms' ),
|
352 |
'rule_create_group' => __( 'Add new group', 'wpforms' ),
|
353 |
'rule_delete' => __( 'Delete rule', 'wpforms' ),
|
354 |
-
'saved_state' => '',
|
355 |
'smart_tags' => wpforms()->smart_tags->get(),
|
356 |
'smart_tags_show' => __( 'Show Smart Tags', 'wpforms' ),
|
357 |
'smart_tags_hide' => __( 'Hide Smart Tags', 'wpforms' ),
|
@@ -361,7 +356,12 @@ class WPForms_Builder {
|
|
361 |
$strings = apply_filters( 'wpforms_builder_strings', $strings, $this->form );
|
362 |
|
363 |
if ( ! empty( $_GET['form_id'] ) ) {
|
364 |
-
$strings['preview_url'] = add_query_arg(
|
|
|
|
|
|
|
|
|
|
|
365 |
$strings['entries_url'] = esc_url_raw( admin_url( 'admin.php?page=wpforms-entries&view=list&form_id=' . intval( $_GET['form_id'] ) ) );
|
366 |
}
|
367 |
|
@@ -371,12 +371,12 @@ class WPForms_Builder {
|
|
371 |
$strings
|
372 |
);
|
373 |
|
374 |
-
// Hook for
|
375 |
do_action( 'wpforms_builder_enqueues', $this->view );
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
-
* Footer
|
380 |
*
|
381 |
* @since 1.3.7
|
382 |
*/
|
@@ -422,7 +422,7 @@ class WPForms_Builder {
|
|
422 |
*/
|
423 |
public function output() {
|
424 |
|
425 |
-
$form_id = $this->form ? absint( $this->form->ID ): '';
|
426 |
$form_data = $this->form ? wpforms_decode( $this->form->post_content ) : false;
|
427 |
?>
|
428 |
<div id="wpforms-builder">
|
@@ -510,4 +510,5 @@ class WPForms_Builder {
|
|
510 |
<?php
|
511 |
}
|
512 |
}
|
|
|
513 |
new WPForms_Builder;
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Builder {
|
12 |
|
13 |
/**
|
64 |
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
65 |
|
66 |
// Only load if we are actually on the builder
|
67 |
+
if ( 'wpforms-builder' === $page ) {
|
68 |
|
69 |
// Load form if found
|
70 |
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false;
|
73 |
// Default view for with an existing form is fields panel
|
74 |
$this->view = isset( $_GET['view'] ) ? $_GET['view'] : 'fields';
|
75 |
} else {
|
76 |
+
// Default view for new field is the setup panel
|
77 |
$this->view = isset( $_GET['view'] ) ? $_GET['view'] : 'setup';
|
78 |
}
|
79 |
|
93 |
add_action( 'admin_print_footer_scripts', array( $this, 'footer_scripts' ) );
|
94 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
95 |
|
96 |
+
// Provide hook for addons
|
97 |
do_action( 'wpforms_builder_init', $this->view );
|
98 |
|
99 |
add_filter( 'teeny_mce_plugins', array( $this, 'tinymce_buttons' ) );
|
104 |
* Define TinyMCE buttons to use with our fancy editor instances.
|
105 |
*
|
106 |
* @since 1.0.3
|
107 |
+
*
|
108 |
* @param array $buttons
|
109 |
+
*
|
110 |
* @return array
|
111 |
*/
|
112 |
public function tinymce_buttons( $buttons ) {
|
113 |
|
114 |
$buttons = array( 'colorpicker', 'lists', 'wordpress', 'wpeditimage', 'wplink' );
|
115 |
+
|
116 |
return $buttons;
|
117 |
}
|
118 |
|
204 |
'serialize-object',
|
205 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.serialize-object.min.js',
|
206 |
array( 'jquery' ),
|
207 |
+
'2.5.0'
|
|
|
208 |
);
|
209 |
|
210 |
wp_enqueue_script(
|
211 |
'tooltipster',
|
212 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.tooltipster.min.js',
|
213 |
array( 'jquery' ),
|
214 |
+
'3.3.0'
|
|
|
215 |
);
|
216 |
|
217 |
wp_enqueue_script(
|
218 |
'jquery-confirm',
|
219 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.jquery-confirm.min.js',
|
220 |
+
array( 'jquery' ),
|
221 |
+
'3.2.3'
|
|
|
222 |
);
|
223 |
|
224 |
wp_enqueue_script(
|
225 |
'matchheight',
|
226 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.matchHeight-min.js',
|
227 |
array( 'jquery' ),
|
228 |
+
'0.7.0'
|
|
|
229 |
);
|
230 |
|
231 |
wp_enqueue_script(
|
232 |
'insert-at-caret',
|
233 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.insert-at-caret.min.js',
|
234 |
array( 'jquery' ),
|
235 |
+
'1.1.4'
|
|
|
236 |
);
|
237 |
|
238 |
wp_enqueue_script(
|
239 |
'minicolors',
|
240 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.minicolors.min.js',
|
241 |
array( 'jquery' ),
|
242 |
+
'2.2.6'
|
|
|
243 |
);
|
244 |
|
245 |
wp_enqueue_script(
|
246 |
'conditionals',
|
247 |
WPFORMS_PLUGIN_URL . 'assets/js/jquery.conditionals.min.js',
|
248 |
array( 'jquery' ),
|
249 |
+
'1.0.0'
|
|
|
250 |
);
|
251 |
|
252 |
wp_enqueue_script(
|
253 |
'listjs',
|
254 |
WPFORMS_PLUGIN_URL . 'assets/js/list.min.js',
|
255 |
array( 'jquery' ),
|
256 |
+
'1.5.0'
|
|
|
257 |
);
|
258 |
|
259 |
wp_enqueue_script(
|
260 |
'wpforms-utils',
|
261 |
WPFORMS_PLUGIN_URL . 'assets/js/admin-utils.js',
|
262 |
+
array( 'serialize-object' ),
|
263 |
+
WPFORMS_VERSION
|
|
|
264 |
);
|
265 |
|
266 |
wp_enqueue_script(
|
267 |
'wpforms-builder',
|
268 |
WPFORMS_PLUGIN_URL . 'assets/js/admin-builder.js',
|
269 |
+
array( 'wpforms-utils', 'jquery-ui-sortable', 'jquery-ui-draggable', 'tooltipster', 'jquery-confirm' ),
|
270 |
+
WPFORMS_VERSION
|
|
|
271 |
);
|
272 |
|
273 |
$strings = array(
|
280 |
'bulk_add_placeholder' => __( "Blue\nRed\nGreen", 'wpforms '),
|
281 |
'bulk_add_presets_show' => __( 'Show presets', 'wpforms '),
|
282 |
'bulk_add_presets_hide' => __( 'Hide presets', 'wpforms '),
|
283 |
+
'date_select_day' => 'DD',
|
284 |
+
'date_select_month' => 'MM',
|
285 |
'debug' => wpforms_debug(),
|
286 |
'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' ),
|
287 |
'cancel' => __( 'Cancel', 'wpforms' ),
|
301 |
'notification_prompt' => __( 'Enter a notification name', 'wpforms' ),
|
302 |
'notification_ph' => __( 'Eg: User Confirmation', 'wpforms' ),
|
303 |
'notification_error' => __( 'You must provide a notification name', 'wpforms' ),
|
304 |
+
'notification_error2' => __( 'Form must contain one notification. To disable all notifications use the Notifications dropdown setting.', 'wpforms' ),
|
305 |
+
'notification_def_name' => __( 'Default Notification', 'wpforms' ),
|
306 |
+
'save' => __( 'Save', 'wpforms' ),
|
307 |
'saving' => __( 'Saving ...', 'wpforms' ),
|
308 |
'saved' => __( 'Saved!', 'wpforms' ),
|
309 |
'save_exit' => __( 'Save and Exit', 'wpforms' ),
|
310 |
+
'saved_state' => '',
|
311 |
'layout_selector_show' => __( 'Show Layouts', 'wpforms' ),
|
312 |
'layout_selector_hide' => __( 'Hide Layouts', 'wpforms' ),
|
313 |
'layout_selector_layout' => __( 'Select your layout', 'wpforms' ),
|
314 |
'layout_selector_column' => __( 'Select your column', 'wpforms' ),
|
315 |
'loading' => __( 'Loading', 'wpforms' ),
|
316 |
+
'template_name' => ! empty( $this->template['name'] ) ? $this->template['name'] : '',
|
317 |
+
'template_slug' => ! empty( $this->template['slug'] ) ? $this->template['slug'] : '',
|
318 |
+
'template_modal_title' => ! empty( $this->template['modal']['title'] ) ? $this->template['modal']['title'] : '',
|
319 |
+
'template_modal_msg' => ! empty( $this->template['modal']['message'] ) ? $this->template['modal']['message'] : '',
|
320 |
+
'template_modal_display' => ! empty( $this->template['modal_display'] ) ? $this->template['modal_display'] : '',
|
321 |
'template_select' => __( 'Use Template', 'wpforms' ),
|
322 |
'template_confirm' => __( 'Changing templates on an existing form will DELETE existing form fields. Are you sure you want apply the new template?', 'wpforms' ),
|
323 |
'embed_modal' => __( 'You are almost done. To embed this form on your site, please paste the following shortcode inside a post or page.', 'wpforms' ),
|
328 |
'delete_confirm' => __( 'Are you sure you want to delete this field?', 'wpforms' ),
|
329 |
'duplicate_confirm' => __( 'Are you sure you want to duplicate this field?', 'wpforms' ),
|
330 |
'duplicate_copy' => __( '(copy)', 'wpforms'),
|
331 |
+
'error_title' => __( 'Please enter a form name.', 'wpforms' ),
|
332 |
'error_choice' => __( 'This item must contain at least one choice.', 'wpforms' ),
|
333 |
'off' => __( 'Off', 'wpforms' ),
|
334 |
'on' => __( 'On', 'wpforms' ),
|
347 |
'rule_create' => __( 'Create new rule', 'wpforms' ),
|
348 |
'rule_create_group' => __( 'Add new group', 'wpforms' ),
|
349 |
'rule_delete' => __( 'Delete rule', 'wpforms' ),
|
|
|
350 |
'smart_tags' => wpforms()->smart_tags->get(),
|
351 |
'smart_tags_show' => __( 'Show Smart Tags', 'wpforms' ),
|
352 |
'smart_tags_hide' => __( 'Hide Smart Tags', 'wpforms' ),
|
356 |
$strings = apply_filters( 'wpforms_builder_strings', $strings, $this->form );
|
357 |
|
358 |
if ( ! empty( $_GET['form_id'] ) ) {
|
359 |
+
$strings['preview_url'] = add_query_arg(
|
360 |
+
array(
|
361 |
+
'new_window' => 1,
|
362 |
+
),
|
363 |
+
wpforms()->preview->form_preview_url( $_GET['form_id'] )
|
364 |
+
);
|
365 |
$strings['entries_url'] = esc_url_raw( admin_url( 'admin.php?page=wpforms-entries&view=list&form_id=' . intval( $_GET['form_id'] ) ) );
|
366 |
}
|
367 |
|
371 |
$strings
|
372 |
);
|
373 |
|
374 |
+
// Hook for addons
|
375 |
do_action( 'wpforms_builder_enqueues', $this->view );
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
+
* Footer JavaScript.
|
380 |
*
|
381 |
* @since 1.3.7
|
382 |
*/
|
422 |
*/
|
423 |
public function output() {
|
424 |
|
425 |
+
$form_id = $this->form ? absint( $this->form->ID ) : '';
|
426 |
$form_data = $this->form ? wpforms_decode( $this->form->post_content ) : false;
|
427 |
?>
|
428 |
<div id="wpforms-builder">
|
510 |
<?php
|
511 |
}
|
512 |
}
|
513 |
+
|
514 |
new WPForms_Builder;
|
includes/admin/builder/functions.php
CHANGED
@@ -13,46 +13,51 @@
|
|
13 |
* Outputs fields to be used on panels (settings etc).
|
14 |
*
|
15 |
* @since 1.0.0
|
|
|
16 |
* @param string $option
|
17 |
* @param string $panel
|
18 |
* @param string $field
|
|
|
19 |
* @param string $label
|
20 |
* @param array $args
|
21 |
* @param boolean $echo
|
|
|
|
|
22 |
*/
|
23 |
function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args = array(), $echo = true ) {
|
24 |
|
25 |
// Required params
|
26 |
-
if ( empty( $option ) || empty( $panel ) || empty( $field )
|
27 |
-
return;
|
28 |
}
|
29 |
|
30 |
// Setup basic vars
|
31 |
$panel = esc_attr( $panel );
|
32 |
$field = esc_attr( $field );
|
33 |
$panel_id = sanitize_html_class( $panel );
|
34 |
-
$parent = !empty( $args['parent'] ) ? esc_attr( $args['parent'] ) : '';
|
35 |
-
$subsection = !empty( $args['subsection'] ) ? esc_attr( $args['subsection'] ) : '';
|
36 |
-
$label = !empty( $label ) ? esc_html( $label ) : '';
|
37 |
-
$class = !empty( $args['class'] ) ? esc_attr( $args['class'] ) : '';
|
38 |
-
$input_class = !empty( $args['input_class'] ) ? esc_attr( $args['input_class'] ) : '';
|
39 |
$default = isset( $args['default'] ) ? $args['default'] : '';
|
40 |
-
$placeholder = !empty( $args['placeholder'] ) ? esc_attr( $args['placeholder'] ) : '';
|
41 |
$data_attr = '';
|
|
|
42 |
|
43 |
// Check if we should store values in a parent array
|
44 |
-
if ( !empty( $parent ) ) {
|
45 |
-
if ( !empty( $subsection ) ) {
|
46 |
-
$field_name
|
47 |
-
$value
|
48 |
-
$panel_id
|
49 |
} else {
|
50 |
$field_name = sprintf( '%s[%s][%s]', $parent, $panel, $field );
|
51 |
-
$value = isset( $form_data[$parent][$panel][$field] )
|
52 |
}
|
53 |
} else {
|
54 |
$field_name = sprintf( '%s[%s]', $panel, $field );
|
55 |
-
$value = isset( $form_data[$panel][$field] ) ? $form_data[$panel][$field] : $default;
|
56 |
}
|
57 |
|
58 |
// Check for data attributes
|
@@ -70,7 +75,7 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
70 |
|
71 |
// Text input
|
72 |
case 'text':
|
73 |
-
$type = !empty( $args['type'] ) ? esc_attr( $args['type'] ) : 'text';
|
74 |
$output = sprintf(
|
75 |
'<input type="%s" id="wpforms-panel-field-%s-%s" name="%s" value="%s" placeholder="%s" class="%s" %s>',
|
76 |
$type,
|
@@ -86,7 +91,7 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
86 |
|
87 |
// Textarea
|
88 |
case 'textarea':
|
89 |
-
$rows = !empty( $args['rows'] ) ? (int) $args['rows'] : '3';
|
90 |
$output = sprintf(
|
91 |
'<textarea id="wpforms-panel-field-%s-%s" name="%s" rows="%d" placeholder="%s" class="%s" %s>%s</textarea>',
|
92 |
sanitize_html_class( $panel_id ),
|
@@ -102,16 +107,16 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
102 |
|
103 |
// TinyMCE
|
104 |
case 'tinymce':
|
105 |
-
$args
|
106 |
'media_buttons' => false,
|
107 |
-
'teeny'
|
108 |
) );
|
109 |
$args['textarea_name'] = $field_name;
|
110 |
-
$args['teeny']
|
111 |
-
$id
|
112 |
-
$id
|
113 |
ob_start();
|
114 |
-
wp_editor( $value, $id
|
115 |
$output = ob_get_clean();
|
116 |
break;
|
117 |
|
@@ -127,14 +132,14 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
127 |
$checked,
|
128 |
$data_attr
|
129 |
);
|
130 |
-
$output
|
131 |
'<label for="wpforms-panel-field-%s-%s" class="inline">%s',
|
132 |
sanitize_html_class( $panel_id ),
|
133 |
sanitize_html_class( $field ),
|
134 |
$label
|
135 |
);
|
136 |
-
if ( !empty( $args['tooltip'] ) ) {
|
137 |
-
$output .=
|
138 |
}
|
139 |
$output .= '</label>';
|
140 |
break;
|
@@ -149,7 +154,7 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
149 |
continue;
|
150 |
}
|
151 |
$checked = checked( $key, $value, false );
|
152 |
-
$output
|
153 |
'<span class="row"><input type="radio" id="wpforms-panel-field-%s-%s-%d" name="%s" value="%s" class="%s" %s %s>',
|
154 |
sanitize_html_class( $panel_id ),
|
155 |
sanitize_html_class( $field ),
|
@@ -160,45 +165,46 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
160 |
$checked,
|
161 |
$data_attr
|
162 |
);
|
163 |
-
$output
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
$output .= '</label></span>';
|
174 |
-
$x++;
|
175 |
}
|
176 |
break;
|
177 |
|
178 |
// Select
|
179 |
case 'select':
|
180 |
if ( empty( $args['options'] ) && empty( $args['field_map'] ) ) {
|
181 |
-
return;
|
182 |
}
|
183 |
|
184 |
-
if ( !empty( $args['field_map'] ) ) {
|
185 |
-
$options
|
186 |
-
$available_fields = wpforms_get_form_fields( $form_data, $args['field_map']
|
187 |
-
if ( !empty( $available_fields ) ) {
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
192 |
$input_class .= ' wpforms-field-map-select';
|
193 |
$data_attr .= ' data-field-map-allowed="' . implode( ' ', $args['field_map'] ) . '"';
|
194 |
-
if ( !empty( $placeholder ) ) {
|
195 |
$data_attr .= ' data-field-map-placeholder="' . esc_attr( $placeholder ) . '"';
|
196 |
}
|
197 |
} else {
|
198 |
$options = $args['options'];
|
199 |
}
|
200 |
|
201 |
-
$output
|
202 |
'<select id="wpforms-panel-field-%s-%s" name="%s" class="%s" %s>',
|
203 |
sanitize_html_class( $panel_id ),
|
204 |
sanitize_html_class( $field ),
|
@@ -207,13 +213,13 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
207 |
$data_attr
|
208 |
);
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
|
218 |
$output .= '</select>';
|
219 |
break;
|
@@ -227,34 +233,34 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
227 |
$class,
|
228 |
'wpforms-panel-field-' . sanitize_html_class( $option )
|
229 |
);
|
230 |
-
$field_open .= !empty( $args['before'] ) ? $args['before'] : '';
|
231 |
-
if ( !in_array( $option, array( 'checkbox' ) ) && !empty( $label ) ) {
|
232 |
$field_label = sprintf(
|
233 |
'<label for="wpforms-panel-field-%s-%s">%s',
|
234 |
sanitize_html_class( $panel_id ),
|
235 |
sanitize_html_class( $field ),
|
236 |
$label
|
237 |
);
|
238 |
-
if ( !empty( $args['tooltip'] ) ) {
|
239 |
-
$field_label .=
|
240 |
}
|
241 |
-
if ( !empty( $args['after_tooltip'] ) ) {
|
242 |
$field_label .= $args['after_tooltip'];
|
243 |
}
|
244 |
-
if ( !empty( $args['smarttags'] ) ) {
|
245 |
|
246 |
-
$type = !empty( $args['smarttags']['type'] ) ? esc_attr( $args['smarttags']['type'] ) : 'fields';
|
247 |
-
$fields = !empty( $args['smarttags']['fields'] ) ? esc_attr( $args['smarttags']['fields'] ) : '';
|
248 |
|
249 |
-
$field_label .='<a href="#" class="toggle-smart-tag-display" data-type="' . $type . '" data-fields="' . $fields . '"><i class="fa fa-tags"></i> <span>' . __( 'Show Smart Tags', 'wpforms' ) . '</span></a>';
|
250 |
}
|
251 |
$field_label .= '</label>';
|
252 |
} else {
|
253 |
$field_label = '';
|
254 |
}
|
255 |
-
$field_close = !empty( $args['after'] ) ? $args['after'] : '';
|
256 |
$field_close .= '</div>';
|
257 |
-
$output
|
258 |
|
259 |
// Wash our hands.
|
260 |
if ( $echo ) {
|
@@ -263,3 +269,31 @@ function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args
|
|
263 |
return $output;
|
264 |
}
|
265 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
* Outputs fields to be used on panels (settings etc).
|
14 |
*
|
15 |
* @since 1.0.0
|
16 |
+
*
|
17 |
* @param string $option
|
18 |
* @param string $panel
|
19 |
* @param string $field
|
20 |
+
* @param array $form_data
|
21 |
* @param string $label
|
22 |
* @param array $args
|
23 |
* @param boolean $echo
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
*/
|
27 |
function wpforms_panel_field( $option, $panel, $field, $form_data, $label, $args = array(), $echo = true ) {
|
28 |
|
29 |
// Required params
|
30 |
+
if ( empty( $option ) || empty( $panel ) || empty( $field ) ) {
|
31 |
+
return '';
|
32 |
}
|
33 |
|
34 |
// Setup basic vars
|
35 |
$panel = esc_attr( $panel );
|
36 |
$field = esc_attr( $field );
|
37 |
$panel_id = sanitize_html_class( $panel );
|
38 |
+
$parent = ! empty( $args['parent'] ) ? esc_attr( $args['parent'] ) : '';
|
39 |
+
$subsection = ! empty( $args['subsection'] ) ? esc_attr( $args['subsection'] ) : '';
|
40 |
+
$label = ! empty( $label ) ? esc_html( $label ) : '';
|
41 |
+
$class = ! empty( $args['class'] ) ? esc_attr( $args['class'] ) : '';
|
42 |
+
$input_class = ! empty( $args['input_class'] ) ? esc_attr( $args['input_class'] ) : '';
|
43 |
$default = isset( $args['default'] ) ? $args['default'] : '';
|
44 |
+
$placeholder = ! empty( $args['placeholder'] ) ? esc_attr( $args['placeholder'] ) : '';
|
45 |
$data_attr = '';
|
46 |
+
$output = '';
|
47 |
|
48 |
// Check if we should store values in a parent array
|
49 |
+
if ( ! empty( $parent ) ) {
|
50 |
+
if ( ! empty( $subsection ) ) {
|
51 |
+
$field_name = sprintf( '%s[%s][%s][%s]', $parent, $panel, $subsection, $field );
|
52 |
+
$value = isset( $form_data[ $parent ][ $panel ][ $subsection ][ $field ] ) ? $form_data[ $parent ][ $panel ][ $subsection ][ $field ] : $default;
|
53 |
+
$panel_id = sanitize_html_class( $panel . '-' . $subsection );
|
54 |
} else {
|
55 |
$field_name = sprintf( '%s[%s][%s]', $parent, $panel, $field );
|
56 |
+
$value = isset( $form_data[ $parent ][ $panel ][ $field ] ) ? $form_data[ $parent ][ $panel ][ $field ] : $default;
|
57 |
}
|
58 |
} else {
|
59 |
$field_name = sprintf( '%s[%s]', $panel, $field );
|
60 |
+
$value = isset( $form_data[ $panel ][ $field ] ) ? $form_data[ $panel ][ $field ] : $default;
|
61 |
}
|
62 |
|
63 |
// Check for data attributes
|
75 |
|
76 |
// Text input
|
77 |
case 'text':
|
78 |
+
$type = ! empty( $args['type'] ) ? esc_attr( $args['type'] ) : 'text';
|
79 |
$output = sprintf(
|
80 |
'<input type="%s" id="wpforms-panel-field-%s-%s" name="%s" value="%s" placeholder="%s" class="%s" %s>',
|
81 |
$type,
|
91 |
|
92 |
// Textarea
|
93 |
case 'textarea':
|
94 |
+
$rows = ! empty( $args['rows'] ) ? (int) $args['rows'] : '3';
|
95 |
$output = sprintf(
|
96 |
'<textarea id="wpforms-panel-field-%s-%s" name="%s" rows="%d" placeholder="%s" class="%s" %s>%s</textarea>',
|
97 |
sanitize_html_class( $panel_id ),
|
107 |
|
108 |
// TinyMCE
|
109 |
case 'tinymce':
|
110 |
+
$args = wp_parse_args( $args['tinymce'], array(
|
111 |
'media_buttons' => false,
|
112 |
+
'teeny' => true,
|
113 |
) );
|
114 |
$args['textarea_name'] = $field_name;
|
115 |
+
$args['teeny'] = true;
|
116 |
+
$id = 'wpforms-panel-field-' . sanitize_html_class( $panel_id ) . '-' . sanitize_html_class( $field );
|
117 |
+
$id = str_replace( '-', '_', $id );
|
118 |
ob_start();
|
119 |
+
wp_editor( $value, $id, $args );
|
120 |
$output = ob_get_clean();
|
121 |
break;
|
122 |
|
132 |
$checked,
|
133 |
$data_attr
|
134 |
);
|
135 |
+
$output .= sprintf(
|
136 |
'<label for="wpforms-panel-field-%s-%s" class="inline">%s',
|
137 |
sanitize_html_class( $panel_id ),
|
138 |
sanitize_html_class( $field ),
|
139 |
$label
|
140 |
);
|
141 |
+
if ( ! empty( $args['tooltip'] ) ) {
|
142 |
+
$output .= sprintf( ' <i class="fa fa-question-circle wpforms-help-tooltip" title="%s"></i>', esc_attr( $args['tooltip'] ) );
|
143 |
}
|
144 |
$output .= '</label>';
|
145 |
break;
|
154 |
continue;
|
155 |
}
|
156 |
$checked = checked( $key, $value, false );
|
157 |
+
$output .= sprintf(
|
158 |
'<span class="row"><input type="radio" id="wpforms-panel-field-%s-%s-%d" name="%s" value="%s" class="%s" %s %s>',
|
159 |
sanitize_html_class( $panel_id ),
|
160 |
sanitize_html_class( $field ),
|
165 |
$checked,
|
166 |
$data_attr
|
167 |
);
|
168 |
+
$output .= sprintf(
|
169 |
+
'<label for="wpforms-panel-field-%s-%s-%d" class="inline">%s',
|
170 |
+
sanitize_html_class( $panel_id ),
|
171 |
+
sanitize_html_class( $field ),
|
172 |
+
$x,
|
173 |
+
$item['label']
|
174 |
+
);
|
175 |
+
if ( ! empty( $item['tooltip'] ) ) {
|
176 |
+
$output .= sprintf( ' <i class="fa fa-question-circle wpforms-help-tooltip" title="%s"></i>', esc_attr( $item['tooltip'] ) );
|
177 |
+
}
|
178 |
$output .= '</label></span>';
|
179 |
+
$x ++;
|
180 |
}
|
181 |
break;
|
182 |
|
183 |
// Select
|
184 |
case 'select':
|
185 |
if ( empty( $args['options'] ) && empty( $args['field_map'] ) ) {
|
186 |
+
return '';
|
187 |
}
|
188 |
|
189 |
+
if ( ! empty( $args['field_map'] ) ) {
|
190 |
+
$options = array();
|
191 |
+
$available_fields = wpforms_get_form_fields( $form_data, $args['field_map'] );
|
192 |
+
if ( ! empty( $available_fields ) ) {
|
193 |
+
foreach ( $available_fields as $id => $available_field ) {
|
194 |
+
$lbl = ! empty( $available_field['label'] ) ? esc_attr( $available_field['label'] ) : __( 'Field #' ) . $id;
|
195 |
+
$options[ $id ] = $lbl;
|
196 |
+
}
|
197 |
+
}
|
198 |
$input_class .= ' wpforms-field-map-select';
|
199 |
$data_attr .= ' data-field-map-allowed="' . implode( ' ', $args['field_map'] ) . '"';
|
200 |
+
if ( ! empty( $placeholder ) ) {
|
201 |
$data_attr .= ' data-field-map-placeholder="' . esc_attr( $placeholder ) . '"';
|
202 |
}
|
203 |
} else {
|
204 |
$options = $args['options'];
|
205 |
}
|
206 |
|
207 |
+
$output = sprintf(
|
208 |
'<select id="wpforms-panel-field-%s-%s" name="%s" class="%s" %s>',
|
209 |
sanitize_html_class( $panel_id ),
|
210 |
sanitize_html_class( $field ),
|
213 |
$data_attr
|
214 |
);
|
215 |
|
216 |
+
if ( ! empty( $placeholder ) ) {
|
217 |
+
$output .= '<option value="">' . $placeholder . '</option>';
|
218 |
+
}
|
219 |
|
220 |
+
foreach ( $options as $key => $item ) {
|
221 |
+
$output .= sprintf( '<option value="%s" %s>%s</option>', esc_attr( $key ), selected( $key, $value, false ), $item );
|
222 |
+
}
|
223 |
|
224 |
$output .= '</select>';
|
225 |
break;
|
233 |
$class,
|
234 |
'wpforms-panel-field-' . sanitize_html_class( $option )
|
235 |
);
|
236 |
+
$field_open .= ! empty( $args['before'] ) ? $args['before'] : '';
|
237 |
+
if ( ! in_array( $option, array( 'checkbox' ), true ) && ! empty( $label ) ) {
|
238 |
$field_label = sprintf(
|
239 |
'<label for="wpforms-panel-field-%s-%s">%s',
|
240 |
sanitize_html_class( $panel_id ),
|
241 |
sanitize_html_class( $field ),
|
242 |
$label
|
243 |
);
|
244 |
+
if ( ! empty( $args['tooltip'] ) ) {
|
245 |
+
$field_label .= sprintf( ' <i class="fa fa-question-circle wpforms-help-tooltip" title="%s"></i>', esc_attr( $args['tooltip'] ) );
|
246 |
}
|
247 |
+
if ( ! empty( $args['after_tooltip'] ) ) {
|
248 |
$field_label .= $args['after_tooltip'];
|
249 |
}
|
250 |
+
if ( ! empty( $args['smarttags'] ) ) {
|
251 |
|
252 |
+
$type = ! empty( $args['smarttags']['type'] ) ? esc_attr( $args['smarttags']['type'] ) : 'fields';
|
253 |
+
$fields = ! empty( $args['smarttags']['fields'] ) ? esc_attr( $args['smarttags']['fields'] ) : '';
|
254 |
|
255 |
+
$field_label .= '<a href="#" class="toggle-smart-tag-display" data-type="' . $type . '" data-fields="' . $fields . '"><i class="fa fa-tags"></i> <span>' . __( 'Show Smart Tags', 'wpforms' ) . '</span></a>';
|
256 |
}
|
257 |
$field_label .= '</label>';
|
258 |
} else {
|
259 |
$field_label = '';
|
260 |
}
|
261 |
+
$field_close = ! empty( $args['after'] ) ? $args['after'] : '';
|
262 |
$field_close .= '</div>';
|
263 |
+
$output = $field_open . $field_label . $output . $field_close;
|
264 |
|
265 |
// Wash our hands.
|
266 |
if ( $echo ) {
|
269 |
return $output;
|
270 |
}
|
271 |
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Get notification state, whether it's opened or closed.
|
275 |
+
*
|
276 |
+
* @since 1.4.1
|
277 |
+
*
|
278 |
+
* @param int $form_id
|
279 |
+
* @param int $notification_id
|
280 |
+
*
|
281 |
+
* @return string
|
282 |
+
*/
|
283 |
+
function wpforms_builder_notification_get_state( $form_id, $notification_id ) {
|
284 |
+
|
285 |
+
$form_id = absint( $form_id );
|
286 |
+
$notification_id = absint( $notification_id );
|
287 |
+
$state = 'opened';
|
288 |
+
|
289 |
+
$all_states = get_user_meta( get_current_user_id(), 'wpforms_builder_notification_states', true );
|
290 |
+
|
291 |
+
if (
|
292 |
+
! empty( $all_states[ $form_id ][ $notification_id ] ) &&
|
293 |
+
'closed' === $all_states[ $form_id ][ $notification_id ]
|
294 |
+
) {
|
295 |
+
$state = 'closed';
|
296 |
+
}
|
297 |
+
|
298 |
+
return apply_filters( 'wpforms_builder_notification_get_state', $state, $form_id, $notification_id );
|
299 |
+
}
|
includes/admin/builder/panels/class-providers.php
CHANGED
@@ -86,10 +86,10 @@ class WPForms_Builder_Panel_Providers extends WPForms_Builder_Panel {
|
|
86 |
*/
|
87 |
public function panel_content() {
|
88 |
|
89 |
-
// An array of all the active provider
|
90 |
$providers_active = apply_filters( 'wpforms_providers_available', array() );
|
91 |
|
92 |
-
if (
|
93 |
|
94 |
// Check if there is a form created. When no form has been created
|
95 |
// yet let the user know we need a form to setup a provider.
|
@@ -97,25 +97,28 @@ class WPForms_Builder_Panel_Providers extends WPForms_Builder_Panel {
|
|
97 |
_e( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage these settings.', 'wpforms' );
|
98 |
echo '</div>';
|
99 |
return;
|
100 |
-
}
|
101 |
|
102 |
-
|
|
|
|
|
103 |
// activated let the user know they need to install/activate an
|
104 |
-
//
|
105 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-info">';
|
106 |
echo '<h5>' . __( 'Install Your Marketing Integration', 'wpforms' ) . '</h5>';
|
107 |
-
echo '<p>' . sprintf( __( 'It seems you do not have any marketing
|
108 |
echo '</div>';
|
109 |
-
}
|
110 |
|
111 |
-
// Everything is good - display default instructions
|
112 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">';
|
113 |
echo '<h5>' . __( 'Select Your Marketing Integration', 'wpforms' ) . '</h5>';
|
114 |
-
echo '<p>' . __( 'Select your email marketing service provider or CRM from the options on the left. If you don\'t see your email marketing service listed, then let us know and we\'ll do our best to get it added as fast as possible', 'wpforms' ) . '</p>';
|
115 |
echo '</div>';
|
116 |
}
|
117 |
|
118 |
do_action( 'wpforms_providers_panel_content', $this->form );
|
119 |
}
|
120 |
}
|
|
|
121 |
new WPForms_Builder_Panel_Providers;
|
86 |
*/
|
87 |
public function panel_content() {
|
88 |
|
89 |
+
// An array of all the active provider addons
|
90 |
$providers_active = apply_filters( 'wpforms_providers_available', array() );
|
91 |
|
92 |
+
if ( ! $this->form ) {
|
93 |
|
94 |
// Check if there is a form created. When no form has been created
|
95 |
// yet let the user know we need a form to setup a provider.
|
97 |
_e( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage these settings.', 'wpforms' );
|
98 |
echo '</div>';
|
99 |
return;
|
100 |
+
}
|
101 |
|
102 |
+
if ( empty( $providers_active ) ) {
|
103 |
+
|
104 |
+
// Check for active provider addons. When no provider addons are
|
105 |
// activated let the user know they need to install/activate an
|
106 |
+
// addon to setup a provider.
|
107 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-info">';
|
108 |
echo '<h5>' . __( 'Install Your Marketing Integration', 'wpforms' ) . '</h5>';
|
109 |
+
echo '<p>' . sprintf( __( 'It seems you do not have any marketing addons activated. You can head over to the <a href="%s">Addons page</a> to install and activate the addon for your provider.', 'wpforms' ), admin_url( 'admin.php?page=wpforms-addons' ) ) . '</p>';
|
110 |
echo '</div>';
|
111 |
+
} else {
|
112 |
|
113 |
+
// Everything is good - display default instructions.
|
114 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">';
|
115 |
echo '<h5>' . __( 'Select Your Marketing Integration', 'wpforms' ) . '</h5>';
|
116 |
+
echo '<p>' . __( 'Select your email marketing service provider or CRM from the options on the left. If you don\'t see your email marketing service listed, then let us know and we\'ll do our best to get it added as fast as possible.', 'wpforms' ) . '</p>';
|
117 |
echo '</div>';
|
118 |
}
|
119 |
|
120 |
do_action( 'wpforms_providers_panel_content', $this->form );
|
121 |
}
|
122 |
}
|
123 |
+
|
124 |
new WPForms_Builder_Panel_Providers;
|
includes/admin/builder/panels/class-settings.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_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
12 |
|
13 |
/**
|
@@ -49,7 +49,7 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
49 |
public function panel_sidebar() {
|
50 |
|
51 |
// Sidebar contents are not valid unless we have a form
|
52 |
-
if (
|
53 |
return;
|
54 |
}
|
55 |
|
@@ -59,7 +59,7 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
59 |
'confirmation' => __( 'Confirmation', 'wpforms' ),
|
60 |
);
|
61 |
$sections = apply_filters( 'wpforms_builder_settings_sections', $sections, $this->form_data );
|
62 |
-
foreach( $sections as $slug => $section ) {
|
63 |
$this->panel_sidebar_section( $section, $slug );
|
64 |
}
|
65 |
}
|
@@ -72,16 +72,16 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
72 |
public function panel_content() {
|
73 |
|
74 |
// Check if there is a form created
|
75 |
-
if (
|
76 |
echo '<div class="wpforms-alert wpforms-alert-info">';
|
77 |
_e( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage the settings.', 'wpforms' );
|
78 |
echo '</div>';
|
79 |
return;
|
80 |
}
|
81 |
|
82 |
-
|
83 |
// General
|
84 |
-
|
85 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-general">';
|
86 |
echo '<div class="wpforms-panel-content-section-title">';
|
87 |
_e( 'General', 'wpforms' );
|
@@ -91,8 +91,10 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
91 |
'settings',
|
92 |
'form_title',
|
93 |
$this->form_data,
|
94 |
-
__( 'Form
|
95 |
-
array(
|
|
|
|
|
96 |
);
|
97 |
wpforms_panel_field(
|
98 |
'textarea',
|
@@ -106,7 +108,7 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
106 |
'settings',
|
107 |
'hide_title_desc',
|
108 |
$this->form_data,
|
109 |
-
__( 'Hide form
|
110 |
);
|
111 |
wpforms_panel_field(
|
112 |
'text',
|
@@ -114,7 +116,9 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
114 |
'form_class',
|
115 |
$this->form_data,
|
116 |
__( 'Form CSS Class', 'wpforms' ),
|
117 |
-
array(
|
|
|
|
|
118 |
);
|
119 |
wpforms_panel_field(
|
120 |
'text',
|
@@ -122,7 +126,9 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
122 |
'submit_text',
|
123 |
$this->form_data,
|
124 |
__( 'Submit Button Text', 'wpforms' ),
|
125 |
-
array(
|
|
|
|
|
126 |
);
|
127 |
wpforms_panel_field(
|
128 |
'text',
|
@@ -130,7 +136,9 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
130 |
'submit_text_processing',
|
131 |
$this->form_data,
|
132 |
__( 'Submit Button Processing Text', 'wpforms' ),
|
133 |
-
array(
|
|
|
|
|
134 |
);
|
135 |
wpforms_panel_field(
|
136 |
'text',
|
@@ -138,7 +146,9 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
138 |
'submit_class',
|
139 |
$this->form_data,
|
140 |
__( 'Submit Button CSS Class', 'wpforms' ),
|
141 |
-
array(
|
|
|
|
|
142 |
);
|
143 |
wpforms_panel_field(
|
144 |
'checkbox',
|
@@ -150,28 +160,28 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
150 |
$recaptcha_key = wpforms_setting( 'recaptcha-site-key' );
|
151 |
$recaptcha_secret = wpforms_setting( 'recaptcha-secret-key' );
|
152 |
$recaptcha_type = wpforms_setting( 'recaptcha-type' );
|
153 |
-
if ( !empty( $recaptcha_key ) && !empty( $recaptcha_secret ) ) {
|
154 |
wpforms_panel_field(
|
155 |
'checkbox',
|
156 |
'settings',
|
157 |
'recaptcha',
|
158 |
$this->form_data,
|
159 |
-
|
160 |
);
|
161 |
}
|
162 |
do_action( 'wpforms_form_settings_general', $this );
|
163 |
echo '</div>';
|
164 |
|
165 |
-
|
166 |
// Notifications
|
167 |
-
|
168 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-notifications">';
|
169 |
do_action( 'wpforms_form_settings_notifications', $this );
|
170 |
echo '</div>';
|
171 |
|
172 |
-
|
173 |
// Confirmation
|
174 |
-
|
175 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-confirmation">';
|
176 |
echo '<div class="wpforms-panel-content-section-title">';
|
177 |
_e( 'Confirmation', 'wpforms' );
|
@@ -200,8 +210,8 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
200 |
array(
|
201 |
'default' => __( 'Thanks for contacting us! We will be in touch with you shortly.', 'wpforms' ),
|
202 |
'tinymce' => array(
|
203 |
-
'editor_height' => '200'
|
204 |
-
)
|
205 |
)
|
206 |
);
|
207 |
wpforms_panel_field(
|
@@ -213,9 +223,9 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
213 |
);
|
214 |
$p = array();
|
215 |
$pages = get_pages();
|
216 |
-
foreach( $pages as $page ) {
|
217 |
-
$depth
|
218 |
-
$p[$page->ID] = str_repeat( '-', $depth ) . ' ' . $page->post_title;
|
219 |
}
|
220 |
wpforms_panel_field(
|
221 |
'select',
|
@@ -223,7 +233,9 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
223 |
'confirmation_page',
|
224 |
$this->form_data,
|
225 |
__( 'Confirmation Page', 'wpforms' ),
|
226 |
-
array(
|
|
|
|
|
227 |
);
|
228 |
wpforms_panel_field(
|
229 |
'text',
|
@@ -238,4 +250,5 @@ class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
|
238 |
do_action( 'wpforms_form_settings_panel_content', $this );
|
239 |
}
|
240 |
}
|
|
|
241 |
new WPForms_Builder_Panel_Settings;
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Builder_Panel_Settings extends WPForms_Builder_Panel {
|
12 |
|
13 |
/**
|
49 |
public function panel_sidebar() {
|
50 |
|
51 |
// Sidebar contents are not valid unless we have a form
|
52 |
+
if ( ! $this->form ) {
|
53 |
return;
|
54 |
}
|
55 |
|
59 |
'confirmation' => __( 'Confirmation', 'wpforms' ),
|
60 |
);
|
61 |
$sections = apply_filters( 'wpforms_builder_settings_sections', $sections, $this->form_data );
|
62 |
+
foreach ( $sections as $slug => $section ) {
|
63 |
$this->panel_sidebar_section( $section, $slug );
|
64 |
}
|
65 |
}
|
72 |
public function panel_content() {
|
73 |
|
74 |
// Check if there is a form created
|
75 |
+
if ( ! $this->form ) {
|
76 |
echo '<div class="wpforms-alert wpforms-alert-info">';
|
77 |
_e( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage the settings.', 'wpforms' );
|
78 |
echo '</div>';
|
79 |
return;
|
80 |
}
|
81 |
|
82 |
+
// --------------------------------------------------------------------//
|
83 |
// General
|
84 |
+
// --------------------------------------------------------------------//
|
85 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-general">';
|
86 |
echo '<div class="wpforms-panel-content-section-title">';
|
87 |
_e( 'General', 'wpforms' );
|
91 |
'settings',
|
92 |
'form_title',
|
93 |
$this->form_data,
|
94 |
+
__( 'Form Name', 'wpforms' ),
|
95 |
+
array(
|
96 |
+
'default' => $this->form->post_title,
|
97 |
+
)
|
98 |
);
|
99 |
wpforms_panel_field(
|
100 |
'textarea',
|
108 |
'settings',
|
109 |
'hide_title_desc',
|
110 |
$this->form_data,
|
111 |
+
__( 'Hide form name and description area', 'wpforms' )
|
112 |
);
|
113 |
wpforms_panel_field(
|
114 |
'text',
|
116 |
'form_class',
|
117 |
$this->form_data,
|
118 |
__( 'Form CSS Class', 'wpforms' ),
|
119 |
+
array(
|
120 |
+
'tooltip' => __( 'Enter CSS class names for the form wrapper. Multiple class names should be separated with spaces.', 'wpforms' ),
|
121 |
+
)
|
122 |
);
|
123 |
wpforms_panel_field(
|
124 |
'text',
|
126 |
'submit_text',
|
127 |
$this->form_data,
|
128 |
__( 'Submit Button Text', 'wpforms' ),
|
129 |
+
array(
|
130 |
+
'default' => __( 'Submit', 'wpforms' ),
|
131 |
+
)
|
132 |
);
|
133 |
wpforms_panel_field(
|
134 |
'text',
|
136 |
'submit_text_processing',
|
137 |
$this->form_data,
|
138 |
__( 'Submit Button Processing Text', 'wpforms' ),
|
139 |
+
array(
|
140 |
+
'tooltip' => __( 'Enter the submit button text you would like the button display while the form submit is processing.', 'wpforms' ),
|
141 |
+
)
|
142 |
);
|
143 |
wpforms_panel_field(
|
144 |
'text',
|
146 |
'submit_class',
|
147 |
$this->form_data,
|
148 |
__( 'Submit Button CSS Class', 'wpforms' ),
|
149 |
+
array(
|
150 |
+
'tooltip' => __( 'Enter CSS class names for the form submit button. Multiple names should be separated with spaces.', 'wpforms' ),
|
151 |
+
)
|
152 |
);
|
153 |
wpforms_panel_field(
|
154 |
'checkbox',
|
160 |
$recaptcha_key = wpforms_setting( 'recaptcha-site-key' );
|
161 |
$recaptcha_secret = wpforms_setting( 'recaptcha-secret-key' );
|
162 |
$recaptcha_type = wpforms_setting( 'recaptcha-type' );
|
163 |
+
if ( ! empty( $recaptcha_key ) && ! empty( $recaptcha_secret ) ) {
|
164 |
wpforms_panel_field(
|
165 |
'checkbox',
|
166 |
'settings',
|
167 |
'recaptcha',
|
168 |
$this->form_data,
|
169 |
+
'invisible' === $recaptcha_type ? __( 'Enable Google invisible reCAPTCHA', 'wpforms' ) : __( 'Enable Google reCAPTCHA (v2)', 'wpforms' )
|
170 |
);
|
171 |
}
|
172 |
do_action( 'wpforms_form_settings_general', $this );
|
173 |
echo '</div>';
|
174 |
|
175 |
+
// --------------------------------------------------------------------//
|
176 |
// Notifications
|
177 |
+
// --------------------------------------------------------------------//
|
178 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-notifications">';
|
179 |
do_action( 'wpforms_form_settings_notifications', $this );
|
180 |
echo '</div>';
|
181 |
|
182 |
+
// --------------------------------------------------------------------//
|
183 |
// Confirmation
|
184 |
+
// --------------------------------------------------------------------//
|
185 |
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-confirmation">';
|
186 |
echo '<div class="wpforms-panel-content-section-title">';
|
187 |
_e( 'Confirmation', 'wpforms' );
|
210 |
array(
|
211 |
'default' => __( 'Thanks for contacting us! We will be in touch with you shortly.', 'wpforms' ),
|
212 |
'tinymce' => array(
|
213 |
+
'editor_height' => '200',
|
214 |
+
),
|
215 |
)
|
216 |
);
|
217 |
wpforms_panel_field(
|
223 |
);
|
224 |
$p = array();
|
225 |
$pages = get_pages();
|
226 |
+
foreach ( $pages as $page ) {
|
227 |
+
$depth = count( $page->ancestors );
|
228 |
+
$p[ $page->ID ] = str_repeat( '-', $depth ) . ' ' . $page->post_title;
|
229 |
}
|
230 |
wpforms_panel_field(
|
231 |
'select',
|
233 |
'confirmation_page',
|
234 |
$this->form_data,
|
235 |
__( 'Confirmation Page', 'wpforms' ),
|
236 |
+
array(
|
237 |
+
'options' => $p,
|
238 |
+
)
|
239 |
);
|
240 |
wpforms_panel_field(
|
241 |
'text',
|
250 |
do_action( 'wpforms_form_settings_panel_content', $this );
|
251 |
}
|
252 |
}
|
253 |
+
|
254 |
new WPForms_Builder_Panel_Settings;
|
includes/admin/builder/panels/class-setup.php
CHANGED
@@ -75,17 +75,18 @@ class WPForms_Builder_Panel_Setup extends WPForms_Builder_Panel {
|
|
75 |
|
76 |
<p class="wpforms-setup-desc additional">
|
77 |
<?php
|
|
|
78 |
printf(
|
79 |
-
|
80 |
'Have a suggestion for a new template? %1$sWe\'d love to hear it%2$s. Also, you can %3$screate your own templates%4$s!',
|
81 |
-
'translators:%1$s - opening tag, %2$s - close tag, %3$s - opening tag, %4$s - close tag',
|
82 |
'wpforms'
|
83 |
),
|
84 |
'<a href="https://wpforms.com/form-template-suggestion/" target="_blank" rel="noopener noreferrer">',
|
85 |
'</a>',
|
86 |
'<a href="https://wpforms.com/docs/how-to-create-a-custom-form-template/" target="_blank" rel="noopener noreferrer">',
|
87 |
'</a>'
|
88 |
-
);
|
|
|
89 |
</p>
|
90 |
|
91 |
<div class="wpforms-setup-template-search-wrap">
|
@@ -98,17 +99,18 @@ class WPForms_Builder_Panel_Setup extends WPForms_Builder_Panel {
|
|
98 |
|
99 |
<p class="wpforms-setup-desc additional">
|
100 |
<?php
|
|
|
101 |
printf(
|
102 |
-
|
103 |
'More are available in the %1$sForm Templates Pack addon%2$s or by %3$screating your own%4$s.',
|
104 |
-
'translators:%1$s - opening a tag, %2$s - close tag, %3$s - opening tag, %4$s - close tag',
|
105 |
'wpforms'
|
106 |
),
|
107 |
'<a href="https://wpforms.com/addons/form-templates-pack-addon/" target="_blank" rel="noopener noreferrer">',
|
108 |
'</a>',
|
109 |
'<a href="https://wpforms.com/docs/how-to-create-a-custom-form-template/" target="_blank" rel="noopener noreferrer">',
|
110 |
'</a>'
|
111 |
-
);
|
|
|
112 |
</p>
|
113 |
|
114 |
<?php
|
@@ -152,7 +154,7 @@ class WPForms_Builder_Panel_Setup extends WPForms_Builder_Panel {
|
|
152 |
<?php endif; ?>
|
153 |
|
154 |
<div class="wpforms-template-overlay">
|
155 |
-
<a href="#" class="wpforms-template-select" data-template-name-raw="<?php echo esc_attr( $template['name'] ); ?>" data-template-name="<?php
|
156 |
</div>
|
157 |
|
158 |
</div>
|
75 |
|
76 |
<p class="wpforms-setup-desc additional">
|
77 |
<?php
|
78 |
+
/* translators: %1$s - opening tag, %2$s - closing tag, %3$s - opening tag, %4$s - closing tag. */
|
79 |
printf(
|
80 |
+
__(
|
81 |
'Have a suggestion for a new template? %1$sWe\'d love to hear it%2$s. Also, you can %3$screate your own templates%4$s!',
|
|
|
82 |
'wpforms'
|
83 |
),
|
84 |
'<a href="https://wpforms.com/form-template-suggestion/" target="_blank" rel="noopener noreferrer">',
|
85 |
'</a>',
|
86 |
'<a href="https://wpforms.com/docs/how-to-create-a-custom-form-template/" target="_blank" rel="noopener noreferrer">',
|
87 |
'</a>'
|
88 |
+
);
|
89 |
+
?>
|
90 |
</p>
|
91 |
|
92 |
<div class="wpforms-setup-template-search-wrap">
|
99 |
|
100 |
<p class="wpforms-setup-desc additional">
|
101 |
<?php
|
102 |
+
/* translators:%1$s - opening a tag, %2$s - close tag, %3$s - opening tag, %4$s - close tag. */
|
103 |
printf(
|
104 |
+
__(
|
105 |
'More are available in the %1$sForm Templates Pack addon%2$s or by %3$screating your own%4$s.',
|
|
|
106 |
'wpforms'
|
107 |
),
|
108 |
'<a href="https://wpforms.com/addons/form-templates-pack-addon/" target="_blank" rel="noopener noreferrer">',
|
109 |
'</a>',
|
110 |
'<a href="https://wpforms.com/docs/how-to-create-a-custom-form-template/" target="_blank" rel="noopener noreferrer">',
|
111 |
'</a>'
|
112 |
+
);
|
113 |
+
?>
|
114 |
</p>
|
115 |
|
116 |
<?php
|
154 |
<?php endif; ?>
|
155 |
|
156 |
<div class="wpforms-template-overlay">
|
157 |
+
<a href="#" class="wpforms-template-select" data-template-name-raw="<?php echo esc_attr( $template['name'] ); ?>" data-template-name="<?php printf( _x( '%s template', 'Template name', 'wpforms' ), esc_attr( $template['name'] ) ); ?>" data-template="<?php echo esc_attr( $template['slug'] ); ?>"><?php printf( _x( 'Create a %s', 'Template name', 'wpforms' ), esc_html( $template['name'] ) ); ?></a>
|
158 |
</div>
|
159 |
|
160 |
</div>
|
includes/admin/class-am-notification.php
CHANGED
@@ -64,8 +64,8 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
64 |
*
|
65 |
* @since 1.0.0
|
66 |
*
|
67 |
-
* @param string $plugin
|
68 |
-
* @param
|
69 |
*/
|
70 |
public function __construct( $plugin = '', $version = 0 ) {
|
71 |
$this->plugin = $plugin;
|
@@ -84,7 +84,7 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
84 |
*/
|
85 |
public function custom_post_type() {
|
86 |
register_post_type( 'amn_' . $this->plugin, array(
|
87 |
-
'supports' => false
|
88 |
) );
|
89 |
}
|
90 |
|
@@ -94,28 +94,27 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
94 |
* @since 1.0.0
|
95 |
*/
|
96 |
public function get_remote_notifications() {
|
97 |
-
$last_checked
|
98 |
|
99 |
if ( $last_checked < strtotime( 'today midnight' ) ) {
|
100 |
|
101 |
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
102 |
|
103 |
$notification_id = null;
|
104 |
-
if ( ! empty( $plugin_notifications) ) {
|
105 |
// Unset it from the array.
|
106 |
$notification = $plugin_notifications[0];
|
107 |
$notification_id = get_post_meta( $notification->ID, 'notification_id', true );
|
108 |
}
|
109 |
|
110 |
$response = wp_remote_retrieve_body( wp_remote_post( $this->api_url, array(
|
111 |
-
'
|
112 |
-
'body' => array(
|
113 |
'slug' => $this->plugin,
|
114 |
'version' => $this->plugin_version,
|
115 |
'last_notification' => $notification_id,
|
116 |
'plugins' => $this->get_plugins_list(),
|
117 |
-
'themes' => $this->get_themes_list()
|
118 |
-
)
|
119 |
) ) );
|
120 |
|
121 |
$data = json_decode( $response );
|
@@ -124,20 +123,25 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
124 |
|
125 |
$notifications = array();
|
126 |
foreach ( (array) $data->slugs as $slug ) {
|
127 |
-
$notifications = array_merge(
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
if ( empty( $notifications ) ) {
|
136 |
|
137 |
$new_notification_id = wp_insert_post( array(
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
|
142 |
update_post_meta( $new_notification_id, 'notification_id', $data->id );
|
143 |
update_post_meta( $new_notification_id, 'type', $data->type );
|
@@ -148,7 +152,6 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
148 |
update_post_meta( $new_notification_id, 'version', $data->version );
|
149 |
update_post_meta( $new_notification_id, 'viewed', 0 );
|
150 |
}
|
151 |
-
|
152 |
}
|
153 |
|
154 |
// Set the option now so we can't run this again until after 24 hours.
|
@@ -162,14 +165,17 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
162 |
* @since 1.0.0
|
163 |
*
|
164 |
* @param integer $limit Set the limit for how many posts to retrieve.
|
165 |
-
* @param array
|
166 |
-
*
|
|
|
167 |
*/
|
168 |
-
public function get_plugin_notifications( $limit = -1, $args = array() ) {
|
169 |
-
return get_posts(
|
|
|
170 |
'showposts' => $limit,
|
171 |
-
'post_type' => 'amn_' . $this->plugin
|
172 |
-
|
|
|
173 |
}
|
174 |
|
175 |
/**
|
@@ -195,7 +201,7 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
195 |
'slug' => $slug,
|
196 |
'name' => $plugin['Name'],
|
197 |
'version' => $plugin['Version'],
|
198 |
-
'active' => is_plugin_active( $slug )
|
199 |
);
|
200 |
}
|
201 |
|
@@ -221,7 +227,7 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
221 |
'slug' => $slug,
|
222 |
'name' => $theme->Name,
|
223 |
'version' => $theme->Version,
|
224 |
-
'active' => (string) wp_get_theme()
|
225 |
);
|
226 |
}
|
227 |
|
@@ -239,10 +245,10 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
239 |
return;
|
240 |
}
|
241 |
|
242 |
-
$plugin_notifications = $this->get_plugin_notifications( -1, array(
|
243 |
'post_status' => 'all',
|
244 |
-
'meta_key'
|
245 |
-
'meta_value'
|
246 |
) );
|
247 |
|
248 |
$plugin_notifications = $this->validate_notifications( $plugin_notifications );
|
@@ -256,16 +262,17 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
256 |
<?php echo $notification->post_content; ?>
|
257 |
</div>
|
258 |
<script type="text/javascript">
|
259 |
-
jQuery(document).ready(
|
260 |
-
$(document).on('click', '.am-notification-<?php echo $notification->ID; ?> button.notice-dismiss', function(
|
261 |
-
$.post(
|
262 |
action: 'am_notification_dismiss',
|
263 |
notification_id: '<?php echo $notification->ID; ?>'
|
264 |
});
|
265 |
});
|
266 |
});
|
267 |
</script>
|
268 |
-
|
|
|
269 |
}
|
270 |
}
|
271 |
|
@@ -275,6 +282,7 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
275 |
* @since 1.0.0
|
276 |
*
|
277 |
* @param array $plugin_notifications An array of plugin notifications.
|
|
|
278 |
* @return array A filtered array of plugin notifications.
|
279 |
*/
|
280 |
public function validate_notifications( $plugin_notifications ) {
|
@@ -283,12 +291,12 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
283 |
// Location validation.
|
284 |
$location = (array) json_decode( get_post_meta( $notification->ID, 'location', true ) );
|
285 |
$continue = false;
|
286 |
-
if ( ! in_array( 'everywhere', $location ) ) {
|
287 |
-
if ( in_array( 'index.php', $location ) && 'index.php'
|
288 |
$continue = true;
|
289 |
}
|
290 |
|
291 |
-
if ( in_array( 'plugins.php', $location ) && 'plugins.php'
|
292 |
$continue = true;
|
293 |
}
|
294 |
|
@@ -314,7 +322,7 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
314 |
|
315 |
// Theme validation.
|
316 |
$theme = get_post_meta( $notification->ID, 'theme', true );
|
317 |
-
$continue = (string) wp_get_theme()
|
318 |
|
319 |
if ( ! empty( $theme ) && ! $continue ) {
|
320 |
unset( $plugin_notifications[ $key ] );
|
@@ -332,7 +340,6 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
332 |
unset( $plugin_notifications[ $key ] );
|
333 |
}
|
334 |
}
|
335 |
-
|
336 |
}
|
337 |
|
338 |
return $plugin_notifications;
|
@@ -348,6 +355,5 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
348 |
update_post_meta( $notification_id, 'viewed', 1 );
|
349 |
die;
|
350 |
}
|
351 |
-
|
352 |
}
|
353 |
}
|
64 |
*
|
65 |
* @since 1.0.0
|
66 |
*
|
67 |
+
* @param string $plugin The plugin slug.
|
68 |
+
* @param mixed $version The version of the plugin.
|
69 |
*/
|
70 |
public function __construct( $plugin = '', $version = 0 ) {
|
71 |
$this->plugin = $plugin;
|
84 |
*/
|
85 |
public function custom_post_type() {
|
86 |
register_post_type( 'amn_' . $this->plugin, array(
|
87 |
+
'supports' => false,
|
88 |
) );
|
89 |
}
|
90 |
|
94 |
* @since 1.0.0
|
95 |
*/
|
96 |
public function get_remote_notifications() {
|
97 |
+
$last_checked = get_option( '_amn_' . $this->plugin . '_last_checked', strtotime( '-1 week' ) );
|
98 |
|
99 |
if ( $last_checked < strtotime( 'today midnight' ) ) {
|
100 |
|
101 |
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
102 |
|
103 |
$notification_id = null;
|
104 |
+
if ( ! empty( $plugin_notifications ) ) {
|
105 |
// Unset it from the array.
|
106 |
$notification = $plugin_notifications[0];
|
107 |
$notification_id = get_post_meta( $notification->ID, 'notification_id', true );
|
108 |
}
|
109 |
|
110 |
$response = wp_remote_retrieve_body( wp_remote_post( $this->api_url, array(
|
111 |
+
'body' => array(
|
|
|
112 |
'slug' => $this->plugin,
|
113 |
'version' => $this->plugin_version,
|
114 |
'last_notification' => $notification_id,
|
115 |
'plugins' => $this->get_plugins_list(),
|
116 |
+
'themes' => $this->get_themes_list(),
|
117 |
+
),
|
118 |
) ) );
|
119 |
|
120 |
$data = json_decode( $response );
|
123 |
|
124 |
$notifications = array();
|
125 |
foreach ( (array) $data->slugs as $slug ) {
|
126 |
+
$notifications = array_merge(
|
127 |
+
$notifications,
|
128 |
+
(array) get_posts(
|
129 |
+
array(
|
130 |
+
'post_type' => 'amn_' . $slug,
|
131 |
+
'post_status' => 'all',
|
132 |
+
'meta_key' => 'notification_id',
|
133 |
+
'meta_value' => $data->id,
|
134 |
+
)
|
135 |
+
)
|
136 |
+
);
|
137 |
}
|
138 |
|
139 |
if ( empty( $notifications ) ) {
|
140 |
|
141 |
$new_notification_id = wp_insert_post( array(
|
142 |
+
'post_content' => $data->content,
|
143 |
+
'post_type' => 'amn_' . $this->plugin,
|
144 |
+
) );
|
145 |
|
146 |
update_post_meta( $new_notification_id, 'notification_id', $data->id );
|
147 |
update_post_meta( $new_notification_id, 'type', $data->type );
|
152 |
update_post_meta( $new_notification_id, 'version', $data->version );
|
153 |
update_post_meta( $new_notification_id, 'viewed', 0 );
|
154 |
}
|
|
|
155 |
}
|
156 |
|
157 |
// Set the option now so we can't run this again until after 24 hours.
|
165 |
* @since 1.0.0
|
166 |
*
|
167 |
* @param integer $limit Set the limit for how many posts to retrieve.
|
168 |
+
* @param array $args Any top-level arguments to add to the array.
|
169 |
+
*
|
170 |
+
* @return WP_Post[] WP_Post that match the query.
|
171 |
*/
|
172 |
+
public function get_plugin_notifications( $limit = - 1, $args = array() ) {
|
173 |
+
return get_posts(
|
174 |
+
array(
|
175 |
'showposts' => $limit,
|
176 |
+
'post_type' => 'amn_' . $this->plugin,
|
177 |
+
) + $args
|
178 |
+
);
|
179 |
}
|
180 |
|
181 |
/**
|
201 |
'slug' => $slug,
|
202 |
'name' => $plugin['Name'],
|
203 |
'version' => $plugin['Version'],
|
204 |
+
'active' => is_plugin_active( $slug ),
|
205 |
);
|
206 |
}
|
207 |
|
227 |
'slug' => $slug,
|
228 |
'name' => $theme->Name,
|
229 |
'version' => $theme->Version,
|
230 |
+
'active' => (string) wp_get_theme() === $theme->Name,
|
231 |
);
|
232 |
}
|
233 |
|
245 |
return;
|
246 |
}
|
247 |
|
248 |
+
$plugin_notifications = $this->get_plugin_notifications( - 1, array(
|
249 |
'post_status' => 'all',
|
250 |
+
'meta_key' => 'viewed',
|
251 |
+
'meta_value' => '0',
|
252 |
) );
|
253 |
|
254 |
$plugin_notifications = $this->validate_notifications( $plugin_notifications );
|
262 |
<?php echo $notification->post_content; ?>
|
263 |
</div>
|
264 |
<script type="text/javascript">
|
265 |
+
jQuery(document).ready(function ($) {
|
266 |
+
$(document).on('click', '.am-notification-<?php echo $notification->ID; ?> button.notice-dismiss', function (event) {
|
267 |
+
$.post(ajaxurl, {
|
268 |
action: 'am_notification_dismiss',
|
269 |
notification_id: '<?php echo $notification->ID; ?>'
|
270 |
});
|
271 |
});
|
272 |
});
|
273 |
</script>
|
274 |
+
<?php
|
275 |
+
}
|
276 |
}
|
277 |
}
|
278 |
|
282 |
* @since 1.0.0
|
283 |
*
|
284 |
* @param array $plugin_notifications An array of plugin notifications.
|
285 |
+
*
|
286 |
* @return array A filtered array of plugin notifications.
|
287 |
*/
|
288 |
public function validate_notifications( $plugin_notifications ) {
|
291 |
// Location validation.
|
292 |
$location = (array) json_decode( get_post_meta( $notification->ID, 'location', true ) );
|
293 |
$continue = false;
|
294 |
+
if ( ! in_array( 'everywhere', $location, true ) ) {
|
295 |
+
if ( in_array( 'index.php', $location, true ) && 'index.php' === $pagenow ) {
|
296 |
$continue = true;
|
297 |
}
|
298 |
|
299 |
+
if ( in_array( 'plugins.php', $location, true ) && 'plugins.php' === $pagenow ) {
|
300 |
$continue = true;
|
301 |
}
|
302 |
|
322 |
|
323 |
// Theme validation.
|
324 |
$theme = get_post_meta( $notification->ID, 'theme', true );
|
325 |
+
$continue = (string) wp_get_theme() === $theme;
|
326 |
|
327 |
if ( ! empty( $theme ) && ! $continue ) {
|
328 |
unset( $plugin_notifications[ $key ] );
|
340 |
unset( $plugin_notifications[ $key ] );
|
341 |
}
|
342 |
}
|
|
|
343 |
}
|
344 |
|
345 |
return $plugin_notifications;
|
355 |
update_post_meta( $notification_id, 'viewed', 1 );
|
356 |
die;
|
357 |
}
|
|
|
358 |
}
|
359 |
}
|
includes/admin/class-editor.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_Admin_Editor {
|
12 |
|
13 |
/**
|
@@ -22,18 +22,19 @@ class WPForms_Admin_Editor {
|
|
22 |
|
23 |
/**
|
24 |
* Allow easy shortcode insertion via a custom media button.
|
25 |
-
*
|
26 |
* @since 1.0.0
|
|
|
27 |
* @param string $editor_id
|
28 |
-
* @return
|
29 |
*/
|
30 |
function media_button( $editor_id ) {
|
31 |
|
32 |
// Provide the ability to conditionally disable the button, so it can be
|
33 |
// disabled for custom fields or front-end use such as bbPress. We default
|
34 |
// to only showing within the admin panel.
|
35 |
-
if ( !apply_filters( 'wpforms_display_media_button', is_admin(), $editor_id ) )
|
36 |
return;
|
|
|
37 |
|
38 |
// Setup the icon - currently using a dashicon
|
39 |
$icon = '<span class="wp-media-buttons-icon wpforms-menu-icon" style="font-size:16px;margin-top:-2px;"></span>';
|
@@ -65,42 +66,42 @@ class WPForms_Admin_Editor {
|
|
65 |
<div id="wpforms-modal-backdrop" style="display: none"></div>
|
66 |
<div id="wpforms-modal-wrap" style="display: none">
|
67 |
<form id="wpforms-modal" tabindex="-1">
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
</div>
|
72 |
-
<div id="wpforms-modal-inner">
|
73 |
-
<div id="wpforms-modal-options">
|
74 |
-
<?php
|
75 |
-
$args = apply_filters( 'wpforms_modal_select', array() );
|
76 |
-
$forms = wpforms()->form->get( '', $args );
|
77 |
-
if ( !empty( $forms ) ) {
|
78 |
-
printf( '<p><label for="wpforms-modal-select-form">%s</label></p>', __( 'Select a form below to insert', 'wpforms' ) );
|
79 |
-
echo '<select id="wpforms-modal-select-form">';
|
80 |
-
foreach ( $forms as $form ) {
|
81 |
-
printf( '<option value="%d">%s</option>', $form->ID, esc_html( $form->post_title ) );
|
82 |
-
}
|
83 |
-
echo '</select><br>';
|
84 |
-
printf( '<p class="wpforms-modal-inline"><input type="checkbox" id="wpforms-modal-checkbox-title"><label for="wpforms-modal-checkbox-title">%s</label></p>', __( 'Show form title', 'wpforms' ) );
|
85 |
-
printf( '<p class="wpforms-modal-inline"><input type="checkbox" id="wpforms-modal-checkbox-description"><label for="wpforms-modal-checkbox-description">%s</label></p>', __( 'Show form description', 'wpforms' ) );
|
86 |
-
} else {
|
87 |
-
echo '<p>';
|
88 |
-
printf( __( 'Whoops, you haven\'t created a form yet. Want to <a href="%s">give it a go</a>?', 'wpforms' ), admin_url( 'admin.php?page=wpforms-builder' ) );
|
89 |
-
echo '</p>';
|
90 |
-
}
|
91 |
-
?>
|
92 |
</div>
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
</div>
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
</div>
|
102 |
-
<?php endif; ?>
|
103 |
-
</div>
|
104 |
</form>
|
105 |
</div>
|
106 |
<style style="text/css">
|
@@ -277,4 +278,5 @@ class WPForms_Admin_Editor {
|
|
277 |
}
|
278 |
|
279 |
}
|
280 |
-
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Admin_Editor {
|
12 |
|
13 |
/**
|
22 |
|
23 |
/**
|
24 |
* Allow easy shortcode insertion via a custom media button.
|
25 |
+
*
|
26 |
* @since 1.0.0
|
27 |
+
*
|
28 |
* @param string $editor_id
|
|
|
29 |
*/
|
30 |
function media_button( $editor_id ) {
|
31 |
|
32 |
// Provide the ability to conditionally disable the button, so it can be
|
33 |
// disabled for custom fields or front-end use such as bbPress. We default
|
34 |
// to only showing within the admin panel.
|
35 |
+
if ( ! apply_filters( 'wpforms_display_media_button', is_admin(), $editor_id ) ) {
|
36 |
return;
|
37 |
+
}
|
38 |
|
39 |
// Setup the icon - currently using a dashicon
|
40 |
$icon = '<span class="wp-media-buttons-icon wpforms-menu-icon" style="font-size:16px;margin-top:-2px;"></span>';
|
66 |
<div id="wpforms-modal-backdrop" style="display: none"></div>
|
67 |
<div id="wpforms-modal-wrap" style="display: none">
|
68 |
<form id="wpforms-modal" tabindex="-1">
|
69 |
+
<div id="wpforms-modal-title">
|
70 |
+
<?php _e( 'Insert Form', 'wpforms' ); ?>
|
71 |
+
<button type="button" id="wpforms-modal-close"><span class="screen-reader-text"><?php _e( 'Close', 'wpforms' ); ?></span></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
</div>
|
73 |
+
<div id="wpforms-modal-inner">
|
74 |
+
<div id="wpforms-modal-options">
|
75 |
+
<?php
|
76 |
+
$args = apply_filters( 'wpforms_modal_select', array() );
|
77 |
+
$forms = wpforms()->form->get( '', $args );
|
78 |
+
if ( ! empty( $forms ) ) {
|
79 |
+
printf( '<p><label for="wpforms-modal-select-form">%s</label></p>', __( 'Select a form below to insert', 'wpforms' ) );
|
80 |
+
echo '<select id="wpforms-modal-select-form">';
|
81 |
+
foreach ( $forms as $form ) {
|
82 |
+
printf( '<option value="%d">%s</option>', $form->ID, esc_html( $form->post_title ) );
|
83 |
+
}
|
84 |
+
echo '</select><br>';
|
85 |
+
printf( '<p class="wpforms-modal-inline"><input type="checkbox" id="wpforms-modal-checkbox-title"><label for="wpforms-modal-checkbox-title">%s</label></p>', __( 'Show form name', 'wpforms' ) );
|
86 |
+
printf( '<p class="wpforms-modal-inline"><input type="checkbox" id="wpforms-modal-checkbox-description"><label for="wpforms-modal-checkbox-description">%s</label></p>', __( 'Show form description', 'wpforms' ) );
|
87 |
+
} else {
|
88 |
+
echo '<p>';
|
89 |
+
printf( __( 'Whoops, you haven\'t created a form yet. Want to <a href="%s">give it a go</a>?', 'wpforms' ), admin_url( 'admin.php?page=wpforms-builder' ) );
|
90 |
+
echo '</p>';
|
91 |
+
}
|
92 |
+
?>
|
93 |
+
</div>
|
94 |
</div>
|
95 |
+
<div class="submitbox">
|
96 |
+
<div id="wpforms-modal-cancel">
|
97 |
+
<a class="submitdelete deletion" href="#"><?php _e( 'Cancel', 'wpforms' ); ?></a>
|
98 |
+
</div>
|
99 |
+
<?php if ( ! empty( $forms ) ) : ?>
|
100 |
+
<div id="wpforms-modal-update">
|
101 |
+
<button class="button button-primary" id="wpforms-modal-submit"><?php _e( 'Add Form', 'wpforms' ); ?></button>
|
102 |
+
</div>
|
103 |
+
<?php endif; ?>
|
104 |
</div>
|
|
|
|
|
105 |
</form>
|
106 |
</div>
|
107 |
<style style="text/css">
|
278 |
}
|
279 |
|
280 |
}
|
281 |
+
|
282 |
+
new WPForms_Admin_Editor;
|
includes/admin/class-settings.php
CHANGED
@@ -55,7 +55,7 @@ class WPForms_Settings {
|
|
55 |
add_action( 'wpforms_admin_settings_after', array( $this, 'captcha_addon_notice' ) );
|
56 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
57 |
|
58 |
-
// Hook for
|
59 |
do_action( 'wpforms_settings_init' );
|
60 |
}
|
61 |
}
|
@@ -139,7 +139,7 @@ class WPForms_Settings {
|
|
139 |
// Save settings.
|
140 |
update_option( 'wpforms_settings', $settings );
|
141 |
|
142 |
-
WPForms_Admin_Notice::success( __( 'Settings saved.', 'wpforms' ) );
|
143 |
}
|
144 |
|
145 |
/**
|
@@ -149,7 +149,7 @@ class WPForms_Settings {
|
|
149 |
*/
|
150 |
public function enqueues() {
|
151 |
|
152 |
-
// Hook for
|
153 |
do_action( 'wpforms_settings_enqueue' );
|
154 |
}
|
155 |
|
@@ -221,18 +221,18 @@ class WPForms_Settings {
|
|
221 |
*/
|
222 |
public function get_registered_settings( $view = '' ) {
|
223 |
|
224 |
-
// reCAPTCAH heading description is long so we define it
|
225 |
$recaptcha_desc = '<p>' . __( 'reCAPTCHA is a free anti-spam service from Google which helps to protect your website from spam and abuse while letting real people pass through with ease.', 'wpforms' ) . '</p>';
|
226 |
$recaptcha_desc .= '<p>' . __( 'Google\'s original <a href="https://www.google.com/recaptcha/intro/" target="_blank" rel="noopener noreferrer">v2 reCAPTCHA</a> prompts users to check a box to prove they\'re human, whereas <a href="https://www.google.com/recaptcha/intro/invisible.html" target="_blank" rel="noopener noreferrer">Invisible reCAPTCHA</a> uses advanced technology to detect real users without requiring any input.', 'wpforms' ) . '</p>';
|
227 |
$recaptcha_desc .= '<p>' . __( 'Sites already using v2 reCAPTCHA will need to create new site keys before switching to the Invisible reCAPTCHA.', 'wpforms' ) . '</p>';
|
228 |
-
$recaptcha_desc .= '<p>' . __( '<a href="
|
229 |
|
230 |
$defaults = array(
|
231 |
// General Settings tab.
|
232 |
'general' => array(
|
233 |
'license-heading' => array(
|
234 |
'id' => 'license-heading',
|
235 |
-
'content' => '<h4>' . __( 'License', 'wpforms' ) . '</h4><p>' . __( 'Your license key provides access to updates and
|
236 |
'type' => 'content',
|
237 |
'no_label' => true,
|
238 |
'class' => array( 'section-heading' ),
|
55 |
add_action( 'wpforms_admin_settings_after', array( $this, 'captcha_addon_notice' ) );
|
56 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
57 |
|
58 |
+
// Hook for addons.
|
59 |
do_action( 'wpforms_settings_init' );
|
60 |
}
|
61 |
}
|
139 |
// Save settings.
|
140 |
update_option( 'wpforms_settings', $settings );
|
141 |
|
142 |
+
WPForms_Admin_Notice::success( __( 'Settings were successfully saved.', 'wpforms' ) );
|
143 |
}
|
144 |
|
145 |
/**
|
149 |
*/
|
150 |
public function enqueues() {
|
151 |
|
152 |
+
// Hook for addons.
|
153 |
do_action( 'wpforms_settings_enqueue' );
|
154 |
}
|
155 |
|
221 |
*/
|
222 |
public function get_registered_settings( $view = '' ) {
|
223 |
|
224 |
+
// reCAPTCAH heading description is long so we define it separately.
|
225 |
$recaptcha_desc = '<p>' . __( 'reCAPTCHA is a free anti-spam service from Google which helps to protect your website from spam and abuse while letting real people pass through with ease.', 'wpforms' ) . '</p>';
|
226 |
$recaptcha_desc .= '<p>' . __( 'Google\'s original <a href="https://www.google.com/recaptcha/intro/" target="_blank" rel="noopener noreferrer">v2 reCAPTCHA</a> prompts users to check a box to prove they\'re human, whereas <a href="https://www.google.com/recaptcha/intro/invisible.html" target="_blank" rel="noopener noreferrer">Invisible reCAPTCHA</a> uses advanced technology to detect real users without requiring any input.', 'wpforms' ) . '</p>';
|
227 |
$recaptcha_desc .= '<p>' . __( 'Sites already using v2 reCAPTCHA will need to create new site keys before switching to the Invisible reCAPTCHA.', 'wpforms' ) . '</p>';
|
228 |
+
$recaptcha_desc .= '<p>' . sprintf( __( '<a href="%s" rel="noopener noreferrer" target="_blank">Read our walk through</a> to learn more and for step-by-step directions.', 'wpforms' ), 'https://wpforms.com/docs/setup-captcha-wpforms/' ) . '</p>';
|
229 |
|
230 |
$defaults = array(
|
231 |
// General Settings tab.
|
232 |
'general' => array(
|
233 |
'license-heading' => array(
|
234 |
'id' => 'license-heading',
|
235 |
+
'content' => '<h4>' . __( 'License', 'wpforms' ) . '</h4><p>' . __( 'Your license key provides access to updates and addons.', 'wpforms' ) . '</p>',
|
236 |
'type' => 'content',
|
237 |
'no_label' => true,
|
238 |
'class' => array( 'section-heading' ),
|
includes/admin/class-tools.php
CHANGED
@@ -70,7 +70,7 @@ class WPForms_Tools {
|
|
70 |
add_action( 'wpforms_tools_init', array( $this, 'import_export_process' ) );
|
71 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
72 |
|
73 |
-
// Hook for
|
74 |
do_action( 'wpforms_tools_init' );
|
75 |
}
|
76 |
}
|
@@ -94,7 +94,11 @@ class WPForms_Tools {
|
|
94 |
|
95 |
<?php
|
96 |
if ( isset( $_GET['wpforms_notice'] ) && 'forms-imported' === $_GET['wpforms_notice'] ) {
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
?>
|
100 |
|
70 |
add_action( 'wpforms_tools_init', array( $this, 'import_export_process' ) );
|
71 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
72 |
|
73 |
+
// Hook for addons.
|
74 |
do_action( 'wpforms_tools_init' );
|
75 |
}
|
76 |
}
|
94 |
|
95 |
<?php
|
96 |
if ( isset( $_GET['wpforms_notice'] ) && 'forms-imported' === $_GET['wpforms_notice'] ) {
|
97 |
+
?>
|
98 |
+
<div class="updated notice is-dismissible">
|
99 |
+
<p><?php printf( __( 'Import was successfully finished. You can go and <a href="%s">check your forms</a>.', 'wpforms' ), admin_url( 'admin.php?page=wpforms-overview' ) ); ?></p>
|
100 |
+
</div>
|
101 |
+
<?php
|
102 |
}
|
103 |
?>
|
104 |
|
includes/admin/class-welcome.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @since 1.0.0
|
10 |
* @license GPL-2.0+
|
11 |
* @copyright Copyright (c) 2016, WPForms LLC
|
12 |
-
*/
|
13 |
class WPForms_Welcome {
|
14 |
|
15 |
/**
|
@@ -118,7 +118,7 @@ class WPForms_Welcome {
|
|
118 |
<h6><?php _e( 'Thank you for choosing WPForms - the most powerful drag & drop WordPress form builder in the market.', 'wpforms' ); ?></h6>
|
119 |
</div>
|
120 |
|
121 |
-
<a href="#" class="play-video" title="<?php esc_attr_e( 'Watch how to create
|
122 |
<img src="<?php echo WPFORMS_PLUGIN_URL; ?>assets/images/welcome-video.png" alt="<?php esc_attr_e( 'Watch how to create your first form', 'wpforms' ); ?>" class="video-thumbnail">
|
123 |
</a>
|
124 |
|
@@ -251,7 +251,7 @@ class WPForms_Welcome {
|
|
251 |
|
252 |
</div>
|
253 |
|
254 |
-
<div class="testimonials">
|
255 |
|
256 |
<div class="block">
|
257 |
|
@@ -296,4 +296,5 @@ class WPForms_Welcome {
|
|
296 |
<?php
|
297 |
}
|
298 |
}
|
|
|
299 |
new WPForms_Welcome;
|
9 |
* @since 1.0.0
|
10 |
* @license GPL-2.0+
|
11 |
* @copyright Copyright (c) 2016, WPForms LLC
|
12 |
+
*/
|
13 |
class WPForms_Welcome {
|
14 |
|
15 |
/**
|
118 |
<h6><?php _e( 'Thank you for choosing WPForms - the most powerful drag & drop WordPress form builder in the market.', 'wpforms' ); ?></h6>
|
119 |
</div>
|
120 |
|
121 |
+
<a href="#" class="play-video" title="<?php esc_attr_e( 'Watch how to create your first form', 'wpforms' ); ?>">
|
122 |
<img src="<?php echo WPFORMS_PLUGIN_URL; ?>assets/images/welcome-video.png" alt="<?php esc_attr_e( 'Watch how to create your first form', 'wpforms' ); ?>" class="video-thumbnail">
|
123 |
</a>
|
124 |
|
251 |
|
252 |
</div>
|
253 |
|
254 |
+
<div class="testimonials upgrade">
|
255 |
|
256 |
<div class="block">
|
257 |
|
296 |
<?php
|
297 |
}
|
298 |
}
|
299 |
+
|
300 |
new WPForms_Welcome;
|
includes/admin/overview/class-overview-table.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
class WPForms_Overview_Table extends WP_List_Table {
|
12 |
|
13 |
/**
|
14 |
-
*
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
*/
|
@@ -53,10 +53,6 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
53 |
'form_name' => __( 'Name', 'wpforms' ),
|
54 |
'shortcode' => __( 'Shortcode', 'wpforms' ),
|
55 |
'created' => __( 'Created', 'wpforms' ),
|
56 |
-
// 'id' => __( 'ID', 'wpforms' ),
|
57 |
-
//'modified' => __( 'Modified', 'wpforms' ),
|
58 |
-
//'author' => __( 'Author', 'wpforms' ),
|
59 |
-
//'php' => __( 'PHP Code', 'wpforms' ),
|
60 |
);
|
61 |
|
62 |
return apply_filters( 'wpforms_overview_table_columns', $columns );
|
@@ -66,7 +62,9 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
66 |
* Render the checkbox column.
|
67 |
*
|
68 |
* @since 1.0.0
|
69 |
-
*
|
|
|
|
|
70 |
* @return string
|
71 |
*/
|
72 |
public function column_cb( $form ) {
|
@@ -78,41 +76,42 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
78 |
* Renders the columns.
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
-
*
|
|
|
82 |
* @param string $column_name
|
|
|
83 |
* @return string
|
84 |
*/
|
85 |
public function column_default( $form, $column_name ) {
|
86 |
|
87 |
-
switch( $column_name ) {
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
break;
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
-
|
115 |
-
|
116 |
}
|
117 |
|
118 |
return apply_filters( 'wpforms_overview_table_column_value', $value, $form, $column_name );
|
@@ -122,15 +121,24 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
122 |
* Render the form name column with action links.
|
123 |
*
|
124 |
* @since 1.0.0
|
125 |
-
*
|
|
|
|
|
126 |
* @return string
|
127 |
*/
|
128 |
public function column_form_name( $form ) {
|
129 |
|
130 |
// Prepare variables.
|
131 |
$name = ! empty( $form->post_title ) ? $form->post_title : $form->post_name;
|
132 |
-
$name = sprintf(
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
__( 'Edit this form', 'wpforms' ),
|
135 |
$name
|
136 |
);
|
@@ -139,36 +147,71 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
139 |
$row_actions = array();
|
140 |
|
141 |
// Edit
|
142 |
-
$row_actions['edit'] = sprintf(
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
__( 'Edit this form', 'wpforms' ),
|
145 |
__( 'Edit', 'wpforms' )
|
146 |
);
|
147 |
|
148 |
// Entries
|
149 |
-
$row_actions['entries'] = sprintf(
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
__( 'View entries', 'wpforms' ),
|
152 |
__( 'Entries', 'wpforms' )
|
153 |
);
|
154 |
|
155 |
// Preview
|
156 |
-
$row_actions['preview_'] = sprintf(
|
|
|
157 |
esc_url( wpforms()->preview->form_preview_url( $form->ID ) ),
|
158 |
__( 'View preview', 'wpforms' ),
|
159 |
__( 'Preview', 'wpforms' )
|
160 |
);
|
161 |
|
162 |
// Duplicate
|
163 |
-
$row_actions['duplicate']
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
__( 'Duplicate this form', 'wpforms' ),
|
166 |
__( 'Duplicate', 'wpforms' )
|
167 |
);
|
168 |
|
169 |
// Delete
|
170 |
-
$row_actions['delete']
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
__( 'Delete this form', 'wpforms' ),
|
173 |
__( 'Delete', 'wpforms' )
|
174 |
);
|
@@ -180,21 +223,22 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
-
* Define bulk actions available for our table listing
|
184 |
*
|
185 |
* @since 1.0.0
|
|
|
186 |
* @return array
|
187 |
*/
|
188 |
public function get_bulk_actions() {
|
189 |
|
190 |
$actions = array(
|
191 |
-
'delete' => __('Delete', 'wpforms' ),
|
192 |
);
|
193 |
return $actions;
|
194 |
}
|
195 |
|
196 |
/**
|
197 |
-
* Process the bulk actions
|
198 |
*
|
199 |
* @since 1.0.0
|
200 |
*/
|
@@ -216,13 +260,34 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
216 |
// Delete one or multiple forms - both delete links and bulk actions
|
217 |
if ( 'delete' === $this->current_action() ) {
|
218 |
|
219 |
-
if (
|
|
|
|
|
|
|
220 |
foreach ( $ids as $id ) {
|
221 |
wpforms()->form->delete( $id );
|
222 |
}
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
} else {
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
}
|
227 |
}
|
228 |
|
@@ -231,17 +296,35 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
231 |
|
232 |
if ( wp_verify_nonce( $_GET['_wpnonce'], 'wpforms_duplicate_form_nonce' ) ) {
|
233 |
foreach ( $ids as $id ) {
|
234 |
-
|
235 |
}
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
} else {
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
}
|
241 |
}
|
242 |
|
243 |
/**
|
244 |
-
* Message to be displayed when there are no forms
|
245 |
*
|
246 |
* @since 1.0.0
|
247 |
*/
|
@@ -251,7 +334,7 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
251 |
}
|
252 |
|
253 |
/**
|
254 |
-
* Fetch and setup the final data for the table
|
255 |
*
|
256 |
* @since 1.0.0
|
257 |
*/
|
@@ -269,7 +352,7 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
269 |
// Define which columns can be sorted - form name, date
|
270 |
$sortable = array(
|
271 |
'form_name' => array( 'title', false ),
|
272 |
-
'created' => array( 'date', false )
|
273 |
);
|
274 |
|
275 |
// Set column headers
|
@@ -302,5 +385,4 @@ class WPForms_Overview_Table extends WP_List_Table {
|
|
302 |
)
|
303 |
);
|
304 |
}
|
305 |
-
|
306 |
}
|
11 |
class WPForms_Overview_Table extends WP_List_Table {
|
12 |
|
13 |
/**
|
14 |
+
* Number of forms to show per page.
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
*/
|
53 |
'form_name' => __( 'Name', 'wpforms' ),
|
54 |
'shortcode' => __( 'Shortcode', 'wpforms' ),
|
55 |
'created' => __( 'Created', 'wpforms' ),
|
|
|
|
|
|
|
|
|
56 |
);
|
57 |
|
58 |
return apply_filters( 'wpforms_overview_table_columns', $columns );
|
62 |
* Render the checkbox column.
|
63 |
*
|
64 |
* @since 1.0.0
|
65 |
+
*
|
66 |
+
* @param WP_Post $form
|
67 |
+
*
|
68 |
* @return string
|
69 |
*/
|
70 |
public function column_cb( $form ) {
|
76 |
* Renders the columns.
|
77 |
*
|
78 |
* @since 1.0.0
|
79 |
+
*
|
80 |
+
* @param WP_Post $form
|
81 |
* @param string $column_name
|
82 |
+
*
|
83 |
* @return string
|
84 |
*/
|
85 |
public function column_default( $form, $column_name ) {
|
86 |
|
87 |
+
switch ( $column_name ) {
|
88 |
+
case 'id':
|
89 |
+
$value = $form->ID;
|
90 |
+
break;
|
|
|
91 |
|
92 |
+
case 'shortcode':
|
93 |
+
$value = '[wpforms id="' . $form->ID . '"]';
|
94 |
+
break;
|
95 |
|
96 |
+
case 'created':
|
97 |
+
$value = get_the_date( get_option( 'date_format' ), $form );
|
98 |
+
break;
|
99 |
|
100 |
+
case 'modified':
|
101 |
+
$value = get_post_modified_time( get_option( 'date_format' ), false, $form );
|
102 |
+
break;
|
103 |
|
104 |
+
case 'author':
|
105 |
+
$author = get_userdata( $form->post_author );
|
106 |
+
$value = $author->display_name;
|
107 |
+
break;
|
108 |
|
109 |
+
case 'php':
|
110 |
+
$value = '<code style="display:block;font-size:11px;">if( function_exists( \'wpforms_get\' ) ){ wpforms_get( ' . $form->ID . ' ); }</code>';
|
111 |
+
break;
|
112 |
|
113 |
+
default:
|
114 |
+
$value = '';
|
115 |
}
|
116 |
|
117 |
return apply_filters( 'wpforms_overview_table_column_value', $value, $form, $column_name );
|
121 |
* Render the form name column with action links.
|
122 |
*
|
123 |
* @since 1.0.0
|
124 |
+
*
|
125 |
+
* @param WP_Post $form
|
126 |
+
*
|
127 |
* @return string
|
128 |
*/
|
129 |
public function column_form_name( $form ) {
|
130 |
|
131 |
// Prepare variables.
|
132 |
$name = ! empty( $form->post_title ) ? $form->post_title : $form->post_name;
|
133 |
+
$name = sprintf(
|
134 |
+
'<a class="row-title" href="%s" title="%s"><strong>%s</strong></a>',
|
135 |
+
add_query_arg(
|
136 |
+
array(
|
137 |
+
'view' => 'fields',
|
138 |
+
'form_id' => $form->ID,
|
139 |
+
),
|
140 |
+
admin_url( 'admin.php?page=wpforms-builder' )
|
141 |
+
),
|
142 |
__( 'Edit this form', 'wpforms' ),
|
143 |
$name
|
144 |
);
|
147 |
$row_actions = array();
|
148 |
|
149 |
// Edit
|
150 |
+
$row_actions['edit'] = sprintf(
|
151 |
+
'<a href="%s" title="%s">%s</a>',
|
152 |
+
add_query_arg(
|
153 |
+
array(
|
154 |
+
'view' => 'fields',
|
155 |
+
'form_id' => $form->ID,
|
156 |
+
),
|
157 |
+
admin_url( 'admin.php?page=wpforms-builder' )
|
158 |
+
),
|
159 |
__( 'Edit this form', 'wpforms' ),
|
160 |
__( 'Edit', 'wpforms' )
|
161 |
);
|
162 |
|
163 |
// Entries
|
164 |
+
$row_actions['entries'] = sprintf(
|
165 |
+
'<a href="%s" title="%s">%s</a>',
|
166 |
+
add_query_arg(
|
167 |
+
array(
|
168 |
+
'view' => 'list',
|
169 |
+
'form_id' => $form->ID,
|
170 |
+
),
|
171 |
+
admin_url( 'admin.php?page=wpforms-entries' )
|
172 |
+
),
|
173 |
__( 'View entries', 'wpforms' ),
|
174 |
__( 'Entries', 'wpforms' )
|
175 |
);
|
176 |
|
177 |
// Preview
|
178 |
+
$row_actions['preview_'] = sprintf(
|
179 |
+
'<a href="%s" title="%s" target="_blank" rel="noopener">%s</a>',
|
180 |
esc_url( wpforms()->preview->form_preview_url( $form->ID ) ),
|
181 |
__( 'View preview', 'wpforms' ),
|
182 |
__( 'Preview', 'wpforms' )
|
183 |
);
|
184 |
|
185 |
// Duplicate
|
186 |
+
$row_actions['duplicate'] = sprintf(
|
187 |
+
'<a href="%s" title="%s">%s</a>',
|
188 |
+
wp_nonce_url(
|
189 |
+
add_query_arg(
|
190 |
+
array(
|
191 |
+
'action' => 'duplicate',
|
192 |
+
'form_id' => $form->ID,
|
193 |
+
),
|
194 |
+
admin_url( 'admin.php?page=wpforms-overview' )
|
195 |
+
),
|
196 |
+
'wpforms_duplicate_form_nonce'
|
197 |
+
),
|
198 |
__( 'Duplicate this form', 'wpforms' ),
|
199 |
__( 'Duplicate', 'wpforms' )
|
200 |
);
|
201 |
|
202 |
// Delete
|
203 |
+
$row_actions['delete'] = sprintf(
|
204 |
+
'<a href="%s" title="%s">%s</a>',
|
205 |
+
wp_nonce_url(
|
206 |
+
add_query_arg(
|
207 |
+
array(
|
208 |
+
'action' => 'delete',
|
209 |
+
'form_id' => $form->ID,
|
210 |
+
),
|
211 |
+
admin_url( 'admin.php?page=wpforms-overview' )
|
212 |
+
),
|
213 |
+
'wpforms_delete_form_nonce'
|
214 |
+
),
|
215 |
__( 'Delete this form', 'wpforms' ),
|
216 |
__( 'Delete', 'wpforms' )
|
217 |
);
|
223 |
}
|
224 |
|
225 |
/**
|
226 |
+
* Define bulk actions available for our table listing.
|
227 |
*
|
228 |
* @since 1.0.0
|
229 |
+
*
|
230 |
* @return array
|
231 |
*/
|
232 |
public function get_bulk_actions() {
|
233 |
|
234 |
$actions = array(
|
235 |
+
'delete' => __( 'Delete', 'wpforms' ),
|
236 |
);
|
237 |
return $actions;
|
238 |
}
|
239 |
|
240 |
/**
|
241 |
+
* Process the bulk actions.
|
242 |
*
|
243 |
* @since 1.0.0
|
244 |
*/
|
260 |
// Delete one or multiple forms - both delete links and bulk actions
|
261 |
if ( 'delete' === $this->current_action() ) {
|
262 |
|
263 |
+
if (
|
264 |
+
wp_verify_nonce( $_GET['_wpnonce'], 'bulk-forms' ) ||
|
265 |
+
wp_verify_nonce( $_GET['_wpnonce'], 'wpforms_delete_form_nonce' )
|
266 |
+
) {
|
267 |
foreach ( $ids as $id ) {
|
268 |
wpforms()->form->delete( $id );
|
269 |
}
|
270 |
+
?>
|
271 |
+
<div class="notice updated">
|
272 |
+
<p>
|
273 |
+
<?php
|
274 |
+
if ( count( $ids ) === 1 ) {
|
275 |
+
_e( 'Form was successfully deleted.', 'wpforms' );
|
276 |
+
} else {
|
277 |
+
_e( 'Forms were successfully deleted.', 'wpforms' );
|
278 |
+
}
|
279 |
+
?>
|
280 |
+
</p>
|
281 |
+
</div>
|
282 |
+
<?php
|
283 |
} else {
|
284 |
+
?>
|
285 |
+
<div class="notice updated">
|
286 |
+
<p>
|
287 |
+
<?php _e( 'Security check failed. Please try again.', 'wpforms' ); ?>
|
288 |
+
</p>
|
289 |
+
</div>
|
290 |
+
<?php
|
291 |
}
|
292 |
}
|
293 |
|
296 |
|
297 |
if ( wp_verify_nonce( $_GET['_wpnonce'], 'wpforms_duplicate_form_nonce' ) ) {
|
298 |
foreach ( $ids as $id ) {
|
299 |
+
wpforms()->form->duplicate( $id );
|
300 |
}
|
301 |
+
?>
|
302 |
+
<div class="notice updated">
|
303 |
+
<p>
|
304 |
+
<?php
|
305 |
+
if ( count( $ids ) === 1 ) {
|
306 |
+
_e( 'Form was successfully duplicated.', 'wpforms' );
|
307 |
+
} else {
|
308 |
+
_e( 'Forms were successfully duplicated.', 'wpforms' );
|
309 |
+
}
|
310 |
+
?>
|
311 |
+
</p>
|
312 |
+
</div>
|
313 |
+
<?php
|
314 |
} else {
|
315 |
+
?>
|
316 |
+
<div class="notice updated">
|
317 |
+
<p>
|
318 |
+
<?php _e( 'Security check failed. Please try again.', 'wpforms' ); ?>
|
319 |
+
</p>
|
320 |
+
</div>
|
321 |
+
<?php
|
322 |
}
|
323 |
}
|
324 |
}
|
325 |
|
326 |
/**
|
327 |
+
* Message to be displayed when there are no forms.
|
328 |
*
|
329 |
* @since 1.0.0
|
330 |
*/
|
334 |
}
|
335 |
|
336 |
/**
|
337 |
+
* Fetch and setup the final data for the table.
|
338 |
*
|
339 |
* @since 1.0.0
|
340 |
*/
|
352 |
// Define which columns can be sorted - form name, date
|
353 |
$sortable = array(
|
354 |
'form_name' => array( 'title', false ),
|
355 |
+
'created' => array( 'date', false ),
|
356 |
);
|
357 |
|
358 |
// Set column headers
|
385 |
)
|
386 |
);
|
387 |
}
|
|
|
388 |
}
|
includes/admin/overview/class-overview.php
CHANGED
@@ -52,7 +52,7 @@ class WPForms_Overview {
|
|
52 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
|
53 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
54 |
|
55 |
-
// Provide hook for
|
56 |
do_action( 'wpforms_overview_init' );
|
57 |
}
|
58 |
}
|
@@ -105,7 +105,7 @@ class WPForms_Overview {
|
|
105 |
*/
|
106 |
public function enqueues() {
|
107 |
|
108 |
-
// Hook for
|
109 |
do_action( 'wpforms_overview_enqueue' );
|
110 |
}
|
111 |
|
52 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
|
53 |
add_action( 'wpforms_admin_page', array( $this, 'output' ) );
|
54 |
|
55 |
+
// Provide hook for addons.
|
56 |
do_action( 'wpforms_overview_init' );
|
57 |
}
|
58 |
}
|
105 |
*/
|
106 |
public function enqueues() {
|
107 |
|
108 |
+
// Hook for addons.
|
109 |
do_action( 'wpforms_overview_enqueue' );
|
110 |
}
|
111 |
|
includes/class-conditional-logic-core.php
CHANGED
@@ -37,6 +37,7 @@ class 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 |
|
@@ -48,7 +49,7 @@ class WPForms_Conditional_Logic_Core {
|
|
48 |
public function init() {
|
49 |
|
50 |
// Form builder.
|
51 |
-
add_action( 'wpforms_builder_enqueues',
|
52 |
add_action( 'wpforms_builder_print_footer_scripts', array( $this, 'builder_footer_scripts' ) );
|
53 |
}
|
54 |
|
@@ -139,8 +140,11 @@ class WPForms_Conditional_Logic_Core {
|
|
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 |
|
@@ -273,190 +277,190 @@ class WPForms_Conditional_Logic_Core {
|
|
273 |
// Only display the block details if conditional logic is enabled.
|
274 |
if ( $enabled ) :
|
275 |
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
|
297 |
-
|
298 |
-
|
299 |
|
300 |
-
|
301 |
-
|
302 |
|
303 |
-
|
304 |
|
305 |
-
|
306 |
|
307 |
-
|
308 |
|
309 |
-
|
310 |
-
|
311 |
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
|
326 |
-
|
327 |
|
328 |
-
|
329 |
|
330 |
-
|
331 |
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
343 |
}
|
|
|
344 |
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
401 |
|
402 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
|
423 |
-
|
424 |
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
}
|
430 |
-
}
|
431 |
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
|
445 |
-
|
446 |
|
447 |
-
|
448 |
|
449 |
-
|
450 |
|
451 |
-
|
452 |
|
453 |
-
|
454 |
|
455 |
-
|
456 |
|
457 |
-
|
458 |
|
459 |
-
|
460 |
|
461 |
endif; // End $enabled if().
|
462 |
|
@@ -475,8 +479,11 @@ class WPForms_Conditional_Logic_Core {
|
|
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 |
|
@@ -493,9 +500,12 @@ class WPForms_Conditional_Logic_Core {
|
|
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 |
|
@@ -532,31 +542,31 @@ class WPForms_Conditional_Logic_Core {
|
|
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 |
}
|
@@ -578,7 +588,7 @@ class WPForms_Conditional_Logic_Core {
|
|
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'];
|
@@ -586,7 +596,9 @@ class WPForms_Conditional_Logic_Core {
|
|
586 |
|
587 |
foreach ( $form_data['fields'][ $rule_field ]['choices'] as $key => $choice ) {
|
588 |
foreach ( $values as $value ) {
|
589 |
-
|
|
|
|
|
590 |
$provided_id[] = $key;
|
591 |
}
|
592 |
}
|
@@ -597,25 +609,25 @@ class WPForms_Conditional_Logic_Core {
|
|
597 |
$right = trim( strtolower( (int) $rule_value ) );
|
598 |
|
599 |
switch ( $rule_operator ) {
|
600 |
-
case '=='
|
601 |
-
case 'c'
|
602 |
-
case '^'
|
603 |
-
case '~'
|
604 |
$pass_rule = in_array( $right, $left );
|
605 |
break;
|
606 |
-
case '!='
|
607 |
-
case '!c'
|
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 |
-
|
619 |
}
|
620 |
} // End if().
|
621 |
|
@@ -638,9 +650,12 @@ class WPForms_Conditional_Logic_Core {
|
|
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 |
|
@@ -661,4 +676,5 @@ function wpforms_conditional_logic() {
|
|
661 |
|
662 |
return WPForms_Conditional_Logic_Core::instance();
|
663 |
}
|
|
|
664 |
wpforms_conditional_logic();
|
37 |
self::$instance = new WPForms_Conditional_Logic_Core;
|
38 |
add_action( 'wpforms_loaded', array( self::$instance, 'init' ), 10 );
|
39 |
}
|
40 |
+
|
41 |
return self::$instance;
|
42 |
}
|
43 |
|
49 |
public function init() {
|
50 |
|
51 |
// Form builder.
|
52 |
+
add_action( 'wpforms_builder_enqueues', array( $this, 'builder_assets' ) );
|
53 |
add_action( 'wpforms_builder_print_footer_scripts', array( $this, 'builder_footer_scripts' ) );
|
54 |
}
|
55 |
|
140 |
* Builds the conditional logic settings to display in the form builder.
|
141 |
*
|
142 |
* @since 1.3.8
|
143 |
+
*
|
144 |
* @param array $args
|
145 |
* @param bool $echo
|
146 |
+
*
|
147 |
+
* @return string
|
148 |
*/
|
149 |
public function builder_block( $args = array(), $echo = true ) {
|
150 |
|
277 |
// Only display the block details if conditional logic is enabled.
|
278 |
if ( $enabled ) :
|
279 |
|
280 |
+
$data_attrs .= 'data-input-name="' . $field_name . '"';
|
281 |
+
$style = $enabled ? '' : 'display:none;';
|
282 |
+
|
283 |
+
// Groups wrap open markup.
|
284 |
+
echo '<div class="wpforms-conditional-groups" style="' . $style . '">';
|
285 |
+
|
286 |
+
// This is the "[Show] this field if" type text and setting.
|
287 |
+
echo '<h4>';
|
288 |
+
echo '<select name="' . $field_name . '[conditional_type]">';
|
289 |
+
foreach ( $actions as $key => $label ) {
|
290 |
+
printf(
|
291 |
+
'<option value="%s" %s>%s</option>',
|
292 |
+
trim( esc_attr( $key ) ),
|
293 |
+
selected( $key, $action_selected, false ),
|
294 |
+
esc_html( $label )
|
295 |
+
);
|
296 |
+
}
|
297 |
+
echo '</select>';
|
298 |
+
echo $action_desc; // Eg "this field if".
|
299 |
+
echo '</h4>';
|
300 |
|
301 |
+
// Go through each conditional logic group.
|
302 |
+
foreach ( $conditionals as $group_id => $group ) :
|
303 |
|
304 |
+
// Individual group open markup.
|
305 |
+
echo '<div class="wpforms-conditional-group" data-reference="' . $reference . '">';
|
306 |
|
307 |
+
echo'<table><tbody>';
|
308 |
|
309 |
+
foreach ( $group as $rule_id => $rule ) :
|
310 |
|
311 |
+
$selected_current = false;
|
312 |
|
313 |
+
// Individual rule table row.
|
314 |
+
echo '<tr class="wpforms-conditional-row" ' . $data_attrs . '>';
|
315 |
|
316 |
+
// Rule field - allows the user to select
|
317 |
+
// which field the conditional logic rule is
|
318 |
+
// anchored to.
|
319 |
+
echo '<td class="field">';
|
320 |
|
321 |
+
printf(
|
322 |
+
'<select name="%s[conditionals][%d][%d][field]" class="wpforms-conditional-field" data-groupid="%d" data-ruleid="%d">',
|
323 |
+
$field_name,
|
324 |
+
$group_id,
|
325 |
+
$rule_id,
|
326 |
+
$group_id,
|
327 |
+
$rule_id
|
328 |
+
);
|
329 |
|
330 |
+
echo '<option value="">' . __( '-- Select Field --', 'wpforms' ) . '</option>';
|
331 |
|
332 |
+
if ( ! empty( $form_fields ) ) {
|
333 |
|
334 |
+
foreach ( $form_fields as $form_field ) {
|
335 |
|
336 |
+
// Exclude fields that are
|
337 |
+
// leveraging dynamic choices.
|
338 |
+
if ( ! empty( $form_field['dynamic_choices'] ) ) {
|
339 |
+
continue;
|
340 |
+
}
|
341 |
|
342 |
+
if ( isset( $rule['field'] ) ) {
|
343 |
+
$selected = $rule['field'];
|
344 |
+
$selected_current = $rule['field'];
|
345 |
+
} else {
|
346 |
+
$selected = false;
|
347 |
+
}
|
348 |
+
|
349 |
+
$selected = selected( $selected, $form_field['id'], false );
|
350 |
+
printf( '<option value="%s" %s>%s</option>', absint( $form_field['id'] ), $selected, esc_html( $form_field['label'] ) );
|
351 |
}
|
352 |
+
}
|
353 |
|
354 |
+
echo '</select>';
|
355 |
+
|
356 |
+
echo '</td>';
|
357 |
+
|
358 |
+
// Rule operator - allows the user to
|
359 |
+
// determine the comparison operator used
|
360 |
+
// for processing.
|
361 |
+
echo '<td class="operator">';
|
362 |
+
|
363 |
+
printf(
|
364 |
+
'<select name="%s[conditionals][%s][%s][operator]" class="wpforms-conditional-operator">',
|
365 |
+
$field_name,
|
366 |
+
$group_id,
|
367 |
+
$rule_id
|
368 |
+
);
|
369 |
+
|
370 |
+
$operator = ! empty( $rule['operator'] ) ? $rule['operator'] : false;
|
371 |
+
printf( '<option value="==" %s>%s</option>', selected( $operator, '==', false ), __( 'is', 'wpforms' ) );
|
372 |
+
printf( '<option value="!=" %s>%s</option>', selected( $operator, '!=', false ), __( 'is not', 'wpforms' ) );
|
373 |
+
printf( '<option value="e" %s>%s</option>', selected( $operator, 'e', false ), __( 'empty', 'wpforms' ) );
|
374 |
+
printf( '<option value="!e" %s>%s</option>', selected( $operator, '!e', false ), __( 'not empty', 'wpforms' ) );
|
375 |
+
|
376 |
+
// Only text based fields support
|
377 |
+
// these additional operators.
|
378 |
+
if ( ! $selected || ( in_array( $form_fields[ $rule['field'] ]['type'], array( 'text', 'textarea', 'email', 'url', 'number', 'hidden' ), true ) ) ) {
|
379 |
+
printf( '<option value="c" %s>%s</option>', selected( $operator, 'c', false ), __( 'contains', 'wpforms' ) );
|
380 |
+
printf( '<option value="!c" %s>%s</option>', selected( $operator, '!c', false ), __( 'does not contain', 'wpforms' ) );
|
381 |
+
printf( '<option value="^" %s>%s</option>', selected( $operator, '^', false ), __( 'starts with', 'wpforms' ) );
|
382 |
+
printf( '<option value="~" %s>%s</option>', selected( $operator, '~', false ), __( 'ends with', 'wpforms' ) );
|
383 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
|
385 |
+
echo '</select>';
|
386 |
|
387 |
+
echo '</td>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
+
// Rule value - allows the user to
|
390 |
+
// determine the value we are using for
|
391 |
+
// comparison.
|
392 |
+
echo '<td class="value">';
|
393 |
+
|
394 |
+
if ( isset( $rule['field'] ) ) {
|
395 |
+
|
396 |
+
// For empty/not empty fields the field value input is not needed so we disable it
|
397 |
+
if ( ! empty( $rule['operator'] ) && in_array( $rule['operator'], array( 'e', '!e' ), true ) ) {
|
398 |
+
$disabled = 'disabled';
|
399 |
+
$rule['value'] = '';
|
400 |
+
} else {
|
401 |
+
$disabled = '';
|
402 |
+
}
|
403 |
|
404 |
+
if ( isset( $form_fields[ $rule['field'] ]['type'] ) && in_array( $form_fields[ $rule['field'] ]['type'], array( 'text', 'textarea', 'email', 'url', 'number', 'hidden' ), true ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
+
printf(
|
407 |
+
'<input type="text" name="%s[conditionals][%s][%s][value]" value="%s" class="wpforms-conditional-value" %s>',
|
408 |
+
$field_name,
|
409 |
+
$group_id,
|
410 |
+
$rule_id,
|
411 |
+
esc_attr( $rule['value'] ),
|
412 |
+
$disabled
|
413 |
+
);
|
414 |
|
415 |
+
} else {
|
416 |
|
417 |
+
printf(
|
418 |
+
'<select name="%s[conditionals][%s][%s][value]" class="wpforms-conditional-value" %d>',
|
419 |
+
$field_name,
|
420 |
+
$group_id,
|
421 |
+
$rule_id,
|
422 |
+
$disabled
|
423 |
+
);
|
424 |
+
|
425 |
+
echo '<option value="">' . __( '-- Select Choice --', 'wpforms' ) . '</option>';
|
426 |
+
|
427 |
+
if ( ! empty( $form_fields[ $rule['field'] ]['choices'] ) ) {
|
428 |
+
|
429 |
+
foreach ( $form_fields[ $rule['field'] ]['choices'] as $option_id => $option ) {
|
430 |
+
$value = isset( $rule['value'] ) ? $rule['value'] : '';
|
431 |
+
$selected = selected( $option_id, $value, false );
|
432 |
+
printf( '<option value="%s" %s>%s</option>', $option_id, $selected, esc_html( $option['label'] ) );
|
433 |
+
}
|
434 |
}
|
|
|
435 |
|
436 |
+
echo '</select>';
|
437 |
+
}
|
438 |
+
} else {
|
439 |
+
echo '<select></select>';
|
440 |
+
} // End if().
|
441 |
+
echo '</td>';
|
442 |
|
443 |
+
// Rule actions.
|
444 |
+
echo '<td class="actions">';
|
445 |
+
echo '<button class="wpforms-conditional-rule-add" title="' . __( 'Create new rule', 'wpforms' ) . '">' . __( 'AND', 'wpforms') . '</button>';
|
446 |
+
echo '<button class="wpforms-conditional-rule-delete" title="' . __( 'Delete rule', 'wpforms' ) . '"><i class="fa fa-times-circle" aria-hidden="true"></i></button>';
|
447 |
+
echo '</td>';
|
448 |
|
449 |
+
echo '</tr>'; // Close individual rule table row.
|
450 |
|
451 |
+
endforeach; // End foreach() for individual rules.
|
452 |
|
453 |
+
echo '</tbody></table>';
|
454 |
|
455 |
+
echo '<h5>or</h5>';
|
456 |
|
457 |
+
echo '</div>'; // Close individual group markup.
|
458 |
|
459 |
+
endforeach; // End foreach() for conditional logic groups.
|
460 |
|
461 |
+
echo '<button class="wpforms-conditional-groups-add">' . __( 'Add rule group', 'wpforms' ) . '</button>';
|
462 |
|
463 |
+
echo '</div>'; // Close Groups wrap markup.
|
464 |
|
465 |
endif; // End $enabled if().
|
466 |
|
479 |
* Alias method for backwards compatibility.
|
480 |
*
|
481 |
* @since 1.1.0
|
482 |
+
*
|
483 |
* @param array $args
|
484 |
* @param bool $echo
|
485 |
+
*
|
486 |
+
* @return string
|
487 |
*/
|
488 |
public function conditionals_block( $args = array(), $echo = true ) {
|
489 |
|
500 |
* Checks if a form passes the conditional logic rules that are provided.
|
501 |
*
|
502 |
* @since 1.3.8
|
503 |
+
*
|
504 |
* @param array $fields
|
505 |
* @param array $form_data
|
506 |
* @param array $conditionals
|
507 |
+
*
|
508 |
+
* @return bool
|
509 |
*/
|
510 |
public function process( $fields, $form_data, $conditionals ) {
|
511 |
|
542 |
$right = trim( strtolower( $rule_value ) );
|
543 |
|
544 |
switch ( $rule_operator ) {
|
545 |
+
case '==':
|
546 |
$pass_rule = ( $left == $right );
|
547 |
break;
|
548 |
+
case '!=':
|
549 |
$pass_rule = ( $left != $right );
|
550 |
break;
|
551 |
+
case 'c':
|
552 |
$pass_rule = ( strpos( $left, $right ) !== false );
|
553 |
break;
|
554 |
+
case '!c':
|
555 |
$pass_rule = ( strpos( $left, $right ) === false );
|
556 |
break;
|
557 |
+
case '^':
|
558 |
$pass_rule = ( strrpos( $left, $right, -strlen( $left ) ) !== false );
|
559 |
break;
|
560 |
+
case '~':
|
561 |
$pass_rule = ( ( $temp = strlen( $left ) - strlen( $right ) ) >= 0 && strpos( $left, $right, $temp ) !== false );
|
562 |
break;
|
563 |
+
case 'e':
|
564 |
$pass_rule = ( '' == $left );
|
565 |
break;
|
566 |
+
case '!e':
|
567 |
$pass_rule = ( '' != $left );
|
568 |
break;
|
569 |
+
default:
|
570 |
$pass_rule = apply_filters( 'wpforms_process_conditional_logic', false, $rule_operator, $left, $right );
|
571 |
break;
|
572 |
}
|
588 |
// it ourselves.
|
589 |
$provided_id = array();
|
590 |
|
591 |
+
if ( in_array( $fields[ $rule_field ]['type'], array( 'checkbox' ), true ) ) {
|
592 |
$values = explode( "\n", $fields[ $rule_field ]['value'] );
|
593 |
} else {
|
594 |
$values = (array) $fields[ $rule_field ]['value'];
|
596 |
|
597 |
foreach ( $form_data['fields'][ $rule_field ]['choices'] as $key => $choice ) {
|
598 |
foreach ( $values as $value ) {
|
599 |
+
$value = wpforms_decode_string( $value );
|
600 |
+
|
601 |
+
if ( in_array( $value, $choice, true ) ) {
|
602 |
$provided_id[] = $key;
|
603 |
}
|
604 |
}
|
609 |
$right = trim( strtolower( (int) $rule_value ) );
|
610 |
|
611 |
switch ( $rule_operator ) {
|
612 |
+
case '==':
|
613 |
+
case 'c': // BC, no longer available
|
614 |
+
case '^': // BC, no longer available
|
615 |
+
case '~': // BC, no longer available
|
616 |
$pass_rule = in_array( $right, $left );
|
617 |
break;
|
618 |
+
case '!=':
|
619 |
+
case '!c': // BC, no longer available
|
620 |
$pass_rule = ! in_array( $right, $left );
|
621 |
break;
|
622 |
+
case 'e':
|
623 |
$pass_rule = ( false === $left[0] );
|
624 |
break;
|
625 |
+
case '!e':
|
626 |
$pass_rule = ( false !== $left[0] );
|
627 |
break;
|
628 |
+
default:
|
629 |
$pass_rule = apply_filters( 'wpforms_process_conditional_logic', false, $rule_operator, $left, $right );
|
630 |
+
break;
|
631 |
}
|
632 |
} // End if().
|
633 |
|
650 |
* Alias function for backwards compatibility.
|
651 |
*
|
652 |
* @since 1.0.0
|
653 |
+
*
|
654 |
* @param array $fields
|
655 |
* @param array $form_data
|
656 |
* @param array $conditionals
|
657 |
+
*
|
658 |
+
* @return bool
|
659 |
*/
|
660 |
public function conditionals_process( $fields, $form_data, $conditionals ) {
|
661 |
|
676 |
|
677 |
return WPForms_Conditional_Logic_Core::instance();
|
678 |
}
|
679 |
+
|
680 |
wpforms_conditional_logic();
|
includes/class-form.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* All the form goodness and basics.
|
4 |
*
|
@@ -9,7 +10,7 @@
|
|
9 |
* @since 1.0.0
|
10 |
* @license GPL-2.0+
|
11 |
* @copyright Copyright (c) 2016, WPForms LLC
|
12 |
-
*/
|
13 |
class WPForms_Form_Handler {
|
14 |
|
15 |
/**
|
@@ -34,7 +35,8 @@ class WPForms_Form_Handler {
|
|
34 |
public function register_cpt() {
|
35 |
|
36 |
// Custom post type arguments, which can be filtered if needed
|
37 |
-
$args = apply_filters(
|
|
|
38 |
array(
|
39 |
'labels' => array(),
|
40 |
'public' => false,
|
@@ -56,11 +58,12 @@ class WPForms_Form_Handler {
|
|
56 |
* Adds "WPForm" item to new-content admin bar menu item.
|
57 |
*
|
58 |
* @since 1.1.7.2
|
|
|
59 |
* @param object $wp_admin_bar
|
60 |
*/
|
61 |
public function admin_bar( $wp_admin_bar ) {
|
62 |
|
63 |
-
if ( !is_admin_bar_showing() || !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
64 |
return;
|
65 |
}
|
66 |
|
@@ -77,8 +80,11 @@ class WPForms_Form_Handler {
|
|
77 |
* Fetches forms
|
78 |
*
|
79 |
* @since 1.0.0
|
80 |
-
*
|
|
|
81 |
* @param array $args
|
|
|
|
|
82 |
*/
|
83 |
public function get( $id = '', $args = array() ) {
|
84 |
|
@@ -88,16 +94,15 @@ class WPForms_Form_Handler {
|
|
88 |
return false;
|
89 |
}
|
90 |
|
91 |
-
if ( !empty( $id ) ) {
|
92 |
|
93 |
// @todo add $id array support
|
94 |
// If ID is provided, we get a single form
|
95 |
$forms = get_post( absint( $id ) );
|
96 |
|
97 |
-
if ( !empty( $args['content_only'] ) && !empty( $forms ) && 'wpforms'
|
98 |
-
|
99 |
}
|
100 |
-
|
101 |
} else {
|
102 |
|
103 |
// No ID provided, get multiple forms
|
@@ -124,17 +129,20 @@ class WPForms_Form_Handler {
|
|
124 |
}
|
125 |
|
126 |
/**
|
127 |
-
*
|
128 |
*
|
129 |
* @since 1.0.0
|
|
|
130 |
* @param array $ids
|
|
|
131 |
* @return boolean
|
132 |
*/
|
133 |
public function delete( $ids = array() ) {
|
134 |
|
135 |
// Check for permissions
|
136 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) )
|
137 |
return false;
|
|
|
138 |
|
139 |
if ( ! is_array( $ids ) ) {
|
140 |
$ids = array( $ids );
|
@@ -151,7 +159,7 @@ class WPForms_Form_Handler {
|
|
151 |
wpforms()->entry_meta->delete_by( 'form_id', $id );
|
152 |
}
|
153 |
|
154 |
-
if ( ! $form
|
155 |
return false;
|
156 |
}
|
157 |
}
|
@@ -163,37 +171,42 @@ class WPForms_Form_Handler {
|
|
163 |
* Add new form.
|
164 |
*
|
165 |
* @since 1.0.0
|
|
|
166 |
* @param string $title
|
167 |
* @param array $args
|
|
|
|
|
168 |
* @return mixed
|
169 |
*/
|
170 |
public function add( $title = '', $args = array(), $data = array() ) {
|
171 |
|
172 |
// Check for permissions
|
173 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) )
|
174 |
return false;
|
|
|
175 |
|
176 |
// Must have a title
|
177 |
-
if ( empty( $title ) )
|
178 |
return false;
|
|
|
179 |
|
180 |
-
$args = apply_filters( 'wpforms_create_form_args'
|
181 |
|
182 |
$form_content = array(
|
183 |
'field_id' => '0',
|
184 |
'settings' => array(
|
185 |
'form_title' => sanitize_text_field( $title ),
|
186 |
-
'form_desc'
|
187 |
),
|
188 |
);
|
189 |
|
190 |
// Merge args and create the form
|
191 |
-
$form
|
192 |
$args,
|
193 |
array(
|
194 |
-
'post_title'
|
195 |
-
'post_status'
|
196 |
-
'post_type'
|
197 |
'post_content' => wpforms_encode( $form_content ),
|
198 |
)
|
199 |
);
|
@@ -208,9 +221,13 @@ class WPForms_Form_Handler {
|
|
208 |
* Updates form
|
209 |
*
|
210 |
* @since 1.0.0
|
211 |
-
*
|
|
|
|
|
212 |
* @param array $args
|
|
|
213 |
* @return mixed
|
|
|
214 |
*/
|
215 |
public function update( $form_id = '', $data = array(), $args = array() ) {
|
216 |
|
@@ -218,11 +235,13 @@ class WPForms_Form_Handler {
|
|
218 |
remove_filter( 'content_save_pre', 'balanceTags', 50 );
|
219 |
|
220 |
// Check for permissions
|
221 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) )
|
222 |
return false;
|
|
|
223 |
|
224 |
-
if ( empty( $data ) )
|
225 |
return false;
|
|
|
226 |
|
227 |
if ( empty( $form_id ) ) {
|
228 |
$form_id = $data['id'];
|
@@ -230,28 +249,28 @@ class WPForms_Form_Handler {
|
|
230 |
|
231 |
$data = wp_unslash( $data );
|
232 |
|
233 |
-
if ( !empty( $data['settings']['form_title'] ) ) {
|
234 |
$title = $data['settings']['form_title'];
|
235 |
} else {
|
236 |
$title = get_the_title( $form_id );
|
237 |
}
|
238 |
|
239 |
-
if ( !empty( $data['settings']['form_desc'] ) ) {
|
240 |
$desc = $data['settings']['form_desc'];
|
241 |
} else {
|
242 |
$desc = '';
|
243 |
}
|
244 |
|
245 |
-
$data['field_id'] = !empty( $data['field_id'] ) ? absint( $data['field_id'] ) : '0';
|
246 |
|
247 |
-
//
|
248 |
$meta = $this->get_meta( $form_id );
|
249 |
if ( $meta ) {
|
250 |
$data['meta'] = $meta;
|
251 |
}
|
252 |
|
253 |
// Preserve field meta.
|
254 |
-
if ( isset( $data['fields'] ) )
|
255 |
foreach ( $data['fields'] as $i => $field_data ) {
|
256 |
if ( isset( $field_data['id'] ) ) {
|
257 |
$field_meta = $this->get_field_meta( $form_id, $field_data['id'] );
|
@@ -263,11 +282,16 @@ class WPForms_Form_Handler {
|
|
263 |
}
|
264 |
|
265 |
// Sanitize - don't allow tags for users who do not have appropriate cap
|
266 |
-
if ( !current_user_can( 'unfiltered_html' ) ) {
|
267 |
array_walk_recursive( $data, 'wp_strip_all_tags' );
|
268 |
}
|
269 |
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
271 |
'ID' => $form_id,
|
272 |
'post_title' => esc_html( $title ),
|
273 |
'post_excerpt' => $desc,
|
@@ -285,14 +309,17 @@ class WPForms_Form_Handler {
|
|
285 |
* Duplicate forms.
|
286 |
*
|
287 |
* @since 1.1.4
|
|
|
288 |
* @param array $ids
|
|
|
289 |
* @return boolean
|
290 |
*/
|
291 |
public function duplicate( $ids = array() ) {
|
292 |
|
293 |
-
// Check for permissions
|
294 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) )
|
295 |
return false;
|
|
|
296 |
|
297 |
if ( ! is_array( $ids ) ) {
|
298 |
$ids = array( $ids );
|
@@ -302,28 +329,28 @@ class WPForms_Form_Handler {
|
|
302 |
|
303 |
foreach ( $ids as $id ) {
|
304 |
|
305 |
-
// Get original entry
|
306 |
$form = get_post( $id );
|
307 |
|
308 |
-
// Confirm form exists
|
309 |
if ( ! $form || empty( $form ) ) {
|
310 |
return false;
|
311 |
}
|
312 |
|
313 |
-
// Get the form data
|
314 |
$new_form_data = wpforms_decode( $form->post_content );
|
315 |
|
316 |
-
// Remove form ID from title if present
|
317 |
-
$new_form_data['settings']['form_title'] = str_replace('(ID #' . absint( $id ) . ')', '', $new_form_data['settings']['form_title'] );
|
318 |
-
|
319 |
-
// Create the duplicate form
|
320 |
-
$new_form
|
321 |
-
'post_author'
|
322 |
-
'post_content'
|
323 |
-
'post_excerpt'
|
324 |
-
'post_status'
|
325 |
-
'post_title'
|
326 |
-
'post_type'
|
327 |
);
|
328 |
$new_form_id = wp_insert_post( $new_form );
|
329 |
|
@@ -331,13 +358,13 @@ class WPForms_Form_Handler {
|
|
331 |
return false;
|
332 |
}
|
333 |
|
334 |
-
// Set new form
|
335 |
$new_form_data['settings']['form_title'] .= ' (ID #' . absint( $new_form_id ) . ')';
|
336 |
|
337 |
-
// Set new form ID
|
338 |
$new_form_data['id'] = absint( $new_form_id );
|
339 |
|
340 |
-
// Update new duplicate form
|
341 |
$new_form_id = $this->update( $new_form_id, $new_form_data );
|
342 |
|
343 |
if ( ! $new_form_id || is_wp_error( $new_form_id ) ) {
|
@@ -352,25 +379,31 @@ class WPForms_Form_Handler {
|
|
352 |
* Get the next available field ID and increment by one.
|
353 |
*
|
354 |
* @since 1.0.0
|
|
|
355 |
* @param int $form_id
|
|
|
356 |
* @return mixed int or false
|
357 |
*/
|
358 |
public function next_field_id( $form_id ) {
|
359 |
|
360 |
-
// Check for permissions
|
361 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) )
|
362 |
return false;
|
|
|
363 |
|
364 |
-
if ( empty( $form_id ) )
|
365 |
return false;
|
|
|
366 |
|
367 |
-
$form = $this->get( $form_id, array(
|
|
|
|
|
368 |
|
369 |
-
if ( !empty( $form['field_id'] ) ) {
|
370 |
$field_id = absint( $form['field_id'] );
|
371 |
-
$form['field_id']++;
|
372 |
} else {
|
373 |
-
$field_id
|
374 |
$form['field_id'] = '1';
|
375 |
}
|
376 |
|
@@ -383,21 +416,30 @@ class WPForms_Form_Handler {
|
|
383 |
* Get private meta information for a form.
|
384 |
*
|
385 |
* @since 1.0.0
|
|
|
|
|
|
|
|
|
|
|
386 |
*/
|
387 |
public function get_meta( $form_id, $field = '' ) {
|
388 |
|
389 |
-
if ( empty( $form_id ) )
|
390 |
return false;
|
|
|
391 |
|
392 |
-
$data = $this->get( $form_id, array(
|
|
|
|
|
393 |
|
394 |
if ( isset( $data['meta'] ) ) {
|
395 |
if ( empty( $field ) ) {
|
396 |
return $data['meta'];
|
397 |
-
} elseif ( isset( $data['meta'][$field] ) ) {
|
398 |
-
return $data['meta'][$field];
|
399 |
}
|
400 |
}
|
|
|
401 |
return false;
|
402 |
}
|
403 |
|
@@ -405,9 +447,11 @@ class WPForms_Form_Handler {
|
|
405 |
* Update or add form meta information to a form.
|
406 |
*
|
407 |
* @since 1.4.0
|
|
|
408 |
* @param int $form_id
|
409 |
* @param string $meta_key
|
410 |
* @param string $meta_value
|
|
|
411 |
* @return bool
|
412 |
*/
|
413 |
public function update_meta( $form_id, $meta_key, $meta_value ) {
|
@@ -432,7 +476,7 @@ class WPForms_Form_Handler {
|
|
432 |
|
433 |
$data['meta'][ $meta_key ] = $meta_value;
|
434 |
|
435 |
-
$form
|
436 |
'ID' => $form_id,
|
437 |
'post_content' => wpforms_encode( $data ),
|
438 |
);
|
@@ -448,8 +492,10 @@ class WPForms_Form_Handler {
|
|
448 |
* Delete form meta information from a form.
|
449 |
*
|
450 |
* @since 1.4.0
|
|
|
451 |
* @param int $form_id
|
452 |
* @param string $meta_key
|
|
|
453 |
* @return bool
|
454 |
*/
|
455 |
public function delete_meta( $form_id, $meta_key ) {
|
@@ -474,7 +520,7 @@ class WPForms_Form_Handler {
|
|
474 |
|
475 |
unset( $data['meta'][ $meta_key ] );
|
476 |
|
477 |
-
$form
|
478 |
'ID' => $form_id,
|
479 |
'post_content' => wpforms_encode( $data ),
|
480 |
);
|
@@ -490,6 +536,11 @@ class WPForms_Form_Handler {
|
|
490 |
* Get private meta information for a form field.
|
491 |
*
|
492 |
* @since 1.0.0
|
|
|
|
|
|
|
|
|
|
|
493 |
*/
|
494 |
public function get_field( $form_id, $field_id = '' ) {
|
495 |
|
@@ -497,7 +548,9 @@ class WPForms_Form_Handler {
|
|
497 |
return false;
|
498 |
}
|
499 |
|
500 |
-
$data = $this->get( $form_id, array(
|
|
|
|
|
501 |
|
502 |
return isset( $data['fields'][ $field_id ] ) ? $data['fields'][ $field_id ] : false;
|
503 |
}
|
@@ -506,6 +559,11 @@ class WPForms_Form_Handler {
|
|
506 |
* Get private meta information for a form field.
|
507 |
*
|
508 |
* @since 1.0.0
|
|
|
|
|
|
|
|
|
|
|
509 |
*/
|
510 |
public function get_field_meta( $form_id, $field = '' ) {
|
511 |
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* All the form goodness and basics.
|
5 |
*
|
10 |
* @since 1.0.0
|
11 |
* @license GPL-2.0+
|
12 |
* @copyright Copyright (c) 2016, WPForms LLC
|
13 |
+
*/
|
14 |
class WPForms_Form_Handler {
|
15 |
|
16 |
/**
|
35 |
public function register_cpt() {
|
36 |
|
37 |
// Custom post type arguments, which can be filtered if needed
|
38 |
+
$args = apply_filters(
|
39 |
+
'wpforms_post_type_args',
|
40 |
array(
|
41 |
'labels' => array(),
|
42 |
'public' => false,
|
58 |
* Adds "WPForm" item to new-content admin bar menu item.
|
59 |
*
|
60 |
* @since 1.1.7.2
|
61 |
+
*
|
62 |
* @param object $wp_admin_bar
|
63 |
*/
|
64 |
public function admin_bar( $wp_admin_bar ) {
|
65 |
|
66 |
+
if ( ! is_admin_bar_showing() || ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
67 |
return;
|
68 |
}
|
69 |
|
80 |
* Fetches forms
|
81 |
*
|
82 |
* @since 1.0.0
|
83 |
+
*
|
84 |
+
* @param mixed $id
|
85 |
* @param array $args
|
86 |
+
*
|
87 |
+
* @return array|bool|null|WP_Post
|
88 |
*/
|
89 |
public function get( $id = '', $args = array() ) {
|
90 |
|
94 |
return false;
|
95 |
}
|
96 |
|
97 |
+
if ( ! empty( $id ) ) {
|
98 |
|
99 |
// @todo add $id array support
|
100 |
// If ID is provided, we get a single form
|
101 |
$forms = get_post( absint( $id ) );
|
102 |
|
103 |
+
if ( ! empty( $args['content_only'] ) && ! empty( $forms ) && 'wpforms' === $forms->post_type ) {
|
104 |
+
$forms = wpforms_decode( $forms->post_content );
|
105 |
}
|
|
|
106 |
} else {
|
107 |
|
108 |
// No ID provided, get multiple forms
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
+
* Delete forms.
|
133 |
*
|
134 |
* @since 1.0.0
|
135 |
+
*
|
136 |
* @param array $ids
|
137 |
+
*
|
138 |
* @return boolean
|
139 |
*/
|
140 |
public function delete( $ids = array() ) {
|
141 |
|
142 |
// Check for permissions
|
143 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
144 |
return false;
|
145 |
+
}
|
146 |
|
147 |
if ( ! is_array( $ids ) ) {
|
148 |
$ids = array( $ids );
|
159 |
wpforms()->entry_meta->delete_by( 'form_id', $id );
|
160 |
}
|
161 |
|
162 |
+
if ( ! $form ) {
|
163 |
return false;
|
164 |
}
|
165 |
}
|
171 |
* Add new form.
|
172 |
*
|
173 |
* @since 1.0.0
|
174 |
+
*
|
175 |
* @param string $title
|
176 |
* @param array $args
|
177 |
+
* @param array $data
|
178 |
+
*
|
179 |
* @return mixed
|
180 |
*/
|
181 |
public function add( $title = '', $args = array(), $data = array() ) {
|
182 |
|
183 |
// Check for permissions
|
184 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
185 |
return false;
|
186 |
+
}
|
187 |
|
188 |
// Must have a title
|
189 |
+
if ( empty( $title ) ) {
|
190 |
return false;
|
191 |
+
}
|
192 |
|
193 |
+
$args = apply_filters( 'wpforms_create_form_args', $args, $data );
|
194 |
|
195 |
$form_content = array(
|
196 |
'field_id' => '0',
|
197 |
'settings' => array(
|
198 |
'form_title' => sanitize_text_field( $title ),
|
199 |
+
'form_desc' => '',
|
200 |
),
|
201 |
);
|
202 |
|
203 |
// Merge args and create the form
|
204 |
+
$form = wp_parse_args(
|
205 |
$args,
|
206 |
array(
|
207 |
+
'post_title' => esc_html( $title ),
|
208 |
+
'post_status' => 'publish',
|
209 |
+
'post_type' => 'wpforms',
|
210 |
'post_content' => wpforms_encode( $form_content ),
|
211 |
)
|
212 |
);
|
221 |
* Updates form
|
222 |
*
|
223 |
* @since 1.0.0
|
224 |
+
*
|
225 |
+
* @param string $form_id
|
226 |
+
* @param array $data
|
227 |
* @param array $args
|
228 |
+
*
|
229 |
* @return mixed
|
230 |
+
* @internal param string $title
|
231 |
*/
|
232 |
public function update( $form_id = '', $data = array(), $args = array() ) {
|
233 |
|
235 |
remove_filter( 'content_save_pre', 'balanceTags', 50 );
|
236 |
|
237 |
// Check for permissions
|
238 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
239 |
return false;
|
240 |
+
}
|
241 |
|
242 |
+
if ( empty( $data ) ) {
|
243 |
return false;
|
244 |
+
}
|
245 |
|
246 |
if ( empty( $form_id ) ) {
|
247 |
$form_id = $data['id'];
|
249 |
|
250 |
$data = wp_unslash( $data );
|
251 |
|
252 |
+
if ( ! empty( $data['settings']['form_title'] ) ) {
|
253 |
$title = $data['settings']['form_title'];
|
254 |
} else {
|
255 |
$title = get_the_title( $form_id );
|
256 |
}
|
257 |
|
258 |
+
if ( ! empty( $data['settings']['form_desc'] ) ) {
|
259 |
$desc = $data['settings']['form_desc'];
|
260 |
} else {
|
261 |
$desc = '';
|
262 |
}
|
263 |
|
264 |
+
$data['field_id'] = ! empty( $data['field_id'] ) ? absint( $data['field_id'] ) : '0';
|
265 |
|
266 |
+
// Preserve form meta.
|
267 |
$meta = $this->get_meta( $form_id );
|
268 |
if ( $meta ) {
|
269 |
$data['meta'] = $meta;
|
270 |
}
|
271 |
|
272 |
// Preserve field meta.
|
273 |
+
if ( isset( $data['fields'] ) ) {
|
274 |
foreach ( $data['fields'] as $i => $field_data ) {
|
275 |
if ( isset( $field_data['id'] ) ) {
|
276 |
$field_meta = $this->get_field_meta( $form_id, $field_data['id'] );
|
282 |
}
|
283 |
|
284 |
// Sanitize - don't allow tags for users who do not have appropriate cap
|
285 |
+
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
286 |
array_walk_recursive( $data, 'wp_strip_all_tags' );
|
287 |
}
|
288 |
|
289 |
+
// Sanitize notification names
|
290 |
+
foreach ( $data['settings']['notifications'] as $id => &$notification ) {
|
291 |
+
$notification['notification_name'] = sanitize_text_field( $notification['notification_name'] );
|
292 |
+
}
|
293 |
+
|
294 |
+
$form = array(
|
295 |
'ID' => $form_id,
|
296 |
'post_title' => esc_html( $title ),
|
297 |
'post_excerpt' => $desc,
|
309 |
* Duplicate forms.
|
310 |
*
|
311 |
* @since 1.1.4
|
312 |
+
*
|
313 |
* @param array $ids
|
314 |
+
*
|
315 |
* @return boolean
|
316 |
*/
|
317 |
public function duplicate( $ids = array() ) {
|
318 |
|
319 |
+
// Check for permissions.
|
320 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
321 |
return false;
|
322 |
+
}
|
323 |
|
324 |
if ( ! is_array( $ids ) ) {
|
325 |
$ids = array( $ids );
|
329 |
|
330 |
foreach ( $ids as $id ) {
|
331 |
|
332 |
+
// Get original entry.
|
333 |
$form = get_post( $id );
|
334 |
|
335 |
+
// Confirm form exists.
|
336 |
if ( ! $form || empty( $form ) ) {
|
337 |
return false;
|
338 |
}
|
339 |
|
340 |
+
// Get the form data.
|
341 |
$new_form_data = wpforms_decode( $form->post_content );
|
342 |
|
343 |
+
// Remove form ID from title if present.
|
344 |
+
$new_form_data['settings']['form_title'] = str_replace( '(ID #' . absint( $id ) . ')', '', $new_form_data['settings']['form_title'] );
|
345 |
+
|
346 |
+
// Create the duplicate form.
|
347 |
+
$new_form = array(
|
348 |
+
'post_author' => $form->post_author,
|
349 |
+
'post_content' => wpforms_encode( $new_form_data ),
|
350 |
+
'post_excerpt' => $form->post_excerpt,
|
351 |
+
'post_status' => $form->post_status,
|
352 |
+
'post_title' => $new_form_data['settings']['form_title'],
|
353 |
+
'post_type' => $form->post_type,
|
354 |
);
|
355 |
$new_form_id = wp_insert_post( $new_form );
|
356 |
|
358 |
return false;
|
359 |
}
|
360 |
|
361 |
+
// Set new form name.
|
362 |
$new_form_data['settings']['form_title'] .= ' (ID #' . absint( $new_form_id ) . ')';
|
363 |
|
364 |
+
// Set new form ID.
|
365 |
$new_form_data['id'] = absint( $new_form_id );
|
366 |
|
367 |
+
// Update new duplicate form.
|
368 |
$new_form_id = $this->update( $new_form_id, $new_form_data );
|
369 |
|
370 |
if ( ! $new_form_id || is_wp_error( $new_form_id ) ) {
|
379 |
* Get the next available field ID and increment by one.
|
380 |
*
|
381 |
* @since 1.0.0
|
382 |
+
*
|
383 |
* @param int $form_id
|
384 |
+
*
|
385 |
* @return mixed int or false
|
386 |
*/
|
387 |
public function next_field_id( $form_id ) {
|
388 |
|
389 |
+
// Check for permissions.
|
390 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
391 |
return false;
|
392 |
+
}
|
393 |
|
394 |
+
if ( empty( $form_id ) ) {
|
395 |
return false;
|
396 |
+
}
|
397 |
|
398 |
+
$form = $this->get( $form_id, array(
|
399 |
+
'content_only' => true,
|
400 |
+
) );
|
401 |
|
402 |
+
if ( ! empty( $form['field_id'] ) ) {
|
403 |
$field_id = absint( $form['field_id'] );
|
404 |
+
$form['field_id'] ++;
|
405 |
} else {
|
406 |
+
$field_id = '0';
|
407 |
$form['field_id'] = '1';
|
408 |
}
|
409 |
|
416 |
* Get private meta information for a form.
|
417 |
*
|
418 |
* @since 1.0.0
|
419 |
+
*
|
420 |
+
* @param string $form_id
|
421 |
+
* @param string $field
|
422 |
+
*
|
423 |
+
* @return bool
|
424 |
*/
|
425 |
public function get_meta( $form_id, $field = '' ) {
|
426 |
|
427 |
+
if ( empty( $form_id ) ) {
|
428 |
return false;
|
429 |
+
}
|
430 |
|
431 |
+
$data = $this->get( $form_id, array(
|
432 |
+
'content_only' => true,
|
433 |
+
) );
|
434 |
|
435 |
if ( isset( $data['meta'] ) ) {
|
436 |
if ( empty( $field ) ) {
|
437 |
return $data['meta'];
|
438 |
+
} elseif ( isset( $data['meta'][ $field ] ) ) {
|
439 |
+
return $data['meta'][ $field ];
|
440 |
}
|
441 |
}
|
442 |
+
|
443 |
return false;
|
444 |
}
|
445 |
|
447 |
* Update or add form meta information to a form.
|
448 |
*
|
449 |
* @since 1.4.0
|
450 |
+
*
|
451 |
* @param int $form_id
|
452 |
* @param string $meta_key
|
453 |
* @param string $meta_value
|
454 |
+
*
|
455 |
* @return bool
|
456 |
*/
|
457 |
public function update_meta( $form_id, $meta_key, $meta_value ) {
|
476 |
|
477 |
$data['meta'][ $meta_key ] = $meta_value;
|
478 |
|
479 |
+
$form = array(
|
480 |
'ID' => $form_id,
|
481 |
'post_content' => wpforms_encode( $data ),
|
482 |
);
|
492 |
* Delete form meta information from a form.
|
493 |
*
|
494 |
* @since 1.4.0
|
495 |
+
*
|
496 |
* @param int $form_id
|
497 |
* @param string $meta_key
|
498 |
+
*
|
499 |
* @return bool
|
500 |
*/
|
501 |
public function delete_meta( $form_id, $meta_key ) {
|
520 |
|
521 |
unset( $data['meta'][ $meta_key ] );
|
522 |
|
523 |
+
$form = array(
|
524 |
'ID' => $form_id,
|
525 |
'post_content' => wpforms_encode( $data ),
|
526 |
);
|
536 |
* Get private meta information for a form field.
|
537 |
*
|
538 |
* @since 1.0.0
|
539 |
+
*
|
540 |
+
* @param string $form_id
|
541 |
+
* @param string $field_id
|
542 |
+
*
|
543 |
+
* @return bool
|
544 |
*/
|
545 |
public function get_field( $form_id, $field_id = '' ) {
|
546 |
|
548 |
return false;
|
549 |
}
|
550 |
|
551 |
+
$data = $this->get( $form_id, array(
|
552 |
+
'content_only' => true,
|
553 |
+
) );
|
554 |
|
555 |
return isset( $data['fields'][ $field_id ] ) ? $data['fields'][ $field_id ] : false;
|
556 |
}
|
559 |
* Get private meta information for a form field.
|
560 |
*
|
561 |
* @since 1.0.0
|
562 |
+
*
|
563 |
+
* @param string $form_id
|
564 |
+
* @param string $field
|
565 |
+
*
|
566 |
+
* @return bool
|
567 |
*/
|
568 |
public function get_field_meta( $form_id, $field = '' ) {
|
569 |
|
includes/class-frontend.php
CHANGED
@@ -26,6 +26,7 @@ class WPForms_Frontend {
|
|
26 |
* displaying pagebreak fields.
|
27 |
*
|
28 |
* @since 1.3.7
|
|
|
29 |
* @var array
|
30 |
*/
|
31 |
public $pages = false;
|
@@ -64,6 +65,7 @@ class WPForms_Frontend {
|
|
64 |
* Primary function to render a form on the frontend.
|
65 |
*
|
66 |
* @since 1.0.0
|
|
|
67 |
* @param int $id
|
68 |
* @param boolean $title
|
69 |
* @param boolean $description
|
@@ -82,7 +84,7 @@ class WPForms_Frontend {
|
|
82 |
}
|
83 |
|
84 |
// Basic information.
|
85 |
-
$form_data = wpforms_decode( $form->post_content
|
86 |
$form_id = absint( $form->ID );
|
87 |
$settings = $form_data['settings'];
|
88 |
$action = esc_url_raw( remove_query_arg( 'wpforms' ) );
|
@@ -186,6 +188,7 @@ class WPForms_Frontend {
|
|
186 |
* Display form confirmation message.
|
187 |
*
|
188 |
* @since 1.0.0
|
|
|
189 |
* @param array $form_data
|
190 |
*/
|
191 |
function confirmation( $form_data ) {
|
@@ -197,7 +200,7 @@ class WPForms_Frontend {
|
|
197 |
return;
|
198 |
}
|
199 |
|
200 |
-
// Load
|
201 |
$this->assets_confirmation();
|
202 |
|
203 |
$form_id = absint( $form_data['id'] );
|
@@ -219,6 +222,7 @@ class WPForms_Frontend {
|
|
219 |
* Form head area.
|
220 |
*
|
221 |
* @since 1.0.0
|
|
|
222 |
* @param array $form_data
|
223 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
224 |
* @param mixed $title
|
@@ -254,6 +258,7 @@ class WPForms_Frontend {
|
|
254 |
* Form field area.
|
255 |
*
|
256 |
* @since 1.0.0
|
|
|
257 |
* @param array $form_data
|
258 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
259 |
* @param mixed $title
|
@@ -336,11 +341,13 @@ class WPForms_Frontend {
|
|
336 |
|
337 |
/**
|
338 |
* Return base attributes for a specific field. This is deprecated and
|
339 |
-
* exists for backwards-compatibility purposes. Use field
|
340 |
*
|
341 |
* @since 1.3.7
|
|
|
342 |
* @param array $field
|
343 |
* @param array $form_data
|
|
|
344 |
* @return array
|
345 |
*/
|
346 |
public function get_field_attributes( $field, $form_data ) {
|
@@ -400,15 +407,17 @@ class WPForms_Frontend {
|
|
400 |
* Return base properties for a specific field.
|
401 |
*
|
402 |
* @since 1.3.7
|
|
|
403 |
* @param array $field
|
404 |
* @param array $form_data
|
405 |
* @param array $attributes
|
|
|
406 |
* @return array
|
407 |
*/
|
408 |
function get_field_properties( $field, $form_data, $attributes = array() ) {
|
409 |
|
410 |
// This filter is for backwards compatibility purposes.
|
411 |
-
$types = array( 'text', 'textarea', 'number', 'email', 'hidden', 'url', 'html', 'divider', 'password', 'phone' );
|
412 |
if ( in_array( $field['type'], $types, true ) ) {
|
413 |
$field = apply_filters( "wpforms_{$field['type']}_field_display", $field, $attributes, $form_data );
|
414 |
} elseif ( 'credit-card' === $field['type'] ) {
|
@@ -487,6 +496,7 @@ class WPForms_Frontend {
|
|
487 |
* Display the opening container markup for each field.
|
488 |
*
|
489 |
* @since 1.3.7
|
|
|
490 |
* @param array $field
|
491 |
* @param array $form_data
|
492 |
*/
|
@@ -505,6 +515,7 @@ class WPForms_Frontend {
|
|
505 |
* Display the label for each field.
|
506 |
*
|
507 |
* @since 1.3.7
|
|
|
508 |
* @param array $field
|
509 |
* @param array $form_data
|
510 |
*/
|
@@ -530,6 +541,7 @@ class WPForms_Frontend {
|
|
530 |
* Display any errors for each field.
|
531 |
*
|
532 |
* @since 1.3.7
|
|
|
533 |
* @param array $field
|
534 |
* @param array $form_data
|
535 |
*/
|
@@ -554,6 +566,7 @@ class WPForms_Frontend {
|
|
554 |
* Display the description for each field.
|
555 |
*
|
556 |
* @since 1.3.7
|
|
|
557 |
* @param array $field
|
558 |
* @param array $form_data
|
559 |
*/
|
@@ -589,6 +602,7 @@ class WPForms_Frontend {
|
|
589 |
* Display the closing container markup for each field.
|
590 |
*
|
591 |
* @since 1.3.7
|
|
|
592 |
* @param array $field
|
593 |
* @param array $form_data
|
594 |
*/
|
@@ -601,6 +615,7 @@ class WPForms_Frontend {
|
|
601 |
* Anti-spam honeypot output if configured.
|
602 |
*
|
603 |
* @since 1.0.0
|
|
|
604 |
* @param array $form_data
|
605 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
606 |
* @param mixed $title
|
@@ -609,7 +624,10 @@ class WPForms_Frontend {
|
|
609 |
*/
|
610 |
public function honeypot( $form_data, $deprecated, $title, $description, $errors ) {
|
611 |
|
612 |
-
if (
|
|
|
|
|
|
|
613 |
return;
|
614 |
}
|
615 |
|
@@ -628,6 +646,7 @@ class WPForms_Frontend {
|
|
628 |
* Google reCAPTCHA output if configured.
|
629 |
*
|
630 |
* @since 1.0.0
|
|
|
631 |
* @param array $form_data
|
632 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
633 |
* @param mixed $title
|
@@ -644,7 +663,10 @@ class WPForms_Frontend {
|
|
644 |
}
|
645 |
|
646 |
// Check that the recaptcha is configured for the specific form.
|
647 |
-
if (
|
|
|
|
|
|
|
648 |
return;
|
649 |
}
|
650 |
|
@@ -675,9 +697,10 @@ class WPForms_Frontend {
|
|
675 |
}
|
676 |
|
677 |
/**
|
678 |
-
* Form footer
|
679 |
*
|
680 |
* @since 1.0.0
|
|
|
681 |
* @param array $form_data
|
682 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
683 |
* @param mixed $title
|
@@ -735,10 +758,11 @@ class WPForms_Frontend {
|
|
735 |
}
|
736 |
|
737 |
/**
|
738 |
-
* Determine if we should load assets globally.
|
739 |
-
* load conditionally (default).
|
740 |
*
|
741 |
* @since 1.2.4
|
|
|
742 |
* @return bool
|
743 |
*/
|
744 |
public function assets_global() {
|
@@ -778,20 +802,23 @@ class WPForms_Frontend {
|
|
778 |
do_action( 'wpforms_frontend_css', $this->forms );
|
779 |
|
780 |
// jQuery date/time library CSS.
|
781 |
-
if (
|
782 |
-
|
783 |
-
'
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
|
|
|
|
|
|
795 |
|
796 |
// Load CSS per global setting.
|
797 |
if ( wpforms_setting( 'disable-css', '1' ) == '1' ) {
|
@@ -831,44 +858,53 @@ class WPForms_Frontend {
|
|
831 |
);
|
832 |
|
833 |
// Load jQuery date/time libraries.
|
834 |
-
if (
|
835 |
-
|
836 |
-
'
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
|
|
|
|
|
|
850 |
|
851 |
// Load jQuery input mask library - https://github.com/RobinHerbots/jquery.inputmask.
|
852 |
-
if (
|
853 |
-
|
854 |
-
'
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
|
|
|
|
|
|
861 |
|
862 |
// Load CC payment library - https://github.com/stripe/jquery.payment/.
|
863 |
-
if (
|
864 |
-
|
865 |
-
'
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
|
|
|
|
|
|
872 |
|
873 |
// Load base JS.
|
874 |
wp_enqueue_script(
|
@@ -960,7 +996,7 @@ class WPForms_Frontend {
|
|
960 |
return;
|
961 |
}
|
962 |
|
963 |
-
// Below we do our own
|
964 |
// to be better compatible with caching plugins which were causing
|
965 |
// conflicts.
|
966 |
|
@@ -1010,8 +1046,10 @@ class WPForms_Frontend {
|
|
1010 |
* Shortcode wrapper for the outputting a form.
|
1011 |
*
|
1012 |
* @since 1.0.0
|
|
|
1013 |
* @param array $atts
|
1014 |
-
*
|
|
|
1015 |
*/
|
1016 |
public function shortcode( $atts ) {
|
1017 |
|
@@ -1021,12 +1059,38 @@ class WPForms_Frontend {
|
|
1021 |
'description' => false,
|
1022 |
), $atts, 'output' );
|
1023 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
ob_start();
|
1025 |
|
1026 |
$this->output( $atts['id'], $atts['title'], $atts['description'] );
|
1027 |
|
1028 |
-
|
1029 |
-
|
1030 |
-
return $output;
|
1031 |
}
|
1032 |
}
|
26 |
* displaying pagebreak fields.
|
27 |
*
|
28 |
* @since 1.3.7
|
29 |
+
*
|
30 |
* @var array
|
31 |
*/
|
32 |
public $pages = false;
|
65 |
* Primary function to render a form on the frontend.
|
66 |
*
|
67 |
* @since 1.0.0
|
68 |
+
*
|
69 |
* @param int $id
|
70 |
* @param boolean $title
|
71 |
* @param boolean $description
|
84 |
}
|
85 |
|
86 |
// Basic information.
|
87 |
+
$form_data = wpforms_decode( $form->post_content );
|
88 |
$form_id = absint( $form->ID );
|
89 |
$settings = $form_data['settings'];
|
90 |
$action = esc_url_raw( remove_query_arg( 'wpforms' ) );
|
188 |
* Display form confirmation message.
|
189 |
*
|
190 |
* @since 1.0.0
|
191 |
+
*
|
192 |
* @param array $form_data
|
193 |
*/
|
194 |
function confirmation( $form_data ) {
|
200 |
return;
|
201 |
}
|
202 |
|
203 |
+
// Load confirmation specific assets.
|
204 |
$this->assets_confirmation();
|
205 |
|
206 |
$form_id = absint( $form_data['id'] );
|
222 |
* Form head area.
|
223 |
*
|
224 |
* @since 1.0.0
|
225 |
+
*
|
226 |
* @param array $form_data
|
227 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
228 |
* @param mixed $title
|
258 |
* Form field area.
|
259 |
*
|
260 |
* @since 1.0.0
|
261 |
+
*
|
262 |
* @param array $form_data
|
263 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
264 |
* @param mixed $title
|
341 |
|
342 |
/**
|
343 |
* Return base attributes for a specific field. This is deprecated and
|
344 |
+
* exists for backwards-compatibility purposes. Use field properties instead.
|
345 |
*
|
346 |
* @since 1.3.7
|
347 |
+
*
|
348 |
* @param array $field
|
349 |
* @param array $form_data
|
350 |
+
*
|
351 |
* @return array
|
352 |
*/
|
353 |
public function get_field_attributes( $field, $form_data ) {
|
407 |
* Return base properties for a specific field.
|
408 |
*
|
409 |
* @since 1.3.7
|
410 |
+
*
|
411 |
* @param array $field
|
412 |
* @param array $form_data
|
413 |
* @param array $attributes
|
414 |
+
*
|
415 |
* @return array
|
416 |
*/
|
417 |
function get_field_properties( $field, $form_data, $attributes = array() ) {
|
418 |
|
419 |
// This filter is for backwards compatibility purposes.
|
420 |
+
$types = array( 'text', 'textarea', 'number', 'email', 'hidden', 'url', 'html', 'divider', 'password', 'phone', 'address' );
|
421 |
if ( in_array( $field['type'], $types, true ) ) {
|
422 |
$field = apply_filters( "wpforms_{$field['type']}_field_display", $field, $attributes, $form_data );
|
423 |
} elseif ( 'credit-card' === $field['type'] ) {
|
496 |
* Display the opening container markup for each field.
|
497 |
*
|
498 |
* @since 1.3.7
|
499 |
+
*
|
500 |
* @param array $field
|
501 |
* @param array $form_data
|
502 |
*/
|
515 |
* Display the label for each field.
|
516 |
*
|
517 |
* @since 1.3.7
|
518 |
+
*
|
519 |
* @param array $field
|
520 |
* @param array $form_data
|
521 |
*/
|
541 |
* Display any errors for each field.
|
542 |
*
|
543 |
* @since 1.3.7
|
544 |
+
*
|
545 |
* @param array $field
|
546 |
* @param array $form_data
|
547 |
*/
|
566 |
* Display the description for each field.
|
567 |
*
|
568 |
* @since 1.3.7
|
569 |
+
*
|
570 |
* @param array $field
|
571 |
* @param array $form_data
|
572 |
*/
|
602 |
* Display the closing container markup for each field.
|
603 |
*
|
604 |
* @since 1.3.7
|
605 |
+
*
|
606 |
* @param array $field
|
607 |
* @param array $form_data
|
608 |
*/
|
615 |
* Anti-spam honeypot output if configured.
|
616 |
*
|
617 |
* @since 1.0.0
|
618 |
+
*
|
619 |
* @param array $form_data
|
620 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
621 |
* @param mixed $title
|
624 |
*/
|
625 |
public function honeypot( $form_data, $deprecated, $title, $description, $errors ) {
|
626 |
|
627 |
+
if (
|
628 |
+
empty( $form_data['settings']['honeypot'] ) ||
|
629 |
+
'1' != $form_data['settings']['honeypot']
|
630 |
+
) {
|
631 |
return;
|
632 |
}
|
633 |
|
646 |
* Google reCAPTCHA output if configured.
|
647 |
*
|
648 |
* @since 1.0.0
|
649 |
+
*
|
650 |
* @param array $form_data
|
651 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
652 |
* @param mixed $title
|
663 |
}
|
664 |
|
665 |
// Check that the recaptcha is configured for the specific form.
|
666 |
+
if (
|
667 |
+
! isset( $form_data['settings']['recaptcha'] ) ||
|
668 |
+
'1' != $form_data['settings']['recaptcha']
|
669 |
+
) {
|
670 |
return;
|
671 |
}
|
672 |
|
697 |
}
|
698 |
|
699 |
/**
|
700 |
+
* Form footer area.
|
701 |
*
|
702 |
* @since 1.0.0
|
703 |
+
*
|
704 |
* @param array $form_data
|
705 |
* @param null $deprecated Deprecated in v1.3.7, previously was $form object.
|
706 |
* @param mixed $title
|
758 |
}
|
759 |
|
760 |
/**
|
761 |
+
* Determine if we should load assets globally.
|
762 |
+
* If false assets will load conditionally (default).
|
763 |
*
|
764 |
* @since 1.2.4
|
765 |
+
*
|
766 |
* @return bool
|
767 |
*/
|
768 |
public function assets_global() {
|
802 |
do_action( 'wpforms_frontend_css', $this->forms );
|
803 |
|
804 |
// jQuery date/time library CSS.
|
805 |
+
if (
|
806 |
+
$this->assets_global() ||
|
807 |
+
true === wpforms_has_field_type( 'date-time', $this->forms, true )
|
808 |
+
) {
|
809 |
+
wp_enqueue_style(
|
810 |
+
'wpforms-jquery-timepicker',
|
811 |
+
WPFORMS_PLUGIN_URL . 'assets/css/jquery.timepicker.css',
|
812 |
+
array(),
|
813 |
+
'1.11.5'
|
814 |
+
);
|
815 |
+
wp_enqueue_style(
|
816 |
+
'wpforms-flatpickr',
|
817 |
+
WPFORMS_PLUGIN_URL . 'assets/css/flatpickr.min.css',
|
818 |
+
array(),
|
819 |
+
'2.3.4'
|
820 |
+
);
|
821 |
+
}
|
822 |
|
823 |
// Load CSS per global setting.
|
824 |
if ( wpforms_setting( 'disable-css', '1' ) == '1' ) {
|
858 |
);
|
859 |
|
860 |
// Load jQuery date/time libraries.
|
861 |
+
if (
|
862 |
+
$this->assets_global() ||
|
863 |
+
true === wpforms_has_field_type( 'date-time', $this->forms, true )
|
864 |
+
) {
|
865 |
+
wp_enqueue_script(
|
866 |
+
'wpforms-flatpickr',
|
867 |
+
WPFORMS_PLUGIN_URL . 'assets/js/flatpickr.min.js',
|
868 |
+
array( 'jquery' ),
|
869 |
+
'2.0.5',
|
870 |
+
true
|
871 |
+
);
|
872 |
+
wp_enqueue_script(
|
873 |
+
'wpforms-jquery-timepicker',
|
874 |
+
WPFORMS_PLUGIN_URL . 'assets/js/jquery.timepicker.min.js',
|
875 |
+
array( 'jquery' ),
|
876 |
+
'1.11.5',
|
877 |
+
true
|
878 |
+
);
|
879 |
+
}
|
880 |
|
881 |
// Load jQuery input mask library - https://github.com/RobinHerbots/jquery.inputmask.
|
882 |
+
if (
|
883 |
+
$this->assets_global() ||
|
884 |
+
true === wpforms_has_field_type( array( 'phone', 'address' ), $this->forms, true )
|
885 |
+
) {
|
886 |
+
wp_enqueue_script(
|
887 |
+
'wpforms-maskedinput',
|
888 |
+
WPFORMS_PLUGIN_URL . 'assets/js/jquery.inputmask.bundle.min.js',
|
889 |
+
array( 'jquery' ),
|
890 |
+
'3.2.8',
|
891 |
+
true
|
892 |
+
);
|
893 |
+
}
|
894 |
|
895 |
// Load CC payment library - https://github.com/stripe/jquery.payment/.
|
896 |
+
if (
|
897 |
+
$this->assets_global() ||
|
898 |
+
true === wpforms_has_field_type( 'credit-card', $this->forms, true )
|
899 |
+
) {
|
900 |
+
wp_enqueue_script(
|
901 |
+
'wpforms-payment',
|
902 |
+
WPFORMS_PLUGIN_URL . 'assets/js/jquery.payment.min.js',
|
903 |
+
array( 'jquery' ),
|
904 |
+
WPFORMS_VERSION,
|
905 |
+
true
|
906 |
+
);
|
907 |
+
}
|
908 |
|
909 |
// Load base JS.
|
910 |
wp_enqueue_script(
|
996 |
return;
|
997 |
}
|
998 |
|
999 |
+
// Below we do our own implementation of wp_localize_script in an effort
|
1000 |
// to be better compatible with caching plugins which were causing
|
1001 |
// conflicts.
|
1002 |
|
1046 |
* Shortcode wrapper for the outputting a form.
|
1047 |
*
|
1048 |
* @since 1.0.0
|
1049 |
+
*
|
1050 |
* @param array $atts
|
1051 |
+
*
|
1052 |
+
* @return string
|
1053 |
*/
|
1054 |
public function shortcode( $atts ) {
|
1055 |
|
1059 |
'description' => false,
|
1060 |
), $atts, 'output' );
|
1061 |
|
1062 |
+
// We need to stop shortcode processing in case we are on AMP page.
|
1063 |
+
if ( wpforms_is_amp() ) {
|
1064 |
+
$post_id = get_the_ID();
|
1065 |
+
|
1066 |
+
// Display our custom link to non-AMP only if we are on single post/page.
|
1067 |
+
if ( ! empty( $post_id ) && ! empty( $atts['id'] ) ) {
|
1068 |
+
/*
|
1069 |
+
* We need this get param as one of the most popular ampforwp plugin has feature
|
1070 |
+
* for mobile users being force-redirected to AMP version of a site.
|
1071 |
+
* This `nonamp` GET param will ensure they will get to the actual page.
|
1072 |
+
* Other plugins will ignore it.
|
1073 |
+
*/
|
1074 |
+
$link = trailingslashit( get_permalink( $post_id ) ) . '?nonamp=1#wpforms-' . absint( $atts['id'] );
|
1075 |
+
$text = apply_filters(
|
1076 |
+
'wpforms_frontend_shortcode_amp_text',
|
1077 |
+
sprintf(
|
1078 |
+
__( '<a href="%s">Go to the full page</a> to view and submit the form.', 'wpforms' ),
|
1079 |
+
$link
|
1080 |
+
)
|
1081 |
+
);
|
1082 |
+
|
1083 |
+
return '<p class="wpforms-shortcode-amp-text">' . $text . '</p>';
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
// In case we are not on a post/page - return early with empty output.
|
1087 |
+
return '';
|
1088 |
+
}
|
1089 |
+
|
1090 |
ob_start();
|
1091 |
|
1092 |
$this->output( $atts['id'], $atts['title'], $atts['description'] );
|
1093 |
|
1094 |
+
return ob_get_clean();
|
|
|
|
|
1095 |
}
|
1096 |
}
|
includes/class-preview.php
CHANGED
@@ -25,7 +25,7 @@ class WPForms_Preview {
|
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
-
*
|
29 |
*
|
30 |
* @since 1.1.5
|
31 |
*/
|
@@ -68,7 +68,12 @@ class WPForms_Preview {
|
|
68 |
}
|
69 |
|
70 |
// Get form details.
|
71 |
-
$form_data = wpforms()->form->get(
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
// Double check that we found a valid entry.
|
74 |
if ( empty( $form_data ) ) {
|
@@ -76,7 +81,12 @@ class WPForms_Preview {
|
|
76 |
}
|
77 |
|
78 |
// Check for entry notes.
|
79 |
-
$entry->entry_notes = wpforms()->entry_meta->get_meta(
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
?>
|
82 |
<!doctype html>
|
@@ -153,7 +163,7 @@ class WPForms_Preview {
|
|
153 |
</h1>
|
154 |
<div class="actions">
|
155 |
<a href="#" class="toggle-empty"><?php _e( 'Show empty fields', 'wpforms' ); ?></a> •
|
156 |
-
<?php echo ! empty( $entry->entry_notes ) ? '<a href="#" class="toggle-notes">' . __( 'Show
|
157 |
<a href="#" class="toggle-view"><?php _e( 'Compact view', 'wpforms' ); ?></a>
|
158 |
</div>
|
159 |
<?php
|
@@ -178,6 +188,7 @@ class WPForms_Preview {
|
|
178 |
echo '<div class="field ' . $field_class . '">';
|
179 |
|
180 |
echo '<p class="field-name">';
|
|
|
181 |
echo ! empty( $field['name'] ) ? wp_strip_all_tags( $field['name'] ) : sprintf( __( 'Field ID #%d', 'wpforms' ), absint( $field['id'] ) );
|
182 |
echo '</p>';
|
183 |
|
@@ -202,15 +213,12 @@ class WPForms_Preview {
|
|
202 |
$user = get_userdata( $note->user_id );
|
203 |
$user_name = esc_html( ! empty( $user->display_name ) ? $user->display_name : $user->user_login );
|
204 |
$date_format = sprintf( '%s %s', get_option( 'date_format' ), get_option( 'time_format' ) );
|
205 |
-
$date =
|
206 |
|
207 |
echo '<div class="note">';
|
208 |
echo '<div class="note-byline">';
|
209 |
-
|
210 |
-
|
211 |
-
$user_name,
|
212 |
-
$date
|
213 |
-
);
|
214 |
echo '</div>';
|
215 |
echo '<div class="note-text">' . wp_kses_post( $note->data ) . '</div>';
|
216 |
echo '</div>';
|
@@ -247,6 +255,7 @@ class WPForms_Preview {
|
|
247 |
if ( ! empty( $preview_page ) && 'private' !== $preview_page->post_status ) {
|
248 |
$preview_page->post_status = 'private';
|
249 |
wp_update_post( $preview_page );
|
|
|
250 |
return;
|
251 |
} elseif ( ! empty( $preview_page ) ) {
|
252 |
return;
|
@@ -254,17 +263,18 @@ class WPForms_Preview {
|
|
254 |
}
|
255 |
|
256 |
// Create the custom preview page
|
257 |
-
$content
|
258 |
$content .= '<p>' . __( 'The page is set to private, so it is not publicly accessible. Please do not delete this page :) .', 'wpforms' ) . '</p>';
|
259 |
-
$args
|
260 |
-
'post_type'
|
261 |
-
'post_name'
|
262 |
-
'post_author'
|
263 |
-
'post_title'
|
264 |
-
'post_status'
|
265 |
-
'post_content'
|
266 |
'comment_status' => 'closed',
|
267 |
);
|
|
|
268 |
$id = wp_insert_post( $args );
|
269 |
if ( $id ) {
|
270 |
update_option( 'wpforms_preview_page', $id );
|
@@ -275,7 +285,9 @@ class WPForms_Preview {
|
|
275 |
* Preview page URL.
|
276 |
*
|
277 |
* @since 1.1.9
|
|
|
278 |
* @param int $form_id
|
|
|
279 |
* @return string
|
280 |
*/
|
281 |
public function form_preview_url( $form_id ) {
|
@@ -292,7 +304,13 @@ class WPForms_Preview {
|
|
292 |
return home_url();
|
293 |
}
|
294 |
|
295 |
-
return add_query_arg(
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
|
298 |
/**
|
@@ -309,8 +327,10 @@ class WPForms_Preview {
|
|
309 |
* Tweak the page content for form preview page requests.
|
310 |
*
|
311 |
* @since 1.1.9
|
|
|
312 |
* @param array $posts
|
313 |
-
* @param
|
|
|
314 |
* @return array
|
315 |
*/
|
316 |
public function form_preview_query( $posts, $query ) {
|
@@ -328,12 +348,22 @@ class WPForms_Preview {
|
|
328 |
// If our queried object ID does not match the preview page ID, return early.
|
329 |
$preview_id = absint( get_option( 'wpforms_preview_page' ) );
|
330 |
$queried = $query->get_queried_object_id();
|
331 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
332 |
return $posts;
|
333 |
}
|
334 |
|
335 |
// Get the form details
|
336 |
-
$form = wpforms()->form->get(
|
|
|
|
|
|
|
|
|
|
|
337 |
|
338 |
if ( ! $form || empty( $form ) ) {
|
339 |
return $posts;
|
@@ -346,7 +376,7 @@ class WPForms_Preview {
|
|
346 |
if ( ! empty( $_GET['new_window'] ) ) {
|
347 |
$content .= ' <a href="javascript:window.close();">' . __( 'Close this window', 'wpforms' ) . '.</a>';
|
348 |
}
|
349 |
-
$posts[0]->post_title =
|
350 |
$posts[0]->post_content = $content . $shortcode;
|
351 |
$posts[0]->post_status = 'public';
|
352 |
|
@@ -357,17 +387,24 @@ class WPForms_Preview {
|
|
357 |
* Hide the preview page from admin
|
358 |
*
|
359 |
* @since 1.2.3
|
360 |
-
*
|
|
|
361 |
*/
|
362 |
function form_preview_hide( $query ) {
|
363 |
|
364 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
365 |
$wpforms_preview = intval( get_option( 'wpforms_preview_page' ) );
|
|
|
366 |
if ( $wpforms_preview ) {
|
367 |
-
$exclude
|
368 |
$exclude[] = $wpforms_preview;
|
369 |
$query->set( 'post__not_in', $exclude );
|
370 |
-
|
371 |
}
|
372 |
}
|
373 |
}
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
+
* Determining if the user should see a preview page, if so, party on.
|
29 |
*
|
30 |
* @since 1.1.5
|
31 |
*/
|
68 |
}
|
69 |
|
70 |
// Get form details.
|
71 |
+
$form_data = wpforms()->form->get(
|
72 |
+
$entry->form_id,
|
73 |
+
array(
|
74 |
+
'content_only' => true,
|
75 |
+
)
|
76 |
+
);
|
77 |
|
78 |
// Double check that we found a valid entry.
|
79 |
if ( empty( $form_data ) ) {
|
81 |
}
|
82 |
|
83 |
// Check for entry notes.
|
84 |
+
$entry->entry_notes = wpforms()->entry_meta->get_meta(
|
85 |
+
array(
|
86 |
+
'entry_id' => $entry->entry_id,
|
87 |
+
'type' => 'note',
|
88 |
+
)
|
89 |
+
);
|
90 |
|
91 |
?>
|
92 |
<!doctype html>
|
163 |
</h1>
|
164 |
<div class="actions">
|
165 |
<a href="#" class="toggle-empty"><?php _e( 'Show empty fields', 'wpforms' ); ?></a> •
|
166 |
+
<?php echo ! empty( $entry->entry_notes ) ? '<a href="#" class="toggle-notes">' . __( 'Show notes', 'wpforms' ) . '</a> •' : ''; ?>
|
167 |
<a href="#" class="toggle-view"><?php _e( 'Compact view', 'wpforms' ); ?></a>
|
168 |
</div>
|
169 |
<?php
|
188 |
echo '<div class="field ' . $field_class . '">';
|
189 |
|
190 |
echo '<p class="field-name">';
|
191 |
+
/* translators: %d - field ID */
|
192 |
echo ! empty( $field['name'] ) ? wp_strip_all_tags( $field['name'] ) : sprintf( __( 'Field ID #%d', 'wpforms' ), absint( $field['id'] ) );
|
193 |
echo '</p>';
|
194 |
|
213 |
$user = get_userdata( $note->user_id );
|
214 |
$user_name = esc_html( ! empty( $user->display_name ) ? $user->display_name : $user->user_login );
|
215 |
$date_format = sprintf( '%s %s', get_option( 'date_format' ), get_option( 'time_format' ) );
|
216 |
+
$date = date_i18n( $date_format, strtotime( $note->date ) + ( get_option( 'gmt_offset' ) * 3600 ) );
|
217 |
|
218 |
echo '<div class="note">';
|
219 |
echo '<div class="note-byline">';
|
220 |
+
/* translators: %1$s - user name; %2$s - date */
|
221 |
+
printf( __( 'Added by %1$s on %2$s', 'wpforms' ), $user_name, $date );
|
|
|
|
|
|
|
222 |
echo '</div>';
|
223 |
echo '<div class="note-text">' . wp_kses_post( $note->data ) . '</div>';
|
224 |
echo '</div>';
|
255 |
if ( ! empty( $preview_page ) && 'private' !== $preview_page->post_status ) {
|
256 |
$preview_page->post_status = 'private';
|
257 |
wp_update_post( $preview_page );
|
258 |
+
|
259 |
return;
|
260 |
} elseif ( ! empty( $preview_page ) ) {
|
261 |
return;
|
263 |
}
|
264 |
|
265 |
// Create the custom preview page
|
266 |
+
$content = '<p>' . __( 'This is the WPForms preview page. All your form previews will be handled on this page.', 'wpforms' ) . '</p>';
|
267 |
$content .= '<p>' . __( 'The page is set to private, so it is not publicly accessible. Please do not delete this page :) .', 'wpforms' ) . '</p>';
|
268 |
+
$args = array(
|
269 |
+
'post_type' => 'page',
|
270 |
+
'post_name' => 'wpforms-preview',
|
271 |
+
'post_author' => 1,
|
272 |
+
'post_title' => __( 'WPForms Preview', 'wpforms' ),
|
273 |
+
'post_status' => 'private',
|
274 |
+
'post_content' => $content,
|
275 |
'comment_status' => 'closed',
|
276 |
);
|
277 |
+
|
278 |
$id = wp_insert_post( $args );
|
279 |
if ( $id ) {
|
280 |
update_option( 'wpforms_preview_page', $id );
|
285 |
* Preview page URL.
|
286 |
*
|
287 |
* @since 1.1.9
|
288 |
+
*
|
289 |
* @param int $form_id
|
290 |
+
*
|
291 |
* @return string
|
292 |
*/
|
293 |
public function form_preview_url( $form_id ) {
|
304 |
return home_url();
|
305 |
}
|
306 |
|
307 |
+
return add_query_arg(
|
308 |
+
array(
|
309 |
+
'wpforms_preview' => 'form',
|
310 |
+
'form_id' => absint( $form_id ),
|
311 |
+
),
|
312 |
+
$url
|
313 |
+
);
|
314 |
}
|
315 |
|
316 |
/**
|
327 |
* Tweak the page content for form preview page requests.
|
328 |
*
|
329 |
* @since 1.1.9
|
330 |
+
*
|
331 |
* @param array $posts
|
332 |
+
* @param WP_Query $query
|
333 |
+
*
|
334 |
* @return array
|
335 |
*/
|
336 |
public function form_preview_query( $posts, $query ) {
|
348 |
// If our queried object ID does not match the preview page ID, return early.
|
349 |
$preview_id = absint( get_option( 'wpforms_preview_page' ) );
|
350 |
$queried = $query->get_queried_object_id();
|
351 |
+
if (
|
352 |
+
$queried &&
|
353 |
+
$queried !== $preview_id &&
|
354 |
+
isset( $query->query_vars['page_id'] ) &&
|
355 |
+
$preview_id != $query->query_vars['page_id']
|
356 |
+
) {
|
357 |
return $posts;
|
358 |
}
|
359 |
|
360 |
// Get the form details
|
361 |
+
$form = wpforms()->form->get(
|
362 |
+
absint( $_GET['form_id'] ),
|
363 |
+
array(
|
364 |
+
'content_only' => true,
|
365 |
+
)
|
366 |
+
);
|
367 |
|
368 |
if ( ! $form || empty( $form ) ) {
|
369 |
return $posts;
|
376 |
if ( ! empty( $_GET['new_window'] ) ) {
|
377 |
$content .= ' <a href="javascript:window.close();">' . __( 'Close this window', 'wpforms' ) . '.</a>';
|
378 |
}
|
379 |
+
$posts[0]->post_title = sprintf( _x( '%s Preview', 'Form name', 'wpforms' ), $title );
|
380 |
$posts[0]->post_content = $content . $shortcode;
|
381 |
$posts[0]->post_status = 'public';
|
382 |
|
387 |
* Hide the preview page from admin
|
388 |
*
|
389 |
* @since 1.2.3
|
390 |
+
*
|
391 |
+
* @param WP_Query $query
|
392 |
*/
|
393 |
function form_preview_hide( $query ) {
|
394 |
|
395 |
+
if (
|
396 |
+
$query->is_main_query() &&
|
397 |
+
is_admin() &&
|
398 |
+
isset( $query->query_vars['post_type'] ) &&
|
399 |
+
'page' === $query->query_vars['post_type']
|
400 |
+
) {
|
401 |
$wpforms_preview = intval( get_option( 'wpforms_preview_page' ) );
|
402 |
+
|
403 |
if ( $wpforms_preview ) {
|
404 |
+
$exclude = $query->query_vars['post__not_in'];
|
405 |
$exclude[] = $wpforms_preview;
|
406 |
$query->set( 'post__not_in', $exclude );
|
407 |
+
}
|
408 |
}
|
409 |
}
|
410 |
}
|
includes/class-process.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Process and
|
4 |
*
|
5 |
* @package WPForms
|
6 |
* @author WPForms
|
@@ -64,6 +64,7 @@ class WPForms_Process {
|
|
64 |
* Process the form entry.
|
65 |
*
|
66 |
* @since 1.0.0
|
|
|
67 |
* @param array $entry $_POST object.
|
68 |
*/
|
69 |
public function process( $entry ) {
|
@@ -74,7 +75,7 @@ class WPForms_Process {
|
|
74 |
$form = wpforms()->form->get( $form_id );
|
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;
|
@@ -90,7 +91,7 @@ class WPForms_Process {
|
|
90 |
do_action( 'wpforms_process_before', $entry, $form_data );
|
91 |
do_action( "wpforms_process_before_{$form_id}", $entry, $form_data );
|
92 |
|
93 |
-
// Validate fields
|
94 |
foreach ( $form_data['fields'] as $field ) {
|
95 |
|
96 |
$field_id = $field['id'];
|
@@ -100,10 +101,15 @@ class WPForms_Process {
|
|
100 |
do_action( "wpforms_process_validate_{$field_type}", $field_id, $field_submit, $form_data );
|
101 |
}
|
102 |
|
103 |
-
// reCAPTCHA check
|
104 |
$site_key = wpforms_setting( 'recaptcha-site-key', '' );
|
105 |
$secret_key = wpforms_setting( 'recaptcha-secret-key', '' );
|
106 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
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 ) );
|
@@ -129,24 +135,26 @@ class WPForms_Process {
|
|
129 |
return;
|
130 |
}
|
131 |
|
132 |
-
// Validate honeypot
|
133 |
-
if (
|
134 |
-
|
|
|
|
|
|
|
135 |
$honeypot = __( 'WPForms honeypot field triggered.', 'wpforms' );
|
136 |
-
}
|
137 |
}
|
138 |
|
139 |
$honeypot = apply_filters( 'wpforms_process_honeypot', $honeypot, $this->fields, $entry, $form_data );
|
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;
|
147 |
|
148 |
// Format fields
|
149 |
-
foreach ( $form_data['fields'] as $field ) {
|
150 |
|
151 |
$field_id = $field['id'];
|
152 |
$field_type = $field['type'];
|
@@ -158,7 +166,7 @@ class WPForms_Process {
|
|
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
|
162 |
// because at this point we have completed all field validation and
|
163 |
// formatted the data.
|
164 |
$this->fields = apply_filters( 'wpforms_process_filter', $this->fields, $entry, $form_data );
|
@@ -176,19 +184,19 @@ class WPForms_Process {
|
|
176 |
return;
|
177 |
}
|
178 |
|
179 |
-
// Success - add entry to database
|
180 |
$entry_id = $this->entry_save( $this->fields, $entry, $form_data['id'], $form_data );
|
181 |
|
182 |
-
// Success - send email notification
|
183 |
$this->entry_email( $this->fields, $entry, $form_data, $entry_id, 'entry' );
|
184 |
|
185 |
-
// Pass completed and formatted fields in POST
|
186 |
$_POST['wpforms']['complete'] = $this->fields;
|
187 |
|
188 |
-
// Pass entry ID in POST
|
189 |
$_POST['wpforms']['entry_id'] = $entry_id;
|
190 |
|
191 |
-
// Logs entry depending on log levels set
|
192 |
wpforms_log(
|
193 |
'Entry',
|
194 |
$this->fields,
|
@@ -199,13 +207,13 @@ class WPForms_Process {
|
|
199 |
)
|
200 |
);
|
201 |
|
202 |
-
// Post-process hooks
|
203 |
do_action( 'wpforms_process_complete', $this->fields, $entry, $form_data, $entry_id );
|
204 |
do_action( "wpforms_process_complete_{$form_id}", $this->fields, $entry, $form_data, $entry_id );
|
205 |
|
206 |
} else {
|
207 |
|
208 |
-
// Logs spam entry depending on log levels set
|
209 |
wpforms_log(
|
210 |
'Spam Entry',
|
211 |
array( $honeypot, $entry ),
|
@@ -223,6 +231,7 @@ class WPForms_Process {
|
|
223 |
* Validate the form return hash.
|
224 |
*
|
225 |
* @since 1.0.0
|
|
|
226 |
* @param string $hash
|
227 |
* @return mixed false for invalid or form id
|
228 |
*/
|
@@ -231,12 +240,12 @@ class WPForms_Process {
|
|
231 |
$query_args = base64_decode( $hash );
|
232 |
parse_str( $query_args );
|
233 |
|
234 |
-
// Verify hash matches
|
235 |
-
if ( wp_hash( $form_id . ',' . $entry_id )
|
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 ) {
|
@@ -250,7 +259,8 @@ class WPForms_Process {
|
|
250 |
* Redirects user to a page or URL specified in the form confirmation settings.
|
251 |
*
|
252 |
* @since 1.0.0
|
253 |
-
*
|
|
|
254 |
* @param string $hash
|
255 |
*/
|
256 |
public function entry_confirmation_redirect( $form_data = '', $hash = '' ) {
|
@@ -266,10 +276,12 @@ class WPForms_Process {
|
|
266 |
}
|
267 |
|
268 |
// Get form
|
269 |
-
$form_data = wpforms()->form->get( $form_id, array(
|
|
|
|
|
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'] ) {
|
@@ -300,6 +312,7 @@ class WPForms_Process {
|
|
300 |
* Sends entry email notifications.
|
301 |
*
|
302 |
* @since 1.0.0
|
|
|
303 |
* @param array $fields
|
304 |
* @param array $entry
|
305 |
* @param array $form_data
|
@@ -308,8 +321,11 @@ class WPForms_Process {
|
|
308 |
*/
|
309 |
public function entry_email( $fields, $entry, $form_data, $entry_id, $context = '' ) {
|
310 |
|
311 |
-
// Check that the form was configured for email
|
312 |
-
if (
|
|
|
|
|
|
|
313 |
return;
|
314 |
}
|
315 |
|
@@ -320,7 +336,7 @@ class WPForms_Process {
|
|
320 |
|
321 |
$fields = apply_filters( 'wpforms_entry_email_data', $fields, $entry, $form_data );
|
322 |
|
323 |
-
// Backwards compatibility for notifications before v1.2.3
|
324 |
if ( empty( $form_data['settings']['notifications'] ) ) {
|
325 |
$notifications[1] = array(
|
326 |
'email' => $form_data['settings']['notification_email'],
|
@@ -348,17 +364,17 @@ class WPForms_Process {
|
|
348 |
|
349 |
$email = array();
|
350 |
|
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(
|
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
|
362 |
$emails = new WPForms_WP_Emails;
|
363 |
$emails->__set( 'form_data', $form_data );
|
364 |
$emails->__set( 'fields', $fields );
|
@@ -367,12 +383,12 @@ class WPForms_Process {
|
|
367 |
$emails->__set( 'from_address', $email['sender_address'] );
|
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 |
}
|
@@ -383,10 +399,13 @@ class WPForms_Process {
|
|
383 |
* Saves entry to database.
|
384 |
*
|
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 = '' ) {
|
392 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Process and validate form entries.
|
4 |
*
|
5 |
* @package WPForms
|
6 |
* @author WPForms
|
64 |
* Process the form entry.
|
65 |
*
|
66 |
* @since 1.0.0
|
67 |
+
*
|
68 |
* @param array $entry $_POST object.
|
69 |
*/
|
70 |
public function process( $entry ) {
|
75 |
$form = wpforms()->form->get( $form_id );
|
76 |
$honeypot = false;
|
77 |
|
78 |
+
// Validate form is real and active (published).
|
79 |
if ( ! $form || 'publish' !== $form->post_status ) {
|
80 |
$this->errors[ $form_id ]['header'] = __( 'Invalid form.', 'wpforms' );
|
81 |
return;
|
91 |
do_action( 'wpforms_process_before', $entry, $form_data );
|
92 |
do_action( "wpforms_process_before_{$form_id}", $entry, $form_data );
|
93 |
|
94 |
+
// Validate fields.
|
95 |
foreach ( $form_data['fields'] as $field ) {
|
96 |
|
97 |
$field_id = $field['id'];
|
101 |
do_action( "wpforms_process_validate_{$field_type}", $field_id, $field_submit, $form_data );
|
102 |
}
|
103 |
|
104 |
+
// reCAPTCHA check.
|
105 |
$site_key = wpforms_setting( 'recaptcha-site-key', '' );
|
106 |
$secret_key = wpforms_setting( 'recaptcha-secret-key', '' );
|
107 |
+
if (
|
108 |
+
! empty( $site_key ) &&
|
109 |
+
! empty( $secret_key ) &&
|
110 |
+
isset( $form_data['settings']['recaptcha'] ) &&
|
111 |
+
'1' == $form_data['settings']['recaptcha']
|
112 |
+
) {
|
113 |
if ( ! empty( $_POST['g-recaptcha-response'] ) ) {
|
114 |
$data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $_POST['g-recaptcha-response'] );
|
115 |
$data = json_decode( wp_remote_retrieve_body( $data ) );
|
135 |
return;
|
136 |
}
|
137 |
|
138 |
+
// Validate honeypot.
|
139 |
+
if (
|
140 |
+
! empty( $form_data['settings']['honeypot'] ) &&
|
141 |
+
'1' == $form_data['settings']['honeypot'] &&
|
142 |
+
! empty( $entry['hp'] )
|
143 |
+
) {
|
144 |
$honeypot = __( 'WPForms honeypot field triggered.', 'wpforms' );
|
|
|
145 |
}
|
146 |
|
147 |
$honeypot = apply_filters( 'wpforms_process_honeypot', $honeypot, $this->fields, $entry, $form_data );
|
148 |
|
149 |
+
// Only trigger the processing (saving/sending entries, etc) if the entry.
|
150 |
// is not spam.
|
151 |
if ( ! $honeypot ) {
|
152 |
|
153 |
+
// Pass the form created date into the form data.
|
154 |
$form_data['created'] = $form->post_date;
|
155 |
|
156 |
// Format fields
|
157 |
+
foreach ( (array) $form_data['fields'] as $field ) {
|
158 |
|
159 |
$field_id = $field['id'];
|
160 |
$field_type = $field['type'];
|
166 |
// This hook is for internal purposes and should not be leveraged.
|
167 |
do_action( 'wpforms_process_format_after', $form_data );
|
168 |
|
169 |
+
// Process hooks/filter - this is where most addons should hook
|
170 |
// because at this point we have completed all field validation and
|
171 |
// formatted the data.
|
172 |
$this->fields = apply_filters( 'wpforms_process_filter', $this->fields, $entry, $form_data );
|
184 |
return;
|
185 |
}
|
186 |
|
187 |
+
// Success - add entry to database.
|
188 |
$entry_id = $this->entry_save( $this->fields, $entry, $form_data['id'], $form_data );
|
189 |
|
190 |
+
// Success - send email notification.
|
191 |
$this->entry_email( $this->fields, $entry, $form_data, $entry_id, 'entry' );
|
192 |
|
193 |
+
// Pass completed and formatted fields in POST.
|
194 |
$_POST['wpforms']['complete'] = $this->fields;
|
195 |
|
196 |
+
// Pass entry ID in POST.
|
197 |
$_POST['wpforms']['entry_id'] = $entry_id;
|
198 |
|
199 |
+
// Logs entry depending on log levels set.
|
200 |
wpforms_log(
|
201 |
'Entry',
|
202 |
$this->fields,
|
207 |
)
|
208 |
);
|
209 |
|
210 |
+
// Post-process hooks.
|
211 |
do_action( 'wpforms_process_complete', $this->fields, $entry, $form_data, $entry_id );
|
212 |
do_action( "wpforms_process_complete_{$form_id}", $this->fields, $entry, $form_data, $entry_id );
|
213 |
|
214 |
} else {
|
215 |
|
216 |
+
// Logs spam entry depending on log levels set.
|
217 |
wpforms_log(
|
218 |
'Spam Entry',
|
219 |
array( $honeypot, $entry ),
|
231 |
* Validate the form return hash.
|
232 |
*
|
233 |
* @since 1.0.0
|
234 |
+
*
|
235 |
* @param string $hash
|
236 |
* @return mixed false for invalid or form id
|
237 |
*/
|
240 |
$query_args = base64_decode( $hash );
|
241 |
parse_str( $query_args );
|
242 |
|
243 |
+
// Verify hash matches.
|
244 |
+
if ( wp_hash( $form_id . ',' . $entry_id ) !== $hash ) {
|
245 |
return false;
|
246 |
}
|
247 |
|
248 |
+
// Get lead and verify it is attached to the form we received with it.
|
249 |
$entry = wpforms()->entry->get( $entry_id );
|
250 |
|
251 |
if ( $form_id != $entry->form_id ) {
|
259 |
* Redirects user to a page or URL specified in the form confirmation settings.
|
260 |
*
|
261 |
* @since 1.0.0
|
262 |
+
*
|
263 |
+
* @param array|string $form_data
|
264 |
* @param string $hash
|
265 |
*/
|
266 |
public function entry_confirmation_redirect( $form_data = '', $hash = '' ) {
|
276 |
}
|
277 |
|
278 |
// Get form
|
279 |
+
$form_data = wpforms()->form->get( $form_id, array(
|
280 |
+
'content_only' => true,
|
281 |
+
) );
|
282 |
}
|
283 |
|
284 |
+
// Redirect if needed, to either a page or URL, after form processing.
|
285 |
if ( ! empty( $form_data['settings']['confirmation_type'] ) && 'message' !== $form_data['settings']['confirmation_type'] ) {
|
286 |
|
287 |
if ( 'redirect' === $form_data['settings']['confirmation_type'] ) {
|
312 |
* Sends entry email notifications.
|
313 |
*
|
314 |
* @since 1.0.0
|
315 |
+
*
|
316 |
* @param array $fields
|
317 |
* @param array $entry
|
318 |
* @param array $form_data
|
321 |
*/
|
322 |
public function entry_email( $fields, $entry, $form_data, $entry_id, $context = '' ) {
|
323 |
|
324 |
+
// Check that the form was configured for email notifications.
|
325 |
+
if (
|
326 |
+
empty( $form_data['settings']['notification_enable'] ) ||
|
327 |
+
'1' != $form_data['settings']['notification_enable']
|
328 |
+
) {
|
329 |
return;
|
330 |
}
|
331 |
|
336 |
|
337 |
$fields = apply_filters( 'wpforms_entry_email_data', $fields, $entry, $form_data );
|
338 |
|
339 |
+
// Backwards compatibility for notifications before v1.2.3.
|
340 |
if ( empty( $form_data['settings']['notifications'] ) ) {
|
341 |
$notifications[1] = array(
|
342 |
'email' => $form_data['settings']['notification_email'],
|
364 |
|
365 |
$email = array();
|
366 |
|
367 |
+
// Setup email properties.
|
368 |
$email['address'] = explode( ',', apply_filters( 'wpforms_process_smart_tags', $notification['email'], $form_data, $fields, $this->entry_id ) );
|
369 |
$email['address'] = array_map( 'sanitize_email', $email['address'] );
|
370 |
+
$email['subject'] = ! empty( $notification['subject'] ) ? $notification['subject'] : sprintf( _x( 'New %s Entry', 'Form name', 'wpforms ' ), $form_data['settings']['form_title'] );
|
371 |
$email['sender_address'] = ! empty( $notification['sender_address'] ) ? $notification['sender_address'] : get_option( 'admin_email' );
|
372 |
$email['sender_name'] = ! empty( $notification['sender_name'] ) ? $notification['sender_name'] : get_bloginfo( 'name' );
|
373 |
$email['replyto'] = ! empty( $notification['replyto'] ) ? $notification['replyto'] : false;
|
374 |
$email['message'] = ! empty( $notification['message'] ) ? $notification['message'] : '{all_fields}';
|
375 |
$email = apply_filters( 'wpforms_entry_email_atts', $email, $fields, $entry, $form_data, $notification_id );
|
376 |
|
377 |
+
// Create new email.
|
378 |
$emails = new WPForms_WP_Emails;
|
379 |
$emails->__set( 'form_data', $form_data );
|
380 |
$emails->__set( 'fields', $fields );
|
383 |
$emails->__set( 'from_address', $email['sender_address'] );
|
384 |
$emails->__set( 'reply_to', $email['replyto'] );
|
385 |
|
386 |
+
// Maybe include CC.
|
387 |
if ( ! empty( $notification['carboncopy'] ) && wpforms_setting( 'email-carbon-copy', false ) ) {
|
388 |
$emails->__set( 'cc', $notification['carboncopy'] );
|
389 |
}
|
390 |
|
391 |
+
// Go.
|
392 |
foreach ( $email['address'] as $address ) {
|
393 |
$emails->send( trim( $address ), $email['subject'], $email['message'] );
|
394 |
}
|
399 |
* Saves entry to database.
|
400 |
*
|
401 |
* @since 1.0.0
|
402 |
+
*
|
403 |
* @param array $fields
|
404 |
* @param array $entry
|
405 |
* @param int $form_id
|
406 |
+
* @param array|string $form_data
|
407 |
+
*
|
408 |
+
* @return int
|
409 |
*/
|
410 |
public function entry_save( $fields, $entry, $form_id, $form_data = '' ) {
|
411 |
|
includes/class-providers.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Load the providers.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.3.6
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2017, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Providers {
|
12 |
|
13 |
/**
|
@@ -52,4 +53,5 @@ class WPForms_Providers {
|
|
52 |
}
|
53 |
}
|
54 |
}
|
55 |
-
|
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Load the providers.
|
5 |
*
|
8 |
* @since 1.3.6
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2017, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Providers {
|
13 |
|
14 |
/**
|
53 |
}
|
54 |
}
|
55 |
}
|
56 |
+
|
57 |
+
new WPForms_Providers;
|
includes/class-smart-tags.php
CHANGED
@@ -25,17 +25,18 @@ class WPForms_Smart_Tags {
|
|
25 |
*
|
26 |
* @since 1.0.0
|
27 |
* @param string $return
|
28 |
-
*
|
|
|
29 |
*/
|
30 |
-
function get( $return = 'array'
|
31 |
|
32 |
$tags = array(
|
33 |
-
'admin_email' => __( 'Site
|
34 |
'entry_id' => __( 'Entry ID', 'wpforms' ),
|
35 |
'form_id' => __( 'Form ID', 'wpforms' ),
|
36 |
'form_name' => __( 'Form Name', 'wpforms' ),
|
37 |
'page_title' => __( 'Embedded Post/Page Title', 'wpforms' ),
|
38 |
-
'page_url' => __( '
|
39 |
'page_id' => __( 'Embedded Post/Page ID', 'wpforms' ),
|
40 |
'date format="m/d/Y"' => __( 'Date', 'wpforms' ),
|
41 |
'query_var key=""' => __( 'Query String Variable', 'wpforms' ),
|
@@ -46,7 +47,7 @@ class WPForms_Smart_Tags {
|
|
46 |
'author_id' => __( 'Author ID', 'wpforms' ),
|
47 |
'author_display' => __( 'Author Name', 'wpforms' ),
|
48 |
'author_email' => __( 'Author Email', 'wpforms' ),
|
49 |
-
'url_referer' => __( '
|
50 |
'url_login' => __( 'Login URL', 'wpforms' ),
|
51 |
'url_logout' => __( 'Logout URL', 'wpforms' ),
|
52 |
'url_register' => __( 'Register URL', 'wpforms' ),
|
@@ -55,12 +56,12 @@ class WPForms_Smart_Tags {
|
|
55 |
|
56 |
$tags = apply_filters( 'wpforms_smart_tags', $tags );
|
57 |
|
58 |
-
if ( 'list'
|
59 |
|
60 |
// Return formatted list
|
61 |
$output = '<ul class="smart-tags-list">';
|
62 |
-
foreach( $tags as $key => $tag
|
63 |
-
$output .= '<li><a href="#" data-value="' . esc_attr( $key ) . '">' .
|
64 |
}
|
65 |
$output .= '</ul>';
|
66 |
|
@@ -245,11 +246,8 @@ class WPForms_Smart_Tags {
|
|
245 |
if ( ! empty( $ids[1] ) && ! empty( $fields ) ) {
|
246 |
|
247 |
foreach ( $ids[1] as $key => $field_id ) {
|
248 |
-
|
249 |
-
|
250 |
-
} else {
|
251 |
-
$value = ! empty( $fields[ $field_id ]['value'] ) ? sanitize_text_field( $fields[ $field_id ]['value'] ) : '';
|
252 |
-
}
|
253 |
$content = str_replace( '{field_id="' . $field_id . '"}', $value , $content );
|
254 |
}
|
255 |
}
|
25 |
*
|
26 |
* @since 1.0.0
|
27 |
* @param string $return
|
28 |
+
*
|
29 |
+
* @return string|array
|
30 |
*/
|
31 |
+
function get( $return = 'array' ) {
|
32 |
|
33 |
$tags = array(
|
34 |
+
'admin_email' => __( 'Site Administrator Email', 'wpforms' ),
|
35 |
'entry_id' => __( 'Entry ID', 'wpforms' ),
|
36 |
'form_id' => __( 'Form ID', 'wpforms' ),
|
37 |
'form_name' => __( 'Form Name', 'wpforms' ),
|
38 |
'page_title' => __( 'Embedded Post/Page Title', 'wpforms' ),
|
39 |
+
'page_url' => __( 'Embedded Post Page URL', 'wpforms' ),
|
40 |
'page_id' => __( 'Embedded Post/Page ID', 'wpforms' ),
|
41 |
'date format="m/d/Y"' => __( 'Date', 'wpforms' ),
|
42 |
'query_var key=""' => __( 'Query String Variable', 'wpforms' ),
|
47 |
'author_id' => __( 'Author ID', 'wpforms' ),
|
48 |
'author_display' => __( 'Author Name', 'wpforms' ),
|
49 |
'author_email' => __( 'Author Email', 'wpforms' ),
|
50 |
+
'url_referer' => __( 'Referrer URL', 'wpforms' ),
|
51 |
'url_login' => __( 'Login URL', 'wpforms' ),
|
52 |
'url_logout' => __( 'Logout URL', 'wpforms' ),
|
53 |
'url_register' => __( 'Register URL', 'wpforms' ),
|
56 |
|
57 |
$tags = apply_filters( 'wpforms_smart_tags', $tags );
|
58 |
|
59 |
+
if ( 'list' === $return ) {
|
60 |
|
61 |
// Return formatted list
|
62 |
$output = '<ul class="smart-tags-list">';
|
63 |
+
foreach ( $tags as $key => $tag ) {
|
64 |
+
$output .= '<li><a href="#" data-value="' . esc_attr( $key ) . '">' . esc_html( $tag ) . '</a></li>';
|
65 |
}
|
66 |
$output .= '</ul>';
|
67 |
|
246 |
if ( ! empty( $ids[1] ) && ! empty( $fields ) ) {
|
247 |
|
248 |
foreach ( $ids[1] as $key => $field_id ) {
|
249 |
+
$value = ! empty( $fields[ $field_id ]['value'] ) ? wpforms_sanitize_textarea_field( $fields[ $field_id ]['value'] ) : '';
|
250 |
+
|
|
|
|
|
|
|
251 |
$content = str_replace( '{field_id="' . $field_id . '"}', $value , $content );
|
252 |
}
|
253 |
}
|
includes/class-templates.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Pre-configured packaged templates.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Templates {
|
12 |
|
13 |
/**
|
@@ -52,7 +53,7 @@ class WPForms_Templates {
|
|
52 |
) );
|
53 |
|
54 |
foreach ( $templates as $template ) {
|
55 |
-
|
56 |
if ( file_exists( WPFORMS_PLUGIN_DIR . 'includes/templates/class-' . $template . '.php' ) ) {
|
57 |
require_once WPFORMS_PLUGIN_DIR . 'includes/templates/class-' . $template . '.php';
|
58 |
} elseif ( file_exists( WPFORMS_PLUGIN_DIR . 'pro/includes/templates/class-' . $template . '.php' ) ) {
|
@@ -61,4 +62,5 @@ class WPForms_Templates {
|
|
61 |
}
|
62 |
}
|
63 |
}
|
64 |
-
|
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Pre-configured packaged templates.
|
5 |
*
|
8 |
* @since 1.0.0
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2016, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Templates {
|
13 |
|
14 |
/**
|
53 |
) );
|
54 |
|
55 |
foreach ( $templates as $template ) {
|
56 |
+
|
57 |
if ( file_exists( WPFORMS_PLUGIN_DIR . 'includes/templates/class-' . $template . '.php' ) ) {
|
58 |
require_once WPFORMS_PLUGIN_DIR . 'includes/templates/class-' . $template . '.php';
|
59 |
} elseif ( file_exists( WPFORMS_PLUGIN_DIR . 'pro/includes/templates/class-' . $template . '.php' ) ) {
|
62 |
}
|
63 |
}
|
64 |
}
|
65 |
+
|
66 |
+
new WPForms_Templates;
|
includes/class-widget.php
CHANGED
@@ -40,7 +40,7 @@ class WPForms_Widget extends WP_Widget {
|
|
40 |
// Widget basics.
|
41 |
$widget_ops = array(
|
42 |
'classname' => $widget_slug,
|
43 |
-
'description' => _x( 'Display a form.', 'Widget
|
44 |
);
|
45 |
|
46 |
// Widget controls.
|
@@ -49,7 +49,7 @@ class WPForms_Widget extends WP_Widget {
|
|
49 |
);
|
50 |
|
51 |
// load widget
|
52 |
-
parent::__construct( $widget_slug, _x( 'WPForms', 'Widget
|
53 |
}
|
54 |
|
55 |
/**
|
@@ -117,7 +117,7 @@ class WPForms_Widget extends WP_Widget {
|
|
117 |
?>
|
118 |
<p>
|
119 |
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
|
120 |
-
<?php _ex( 'Title:', 'Widget
|
121 |
</label>
|
122 |
<input type="text"
|
123 |
id="<?php echo $this->get_field_id( 'title' ); ?>"
|
@@ -126,19 +126,19 @@ class WPForms_Widget extends WP_Widget {
|
|
126 |
</p>
|
127 |
<p>
|
128 |
<label for="<?php echo $this->get_field_id( 'form_id' ); ?>">
|
129 |
-
<?php _ex( 'Form:', 'Widget
|
130 |
</label>
|
131 |
<select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
|
132 |
<?php
|
133 |
$forms = wpforms()->form->get();
|
134 |
if ( ! empty( $forms ) ) {
|
135 |
-
echo '<option value="" selected disabled>' . _x( 'Select your form', 'Widget
|
136 |
|
137 |
foreach ( $forms as $form ) {
|
138 |
echo '<option value="' . esc_attr( $form->ID ) . '" ' . selected( $instance['form_id'], $form->ID, false ) . '>' . esc_html( $form->post_title ) . '</option>';
|
139 |
}
|
140 |
} else {
|
141 |
-
echo '<option value="">' . _x( 'No forms', 'Widget
|
142 |
}
|
143 |
?>
|
144 |
</select>
|
@@ -146,11 +146,11 @@ class WPForms_Widget extends WP_Widget {
|
|
146 |
<p>
|
147 |
<input type="checkbox" id="<?php echo $this->get_field_id( 'show_title' ); ?>"
|
148 |
name="<?php echo $this->get_field_name( 'show_title' ); ?>" <?php checked( '1', $instance['show_title'] ); ?>>
|
149 |
-
<label for="<?php echo $this->get_field_id( 'show_title' ); ?>"><?php _ex( 'Display form
|
150 |
<br>
|
151 |
<input type="checkbox" id="<?php echo $this->get_field_id( 'show_desc' ); ?>"
|
152 |
name="<?php echo $this->get_field_name( 'show_desc' ); ?>" <?php checked( '1', $instance['show_desc'] ); ?>>
|
153 |
-
<label for="<?php echo $this->get_field_id( 'show_desc' ); ?>"><?php _ex( 'Display form description', 'Widget
|
154 |
</p>
|
155 |
<?php
|
156 |
}
|
40 |
// Widget basics.
|
41 |
$widget_ops = array(
|
42 |
'classname' => $widget_slug,
|
43 |
+
'description' => _x( 'Display a form.', 'Widget', 'wpforms' ),
|
44 |
);
|
45 |
|
46 |
// Widget controls.
|
49 |
);
|
50 |
|
51 |
// load widget
|
52 |
+
parent::__construct( $widget_slug, _x( 'WPForms', 'Widget', 'wpforms' ), $widget_ops, $control_ops );
|
53 |
}
|
54 |
|
55 |
/**
|
117 |
?>
|
118 |
<p>
|
119 |
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
|
120 |
+
<?php _ex( 'Title:', 'Widget', 'wpforms' ); ?>
|
121 |
</label>
|
122 |
<input type="text"
|
123 |
id="<?php echo $this->get_field_id( 'title' ); ?>"
|
126 |
</p>
|
127 |
<p>
|
128 |
<label for="<?php echo $this->get_field_id( 'form_id' ); ?>">
|
129 |
+
<?php _ex( 'Form:', 'Widget', 'wpforms' ); ?>
|
130 |
</label>
|
131 |
<select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
|
132 |
<?php
|
133 |
$forms = wpforms()->form->get();
|
134 |
if ( ! empty( $forms ) ) {
|
135 |
+
echo '<option value="" selected disabled>' . _x( 'Select your form', 'Widget', 'wpforms' ) . '</option>';
|
136 |
|
137 |
foreach ( $forms as $form ) {
|
138 |
echo '<option value="' . esc_attr( $form->ID ) . '" ' . selected( $instance['form_id'], $form->ID, false ) . '>' . esc_html( $form->post_title ) . '</option>';
|
139 |
}
|
140 |
} else {
|
141 |
+
echo '<option value="">' . _x( 'No forms', 'Widget', 'wpforms' ) . '</option>';
|
142 |
}
|
143 |
?>
|
144 |
</select>
|
146 |
<p>
|
147 |
<input type="checkbox" id="<?php echo $this->get_field_id( 'show_title' ); ?>"
|
148 |
name="<?php echo $this->get_field_name( 'show_title' ); ?>" <?php checked( '1', $instance['show_title'] ); ?>>
|
149 |
+
<label for="<?php echo $this->get_field_id( 'show_title' ); ?>"><?php _ex( 'Display form name', 'Widget', 'wpforms' ); ?></label>
|
150 |
<br>
|
151 |
<input type="checkbox" id="<?php echo $this->get_field_id( 'show_desc' ); ?>"
|
152 |
name="<?php echo $this->get_field_name( 'show_desc' ); ?>" <?php checked( '1', $instance['show_desc'] ); ?>>
|
153 |
+
<label for="<?php echo $this->get_field_id( 'show_desc' ); ?>"><?php _ex( 'Display form description', 'Widget', 'wpforms' ); ?></label>
|
154 |
</p>
|
155 |
<?php
|
156 |
}
|
includes/emails/class-emails.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Emails.
|
4 |
*
|
@@ -12,13 +13,15 @@
|
|
12 |
* @since 1.1.3
|
13 |
* @license GPL-2.0+
|
14 |
* @copyright Copyright (c) 2016, WPForms LLC
|
15 |
-
*/
|
16 |
class WPForms_WP_Emails {
|
17 |
|
18 |
/**
|
19 |
* Holds the from address.
|
20 |
*
|
21 |
* @since 1.1.3
|
|
|
|
|
22 |
*/
|
23 |
private $from_address;
|
24 |
|
@@ -26,6 +29,8 @@ class WPForms_WP_Emails {
|
|
26 |
* Holds the from name.
|
27 |
*
|
28 |
* @since 1.1.3
|
|
|
|
|
29 |
*/
|
30 |
private $from_name;
|
31 |
|
@@ -33,13 +38,17 @@ class WPForms_WP_Emails {
|
|
33 |
* Holds the reply-to address.
|
34 |
*
|
35 |
* @since 1.1.3
|
|
|
|
|
36 |
*/
|
37 |
private $reply_to = false;
|
38 |
|
39 |
/**
|
40 |
* Holds the carbon copy addresses.
|
41 |
*
|
42 |
-
* @since 1.3
|
|
|
|
|
43 |
*/
|
44 |
private $cc = false;
|
45 |
|
@@ -47,6 +56,8 @@ class WPForms_WP_Emails {
|
|
47 |
* Holds the email content type.
|
48 |
*
|
49 |
* @since 1.1.3
|
|
|
|
|
50 |
*/
|
51 |
private $content_type;
|
52 |
|
@@ -54,6 +65,8 @@ class WPForms_WP_Emails {
|
|
54 |
* Holds the email headers.
|
55 |
*
|
56 |
* @since 1.1.3
|
|
|
|
|
57 |
*/
|
58 |
private $headers;
|
59 |
|
@@ -61,6 +74,8 @@ class WPForms_WP_Emails {
|
|
61 |
* Whether to send email in HTML.
|
62 |
*
|
63 |
* @since 1.1.3
|
|
|
|
|
64 |
*/
|
65 |
private $html = true;
|
66 |
|
@@ -68,6 +83,8 @@ class WPForms_WP_Emails {
|
|
68 |
* The email template to use.
|
69 |
*
|
70 |
* @since 1.1.3
|
|
|
|
|
71 |
*/
|
72 |
private $template;
|
73 |
|
@@ -75,20 +92,26 @@ class WPForms_WP_Emails {
|
|
75 |
* Form data.
|
76 |
*
|
77 |
* @since 1.1.3
|
|
|
|
|
78 |
*/
|
79 |
-
public $form_data =
|
80 |
|
81 |
/**
|
82 |
* Fields, formatted, and sanitized.
|
83 |
*
|
84 |
* @since 1.1.3
|
|
|
|
|
85 |
*/
|
86 |
-
public $fields =
|
87 |
|
88 |
/**
|
89 |
* Entry ID.
|
90 |
*
|
91 |
* @since 1.2.3
|
|
|
|
|
92 |
*/
|
93 |
public $entry_id = '';
|
94 |
|
@@ -96,7 +119,6 @@ class WPForms_WP_Emails {
|
|
96 |
* Get things going.
|
97 |
*
|
98 |
* @since 1.1.3
|
99 |
-
* @return void
|
100 |
*/
|
101 |
public function __construct() {
|
102 |
|
@@ -112,7 +134,9 @@ class WPForms_WP_Emails {
|
|
112 |
* Set a property.
|
113 |
*
|
114 |
* @since 1.1.3
|
115 |
-
*
|
|
|
|
|
116 |
*/
|
117 |
public function __set( $key, $value ) {
|
118 |
|
@@ -123,14 +147,15 @@ class WPForms_WP_Emails {
|
|
123 |
* Get the email from name.
|
124 |
*
|
125 |
* @since 1.1.3
|
|
|
126 |
* @return string The email from name
|
127 |
*/
|
128 |
public function get_from_name() {
|
129 |
|
130 |
-
if ( !empty( $this->from_name ) ) {
|
131 |
-
$this->from_name =
|
132 |
} else {
|
133 |
-
$this->from_name =
|
134 |
}
|
135 |
|
136 |
return apply_filters( 'wpforms_email_from_name', wp_specialchars_decode( $this->from_name ), $this );
|
@@ -140,11 +165,12 @@ class WPForms_WP_Emails {
|
|
140 |
* Get the email from address.
|
141 |
*
|
142 |
* @since 1.1.3
|
143 |
-
*
|
|
|
144 |
*/
|
145 |
public function get_from_address() {
|
146 |
|
147 |
-
if ( !empty( $this->from_address ) ) {
|
148 |
$this->from_address = $this->process_tag( $this->from_address );
|
149 |
} else {
|
150 |
$this->from_address = get_option( 'admin_email' );
|
@@ -157,15 +183,16 @@ class WPForms_WP_Emails {
|
|
157 |
* Get the email reply-to.
|
158 |
*
|
159 |
* @since 1.1.3
|
160 |
-
*
|
|
|
161 |
*/
|
162 |
public function get_reply_to() {
|
163 |
|
164 |
-
if ( !empty( $this->reply_to ) ) {
|
165 |
|
166 |
$this->reply_to = $this->process_tag( $this->reply_to );
|
167 |
|
168 |
-
if ( !is_email( $this->reply_to ) ) {
|
169 |
$this->reply_to = false;
|
170 |
}
|
171 |
}
|
@@ -177,19 +204,20 @@ class WPForms_WP_Emails {
|
|
177 |
* Get the email carbon copy addresses.
|
178 |
*
|
179 |
* @since 1.3.1
|
180 |
-
*
|
|
|
181 |
*/
|
182 |
public function get_cc() {
|
183 |
|
184 |
-
if ( !empty( $this->cc ) ) {
|
185 |
|
186 |
$this->cc = $this->process_tag( $this->cc );
|
187 |
|
188 |
-
$addresses = array_map( 'trim', explode(',', $this->cc ) );
|
189 |
|
190 |
foreach ( $addresses as $key => $address ) {
|
191 |
-
if ( !is_email( $address ) ) {
|
192 |
-
unset( $addresses[$key] );
|
193 |
}
|
194 |
}
|
195 |
|
@@ -203,7 +231,8 @@ class WPForms_WP_Emails {
|
|
203 |
* Get the email content type.
|
204 |
*
|
205 |
* @since 1.1.3
|
206 |
-
*
|
|
|
207 |
*/
|
208 |
public function get_content_type() {
|
209 |
|
@@ -220,7 +249,8 @@ class WPForms_WP_Emails {
|
|
220 |
* Get the email headers.
|
221 |
*
|
222 |
* @since 1.1.3
|
223 |
-
*
|
|
|
224 |
*/
|
225 |
public function get_headers() {
|
226 |
|
@@ -239,10 +269,12 @@ class WPForms_WP_Emails {
|
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
-
* Build the email
|
243 |
*
|
244 |
* @since 1.1.3
|
245 |
-
*
|
|
|
|
|
246 |
* @return string
|
247 |
*/
|
248 |
public function build_email( $message ) {
|
@@ -273,7 +305,7 @@ class WPForms_WP_Emails {
|
|
273 |
$message = $this->process_tag( $message, false );
|
274 |
$message = nl2br( $message );
|
275 |
|
276 |
-
$body
|
277 |
$message = str_replace( '{email}', $message, $body );
|
278 |
$message = str_replace( '{all_fields}', $this->wpforms_html_field_value( true ), $message );
|
279 |
$message = make_clickable( $message );
|
@@ -282,18 +314,22 @@ class WPForms_WP_Emails {
|
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
-
* Send the email
|
286 |
*
|
287 |
* @since 1.1.3
|
288 |
-
*
|
289 |
-
* @param string $
|
290 |
-
* @param string $
|
291 |
-
* @param string
|
|
|
|
|
|
|
292 |
*/
|
293 |
public function send( $to, $subject, $message, $attachments = array() ) {
|
294 |
|
295 |
if ( ! did_action( 'init' ) && ! did_action( 'admin_init' ) ) {
|
296 |
_doing_it_wrong( __FUNCTION__, __( 'You cannot send emails with WPForms_WP_Emails until init/admin_init has been reached', 'wpforms' ), null );
|
|
|
297 |
return false;
|
298 |
}
|
299 |
|
@@ -330,8 +366,8 @@ class WPForms_WP_Emails {
|
|
330 |
*/
|
331 |
public function send_before() {
|
332 |
|
333 |
-
add_filter( 'wp_mail_from',
|
334 |
-
add_filter( 'wp_mail_from_name',
|
335 |
add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
336 |
}
|
337 |
|
@@ -342,8 +378,8 @@ class WPForms_WP_Emails {
|
|
342 |
*/
|
343 |
public function send_after() {
|
344 |
|
345 |
-
remove_filter( 'wp_mail_from',
|
346 |
-
remove_filter( 'wp_mail_from_name',
|
347 |
remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
348 |
}
|
349 |
|
@@ -352,7 +388,9 @@ class WPForms_WP_Emails {
|
|
352 |
* into <p> and <br/> tags.
|
353 |
*
|
354 |
* @since 1.1.3
|
|
|
355 |
* @param string $message
|
|
|
356 |
* @return string
|
357 |
*/
|
358 |
public function text_to_html( $message ) {
|
@@ -368,19 +406,22 @@ class WPForms_WP_Emails {
|
|
368 |
* Processes a smart tag.
|
369 |
*
|
370 |
* @since 1.1.3
|
|
|
371 |
* @param string $string
|
372 |
* @param bool $sanitize
|
|
|
|
|
373 |
* @return string
|
374 |
*/
|
375 |
-
function process_tag( $string = '', $sanitize = true, $linebreaks = false ) {
|
376 |
|
377 |
$tag = apply_filters( 'wpforms_process_smart_tags', $string, $this->form_data, $this->fields, $this->entry_id );
|
378 |
|
379 |
$tag = stripslashes( wp_specialchars_decode( $tag ) );
|
380 |
|
381 |
if ( $sanitize ) {
|
382 |
-
if (
|
383 |
-
$tag =
|
384 |
} else {
|
385 |
$tag = sanitize_text_field( $tag );
|
386 |
}
|
@@ -393,11 +434,16 @@ class WPForms_WP_Emails {
|
|
393 |
* Process the all fields smart tag if present.
|
394 |
*
|
395 |
* @since 1.1.3
|
|
|
|
|
|
|
|
|
396 |
*/
|
397 |
-
function wpforms_html_field_value( $html = true ) {
|
398 |
|
399 |
-
if ( empty( $this->fields ) )
|
400 |
-
return;
|
|
|
401 |
|
402 |
$message = '';
|
403 |
|
@@ -414,17 +460,20 @@ class WPForms_WP_Emails {
|
|
414 |
$field_template = ob_get_clean();
|
415 |
|
416 |
$x = 1;
|
417 |
-
foreach( $this->fields as $field ) {
|
418 |
|
419 |
-
if (
|
|
|
|
|
|
|
420 |
continue;
|
421 |
}
|
422 |
|
423 |
$field_val = empty( $field['value'] ) && '0' !== $field['value'] ? '<em>' . __( '(empty)', 'wpforms' ) . '</em>' : $field['value'];
|
424 |
-
$field_name = !empty( $field['name'] ) ? $field['name'] : __( 'Field ID #', 'wpforms' ) . absint( $field['id'] );
|
425 |
|
426 |
$field_item = $field_template;
|
427 |
-
if (
|
428 |
$field_item = str_replace( 'border-top:1px solid #dddddd;', '', $field_item );
|
429 |
}
|
430 |
$field_item = str_replace( '{field_name}', $field_name, $field_item );
|
@@ -434,7 +483,6 @@ class WPForms_WP_Emails {
|
|
434 |
$message .= wpautop( $field_item );
|
435 |
$x++;
|
436 |
}
|
437 |
-
|
438 |
} else {
|
439 |
|
440 |
// Plain Text emails ---------------------------------------------//
|
@@ -445,14 +493,19 @@ class WPForms_WP_Emails {
|
|
445 |
}
|
446 |
|
447 |
$field_val = empty( $field['value'] ) && '0' !== $field['value'] ? __( '(empty)', 'wpforms' ) : $field['value'];
|
448 |
-
$field_name = !empty( $field['name'] ) ? $field['name'] : __( 'Field ID #', 'wpforms' ) . absint( $field['id'] );
|
449 |
|
450 |
-
$message .=
|
451 |
$field_value = stripslashes( wp_specialchars_decode( $field_val ) ) . "\r\n\r\n";
|
452 |
$message .= apply_filters( 'wpforms_plaintext_field_value', $field_value, $field, $this->form_data );
|
453 |
}
|
454 |
}
|
455 |
|
|
|
|
|
|
|
|
|
|
|
456 |
return $message;
|
457 |
}
|
458 |
|
@@ -460,6 +513,7 @@ class WPForms_WP_Emails {
|
|
460 |
* Email kill switch if needed.
|
461 |
*
|
462 |
* @since 1.1.3
|
|
|
463 |
* @return bool
|
464 |
*/
|
465 |
public function is_email_disabled() {
|
@@ -470,10 +524,11 @@ class WPForms_WP_Emails {
|
|
470 |
}
|
471 |
|
472 |
/**
|
473 |
-
* Get the enabled email template
|
474 |
*
|
475 |
* @since 1.1.3
|
476 |
-
*
|
|
|
477 |
*/
|
478 |
public function get_template() {
|
479 |
|
@@ -488,17 +543,20 @@ class WPForms_WP_Emails {
|
|
488 |
* Retrieves a template part. Taken from bbPress.
|
489 |
*
|
490 |
* @since 1.1.3
|
|
|
491 |
* @param string $slug
|
492 |
-
* @param string $name Optional. Default null
|
493 |
* @param bool $load
|
|
|
494 |
* @return string
|
495 |
*/
|
496 |
public function get_template_part( $slug, $name = null, $load = true ) {
|
497 |
|
498 |
// Setup possible parts
|
499 |
$templates = array();
|
500 |
-
if ( isset( $name ) )
|
501 |
$templates[] = $slug . '-' . $name . '.php';
|
|
|
502 |
$templates[] = $slug . '.php';
|
503 |
|
504 |
// Return the part that is found
|
@@ -512,13 +570,15 @@ class WPForms_WP_Emails {
|
|
512 |
* inherit from a parent theme can just overload one file. If the template is
|
513 |
* not found in either of those, it looks in the theme-compat folder last.
|
514 |
*
|
515 |
-
* Taken from bbPress
|
516 |
*
|
517 |
* @since 1.1.3
|
|
|
518 |
* @param string|array $template_names Template file(s) to search for, in order.
|
519 |
* @param bool $load If true the template file will be loaded if it is found.
|
520 |
* @param bool $require_once Whether to require_once or require. Default true.
|
521 |
* Has no effect if $load is false.
|
|
|
522 |
* @return string The template filename if one is located.
|
523 |
*/
|
524 |
public function locate_template( $template_names, $load = false, $require_once = true ) {
|
@@ -530,23 +590,25 @@ class WPForms_WP_Emails {
|
|
530 |
foreach ( (array) $template_names as $template_name ) {
|
531 |
|
532 |
// Continue if template is empty
|
533 |
-
if ( empty( $template_name ) )
|
534 |
continue;
|
|
|
535 |
|
536 |
// Trim off any slashes from the template name
|
537 |
$template_name = ltrim( $template_name, '/' );
|
538 |
|
539 |
// try locating this template file by looping through the template paths
|
540 |
-
foreach( $this->get_theme_template_paths() as $template_path ) {
|
541 |
-
if( file_exists( $template_path . $template_name ) ) {
|
542 |
$located = $template_path . $template_name;
|
543 |
break;
|
544 |
}
|
545 |
}
|
546 |
}
|
547 |
|
548 |
-
if ( ( true
|
549 |
load_template( $located, $require_once );
|
|
|
550 |
|
551 |
return $located;
|
552 |
}
|
@@ -555,7 +617,8 @@ class WPForms_WP_Emails {
|
|
555 |
* Returns a list of paths to check for template locations
|
556 |
*
|
557 |
* @since 1.1.3
|
558 |
-
*
|
|
|
559 |
*/
|
560 |
public function get_theme_template_paths() {
|
561 |
|
@@ -564,7 +627,7 @@ class WPForms_WP_Emails {
|
|
564 |
$file_paths = array(
|
565 |
1 => trailingslashit( get_stylesheet_directory() ) . $template_dir,
|
566 |
10 => trailingslashit( get_template_directory() ) . $template_dir,
|
567 |
-
100 => WPFORMS_PLUGIN_DIR . 'includes/emails/templates'
|
568 |
);
|
569 |
|
570 |
$file_paths = apply_filters( 'wpforms_email_template_paths', $file_paths );
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Emails.
|
5 |
*
|
13 |
* @since 1.1.3
|
14 |
* @license GPL-2.0+
|
15 |
* @copyright Copyright (c) 2016, WPForms LLC
|
16 |
+
*/
|
17 |
class WPForms_WP_Emails {
|
18 |
|
19 |
/**
|
20 |
* Holds the from address.
|
21 |
*
|
22 |
* @since 1.1.3
|
23 |
+
*
|
24 |
+
* @var string
|
25 |
*/
|
26 |
private $from_address;
|
27 |
|
29 |
* Holds the from name.
|
30 |
*
|
31 |
* @since 1.1.3
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
*/
|
35 |
private $from_name;
|
36 |
|
38 |
* Holds the reply-to address.
|
39 |
*
|
40 |
* @since 1.1.3
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
*/
|
44 |
private $reply_to = false;
|
45 |
|
46 |
/**
|
47 |
* Holds the carbon copy addresses.
|
48 |
*
|
49 |
+
* @since 1.3.1
|
50 |
+
*
|
51 |
+
* @var string
|
52 |
*/
|
53 |
private $cc = false;
|
54 |
|
56 |
* Holds the email content type.
|
57 |
*
|
58 |
* @since 1.1.3
|
59 |
+
*
|
60 |
+
* @var string
|
61 |
*/
|
62 |
private $content_type;
|
63 |
|
65 |
* Holds the email headers.
|
66 |
*
|
67 |
* @since 1.1.3
|
68 |
+
*
|
69 |
+
* @var string
|
70 |
*/
|
71 |
private $headers;
|
72 |
|
74 |
* Whether to send email in HTML.
|
75 |
*
|
76 |
* @since 1.1.3
|
77 |
+
*
|
78 |
+
* @var bool
|
79 |
*/
|
80 |
private $html = true;
|
81 |
|
83 |
* The email template to use.
|
84 |
*
|
85 |
* @since 1.1.3
|
86 |
+
*
|
87 |
+
* @var string
|
88 |
*/
|
89 |
private $template;
|
90 |
|
92 |
* Form data.
|
93 |
*
|
94 |
* @since 1.1.3
|
95 |
+
*
|
96 |
+
* @var array
|
97 |
*/
|
98 |
+
public $form_data = array();
|
99 |
|
100 |
/**
|
101 |
* Fields, formatted, and sanitized.
|
102 |
*
|
103 |
* @since 1.1.3
|
104 |
+
*
|
105 |
+
* @var array
|
106 |
*/
|
107 |
+
public $fields = array();
|
108 |
|
109 |
/**
|
110 |
* Entry ID.
|
111 |
*
|
112 |
* @since 1.2.3
|
113 |
+
*
|
114 |
+
* @var int
|
115 |
*/
|
116 |
public $entry_id = '';
|
117 |
|
119 |
* Get things going.
|
120 |
*
|
121 |
* @since 1.1.3
|
|
|
122 |
*/
|
123 |
public function __construct() {
|
124 |
|
134 |
* Set a property.
|
135 |
*
|
136 |
* @since 1.1.3
|
137 |
+
*
|
138 |
+
* @param string $key
|
139 |
+
* @param mixed $value
|
140 |
*/
|
141 |
public function __set( $key, $value ) {
|
142 |
|
147 |
* Get the email from name.
|
148 |
*
|
149 |
* @since 1.1.3
|
150 |
+
*
|
151 |
* @return string The email from name
|
152 |
*/
|
153 |
public function get_from_name() {
|
154 |
|
155 |
+
if ( ! empty( $this->from_name ) ) {
|
156 |
+
$this->from_name = $this->process_tag( $this->from_name );
|
157 |
} else {
|
158 |
+
$this->from_name = get_bloginfo( 'name' );
|
159 |
}
|
160 |
|
161 |
return apply_filters( 'wpforms_email_from_name', wp_specialchars_decode( $this->from_name ), $this );
|
165 |
* Get the email from address.
|
166 |
*
|
167 |
* @since 1.1.3
|
168 |
+
*
|
169 |
+
* @return string The email from address.
|
170 |
*/
|
171 |
public function get_from_address() {
|
172 |
|
173 |
+
if ( ! empty( $this->from_address ) ) {
|
174 |
$this->from_address = $this->process_tag( $this->from_address );
|
175 |
} else {
|
176 |
$this->from_address = get_option( 'admin_email' );
|
183 |
* Get the email reply-to.
|
184 |
*
|
185 |
* @since 1.1.3
|
186 |
+
*
|
187 |
+
* @return string The email reply-to address.
|
188 |
*/
|
189 |
public function get_reply_to() {
|
190 |
|
191 |
+
if ( ! empty( $this->reply_to ) ) {
|
192 |
|
193 |
$this->reply_to = $this->process_tag( $this->reply_to );
|
194 |
|
195 |
+
if ( ! is_email( $this->reply_to ) ) {
|
196 |
$this->reply_to = false;
|
197 |
}
|
198 |
}
|
204 |
* Get the email carbon copy addresses.
|
205 |
*
|
206 |
* @since 1.3.1
|
207 |
+
*
|
208 |
+
* @return string The email reply-to address.
|
209 |
*/
|
210 |
public function get_cc() {
|
211 |
|
212 |
+
if ( ! empty( $this->cc ) ) {
|
213 |
|
214 |
$this->cc = $this->process_tag( $this->cc );
|
215 |
|
216 |
+
$addresses = array_map( 'trim', explode( ',', $this->cc ) );
|
217 |
|
218 |
foreach ( $addresses as $key => $address ) {
|
219 |
+
if ( ! is_email( $address ) ) {
|
220 |
+
unset( $addresses[ $key ] );
|
221 |
}
|
222 |
}
|
223 |
|
231 |
* Get the email content type.
|
232 |
*
|
233 |
* @since 1.1.3
|
234 |
+
*
|
235 |
+
* @return string The email content type.
|
236 |
*/
|
237 |
public function get_content_type() {
|
238 |
|
249 |
* Get the email headers.
|
250 |
*
|
251 |
* @since 1.1.3
|
252 |
+
*
|
253 |
+
* @return string The email headers.
|
254 |
*/
|
255 |
public function get_headers() {
|
256 |
|
269 |
}
|
270 |
|
271 |
/**
|
272 |
+
* Build the email.
|
273 |
*
|
274 |
* @since 1.1.3
|
275 |
+
*
|
276 |
+
* @param string $message The email message.
|
277 |
+
*
|
278 |
* @return string
|
279 |
*/
|
280 |
public function build_email( $message ) {
|
305 |
$message = $this->process_tag( $message, false );
|
306 |
$message = nl2br( $message );
|
307 |
|
308 |
+
$body = ob_get_clean();
|
309 |
$message = str_replace( '{email}', $message, $body );
|
310 |
$message = str_replace( '{all_fields}', $this->wpforms_html_field_value( true ), $message );
|
311 |
$message = make_clickable( $message );
|
314 |
}
|
315 |
|
316 |
/**
|
317 |
+
* Send the email.
|
318 |
*
|
319 |
* @since 1.1.3
|
320 |
+
*
|
321 |
+
* @param string $to The To address.
|
322 |
+
* @param string $subject The subject line of the email.
|
323 |
+
* @param string $message The body of the email.
|
324 |
+
* @param string|array $attachments Attachments to the email.
|
325 |
+
*
|
326 |
+
* @return bool
|
327 |
*/
|
328 |
public function send( $to, $subject, $message, $attachments = array() ) {
|
329 |
|
330 |
if ( ! did_action( 'init' ) && ! did_action( 'admin_init' ) ) {
|
331 |
_doing_it_wrong( __FUNCTION__, __( 'You cannot send emails with WPForms_WP_Emails until init/admin_init has been reached', 'wpforms' ), null );
|
332 |
+
|
333 |
return false;
|
334 |
}
|
335 |
|
366 |
*/
|
367 |
public function send_before() {
|
368 |
|
369 |
+
add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
370 |
+
add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
371 |
add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
372 |
}
|
373 |
|
378 |
*/
|
379 |
public function send_after() {
|
380 |
|
381 |
+
remove_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
382 |
+
remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
383 |
remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
|
384 |
}
|
385 |
|
388 |
* into <p> and <br/> tags.
|
389 |
*
|
390 |
* @since 1.1.3
|
391 |
+
*
|
392 |
* @param string $message
|
393 |
+
*
|
394 |
* @return string
|
395 |
*/
|
396 |
public function text_to_html( $message ) {
|
406 |
* Processes a smart tag.
|
407 |
*
|
408 |
* @since 1.1.3
|
409 |
+
*
|
410 |
* @param string $string
|
411 |
* @param bool $sanitize
|
412 |
+
* @param bool $linebreaks
|
413 |
+
*
|
414 |
* @return string
|
415 |
*/
|
416 |
+
public function process_tag( $string = '', $sanitize = true, $linebreaks = false ) {
|
417 |
|
418 |
$tag = apply_filters( 'wpforms_process_smart_tags', $string, $this->form_data, $this->fields, $this->entry_id );
|
419 |
|
420 |
$tag = stripslashes( wp_specialchars_decode( $tag ) );
|
421 |
|
422 |
if ( $sanitize ) {
|
423 |
+
if ( $linebreaks ) {
|
424 |
+
$tag = wpforms_sanitize_textarea_field( $tag );
|
425 |
} else {
|
426 |
$tag = sanitize_text_field( $tag );
|
427 |
}
|
434 |
* Process the all fields smart tag if present.
|
435 |
*
|
436 |
* @since 1.1.3
|
437 |
+
*
|
438 |
+
* @param bool $html
|
439 |
+
*
|
440 |
+
* @return string
|
441 |
*/
|
442 |
+
public function wpforms_html_field_value( $html = true ) {
|
443 |
|
444 |
+
if ( empty( $this->fields ) ) {
|
445 |
+
return '';
|
446 |
+
}
|
447 |
|
448 |
$message = '';
|
449 |
|
460 |
$field_template = ob_get_clean();
|
461 |
|
462 |
$x = 1;
|
463 |
+
foreach ( $this->fields as $field ) {
|
464 |
|
465 |
+
if (
|
466 |
+
! apply_filters( 'wpforms_email_display_empty_fields', false ) &&
|
467 |
+
( empty( $field['value'] ) && '0' !== $field['value'] )
|
468 |
+
) {
|
469 |
continue;
|
470 |
}
|
471 |
|
472 |
$field_val = empty( $field['value'] ) && '0' !== $field['value'] ? '<em>' . __( '(empty)', 'wpforms' ) . '</em>' : $field['value'];
|
473 |
+
$field_name = ! empty( $field['name'] ) ? $field['name'] : __( 'Field ID #', 'wpforms' ) . absint( $field['id'] );
|
474 |
|
475 |
$field_item = $field_template;
|
476 |
+
if ( 1 === $x ) {
|
477 |
$field_item = str_replace( 'border-top:1px solid #dddddd;', '', $field_item );
|
478 |
}
|
479 |
$field_item = str_replace( '{field_name}', $field_name, $field_item );
|
483 |
$message .= wpautop( $field_item );
|
484 |
$x++;
|
485 |
}
|
|
|
486 |
} else {
|
487 |
|
488 |
// Plain Text emails ---------------------------------------------//
|
493 |
}
|
494 |
|
495 |
$field_val = empty( $field['value'] ) && '0' !== $field['value'] ? __( '(empty)', 'wpforms' ) : $field['value'];
|
496 |
+
$field_name = ! empty( $field['name'] ) ? $field['name'] : __( 'Field ID #', 'wpforms' ) . absint( $field['id'] );
|
497 |
|
498 |
+
$message .= '--- ' . wp_specialchars_decode( $field_name ) . " ---\r\n";
|
499 |
$field_value = stripslashes( wp_specialchars_decode( $field_val ) ) . "\r\n\r\n";
|
500 |
$message .= apply_filters( 'wpforms_plaintext_field_value', $field_value, $field, $this->form_data );
|
501 |
}
|
502 |
}
|
503 |
|
504 |
+
if ( empty( $message ) ) {
|
505 |
+
$empty_message = __( 'An empty form was submitted.', 'wpforms' );
|
506 |
+
$message = $html ? wpautop( $empty_message ) : $empty_message;
|
507 |
+
}
|
508 |
+
|
509 |
return $message;
|
510 |
}
|
511 |
|
513 |
* Email kill switch if needed.
|
514 |
*
|
515 |
* @since 1.1.3
|
516 |
+
*
|
517 |
* @return bool
|
518 |
*/
|
519 |
public function is_email_disabled() {
|
524 |
}
|
525 |
|
526 |
/**
|
527 |
+
* Get the enabled email template.
|
528 |
*
|
529 |
* @since 1.1.3
|
530 |
+
*
|
531 |
+
* @return string When filtering return 'none' to switch to text/plain email.
|
532 |
*/
|
533 |
public function get_template() {
|
534 |
|
543 |
* Retrieves a template part. Taken from bbPress.
|
544 |
*
|
545 |
* @since 1.1.3
|
546 |
+
*
|
547 |
* @param string $slug
|
548 |
+
* @param string $name Optional. Default null.
|
549 |
* @param bool $load
|
550 |
+
*
|
551 |
* @return string
|
552 |
*/
|
553 |
public function get_template_part( $slug, $name = null, $load = true ) {
|
554 |
|
555 |
// Setup possible parts
|
556 |
$templates = array();
|
557 |
+
if ( isset( $name ) ) {
|
558 |
$templates[] = $slug . '-' . $name . '.php';
|
559 |
+
}
|
560 |
$templates[] = $slug . '.php';
|
561 |
|
562 |
// Return the part that is found
|
570 |
* inherit from a parent theme can just overload one file. If the template is
|
571 |
* not found in either of those, it looks in the theme-compat folder last.
|
572 |
*
|
573 |
+
* Taken from bbPress.
|
574 |
*
|
575 |
* @since 1.1.3
|
576 |
+
*
|
577 |
* @param string|array $template_names Template file(s) to search for, in order.
|
578 |
* @param bool $load If true the template file will be loaded if it is found.
|
579 |
* @param bool $require_once Whether to require_once or require. Default true.
|
580 |
* Has no effect if $load is false.
|
581 |
+
*
|
582 |
* @return string The template filename if one is located.
|
583 |
*/
|
584 |
public function locate_template( $template_names, $load = false, $require_once = true ) {
|
590 |
foreach ( (array) $template_names as $template_name ) {
|
591 |
|
592 |
// Continue if template is empty
|
593 |
+
if ( empty( $template_name ) ) {
|
594 |
continue;
|
595 |
+
}
|
596 |
|
597 |
// Trim off any slashes from the template name
|
598 |
$template_name = ltrim( $template_name, '/' );
|
599 |
|
600 |
// try locating this template file by looping through the template paths
|
601 |
+
foreach ( $this->get_theme_template_paths() as $template_path ) {
|
602 |
+
if ( file_exists( $template_path . $template_name ) ) {
|
603 |
$located = $template_path . $template_name;
|
604 |
break;
|
605 |
}
|
606 |
}
|
607 |
}
|
608 |
|
609 |
+
if ( ( true === $load ) && ! empty( $located ) ) {
|
610 |
load_template( $located, $require_once );
|
611 |
+
}
|
612 |
|
613 |
return $located;
|
614 |
}
|
617 |
* Returns a list of paths to check for template locations
|
618 |
*
|
619 |
* @since 1.1.3
|
620 |
+
*
|
621 |
+
* @return array
|
622 |
*/
|
623 |
public function get_theme_template_paths() {
|
624 |
|
627 |
$file_paths = array(
|
628 |
1 => trailingslashit( get_stylesheet_directory() ) . $template_dir,
|
629 |
10 => trailingslashit( get_template_directory() ) . $template_dir,
|
630 |
+
100 => WPFORMS_PLUGIN_DIR . 'includes/emails/templates',
|
631 |
);
|
632 |
|
633 |
$file_paths = apply_filters( 'wpforms_email_template_paths', $file_paths );
|
includes/emails/templates/footer-default.php
CHANGED
@@ -34,13 +34,14 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
34 |
<tbody>
|
35 |
<tr>
|
36 |
<td valign="top" class="mcnTextContent" style="padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #aaa;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: center;">
|
37 |
-
|
38 |
<!-- Footer content -->
|
39 |
-
<?php
|
40 |
-
|
|
|
41 |
echo apply_filters( 'wpforms_email_footer_text', $footer );
|
42 |
?>
|
43 |
-
|
44 |
</td>
|
45 |
</tr>
|
46 |
</tbody>
|
@@ -63,4 +64,4 @@ $background_color = wpforms_setting( 'email-background-color', '#e9eaec' );
|
|
63 |
</table>
|
64 |
</center>
|
65 |
</body>
|
66 |
-
</html>
|
34 |
<tbody>
|
35 |
<tr>
|
36 |
<td valign="top" class="mcnTextContent" style="padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #aaa;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: center;">
|
37 |
+
|
38 |
<!-- Footer content -->
|
39 |
+
<?php
|
40 |
+
/* translators: %s - link to a site. */
|
41 |
+
$footer = sprintf( __( 'Sent from %s', 'wpforms' ), '<a href="' . esc_url( home_url() ) . '" style="color:#bbbbbb;">' . wp_specialchars_decode( get_bloginfo( 'name' ) ) . '</a>' );
|
42 |
echo apply_filters( 'wpforms_email_footer_text', $footer );
|
43 |
?>
|
44 |
+
|
45 |
</td>
|
46 |
</tr>
|
47 |
</tbody>
|
64 |
</table>
|
65 |
</center>
|
66 |
</body>
|
67 |
+
</html>
|
includes/fields/class-base.php
CHANGED
@@ -78,6 +78,7 @@ abstract class WPForms_Field {
|
|
78 |
* Primary class constructor.
|
79 |
*
|
80 |
* @since 1.0.0
|
|
|
81 |
* @param bool $init
|
82 |
*/
|
83 |
public function __construct( $init = true ) {
|
@@ -86,31 +87,31 @@ abstract class WPForms_Field {
|
|
86 |
return;
|
87 |
}
|
88 |
|
89 |
-
// The form ID is to be accessed in the builder
|
90 |
$this->form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false;
|
91 |
|
92 |
-
// Bootstrap
|
93 |
$this->init();
|
94 |
|
95 |
-
// Add fields tab
|
96 |
add_filter( 'wpforms_builder_fields_buttons', array( $this, 'field_button' ), 15 );
|
97 |
|
98 |
-
// Field options tab
|
99 |
add_action( "wpforms_builder_fields_options_{$this->type}", array( $this, 'field_options' ), 10 );
|
100 |
|
101 |
-
// Preview fields
|
102 |
add_action( "wpforms_builder_fields_previews_{$this->type}", array( $this, 'field_preview' ), 10 );
|
103 |
|
104 |
-
// AJAX Add new field
|
105 |
add_action( "wp_ajax_wpforms_new_field_{$this->type}", array( $this, 'field_new' ) );
|
106 |
|
107 |
-
// Display field input elements on front-end
|
108 |
add_action( "wpforms_display_field_{$this->type}", array( $this, 'field_display' ), 10, 3 );
|
109 |
|
110 |
-
// Validation on submit
|
111 |
add_action( "wpforms_process_validate_{$this->type}", array( $this, 'validate' ), 10, 3 );
|
112 |
|
113 |
-
// Format
|
114 |
add_action( "wpforms_process_format_{$this->type}", array( $this, 'format' ), 10, 3 );
|
115 |
}
|
116 |
|
@@ -126,19 +127,22 @@ abstract class WPForms_Field {
|
|
126 |
* Create the button for the 'Add Fields' tab, inside the form editor.
|
127 |
*
|
128 |
* @since 1.0.0
|
|
|
129 |
* @param array $fields
|
|
|
130 |
* @return array
|
131 |
*/
|
132 |
public function field_button( $fields ) {
|
133 |
|
134 |
-
// Add field information to fields array
|
135 |
$fields[ $this->group ]['fields'][] = array(
|
136 |
'order' => $this->order,
|
137 |
'name' => $this->name,
|
138 |
'type' => $this->type,
|
139 |
'icon' => $this->icon,
|
140 |
);
|
141 |
-
|
|
|
142 |
return $fields;
|
143 |
}
|
144 |
|
@@ -146,6 +150,7 @@ abstract class WPForms_Field {
|
|
146 |
* Creates the field options panel. Used by subclasses.
|
147 |
*
|
148 |
* @since 1.0.0
|
|
|
149 |
* @param array $field
|
150 |
*/
|
151 |
public function field_options( $field ) {
|
@@ -155,6 +160,7 @@ abstract class WPForms_Field {
|
|
155 |
* Creates the field preview. Used by subclasses.
|
156 |
*
|
157 |
* @since 1.0.0
|
|
|
158 |
* @param array $field
|
159 |
*/
|
160 |
public function field_preview( $field ) {
|
@@ -163,14 +169,16 @@ abstract class WPForms_Field {
|
|
163 |
/**
|
164 |
* Helper function to create field option elements.
|
165 |
*
|
166 |
-
* Field option elements are
|
167 |
-
* are used to quickly build field options.
|
168 |
*
|
169 |
* @since 1.0.0
|
|
|
170 |
* @param string $option
|
171 |
* @param array $field
|
172 |
* @param array $args
|
173 |
* @param boolean $echo
|
|
|
174 |
* @return mixed echo or return string
|
175 |
*/
|
176 |
public function field_element( $option, $field, $args = array(), $echo = true ) {
|
@@ -179,6 +187,7 @@ abstract class WPForms_Field {
|
|
179 |
$class = ! empty( $args['class'] ) ? sanitize_html_class( $args['class'] ) : '';
|
180 |
$slug = ! empty( $args['slug'] ) ? sanitize_title( $args['slug'] ) : '';
|
181 |
$data = '';
|
|
|
182 |
|
183 |
if ( ! empty( $args['data'] ) ) {
|
184 |
foreach ( $args['data'] as $key => $val ) {
|
@@ -191,12 +200,12 @@ abstract class WPForms_Field {
|
|
191 |
|
192 |
switch ( $option ) {
|
193 |
|
194 |
-
// Row
|
195 |
case 'row':
|
196 |
$output = sprintf( '<div class="wpforms-field-option-row wpforms-field-option-row-%s %s" id="wpforms-field-option-row-%d-%s" data-field-id="%d">%s</div>', $slug, $class, $id, $slug, $id, $args['content'] );
|
197 |
break;
|
198 |
|
199 |
-
// Label
|
200 |
case 'label':
|
201 |
$output = sprintf( '<label for="wpforms-field-option-%d-%s">%s', $id, $slug, esc_html( $args['value'] ) );
|
202 |
if ( isset( $args['tooltip'] ) && ! empty( $args['tooltip'] ) ) {
|
@@ -208,7 +217,7 @@ abstract class WPForms_Field {
|
|
208 |
$output .= '</label>';
|
209 |
break;
|
210 |
|
211 |
-
// Text input
|
212 |
case 'text':
|
213 |
$type = ! empty( $args['type'] ) ? esc_attr( $args['type'] ) : 'text';
|
214 |
$placeholder = ! empty( $args['placeholder'] ) ? esc_attr( $args['placeholder'] ) : '';
|
@@ -219,16 +228,15 @@ abstract class WPForms_Field {
|
|
219 |
$output = sprintf( '%s<input type="%s" class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" value="%s" placeholder="%s" %s>', $before, $type, $class, $id, $slug, $id, $slug, esc_attr( $args['value'] ), $placeholder, $data );
|
220 |
break;
|
221 |
|
222 |
-
// Textarea
|
223 |
case 'textarea':
|
224 |
$rows = ! empty( $args['rows'] ) ? (int) $args['rows'] : '3';
|
225 |
$output = sprintf( '<textarea class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" rows="%d" %s>%s</textarea>', $class, $id, $slug, $id, $slug, $rows, $data, $args['value'] );
|
226 |
break;
|
227 |
|
228 |
-
// Checkbox
|
229 |
case 'checkbox':
|
230 |
$checked = checked( '1', $args['value'], false );
|
231 |
-
$desc = ! empty( $args['desc'] ) ? $args['desc'] : '';
|
232 |
$output = sprintf( '<input type="checkbox" class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" value="1" %s %s>', $class, $id, $slug, $id, $slug, $checked, $data );
|
233 |
$output .= sprintf( '<label for="wpforms-field-option-%d-%s" class="inline">%s', $id, $slug, $args['desc'] );
|
234 |
if ( isset( $args['tooltip'] ) && ! empty( $args['tooltip'] ) ) {
|
@@ -237,7 +245,7 @@ abstract class WPForms_Field {
|
|
237 |
$output .= '</label>';
|
238 |
break;
|
239 |
|
240 |
-
// Toggle
|
241 |
case 'toggle':
|
242 |
$checked = checked( '1', $args['value'], false );
|
243 |
$icon = $args['value'] ? 'fa-toggle-on' : 'fa-toggle-off';
|
@@ -247,7 +255,7 @@ abstract class WPForms_Field {
|
|
247 |
$output .= sprintf( '<input type="checkbox" class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" value="1" %s %s></span>', $class, $id, $slug, $id, $slug, $checked, $data );
|
248 |
break;
|
249 |
|
250 |
-
// Select
|
251 |
case 'select':
|
252 |
$options = $args['options'];
|
253 |
$value = isset( $args['value'] ) ? $args['value'] : '';
|
@@ -270,10 +278,12 @@ abstract class WPForms_Field {
|
|
270 |
* Helper function to create common field options that are used frequently.
|
271 |
*
|
272 |
* @since 1.0.0
|
|
|
273 |
* @param string $option
|
274 |
* @param array $field
|
275 |
* @param array $args
|
276 |
* @param boolean $echo
|
|
|
277 |
* @return mixed echo or return string
|
278 |
*/
|
279 |
public function field_option( $option, $field, $args = array(), $echo = true ) {
|
@@ -281,10 +291,10 @@ abstract class WPForms_Field {
|
|
281 |
switch ( $option ) {
|
282 |
|
283 |
// --------------------------------------------------------------//
|
284 |
-
// Basic Fields
|
285 |
// --------------------------------------------------------------//
|
286 |
|
287 |
-
// Basic Options markup ------------------------------------------//
|
288 |
|
289 |
case 'basic-options':
|
290 |
$markup = ! empty( $args['markup'] ) ? $args['markup'] : 'open';
|
@@ -298,7 +308,7 @@ abstract class WPForms_Field {
|
|
298 |
}
|
299 |
break;
|
300 |
|
301 |
-
// Field Label ---------------------------------------------------//
|
302 |
|
303 |
case 'label':
|
304 |
$value = ! empty( $field['label'] ) ? esc_attr( $field['label'] ) : '';
|
@@ -308,7 +318,7 @@ abstract class WPForms_Field {
|
|
308 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label', 'content' => $output ), false );
|
309 |
break;
|
310 |
|
311 |
-
// Field Description ---------------------------------------------//
|
312 |
|
313 |
case 'description':
|
314 |
$value = ! empty( $field['description'] ) ? esc_attr( $field['description'] ) : '';
|
@@ -318,7 +328,7 @@ abstract class WPForms_Field {
|
|
318 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'description', 'content' => $output ), false );
|
319 |
break;
|
320 |
|
321 |
-
// Field Required toggle -----------------------------------------//
|
322 |
|
323 |
case 'required':
|
324 |
$default = ! empty( $args['default'] ) ? $args['default'] : '0';
|
@@ -328,7 +338,7 @@ abstract class WPForms_Field {
|
|
328 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'required', 'content' => $output ), false );
|
329 |
break;
|
330 |
|
331 |
-
// Field Meta (field type and ID) --------------------------------//
|
332 |
|
333 |
case 'meta':
|
334 |
$output = sprintf( '<label>%s</label>', 'Type' );
|
@@ -336,7 +346,7 @@ abstract class WPForms_Field {
|
|
336 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'meta', 'content' => $output ), false );
|
337 |
break;
|
338 |
|
339 |
-
// Code Block ----------------------------------------------------//
|
340 |
|
341 |
case 'code':
|
342 |
$value = ! empty( $field['code'] ) ? esc_attr( $field['code'] ) : '';
|
@@ -346,10 +356,9 @@ abstract class WPForms_Field {
|
|
346 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'code', 'content' => $output ), false );
|
347 |
break;
|
348 |
|
349 |
-
// Choices -------------------------------------------------------//
|
350 |
|
351 |
case 'choices':
|
352 |
-
|
353 |
$tooltip = __( 'Add choices for the form field.', 'wpforms' );
|
354 |
$toggle = '<a href="#" class="toggle-bulk-add-display"><i class="fa fa-download"></i> <span>' . __( 'Bulk Add', 'wpforms' ) . '</span></a>';
|
355 |
$dynamic = ! empty( $field['dynamic_choices'] ) ? esc_html( $field['dynamic_choices'] ) : '';
|
@@ -357,7 +366,7 @@ abstract class WPForms_Field {
|
|
357 |
$class = ! empty( $field['show_values'] ) && $field['show_values'] == '1' ? 'show-values' : '';
|
358 |
$class .= ! empty( $dynamic ) ? ' wpforms-hidden' : '';
|
359 |
|
360 |
-
// Field option label
|
361 |
$option_label = $this->field_element(
|
362 |
'label',
|
363 |
$field,
|
@@ -369,13 +378,14 @@ abstract class WPForms_Field {
|
|
369 |
),
|
370 |
false
|
371 |
);
|
|
|
372 |
|
373 |
// Field option choices inputs
|
374 |
-
$option_choices = sprintf( '<ul data-next-id="%s" class="choices-list %s" data-field-id="%d" data-field-type="%s">', max( array_keys( $values ) ) +1, $class, $field['id'], $this->type );
|
375 |
foreach ( $values as $key => $value ) {
|
376 |
$default = ! empty( $value['default'] ) ? $value['default'] : '';
|
377 |
$option_choices .= sprintf( '<li data-key="%d">', $key );
|
378 |
-
$option_choices .= sprintf( '<input type="
|
379 |
$option_choices .= '<span class="move"><i class="fa fa-bars"></i></span>';
|
380 |
$option_choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][label]" value="%s" class="label">', $field['id'], $key, esc_attr( $value['label'] ) );
|
381 |
$option_choices .= '<a class="add" href="#"><i class="fa fa-plus-circle"></i></a>';
|
@@ -385,28 +395,36 @@ abstract class WPForms_Field {
|
|
385 |
}
|
386 |
$option_choices .= '</ul>';
|
387 |
|
388 |
-
// Field option dynamic status
|
389 |
$source_name = '';
|
390 |
$type_name = '';
|
391 |
-
$status_visibility = ! empty( $dynamic ) && ! empty( $field['dynamic_' . $dynamic ] ) ? '' : 'wpforms-hidden';
|
392 |
|
393 |
-
if ( 'post_type'
|
394 |
|
395 |
$type_name = __( 'post type', 'wpforms' );
|
396 |
-
$source = $field['dynamic_' . $dynamic ];
|
397 |
$pt = get_post_type_object( $source );
|
398 |
$source_name = $pt->labels->name;
|
399 |
|
400 |
-
} elseif ( 'taxonomy'
|
401 |
|
402 |
$type_name = __( 'taxonomy', 'wpforms' );
|
403 |
-
$source = $field['dynamic_' . $dynamic ];
|
404 |
$tax = get_taxonomy( $source );
|
405 |
$source_name = $tax->labels->name;
|
406 |
}
|
407 |
|
408 |
$option_status = sprintf( '<div class="wpforms-alert-warning wpforms-alert %s">', $status_visibility );
|
409 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
$option_status .= '</div>';
|
411 |
|
412 |
// Field option row (markup) including label and input.
|
@@ -420,27 +438,26 @@ abstract class WPForms_Field {
|
|
420 |
);
|
421 |
break;
|
422 |
|
423 |
-
// Choices for payments ------------------------------------------//
|
424 |
|
425 |
case 'choices_payments':
|
426 |
-
|
427 |
$tooltip = __( 'Add choices for the form field.', 'wpforms' );
|
428 |
$values = ! empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
429 |
|
430 |
-
// Field option label
|
431 |
$option_label = $this->field_element(
|
432 |
'label',
|
433 |
$field,
|
434 |
array(
|
435 |
-
'slug'
|
436 |
'value' => __( 'Items', 'wpforms' ),
|
437 |
-
'tooltip' => $tooltip
|
438 |
),
|
439 |
false
|
440 |
);
|
441 |
|
442 |
-
// Field option choices inputs
|
443 |
-
$option_choices = sprintf( '<ul class="choices-list" data-next-id="%s" data-field-id="%d" data-field-type="%s">', max( array_keys( $values ) ) +1, $field['id'], $this->type );
|
444 |
foreach ( $values as $key => $value ) {
|
445 |
$default = ! empty( $value['default'] ) ? $value['default'] : '';
|
446 |
$placeholder = wpforms_format_amount( 0 );
|
@@ -468,10 +485,10 @@ abstract class WPForms_Field {
|
|
468 |
break;
|
469 |
|
470 |
// ---------------------------------------------------------------//
|
471 |
-
// Advanced Fields
|
472 |
// ---------------------------------------------------------------//
|
473 |
|
474 |
-
// Default value -------------------------------------------------//
|
475 |
|
476 |
case 'default_value':
|
477 |
$value = ! empty( $field['default_value'] ) ? esc_attr( $field['default_value'] ) : '';
|
@@ -482,7 +499,7 @@ abstract class WPForms_Field {
|
|
482 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'default_value', 'content' => $output ), false );
|
483 |
break;
|
484 |
|
485 |
-
// Size ----------------------------------------------------------//
|
486 |
|
487 |
case 'size':
|
488 |
$value = ! empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
|
@@ -498,11 +515,11 @@ abstract class WPForms_Field {
|
|
498 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'size', 'content' => $output, 'class' => $class ), false );
|
499 |
break;
|
500 |
|
501 |
-
// Advanced Options markup ---------------------------------------//
|
502 |
|
503 |
case 'advanced-options':
|
504 |
$markup = ! empty( $args['markup'] ) ? $args['markup'] : 'open';
|
505 |
-
if (
|
506 |
$override = apply_filters( 'wpforms_advanced_options_override', false );
|
507 |
$override = ! empty( $override ) ? 'style="display:' . $override . ';"' : '';
|
508 |
$output = sprintf( '<div class="wpforms-field-option-group wpforms-field-option-group-advanced wpforms-hide" id="wpforms-field-option-advanced-%d" %s>', $field['id'], $override );
|
@@ -513,7 +530,7 @@ abstract class WPForms_Field {
|
|
513 |
}
|
514 |
break;
|
515 |
|
516 |
-
// Placeholder ---------------------------------------------------//
|
517 |
|
518 |
case 'placeholder':
|
519 |
$value = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
@@ -523,7 +540,7 @@ abstract class WPForms_Field {
|
|
523 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'placeholder', 'content' => $output ), false );
|
524 |
break;
|
525 |
|
526 |
-
// CSS classes ---------------------------------------------------//
|
527 |
|
528 |
case 'css':
|
529 |
$toggle = '';
|
@@ -538,7 +555,7 @@ abstract class WPForms_Field {
|
|
538 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'css', 'content' => $output ), false );
|
539 |
break;
|
540 |
|
541 |
-
// Hide Label ----------------------------------------------------//
|
542 |
|
543 |
case 'label_hide':
|
544 |
$value = isset( $field['label_hide'] ) ? $field['label_hide'] : '0';
|
@@ -548,7 +565,7 @@ abstract class WPForms_Field {
|
|
548 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label_hide', 'content' => $output ), false );
|
549 |
break;
|
550 |
|
551 |
-
// Hide Sub-Labels -----------------------------------------------//
|
552 |
|
553 |
case 'sublabel_hide':
|
554 |
$value = isset( $field['sublabel_hide'] ) ? $field['sublabel_hide'] : '0';
|
@@ -558,7 +575,7 @@ abstract class WPForms_Field {
|
|
558 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'sublabel_hide', 'content' => $output ), false );
|
559 |
break;
|
560 |
|
561 |
-
// Input Columns -------------------------------------------------//
|
562 |
|
563 |
case 'input_columns':
|
564 |
$value = ! empty( $field['input_columns'] ) ? esc_attr( $field['input_columns'] ) : '';
|
@@ -573,7 +590,7 @@ abstract class WPForms_Field {
|
|
573 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'input_columns', 'content' => $output ), false );
|
574 |
break;
|
575 |
|
576 |
-
// Dynamic Choices -----------------------------------------------//
|
577 |
|
578 |
case 'dynamic_choices':
|
579 |
$value = ! empty( $field['dynamic_choices'] ) ? esc_attr( $field['dynamic_choices'] ) : '';
|
@@ -588,38 +605,50 @@ abstract class WPForms_Field {
|
|
588 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'dynamic_choices', 'content' => $output ), false );
|
589 |
break;
|
590 |
|
591 |
-
// Dynamic Choices Source ----------------------------------------//
|
592 |
|
593 |
case 'dynamic_choices_source':
|
594 |
-
|
595 |
$output = '';
|
596 |
$type = ! empty( $field['dynamic_choices'] ) ? esc_attr( $field['dynamic_choices'] ) : '';
|
597 |
|
598 |
if ( ! empty( $type ) ) {
|
599 |
|
600 |
-
|
|
|
|
|
|
|
601 |
|
602 |
$type_name = __( 'Post Type', 'wpforms' );
|
603 |
-
$items = get_post_types(
|
|
|
|
|
|
|
|
|
|
|
604 |
unset( $items['attachment'] );
|
605 |
|
606 |
-
} elseif ( 'taxonomy'
|
607 |
|
608 |
$type_name = __( 'Taxonomy', 'wpforms' );
|
609 |
-
$items = get_taxonomies(
|
|
|
|
|
|
|
|
|
|
|
610 |
unset( $items['post_format'] );
|
611 |
}
|
612 |
|
613 |
$tooltip = sprintf( __( 'Select %s to use for auto-populating field choices.', 'wpforms' ), $type_name );
|
614 |
$label = sprintf( __( 'Dynamic %s Source', 'wpforms' ), $type_name );
|
615 |
$options = array();
|
616 |
-
$source = ! empty( $field['dynamic_' . $type ] ) ? esc_attr( $field['dynamic_' . $type] ) : '';
|
617 |
|
618 |
foreach ( $items as $key => $item ) {
|
619 |
$options[ $key ] = $item->labels->name;
|
620 |
}
|
621 |
|
622 |
-
// Field option label
|
623 |
$option_label = $this->field_element(
|
624 |
'label',
|
625 |
$field,
|
@@ -631,7 +660,7 @@ abstract class WPForms_Field {
|
|
631 |
false
|
632 |
);
|
633 |
|
634 |
-
// Field option select input
|
635 |
$option_input = $this->field_element(
|
636 |
'select',
|
637 |
$field,
|
@@ -683,10 +712,12 @@ abstract class WPForms_Field {
|
|
683 |
* in the field preview.
|
684 |
*
|
685 |
* @since 1.0.0
|
|
|
686 |
* @param string $option
|
687 |
* @param array $field
|
688 |
* @param array $args
|
689 |
* @param boolean $echo
|
|
|
690 |
* @return mixed echo or return string
|
691 |
*/
|
692 |
public function field_preview_option( $option, $field, $args = array(), $echo = true ) {
|
@@ -698,7 +729,7 @@ abstract class WPForms_Field {
|
|
698 |
$output = sprintf( '<label class="label-title"><span class="text">%s</span><span class="required">*</span></label>', $label );
|
699 |
break;
|
700 |
|
701 |
-
case 'description'
|
702 |
$description = isset( $field['description'] ) && ! empty( $field['description'] ) ? $field['description'] : '';
|
703 |
$output = sprintf( '<div class="description">%s</div>', $description );
|
704 |
break;
|
@@ -718,26 +749,26 @@ abstract class WPForms_Field {
|
|
718 |
*/
|
719 |
public function field_new() {
|
720 |
|
721 |
-
// Run a security check
|
722 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
723 |
|
724 |
-
// Check for permissions
|
725 |
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
726 |
die( esc_html__( 'You do no have permission.', 'wpforms' ) );
|
727 |
}
|
728 |
|
729 |
-
// Check for form ID
|
730 |
if ( ! isset( $_POST['id'] ) || empty( $_POST['id'] ) ) {
|
731 |
die( esc_html__( 'No form ID found', 'wpforms' ) );
|
732 |
}
|
733 |
|
734 |
-
// Check for field type to add
|
735 |
if ( ! isset( $_POST['type'] ) || empty( $_POST['type'] ) ) {
|
736 |
die( esc_html__( 'No field type found', 'wpforms' ) );
|
737 |
}
|
738 |
|
739 |
-
// Grab field data
|
740 |
-
$field_args = ! empty
|
741 |
$field_type = esc_attr( $_POST['type'] );
|
742 |
$field_id = wpforms()->form->next_field_id( $_POST['id'] );
|
743 |
$field = array(
|
@@ -751,13 +782,13 @@ abstract class WPForms_Field {
|
|
751 |
$field_required = apply_filters( 'wpforms_field_new_required', '', $field );
|
752 |
$field_class = apply_filters( 'wpforms_field_new_class', '', $field );
|
753 |
|
754 |
-
// Field types that default to required
|
755 |
if ( ! empty( $field_required ) ) {
|
756 |
$field_required = 'required';
|
757 |
$field['required'] = '1';
|
758 |
}
|
759 |
|
760 |
-
// Build Preview
|
761 |
ob_start();
|
762 |
$this->field_preview( $field );
|
763 |
$prev = ob_get_clean();
|
@@ -768,7 +799,7 @@ abstract class WPForms_Field {
|
|
768 |
$preview .= $prev;
|
769 |
$preview .= '</div>';
|
770 |
|
771 |
-
// Build Options
|
772 |
$options = sprintf( '<div class="wpforms-field-option wpforms-field-option-%s" id="wpforms-field-option-%d" data-field-id="%d">', esc_attr( $field['type'] ), $field['id'], $field['id'] );
|
773 |
$options .= sprintf( '<input type="hidden" name="fields[%d][id]" value="%d" class="wpforms-field-option-hidden-id">', $field['id'], $field['id'] );
|
774 |
$options .= sprintf( '<input type="hidden" name="fields[%d][type]" value="%s" class="wpforms-field-option-hidden-type">', $field['id'], esc_attr( $field['type'] ) );
|
@@ -777,20 +808,22 @@ abstract class WPForms_Field {
|
|
777 |
$options .= ob_get_clean();
|
778 |
$options .= '</div>';
|
779 |
|
780 |
-
// Prepare to return compiled results
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
|
|
|
|
786 |
);
|
787 |
-
wp_send_json_success( $return );
|
788 |
}
|
789 |
|
790 |
/**
|
791 |
* Display the field input elements on the frontend.
|
792 |
*
|
793 |
* @since 1.0.0
|
|
|
794 |
* @param array $field
|
795 |
* @param array $field_atts
|
796 |
* @param array $form_data
|
@@ -802,7 +835,8 @@ abstract class WPForms_Field {
|
|
802 |
* Display field input errors if present.
|
803 |
*
|
804 |
* @since 1.3.7
|
805 |
-
*
|
|
|
806 |
* @param array $field
|
807 |
*/
|
808 |
public function field_display_error( $key, $field ) {
|
@@ -823,7 +857,9 @@ abstract class WPForms_Field {
|
|
823 |
* Display field input sublabel if present.
|
824 |
*
|
825 |
* @since 1.3.7
|
826 |
-
*
|
|
|
|
|
827 |
* @param array $field
|
828 |
*/
|
829 |
public function field_display_sublabel( $key, $position, $field ) {
|
@@ -853,15 +889,16 @@ abstract class WPForms_Field {
|
|
853 |
* Validates field on form submit.
|
854 |
*
|
855 |
* @since 1.0.0
|
|
|
856 |
* @param int $field_id
|
857 |
* @param array $field_submit
|
858 |
* @param array $form_data
|
859 |
*/
|
860 |
public function validate( $field_id, $field_submit, $form_data ) {
|
861 |
|
862 |
-
// Basic required check - If field is marked as required, check for entry data
|
863 |
if ( ! empty( $form_data['fields'][ $field_id ]['required'] ) && empty( $field_submit ) && '0' != $field_submit ) {
|
864 |
-
wpforms()->process->errors[ $form_data['id'] ][ $field_id ] = apply_filters( 'wpforms_required_label', __( 'This field is required', 'wpforms' ) );
|
865 |
}
|
866 |
}
|
867 |
|
@@ -869,6 +906,7 @@ abstract class WPForms_Field {
|
|
869 |
* Formats and sanitizes field.
|
870 |
*
|
871 |
* @since 1.0.0
|
|
|
872 |
* @param int $field_id
|
873 |
* @param array $field_submit
|
874 |
* @param array $form_data
|
@@ -882,8 +920,8 @@ abstract class WPForms_Field {
|
|
882 |
|
883 |
$name = ! empty( $form_data['fields'][ $field_id ]['label'] ) ? sanitize_text_field( $form_data['fields'][ $field_id ]['label'] ) : '';
|
884 |
|
885 |
-
//
|
886 |
-
$value =
|
887 |
|
888 |
wpforms()->process->fields[ $field_id ] = array(
|
889 |
'name' => $name,
|
78 |
* Primary class constructor.
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
+
*
|
82 |
* @param bool $init
|
83 |
*/
|
84 |
public function __construct( $init = true ) {
|
87 |
return;
|
88 |
}
|
89 |
|
90 |
+
// The form ID is to be accessed in the builder.
|
91 |
$this->form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false;
|
92 |
|
93 |
+
// Bootstrap.
|
94 |
$this->init();
|
95 |
|
96 |
+
// Add fields tab.
|
97 |
add_filter( 'wpforms_builder_fields_buttons', array( $this, 'field_button' ), 15 );
|
98 |
|
99 |
+
// Field options tab.
|
100 |
add_action( "wpforms_builder_fields_options_{$this->type}", array( $this, 'field_options' ), 10 );
|
101 |
|
102 |
+
// Preview fields.
|
103 |
add_action( "wpforms_builder_fields_previews_{$this->type}", array( $this, 'field_preview' ), 10 );
|
104 |
|
105 |
+
// AJAX Add new field.
|
106 |
add_action( "wp_ajax_wpforms_new_field_{$this->type}", array( $this, 'field_new' ) );
|
107 |
|
108 |
+
// Display field input elements on front-end.
|
109 |
add_action( "wpforms_display_field_{$this->type}", array( $this, 'field_display' ), 10, 3 );
|
110 |
|
111 |
+
// Validation on submit.
|
112 |
add_action( "wpforms_process_validate_{$this->type}", array( $this, 'validate' ), 10, 3 );
|
113 |
|
114 |
+
// Format.
|
115 |
add_action( "wpforms_process_format_{$this->type}", array( $this, 'format' ), 10, 3 );
|
116 |
}
|
117 |
|
127 |
* Create the button for the 'Add Fields' tab, inside the form editor.
|
128 |
*
|
129 |
* @since 1.0.0
|
130 |
+
*
|
131 |
* @param array $fields
|
132 |
+
*
|
133 |
* @return array
|
134 |
*/
|
135 |
public function field_button( $fields ) {
|
136 |
|
137 |
+
// Add field information to fields array.
|
138 |
$fields[ $this->group ]['fields'][] = array(
|
139 |
'order' => $this->order,
|
140 |
'name' => $this->name,
|
141 |
'type' => $this->type,
|
142 |
'icon' => $this->icon,
|
143 |
);
|
144 |
+
|
145 |
+
// Wipe hands clean.
|
146 |
return $fields;
|
147 |
}
|
148 |
|
150 |
* Creates the field options panel. Used by subclasses.
|
151 |
*
|
152 |
* @since 1.0.0
|
153 |
+
*
|
154 |
* @param array $field
|
155 |
*/
|
156 |
public function field_options( $field ) {
|
160 |
* Creates the field preview. Used by subclasses.
|
161 |
*
|
162 |
* @since 1.0.0
|
163 |
+
*
|
164 |
* @param array $field
|
165 |
*/
|
166 |
public function field_preview( $field ) {
|
169 |
/**
|
170 |
* Helper function to create field option elements.
|
171 |
*
|
172 |
+
* Field option elements are pieces that help create a field option.
|
173 |
+
* They are used to quickly build field options.
|
174 |
*
|
175 |
* @since 1.0.0
|
176 |
+
*
|
177 |
* @param string $option
|
178 |
* @param array $field
|
179 |
* @param array $args
|
180 |
* @param boolean $echo
|
181 |
+
*
|
182 |
* @return mixed echo or return string
|
183 |
*/
|
184 |
public function field_element( $option, $field, $args = array(), $echo = true ) {
|
187 |
$class = ! empty( $args['class'] ) ? sanitize_html_class( $args['class'] ) : '';
|
188 |
$slug = ! empty( $args['slug'] ) ? sanitize_title( $args['slug'] ) : '';
|
189 |
$data = '';
|
190 |
+
$output = '';
|
191 |
|
192 |
if ( ! empty( $args['data'] ) ) {
|
193 |
foreach ( $args['data'] as $key => $val ) {
|
200 |
|
201 |
switch ( $option ) {
|
202 |
|
203 |
+
// Row.
|
204 |
case 'row':
|
205 |
$output = sprintf( '<div class="wpforms-field-option-row wpforms-field-option-row-%s %s" id="wpforms-field-option-row-%d-%s" data-field-id="%d">%s</div>', $slug, $class, $id, $slug, $id, $args['content'] );
|
206 |
break;
|
207 |
|
208 |
+
// Label.
|
209 |
case 'label':
|
210 |
$output = sprintf( '<label for="wpforms-field-option-%d-%s">%s', $id, $slug, esc_html( $args['value'] ) );
|
211 |
if ( isset( $args['tooltip'] ) && ! empty( $args['tooltip'] ) ) {
|
217 |
$output .= '</label>';
|
218 |
break;
|
219 |
|
220 |
+
// Text input.
|
221 |
case 'text':
|
222 |
$type = ! empty( $args['type'] ) ? esc_attr( $args['type'] ) : 'text';
|
223 |
$placeholder = ! empty( $args['placeholder'] ) ? esc_attr( $args['placeholder'] ) : '';
|
228 |
$output = sprintf( '%s<input type="%s" class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" value="%s" placeholder="%s" %s>', $before, $type, $class, $id, $slug, $id, $slug, esc_attr( $args['value'] ), $placeholder, $data );
|
229 |
break;
|
230 |
|
231 |
+
// Textarea.
|
232 |
case 'textarea':
|
233 |
$rows = ! empty( $args['rows'] ) ? (int) $args['rows'] : '3';
|
234 |
$output = sprintf( '<textarea class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" rows="%d" %s>%s</textarea>', $class, $id, $slug, $id, $slug, $rows, $data, $args['value'] );
|
235 |
break;
|
236 |
|
237 |
+
// Checkbox.
|
238 |
case 'checkbox':
|
239 |
$checked = checked( '1', $args['value'], false );
|
|
|
240 |
$output = sprintf( '<input type="checkbox" class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" value="1" %s %s>', $class, $id, $slug, $id, $slug, $checked, $data );
|
241 |
$output .= sprintf( '<label for="wpforms-field-option-%d-%s" class="inline">%s', $id, $slug, $args['desc'] );
|
242 |
if ( isset( $args['tooltip'] ) && ! empty( $args['tooltip'] ) ) {
|
245 |
$output .= '</label>';
|
246 |
break;
|
247 |
|
248 |
+
// Toggle.
|
249 |
case 'toggle':
|
250 |
$checked = checked( '1', $args['value'], false );
|
251 |
$icon = $args['value'] ? 'fa-toggle-on' : 'fa-toggle-off';
|
255 |
$output .= sprintf( '<input type="checkbox" class="%s" id="wpforms-field-option-%d-%s" name="fields[%d][%s]" value="1" %s %s></span>', $class, $id, $slug, $id, $slug, $checked, $data );
|
256 |
break;
|
257 |
|
258 |
+
// Select.
|
259 |
case 'select':
|
260 |
$options = $args['options'];
|
261 |
$value = isset( $args['value'] ) ? $args['value'] : '';
|
278 |
* Helper function to create common field options that are used frequently.
|
279 |
*
|
280 |
* @since 1.0.0
|
281 |
+
*
|
282 |
* @param string $option
|
283 |
* @param array $field
|
284 |
* @param array $args
|
285 |
* @param boolean $echo
|
286 |
+
*
|
287 |
* @return mixed echo or return string
|
288 |
*/
|
289 |
public function field_option( $option, $field, $args = array(), $echo = true ) {
|
291 |
switch ( $option ) {
|
292 |
|
293 |
// --------------------------------------------------------------//
|
294 |
+
// Basic Fields.
|
295 |
// --------------------------------------------------------------//
|
296 |
|
297 |
+
// Basic Options markup. ------------------------------------------//
|
298 |
|
299 |
case 'basic-options':
|
300 |
$markup = ! empty( $args['markup'] ) ? $args['markup'] : 'open';
|
308 |
}
|
309 |
break;
|
310 |
|
311 |
+
// Field Label. ---------------------------------------------------//
|
312 |
|
313 |
case 'label':
|
314 |
$value = ! empty( $field['label'] ) ? esc_attr( $field['label'] ) : '';
|
318 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label', 'content' => $output ), false );
|
319 |
break;
|
320 |
|
321 |
+
// Field Description. ---------------------------------------------//
|
322 |
|
323 |
case 'description':
|
324 |
$value = ! empty( $field['description'] ) ? esc_attr( $field['description'] ) : '';
|
328 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'description', 'content' => $output ), false );
|
329 |
break;
|
330 |
|
331 |
+
// Field Required toggle. -----------------------------------------//
|
332 |
|
333 |
case 'required':
|
334 |
$default = ! empty( $args['default'] ) ? $args['default'] : '0';
|
338 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'required', 'content' => $output ), false );
|
339 |
break;
|
340 |
|
341 |
+
// Field Meta (field type and ID). --------------------------------//
|
342 |
|
343 |
case 'meta':
|
344 |
$output = sprintf( '<label>%s</label>', 'Type' );
|
346 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'meta', 'content' => $output ), false );
|
347 |
break;
|
348 |
|
349 |
+
// Code Block. ----------------------------------------------------//
|
350 |
|
351 |
case 'code':
|
352 |
$value = ! empty( $field['code'] ) ? esc_attr( $field['code'] ) : '';
|
356 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'code', 'content' => $output ), false );
|
357 |
break;
|
358 |
|
359 |
+
// Choices. -------------------------------------------------------//
|
360 |
|
361 |
case 'choices':
|
|
|
362 |
$tooltip = __( 'Add choices for the form field.', 'wpforms' );
|
363 |
$toggle = '<a href="#" class="toggle-bulk-add-display"><i class="fa fa-download"></i> <span>' . __( 'Bulk Add', 'wpforms' ) . '</span></a>';
|
364 |
$dynamic = ! empty( $field['dynamic_choices'] ) ? esc_html( $field['dynamic_choices'] ) : '';
|
366 |
$class = ! empty( $field['show_values'] ) && $field['show_values'] == '1' ? 'show-values' : '';
|
367 |
$class .= ! empty( $dynamic ) ? ' wpforms-hidden' : '';
|
368 |
|
369 |
+
// Field option label and type.
|
370 |
$option_label = $this->field_element(
|
371 |
'label',
|
372 |
$field,
|
378 |
),
|
379 |
false
|
380 |
);
|
381 |
+
$option_type = 'checkbox' === $this->type ? 'checkbox' : 'radio';
|
382 |
|
383 |
// Field option choices inputs
|
384 |
+
$option_choices = sprintf( '<ul data-next-id="%s" class="choices-list %s" data-field-id="%d" data-field-type="%s">', max( array_keys( $values ) ) + 1, $class, $field['id'], $this->type );
|
385 |
foreach ( $values as $key => $value ) {
|
386 |
$default = ! empty( $value['default'] ) ? $value['default'] : '';
|
387 |
$option_choices .= sprintf( '<li data-key="%d">', $key );
|
388 |
+
$option_choices .= sprintf( '<input type="%s" name="fields[%s][choices][%s][default]" class="default" value="1" %s>', $option_type, $field['id'], $key, checked( '1', $default, false ) );
|
389 |
$option_choices .= '<span class="move"><i class="fa fa-bars"></i></span>';
|
390 |
$option_choices .= sprintf( '<input type="text" name="fields[%s][choices][%s][label]" value="%s" class="label">', $field['id'], $key, esc_attr( $value['label'] ) );
|
391 |
$option_choices .= '<a class="add" href="#"><i class="fa fa-plus-circle"></i></a>';
|
395 |
}
|
396 |
$option_choices .= '</ul>';
|
397 |
|
398 |
+
// Field option dynamic status.
|
399 |
$source_name = '';
|
400 |
$type_name = '';
|
401 |
+
$status_visibility = ! empty( $dynamic ) && ! empty( $field[ 'dynamic_' . $dynamic ] ) ? '' : 'wpforms-hidden';
|
402 |
|
403 |
+
if ( 'post_type' === $dynamic && ! empty( $field[ 'dynamic_' . $dynamic ] ) ) {
|
404 |
|
405 |
$type_name = __( 'post type', 'wpforms' );
|
406 |
+
$source = $field[ 'dynamic_' . $dynamic ];
|
407 |
$pt = get_post_type_object( $source );
|
408 |
$source_name = $pt->labels->name;
|
409 |
|
410 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field[ 'dynamic_' . $dynamic ] ) ) {
|
411 |
|
412 |
$type_name = __( 'taxonomy', 'wpforms' );
|
413 |
+
$source = $field[ 'dynamic_' . $dynamic ];
|
414 |
$tax = get_taxonomy( $source );
|
415 |
$source_name = $tax->labels->name;
|
416 |
}
|
417 |
|
418 |
$option_status = sprintf( '<div class="wpforms-alert-warning wpforms-alert %s">', $status_visibility );
|
419 |
+
/* translators: %1$s - source name; %2$s - type name. */
|
420 |
+
$option_status .= sprintf(
|
421 |
+
__(
|
422 |
+
'Choices are dynamically populated from the %1$s %2$s',
|
423 |
+
'wpforms'
|
424 |
+
),
|
425 |
+
'<span class="dynamic-name">' . $source_name . '</span>',
|
426 |
+
'<span class="dynamic-type">' . $type_name . '</span>'
|
427 |
+
);
|
428 |
$option_status .= '</div>';
|
429 |
|
430 |
// Field option row (markup) including label and input.
|
438 |
);
|
439 |
break;
|
440 |
|
441 |
+
// Choices for payments. ------------------------------------------//
|
442 |
|
443 |
case 'choices_payments':
|
|
|
444 |
$tooltip = __( 'Add choices for the form field.', 'wpforms' );
|
445 |
$values = ! empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
446 |
|
447 |
+
// Field option label.
|
448 |
$option_label = $this->field_element(
|
449 |
'label',
|
450 |
$field,
|
451 |
array(
|
452 |
+
'slug' => 'choices',
|
453 |
'value' => __( 'Items', 'wpforms' ),
|
454 |
+
'tooltip' => $tooltip,
|
455 |
),
|
456 |
false
|
457 |
);
|
458 |
|
459 |
+
// Field option choices inputs.
|
460 |
+
$option_choices = sprintf( '<ul class="choices-list" data-next-id="%s" data-field-id="%d" data-field-type="%s">', max( array_keys( $values ) ) + 1, $field['id'], $this->type );
|
461 |
foreach ( $values as $key => $value ) {
|
462 |
$default = ! empty( $value['default'] ) ? $value['default'] : '';
|
463 |
$placeholder = wpforms_format_amount( 0 );
|
485 |
break;
|
486 |
|
487 |
// ---------------------------------------------------------------//
|
488 |
+
// Advanced Fields.
|
489 |
// ---------------------------------------------------------------//
|
490 |
|
491 |
+
// Default value. -------------------------------------------------//
|
492 |
|
493 |
case 'default_value':
|
494 |
$value = ! empty( $field['default_value'] ) ? esc_attr( $field['default_value'] ) : '';
|
499 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'default_value', 'content' => $output ), false );
|
500 |
break;
|
501 |
|
502 |
+
// Size. ----------------------------------------------------------//
|
503 |
|
504 |
case 'size':
|
505 |
$value = ! empty( $field['size'] ) ? esc_attr( $field['size'] ) : 'medium';
|
515 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'size', 'content' => $output, 'class' => $class ), false );
|
516 |
break;
|
517 |
|
518 |
+
// Advanced Options markup. ---------------------------------------//
|
519 |
|
520 |
case 'advanced-options':
|
521 |
$markup = ! empty( $args['markup'] ) ? $args['markup'] : 'open';
|
522 |
+
if ( 'open' === $markup ) {
|
523 |
$override = apply_filters( 'wpforms_advanced_options_override', false );
|
524 |
$override = ! empty( $override ) ? 'style="display:' . $override . ';"' : '';
|
525 |
$output = sprintf( '<div class="wpforms-field-option-group wpforms-field-option-group-advanced wpforms-hide" id="wpforms-field-option-advanced-%d" %s>', $field['id'], $override );
|
530 |
}
|
531 |
break;
|
532 |
|
533 |
+
// Placeholder. ---------------------------------------------------//
|
534 |
|
535 |
case 'placeholder':
|
536 |
$value = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
540 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'placeholder', 'content' => $output ), false );
|
541 |
break;
|
542 |
|
543 |
+
// CSS classes. ---------------------------------------------------//
|
544 |
|
545 |
case 'css':
|
546 |
$toggle = '';
|
555 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'css', 'content' => $output ), false );
|
556 |
break;
|
557 |
|
558 |
+
// Hide Label. ----------------------------------------------------//
|
559 |
|
560 |
case 'label_hide':
|
561 |
$value = isset( $field['label_hide'] ) ? $field['label_hide'] : '0';
|
565 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'label_hide', 'content' => $output ), false );
|
566 |
break;
|
567 |
|
568 |
+
// Hide Sub-Labels. -----------------------------------------------//
|
569 |
|
570 |
case 'sublabel_hide':
|
571 |
$value = isset( $field['sublabel_hide'] ) ? $field['sublabel_hide'] : '0';
|
575 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'sublabel_hide', 'content' => $output ), false );
|
576 |
break;
|
577 |
|
578 |
+
// Input Columns. -------------------------------------------------//
|
579 |
|
580 |
case 'input_columns':
|
581 |
$value = ! empty( $field['input_columns'] ) ? esc_attr( $field['input_columns'] ) : '';
|
590 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'input_columns', 'content' => $output ), false );
|
591 |
break;
|
592 |
|
593 |
+
// Dynamic Choices. -----------------------------------------------//
|
594 |
|
595 |
case 'dynamic_choices':
|
596 |
$value = ! empty( $field['dynamic_choices'] ) ? esc_attr( $field['dynamic_choices'] ) : '';
|
605 |
$output = $this->field_element( 'row', $field, array( 'slug' => 'dynamic_choices', 'content' => $output ), false );
|
606 |
break;
|
607 |
|
608 |
+
// Dynamic Choices Source. ----------------------------------------//
|
609 |
|
610 |
case 'dynamic_choices_source':
|
|
|
611 |
$output = '';
|
612 |
$type = ! empty( $field['dynamic_choices'] ) ? esc_attr( $field['dynamic_choices'] ) : '';
|
613 |
|
614 |
if ( ! empty( $type ) ) {
|
615 |
|
616 |
+
$type_name = '';
|
617 |
+
$items = array();
|
618 |
+
|
619 |
+
if ( 'post_type' === $type ) {
|
620 |
|
621 |
$type_name = __( 'Post Type', 'wpforms' );
|
622 |
+
$items = get_post_types(
|
623 |
+
array(
|
624 |
+
'public' => true,
|
625 |
+
),
|
626 |
+
'objects'
|
627 |
+
);
|
628 |
unset( $items['attachment'] );
|
629 |
|
630 |
+
} elseif ( 'taxonomy' === $type ) {
|
631 |
|
632 |
$type_name = __( 'Taxonomy', 'wpforms' );
|
633 |
+
$items = get_taxonomies(
|
634 |
+
array(
|
635 |
+
'public' => true,
|
636 |
+
),
|
637 |
+
'objects'
|
638 |
+
);
|
639 |
unset( $items['post_format'] );
|
640 |
}
|
641 |
|
642 |
$tooltip = sprintf( __( 'Select %s to use for auto-populating field choices.', 'wpforms' ), $type_name );
|
643 |
$label = sprintf( __( 'Dynamic %s Source', 'wpforms' ), $type_name );
|
644 |
$options = array();
|
645 |
+
$source = ! empty( $field[ 'dynamic_' . $type ] ) ? esc_attr( $field[ 'dynamic_' . $type ] ) : '';
|
646 |
|
647 |
foreach ( $items as $key => $item ) {
|
648 |
$options[ $key ] = $item->labels->name;
|
649 |
}
|
650 |
|
651 |
+
// Field option label.
|
652 |
$option_label = $this->field_element(
|
653 |
'label',
|
654 |
$field,
|
660 |
false
|
661 |
);
|
662 |
|
663 |
+
// Field option select input.
|
664 |
$option_input = $this->field_element(
|
665 |
'select',
|
666 |
$field,
|
712 |
* in the field preview.
|
713 |
*
|
714 |
* @since 1.0.0
|
715 |
+
*
|
716 |
* @param string $option
|
717 |
* @param array $field
|
718 |
* @param array $args
|
719 |
* @param boolean $echo
|
720 |
+
*
|
721 |
* @return mixed echo or return string
|
722 |
*/
|
723 |
public function field_preview_option( $option, $field, $args = array(), $echo = true ) {
|
729 |
$output = sprintf( '<label class="label-title"><span class="text">%s</span><span class="required">*</span></label>', $label );
|
730 |
break;
|
731 |
|
732 |
+
case 'description':
|
733 |
$description = isset( $field['description'] ) && ! empty( $field['description'] ) ? $field['description'] : '';
|
734 |
$output = sprintf( '<div class="description">%s</div>', $description );
|
735 |
break;
|
749 |
*/
|
750 |
public function field_new() {
|
751 |
|
752 |
+
// Run a security check.
|
753 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
754 |
|
755 |
+
// Check for permissions.
|
756 |
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
757 |
die( esc_html__( 'You do no have permission.', 'wpforms' ) );
|
758 |
}
|
759 |
|
760 |
+
// Check for form ID.
|
761 |
if ( ! isset( $_POST['id'] ) || empty( $_POST['id'] ) ) {
|
762 |
die( esc_html__( 'No form ID found', 'wpforms' ) );
|
763 |
}
|
764 |
|
765 |
+
// Check for field type to add.
|
766 |
if ( ! isset( $_POST['type'] ) || empty( $_POST['type'] ) ) {
|
767 |
die( esc_html__( 'No field type found', 'wpforms' ) );
|
768 |
}
|
769 |
|
770 |
+
// Grab field data.
|
771 |
+
$field_args = ! empty( $_POST['defaults'] ) ? (array) $_POST['defaults'] : array();
|
772 |
$field_type = esc_attr( $_POST['type'] );
|
773 |
$field_id = wpforms()->form->next_field_id( $_POST['id'] );
|
774 |
$field = array(
|
782 |
$field_required = apply_filters( 'wpforms_field_new_required', '', $field );
|
783 |
$field_class = apply_filters( 'wpforms_field_new_class', '', $field );
|
784 |
|
785 |
+
// Field types that default to required.
|
786 |
if ( ! empty( $field_required ) ) {
|
787 |
$field_required = 'required';
|
788 |
$field['required'] = '1';
|
789 |
}
|
790 |
|
791 |
+
// Build Preview.
|
792 |
ob_start();
|
793 |
$this->field_preview( $field );
|
794 |
$prev = ob_get_clean();
|
799 |
$preview .= $prev;
|
800 |
$preview .= '</div>';
|
801 |
|
802 |
+
// Build Options.
|
803 |
$options = sprintf( '<div class="wpforms-field-option wpforms-field-option-%s" id="wpforms-field-option-%d" data-field-id="%d">', esc_attr( $field['type'] ), $field['id'], $field['id'] );
|
804 |
$options .= sprintf( '<input type="hidden" name="fields[%d][id]" value="%d" class="wpforms-field-option-hidden-id">', $field['id'], $field['id'] );
|
805 |
$options .= sprintf( '<input type="hidden" name="fields[%d][type]" value="%s" class="wpforms-field-option-hidden-type">', $field['id'], esc_attr( $field['type'] ) );
|
808 |
$options .= ob_get_clean();
|
809 |
$options .= '</div>';
|
810 |
|
811 |
+
// Prepare to return compiled results.
|
812 |
+
wp_send_json_success(
|
813 |
+
array(
|
814 |
+
'form_id' => $_POST['id'],
|
815 |
+
'field' => $field,
|
816 |
+
'preview' => $preview,
|
817 |
+
'options' => $options,
|
818 |
+
)
|
819 |
);
|
|
|
820 |
}
|
821 |
|
822 |
/**
|
823 |
* Display the field input elements on the frontend.
|
824 |
*
|
825 |
* @since 1.0.0
|
826 |
+
*
|
827 |
* @param array $field
|
828 |
* @param array $field_atts
|
829 |
* @param array $form_data
|
835 |
* Display field input errors if present.
|
836 |
*
|
837 |
* @since 1.3.7
|
838 |
+
*
|
839 |
+
* @param string $key
|
840 |
* @param array $field
|
841 |
*/
|
842 |
public function field_display_error( $key, $field ) {
|
857 |
* Display field input sublabel if present.
|
858 |
*
|
859 |
* @since 1.3.7
|
860 |
+
*
|
861 |
+
* @param string $key
|
862 |
+
* @param string $position
|
863 |
* @param array $field
|
864 |
*/
|
865 |
public function field_display_sublabel( $key, $position, $field ) {
|
889 |
* Validates field on form submit.
|
890 |
*
|
891 |
* @since 1.0.0
|
892 |
+
*
|
893 |
* @param int $field_id
|
894 |
* @param array $field_submit
|
895 |
* @param array $form_data
|
896 |
*/
|
897 |
public function validate( $field_id, $field_submit, $form_data ) {
|
898 |
|
899 |
+
// Basic required check - If field is marked as required, check for entry data.
|
900 |
if ( ! empty( $form_data['fields'][ $field_id ]['required'] ) && empty( $field_submit ) && '0' != $field_submit ) {
|
901 |
+
wpforms()->process->errors[ $form_data['id'] ][ $field_id ] = apply_filters( 'wpforms_required_label', __( 'This field is required.', 'wpforms' ) );
|
902 |
}
|
903 |
}
|
904 |
|
906 |
* Formats and sanitizes field.
|
907 |
*
|
908 |
* @since 1.0.0
|
909 |
+
*
|
910 |
* @param int $field_id
|
911 |
* @param array $field_submit
|
912 |
* @param array $form_data
|
920 |
|
921 |
$name = ! empty( $form_data['fields'][ $field_id ]['label'] ) ? sanitize_text_field( $form_data['fields'][ $field_id ]['label'] ) : '';
|
922 |
|
923 |
+
// Sanitize but keep line breaks.
|
924 |
+
$value = wpforms_sanitize_textarea_field( $field_submit );
|
925 |
|
926 |
wpforms()->process->fields[ $field_id ] = array(
|
927 |
'name' => $name,
|
includes/fields/class-checkbox.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_Field_Checkbox extends WPForms_Field {
|
12 |
|
13 |
/**
|
@@ -45,16 +45,19 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
45 |
* Field options panel inside the builder.
|
46 |
*
|
47 |
* @since 1.0.0
|
|
|
48 |
* @param array $field
|
49 |
*/
|
50 |
public function field_options( $field ) {
|
51 |
|
52 |
-
|
53 |
// Basic field options
|
54 |
-
|
55 |
|
56 |
// Options open markup
|
57 |
-
$this->field_option( 'basic-options', $field, array(
|
|
|
|
|
58 |
|
59 |
// Label
|
60 |
$this->field_option( 'label', $field );
|
@@ -69,20 +72,37 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
69 |
$this->field_option( 'required', $field );
|
70 |
|
71 |
// Options close markup
|
72 |
-
$this->field_option( 'basic-options', $field, array(
|
|
|
|
|
73 |
|
74 |
-
|
75 |
// Advanced field options
|
76 |
-
|
77 |
|
78 |
// Options open markup
|
79 |
-
$this->field_option( 'advanced-options', $field, array(
|
|
|
|
|
80 |
|
81 |
// Show Values toggle option
|
82 |
-
$tooltip = __( 'Check this to
|
83 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
84 |
-
$show_values = $this->field_element(
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
// Input columns
|
88 |
$this->field_option( 'input_columns', $field );
|
@@ -100,19 +120,22 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
100 |
$this->field_option( 'dynamic_choices_source', $field );
|
101 |
|
102 |
// Options close markup
|
103 |
-
$this->field_option( 'advanced-options', $field, array(
|
|
|
|
|
104 |
}
|
105 |
|
106 |
/**
|
107 |
* Field preview inside the builder.
|
108 |
*
|
109 |
* @since 1.0.0
|
|
|
110 |
* @param array $field
|
111 |
*/
|
112 |
public function field_preview( $field ) {
|
113 |
|
114 |
-
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
115 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
116 |
|
117 |
// Label
|
118 |
$this->field_preview_option( 'label', $field );
|
@@ -122,7 +145,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
122 |
|
123 |
// Check to see if this field is configured for Dynamic Choices,
|
124 |
// either auto populating from a post type or a taxonomy.
|
125 |
-
if ( 'post_type'
|
126 |
|
127 |
// Post type dynamic populating
|
128 |
$source = $field['dynamic_post_type'];
|
@@ -132,16 +155,17 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
132 |
'post_type' => $source,
|
133 |
'posts_per_page' => -1,
|
134 |
'orderby' => 'title',
|
135 |
-
'order' => 'ASC'
|
136 |
);
|
137 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ), true );
|
138 |
$values = array();
|
139 |
|
140 |
foreach ( $posts as $post ) {
|
141 |
-
$values[] = array(
|
|
|
|
|
142 |
}
|
143 |
-
|
144 |
-
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
145 |
|
146 |
// Taxonomy dynamic populating
|
147 |
$source = $field['dynamic_taxonomy'];
|
@@ -150,17 +174,24 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
150 |
'taxonomy' => $source,
|
151 |
'hide_empty' => false,
|
152 |
);
|
153 |
-
$terms
|
|
|
|
|
|
|
154 |
$values = array();
|
155 |
|
156 |
foreach ( $terms as $term ) {
|
157 |
-
$values[] = array(
|
|
|
|
|
158 |
}
|
159 |
}
|
160 |
|
161 |
// Notify if currently empty
|
162 |
if ( empty( $values ) ) {
|
163 |
-
$values = array(
|
|
|
|
|
164 |
}
|
165 |
|
166 |
// Individual checkbox options
|
@@ -175,7 +206,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
175 |
echo '</ul>';
|
176 |
|
177 |
// Dynamic population is enabled and contains more than 20 items
|
178 |
-
if ( isset( $total ) && $total > 20
|
179 |
echo '<div class="wpforms-alert-dynamic wpforms-alert wpforms-alert-warning">';
|
180 |
printf( __( 'Showing the first 20 choices.<br> All %d choices will be displayed when viewing the form.', 'wpforms' ), absint( $total ) );
|
181 |
echo '</div>';
|
@@ -189,31 +220,32 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
189 |
* Field display on the form front-end.
|
190 |
*
|
191 |
* @since 1.0.0
|
|
|
192 |
* @param array $field
|
|
|
193 |
* @param array $form_data
|
194 |
*/
|
195 |
public function field_display( $field, $field_atts, $form_data ) {
|
196 |
|
197 |
// Setup and sanitize the necessary data
|
198 |
$field = apply_filters( 'wpforms_checkbox_field_display', $field, $field_atts, $form_data );
|
199 |
-
$
|
200 |
-
$field_required = !empty( $field['required'] ) ? ' required' : '';
|
201 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
202 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
203 |
$field_data = '';
|
204 |
$form_id = $form_data['id'];
|
205 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
206 |
$choices = $field['choices'];
|
207 |
|
208 |
-
if ( !empty( $field_atts['input_data'] ) ) {
|
209 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
210 |
-
|
211 |
}
|
212 |
}
|
213 |
|
214 |
// Check to see if this field is configured for Dynamic Choices,
|
215 |
// either auto populating from a post type or a taxonomy.
|
216 |
-
if ( 'post_type'
|
217 |
|
218 |
// Post type dynamic populating
|
219 |
$source = $field['dynamic_post_type'];
|
@@ -221,7 +253,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
221 |
'post_type' => $source,
|
222 |
'posts_per_page' => -1,
|
223 |
'orderby' => 'title',
|
224 |
-
'order' => 'ASC'
|
225 |
);
|
226 |
|
227 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] ), true );
|
@@ -237,7 +269,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
237 |
|
238 |
$field['show_values'] = true;
|
239 |
|
240 |
-
} elseif ( 'taxonomy'
|
241 |
|
242 |
// Taxonomy dynamic populating
|
243 |
$source = $field['dynamic_taxonomy'];
|
@@ -245,7 +277,10 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
245 |
'taxonomy' => $source,
|
246 |
'hide_empty' => false,
|
247 |
);
|
248 |
-
$terms
|
|
|
|
|
|
|
249 |
$choices = array();
|
250 |
|
251 |
foreach ( $terms as $term ) {
|
@@ -259,13 +294,13 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
259 |
$field['show_values'] = true;
|
260 |
}
|
261 |
|
262 |
-
// List
|
263 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
264 |
|
265 |
-
foreach( $choices as $key => $choice ) {
|
266 |
|
267 |
$selected = isset( $choice['default'] ) ? '1' : '0' ;
|
268 |
-
$val = isset( $field['show_values'] ) ?
|
269 |
$depth = isset( $choice['depth'] ) ? absint( $choice['depth'] ) : 1;
|
270 |
|
271 |
printf( '<li class="choice-%d depth-%d">', $key, $depth );
|
@@ -293,6 +328,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
293 |
* Formats and sanitizes field.
|
294 |
*
|
295 |
* @since 1.0.2
|
|
|
296 |
* @param int $field_id
|
297 |
* @param array $field_submit
|
298 |
* @param array $form_data
|
@@ -300,11 +336,10 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
300 |
public function format( $field_id, $field_submit, $form_data ) {
|
301 |
|
302 |
$field_submit = (array) $field_submit;
|
303 |
-
$field = $form_data['fields'][$field_id];
|
304 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
305 |
$name = sanitize_text_field( $field['label'] );
|
306 |
-
$value_raw =
|
307 |
-
$value = '';
|
308 |
|
309 |
$data = array(
|
310 |
'name' => $name,
|
@@ -314,7 +349,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
314 |
'type' => $this->type,
|
315 |
);
|
316 |
|
317 |
-
if ( 'post_type'
|
318 |
|
319 |
// Dynamic population is enabled using post type
|
320 |
$value_raw = implode( ',', array_map( 'absint', $field_submit ) );
|
@@ -327,14 +362,14 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
327 |
foreach ( $field_submit as $id ) {
|
328 |
$post = get_post( $id );
|
329 |
|
330 |
-
if ( ! is_wp_error( $post ) && !empty( $post ) && $data['dynamic_post_type']
|
331 |
$posts[] = esc_html( $post->post_title );
|
332 |
}
|
333 |
}
|
334 |
|
335 |
-
$data['value'] = !empty( $posts ) ?
|
336 |
|
337 |
-
} elseif ( 'taxonomy'
|
338 |
|
339 |
// Dynamic population is enabled using taxonomy
|
340 |
$value_raw = implode( ',', array_map( 'absint', $field_submit ) );
|
@@ -347,12 +382,12 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
347 |
foreach ( $field_submit as $id ) {
|
348 |
$term = get_term( $id, $field['dynamic_taxonomy'] );
|
349 |
|
350 |
-
if ( ! is_wp_error( $term ) && !empty( $term ) ) {
|
351 |
$terms[] = esc_html( $term->name );
|
352 |
}
|
353 |
}
|
354 |
|
355 |
-
$data['value'] = !empty( $terms ) ?
|
356 |
|
357 |
} else {
|
358 |
|
@@ -360,12 +395,12 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
360 |
|
361 |
// If show_values is true, that means values posted are the raw values
|
362 |
// and not the labels. So we need to get the label values.
|
363 |
-
if ( !empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
364 |
|
365 |
$value = array();
|
366 |
|
367 |
-
foreach( $field_submit as $field_submit_single ) {
|
368 |
-
foreach( $field['choices'] as $choice ) {
|
369 |
if ( $choice['value'] == $field_submit_single ) {
|
370 |
$value[] = $choice['label'];
|
371 |
break;
|
@@ -373,7 +408,7 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
373 |
}
|
374 |
}
|
375 |
|
376 |
-
$data['value'] = !empty( $value ) ?
|
377 |
|
378 |
} else {
|
379 |
$data['value'] = $value_raw;
|
@@ -381,7 +416,8 @@ class WPForms_Field_Checkbox extends WPForms_Field {
|
|
381 |
}
|
382 |
|
383 |
// Push field details to be saved
|
384 |
-
wpforms()->process->fields[$field_id] = $data;
|
385 |
}
|
386 |
}
|
|
|
387 |
new WPForms_Field_Checkbox;
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Field_Checkbox extends WPForms_Field {
|
12 |
|
13 |
/**
|
45 |
* Field options panel inside the builder.
|
46 |
*
|
47 |
* @since 1.0.0
|
48 |
+
*
|
49 |
* @param array $field
|
50 |
*/
|
51 |
public function field_options( $field ) {
|
52 |
|
53 |
+
// --------------------------------------------------------------------//
|
54 |
// Basic field options
|
55 |
+
// --------------------------------------------------------------------//
|
56 |
|
57 |
// Options open markup
|
58 |
+
$this->field_option( 'basic-options', $field, array(
|
59 |
+
'markup' => 'open',
|
60 |
+
) );
|
61 |
|
62 |
// Label
|
63 |
$this->field_option( 'label', $field );
|
72 |
$this->field_option( 'required', $field );
|
73 |
|
74 |
// Options close markup
|
75 |
+
$this->field_option( 'basic-options', $field, array(
|
76 |
+
'markup' => 'close',
|
77 |
+
) );
|
78 |
|
79 |
+
// --------------------------------------------------------------------//
|
80 |
// Advanced field options
|
81 |
+
// --------------------------------------------------------------------//
|
82 |
|
83 |
// Options open markup
|
84 |
+
$this->field_option( 'advanced-options', $field, array(
|
85 |
+
'markup' => 'open',
|
86 |
+
) );
|
87 |
|
88 |
// Show Values toggle option
|
89 |
+
$tooltip = __( 'Check this to manually set form field values.', 'wpforms' );
|
90 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
91 |
+
$show_values = $this->field_element(
|
92 |
+
'checkbox',
|
93 |
+
$field,
|
94 |
+
array(
|
95 |
+
'slug' => 'show_values',
|
96 |
+
'value' => $show_values,
|
97 |
+
'desc' => __( 'Show Values', 'wpforms' ),
|
98 |
+
'tooltip' => $tooltip,
|
99 |
+
),
|
100 |
+
false
|
101 |
+
);
|
102 |
+
$this->field_element( 'row', $field, array(
|
103 |
+
'slug' => 'show_values',
|
104 |
+
'content' => $show_values,
|
105 |
+
) );
|
106 |
|
107 |
// Input columns
|
108 |
$this->field_option( 'input_columns', $field );
|
120 |
$this->field_option( 'dynamic_choices_source', $field );
|
121 |
|
122 |
// Options close markup
|
123 |
+
$this->field_option( 'advanced-options', $field, array(
|
124 |
+
'markup' => 'close',
|
125 |
+
) );
|
126 |
}
|
127 |
|
128 |
/**
|
129 |
* Field preview inside the builder.
|
130 |
*
|
131 |
* @since 1.0.0
|
132 |
+
*
|
133 |
* @param array $field
|
134 |
*/
|
135 |
public function field_preview( $field ) {
|
136 |
|
137 |
+
$values = ! empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
138 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
139 |
|
140 |
// Label
|
141 |
$this->field_preview_option( 'label', $field );
|
145 |
|
146 |
// Check to see if this field is configured for Dynamic Choices,
|
147 |
// either auto populating from a post type or a taxonomy.
|
148 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
149 |
|
150 |
// Post type dynamic populating
|
151 |
$source = $field['dynamic_post_type'];
|
155 |
'post_type' => $source,
|
156 |
'posts_per_page' => -1,
|
157 |
'orderby' => 'title',
|
158 |
+
'order' => 'ASC',
|
159 |
);
|
160 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ), true );
|
161 |
$values = array();
|
162 |
|
163 |
foreach ( $posts as $post ) {
|
164 |
+
$values[] = array(
|
165 |
+
'label' => $post->post_title,
|
166 |
+
);
|
167 |
}
|
168 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
|
|
169 |
|
170 |
// Taxonomy dynamic populating
|
171 |
$source = $field['dynamic_taxonomy'];
|
174 |
'taxonomy' => $source,
|
175 |
'hide_empty' => false,
|
176 |
);
|
177 |
+
$terms = wpforms_get_hierarchical_object(
|
178 |
+
apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $this->form_id ),
|
179 |
+
true
|
180 |
+
);
|
181 |
$values = array();
|
182 |
|
183 |
foreach ( $terms as $term ) {
|
184 |
+
$values[] = array(
|
185 |
+
'label' => $term->name,
|
186 |
+
);
|
187 |
}
|
188 |
}
|
189 |
|
190 |
// Notify if currently empty
|
191 |
if ( empty( $values ) ) {
|
192 |
+
$values = array(
|
193 |
+
'label' => __( '(empty)', 'wpforms' ),
|
194 |
+
);
|
195 |
}
|
196 |
|
197 |
// Individual checkbox options
|
206 |
echo '</ul>';
|
207 |
|
208 |
// Dynamic population is enabled and contains more than 20 items
|
209 |
+
if ( isset( $total ) && $total > 20 ) {
|
210 |
echo '<div class="wpforms-alert-dynamic wpforms-alert wpforms-alert-warning">';
|
211 |
printf( __( 'Showing the first 20 choices.<br> All %d choices will be displayed when viewing the form.', 'wpforms' ), absint( $total ) );
|
212 |
echo '</div>';
|
220 |
* Field display on the form front-end.
|
221 |
*
|
222 |
* @since 1.0.0
|
223 |
+
*
|
224 |
* @param array $field
|
225 |
+
* @param array $field_atts
|
226 |
* @param array $form_data
|
227 |
*/
|
228 |
public function field_display( $field, $field_atts, $form_data ) {
|
229 |
|
230 |
// Setup and sanitize the necessary data
|
231 |
$field = apply_filters( 'wpforms_checkbox_field_display', $field, $field_atts, $form_data );
|
232 |
+
$field_required = ! empty( $field['required'] ) ? ' required' : '';
|
|
|
233 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
234 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
235 |
$field_data = '';
|
236 |
$form_id = $form_data['id'];
|
237 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
238 |
$choices = $field['choices'];
|
239 |
|
240 |
+
if ( ! empty( $field_atts['input_data'] ) ) {
|
241 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
242 |
+
$field_data .= ' data-' . $key . '="' . $val . '"';
|
243 |
}
|
244 |
}
|
245 |
|
246 |
// Check to see if this field is configured for Dynamic Choices,
|
247 |
// either auto populating from a post type or a taxonomy.
|
248 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
249 |
|
250 |
// Post type dynamic populating
|
251 |
$source = $field['dynamic_post_type'];
|
253 |
'post_type' => $source,
|
254 |
'posts_per_page' => -1,
|
255 |
'orderby' => 'title',
|
256 |
+
'order' => 'ASC',
|
257 |
);
|
258 |
|
259 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] ), true );
|
269 |
|
270 |
$field['show_values'] = true;
|
271 |
|
272 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
273 |
|
274 |
// Taxonomy dynamic populating
|
275 |
$source = $field['dynamic_taxonomy'];
|
277 |
'taxonomy' => $source,
|
278 |
'hide_empty' => false,
|
279 |
);
|
280 |
+
$terms = wpforms_get_hierarchical_object(
|
281 |
+
apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $form_data['id'] ),
|
282 |
+
true
|
283 |
+
);
|
284 |
$choices = array();
|
285 |
|
286 |
foreach ( $terms as $term ) {
|
294 |
$field['show_values'] = true;
|
295 |
}
|
296 |
|
297 |
+
// List.
|
298 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
299 |
|
300 |
+
foreach ( $choices as $key => $choice ) {
|
301 |
|
302 |
$selected = isset( $choice['default'] ) ? '1' : '0' ;
|
303 |
+
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
304 |
$depth = isset( $choice['depth'] ) ? absint( $choice['depth'] ) : 1;
|
305 |
|
306 |
printf( '<li class="choice-%d depth-%d">', $key, $depth );
|
328 |
* Formats and sanitizes field.
|
329 |
*
|
330 |
* @since 1.0.2
|
331 |
+
*
|
332 |
* @param int $field_id
|
333 |
* @param array $field_submit
|
334 |
* @param array $form_data
|
336 |
public function format( $field_id, $field_submit, $form_data ) {
|
337 |
|
338 |
$field_submit = (array) $field_submit;
|
339 |
+
$field = $form_data['fields'][ $field_id ];
|
340 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
341 |
$name = sanitize_text_field( $field['label'] );
|
342 |
+
$value_raw = wpforms_sanitize_array_combine( $field_submit );
|
|
|
343 |
|
344 |
$data = array(
|
345 |
'name' => $name,
|
349 |
'type' => $this->type,
|
350 |
);
|
351 |
|
352 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
353 |
|
354 |
// Dynamic population is enabled using post type
|
355 |
$value_raw = implode( ',', array_map( 'absint', $field_submit ) );
|
362 |
foreach ( $field_submit as $id ) {
|
363 |
$post = get_post( $id );
|
364 |
|
365 |
+
if ( ! is_wp_error( $post ) && ! empty( $post ) && $data['dynamic_post_type'] === $post->post_type ) {
|
366 |
$posts[] = esc_html( $post->post_title );
|
367 |
}
|
368 |
}
|
369 |
|
370 |
+
$data['value'] = ! empty( $posts ) ? wpforms_sanitize_array_combine( $posts ) : '';
|
371 |
|
372 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
373 |
|
374 |
// Dynamic population is enabled using taxonomy
|
375 |
$value_raw = implode( ',', array_map( 'absint', $field_submit ) );
|
382 |
foreach ( $field_submit as $id ) {
|
383 |
$term = get_term( $id, $field['dynamic_taxonomy'] );
|
384 |
|
385 |
+
if ( ! is_wp_error( $term ) && ! empty( $term ) ) {
|
386 |
$terms[] = esc_html( $term->name );
|
387 |
}
|
388 |
}
|
389 |
|
390 |
+
$data['value'] = ! empty( $terms ) ? wpforms_sanitize_array_combine( $terms ) : '';
|
391 |
|
392 |
} else {
|
393 |
|
395 |
|
396 |
// If show_values is true, that means values posted are the raw values
|
397 |
// and not the labels. So we need to get the label values.
|
398 |
+
if ( ! empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
399 |
|
400 |
$value = array();
|
401 |
|
402 |
+
foreach ( $field_submit as $field_submit_single ) {
|
403 |
+
foreach ( $field['choices'] as $choice ) {
|
404 |
if ( $choice['value'] == $field_submit_single ) {
|
405 |
$value[] = $choice['label'];
|
406 |
break;
|
408 |
}
|
409 |
}
|
410 |
|
411 |
+
$data['value'] = ! empty( $value ) ? wpforms_sanitize_array_combine( $value ) : '';
|
412 |
|
413 |
} else {
|
414 |
$data['value'] = $value_raw;
|
416 |
}
|
417 |
|
418 |
// Push field details to be saved
|
419 |
+
wpforms()->process->fields[ $field_id ] = $data;
|
420 |
}
|
421 |
}
|
422 |
+
|
423 |
new WPForms_Field_Checkbox;
|
includes/fields/class-email.php
CHANGED
@@ -205,7 +205,7 @@ class WPForms_Field_Email extends WPForms_Field {
|
|
205 |
'slug' => 'confirmation',
|
206 |
'value' => isset( $field['confirmation'] ) ? '1' : '0',
|
207 |
'desc' => __( 'Enable Email Confirmation', 'wpforms' ),
|
208 |
-
'tooltip' => __( 'Check this option ask
|
209 |
),
|
210 |
false
|
211 |
);
|
205 |
'slug' => 'confirmation',
|
206 |
'value' => isset( $field['confirmation'] ) ? '1' : '0',
|
207 |
'desc' => __( 'Enable Email Confirmation', 'wpforms' ),
|
208 |
+
'tooltip' => __( 'Check this option to ask users to provide an email address twice.', 'wpforms' ),
|
209 |
),
|
210 |
false
|
211 |
);
|
includes/fields/class-name.php
CHANGED
@@ -482,7 +482,7 @@ class WPForms_Field_Name extends WPForms_Field {
|
|
482 |
|
483 |
$form_id = $form_data['id'];
|
484 |
$format = $form_data['fields'][ $field_id ]['format'];
|
485 |
-
$required = apply_filters( 'wpforms_required_label', __( 'This field is required', 'wpforms' ) );
|
486 |
|
487 |
if ( 'simple' === $format && empty( $field_submit ) ) {
|
488 |
wpforms()->process->errors[ $form_id ][ $field_id ] = $required;
|
482 |
|
483 |
$form_id = $form_data['id'];
|
484 |
$format = $form_data['fields'][ $field_id ]['format'];
|
485 |
+
$required = apply_filters( 'wpforms_required_label', __( 'This field is required.', 'wpforms' ) );
|
486 |
|
487 |
if ( 'simple' === $format && empty( $field_submit ) ) {
|
488 |
wpforms()->process->errors[ $form_id ][ $field_id ] = $required;
|
includes/fields/class-number.php
CHANGED
@@ -149,7 +149,7 @@ class WPForms_Field_Number extends WPForms_Field {
|
|
149 |
|
150 |
// Basic required check - If field is marked as required, check for entry data
|
151 |
if ( ! empty( $form_data['fields'][ $field_id ]['required'] ) && empty( $field_submit ) && '0' != $field_submit ) {
|
152 |
-
wpforms()->process->errors[ $form_id ][ $field_id ] = apply_filters( 'wpforms_required_label', __( 'This field is required', 'wpforms' ) );
|
153 |
}
|
154 |
|
155 |
// Check if value is numeric.
|
149 |
|
150 |
// Basic required check - If field is marked as required, check for entry data
|
151 |
if ( ! empty( $form_data['fields'][ $field_id ]['required'] ) && empty( $field_submit ) && '0' != $field_submit ) {
|
152 |
+
wpforms()->process->errors[ $form_id ][ $field_id ] = apply_filters( 'wpforms_required_label', __( 'This field is required.', 'wpforms' ) );
|
153 |
}
|
154 |
|
155 |
// Check if value is numeric.
|
includes/fields/class-radio.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_Field_Radio extends WPForms_Field {
|
12 |
|
13 |
/**
|
@@ -17,7 +17,7 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
17 |
*/
|
18 |
public function init() {
|
19 |
|
20 |
-
// Define field type information
|
21 |
$this->name = __( 'Multiple Choice', 'wpforms' );
|
22 |
$this->type = 'radio';
|
23 |
$this->icon = 'fa-list-ul';
|
@@ -45,84 +45,107 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
45 |
* Field options panel inside the builder.
|
46 |
*
|
47 |
* @since 1.0.0
|
|
|
48 |
* @param array $field
|
49 |
*/
|
50 |
public function field_options( $field ) {
|
51 |
|
52 |
-
|
53 |
-
// Basic field options
|
54 |
-
|
55 |
|
56 |
-
// Options open markup
|
57 |
-
$this->field_option( 'basic-options', $field, array(
|
|
|
|
|
58 |
|
59 |
-
// Label
|
60 |
$this->field_option( 'label', $field );
|
61 |
|
62 |
-
// Choices
|
63 |
$this->field_option( 'choices', $field );
|
64 |
|
65 |
-
// Description
|
66 |
$this->field_option( 'description', $field );
|
67 |
|
68 |
-
// Required toggle
|
69 |
$this->field_option( 'required', $field );
|
70 |
|
71 |
-
// Options close markup
|
72 |
-
$this->field_option( 'basic-options', $field, array(
|
|
|
|
|
73 |
|
74 |
-
|
75 |
-
// Advanced field options
|
76 |
-
|
77 |
|
78 |
-
// Options open markup
|
79 |
-
$this->field_option( 'advanced-options', $field, array(
|
|
|
|
|
80 |
|
81 |
-
// Show Values toggle option
|
82 |
$tooltip = __( 'Check this to manually set form field values.', 'wpforms' );
|
83 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
84 |
-
$show_values = $this->field_element(
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
-
// Input columns
|
88 |
$this->field_option( 'input_columns', $field );
|
89 |
|
90 |
-
// Hide label
|
91 |
$this->field_option( 'label_hide', $field );
|
92 |
|
93 |
-
// Custom CSS classes
|
94 |
$this->field_option( 'css', $field );
|
95 |
|
96 |
-
// Dynamic choice auto-populating toggle
|
97 |
$this->field_option( 'dynamic_choices', $field );
|
98 |
|
99 |
-
// Dynamic choice source
|
100 |
$this->field_option( 'dynamic_choices_source', $field );
|
101 |
|
102 |
-
// Options close markup
|
103 |
-
$this->field_option( 'advanced-options', $field, array(
|
|
|
|
|
104 |
}
|
105 |
|
106 |
/**
|
107 |
* Field preview inside the builder.
|
108 |
*
|
109 |
* @since 1.0.0
|
|
|
110 |
* @param array $field
|
111 |
*/
|
112 |
public function field_preview( $field ) {
|
113 |
|
114 |
-
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
115 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
116 |
|
117 |
-
// Label
|
118 |
$this->field_preview_option( 'label', $field );
|
119 |
|
120 |
-
// Field radio elements
|
121 |
echo '<ul class="primary-input">';
|
122 |
|
123 |
// Check to see if this field is configured for Dynamic Choices,
|
124 |
// either auto populating from a post type or a taxonomy.
|
125 |
-
if ( 'post_type'
|
126 |
|
127 |
// Post type dynamic populating
|
128 |
$source = $field['dynamic_post_type'];
|
@@ -132,35 +155,43 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
132 |
'post_type' => $source,
|
133 |
'posts_per_page' => -1,
|
134 |
'orderby' => 'title',
|
135 |
-
'order' => 'ASC'
|
136 |
);
|
137 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ), true );
|
138 |
$values = array();
|
139 |
|
140 |
foreach ( $posts as $post ) {
|
141 |
-
$values[] = array(
|
|
|
|
|
142 |
}
|
|
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
// Taxonomy dynamic populating
|
147 |
$source = $field['dynamic_taxonomy'];
|
148 |
$total = wp_count_terms( $source );
|
149 |
$args = array(
|
150 |
'taxonomy' => $source,
|
151 |
'hide_empty' => false,
|
152 |
);
|
153 |
-
$terms
|
|
|
|
|
|
|
154 |
$values = array();
|
155 |
|
156 |
foreach ( $terms as $term ) {
|
157 |
-
$values[] = array(
|
|
|
|
|
158 |
}
|
159 |
}
|
160 |
|
161 |
-
// Notify if currently empty
|
162 |
if ( empty( $values ) ) {
|
163 |
-
$values = array(
|
|
|
|
|
164 |
}
|
165 |
|
166 |
// Individual radio options
|
@@ -174,14 +205,14 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
174 |
|
175 |
echo '</ul>';
|
176 |
|
177 |
-
// Dynamic population is enabled and contains more than 20 items
|
178 |
-
if ( isset( $total ) && $total > 20
|
179 |
echo '<div class="wpforms-alert-dynamic wpforms-alert wpforms-alert-warning">';
|
180 |
printf( __( 'Showing the first 20 choices.<br> All %d choices will be displayed when viewing the form.', 'wpforms' ), absint( $total ) );
|
181 |
echo '</div>';
|
182 |
}
|
183 |
|
184 |
-
// Description
|
185 |
$this->field_preview_option( 'description', $field );
|
186 |
}
|
187 |
|
@@ -189,22 +220,24 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
189 |
* Field display on the form front-end.
|
190 |
*
|
191 |
* @since 1.0.0
|
|
|
192 |
* @param array $field
|
|
|
193 |
* @param array $form_data
|
194 |
*/
|
195 |
public function field_display( $field, $field_atts, $form_data ) {
|
196 |
|
197 |
-
// Setup and sanitize the necessary data
|
198 |
$field = apply_filters( 'wpforms_radio_field_display', $field, $field_atts, $form_data );
|
199 |
-
$field_required = !empty( $field['required'] ) ? ' required' : '';
|
200 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
201 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
202 |
$field_data = '';
|
203 |
$form_id = absint( $form_data['id'] );
|
204 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
205 |
$choices = $field['choices'];
|
206 |
|
207 |
-
if ( !empty( $field_atts['input_data'] ) ) {
|
208 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
209 |
$field_data .= ' data-' . $key . '="' . $val . '"';
|
210 |
}
|
@@ -212,15 +245,15 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
212 |
|
213 |
// Check to see if this field is configured for Dynamic Choices,
|
214 |
// either auto populating from a post type or a taxonomy.
|
215 |
-
if ( 'post_type'
|
216 |
|
217 |
-
// Post type dynamic populating
|
218 |
$source = $field['dynamic_post_type'];
|
219 |
$args = array(
|
220 |
'post_type' => $source,
|
221 |
'posts_per_page' => -1,
|
222 |
'orderby' => 'title',
|
223 |
-
'order' => 'ASC'
|
224 |
);
|
225 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] ), true );
|
226 |
$choices = array();
|
@@ -235,15 +268,18 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
235 |
|
236 |
$field['show_values'] = true;
|
237 |
|
238 |
-
} elseif ( 'taxonomy'
|
239 |
|
240 |
-
// Taxonomy dynamic populating
|
241 |
$source = $field['dynamic_taxonomy'];
|
242 |
$args = array(
|
243 |
'taxonomy' => $source,
|
244 |
'hide_empty' => false,
|
245 |
);
|
246 |
-
$terms
|
|
|
|
|
|
|
247 |
$choices = array();
|
248 |
|
249 |
foreach ( $terms as $term ) {
|
@@ -257,10 +293,10 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
257 |
$field['show_values'] = true;
|
258 |
}
|
259 |
|
260 |
-
// List
|
261 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
262 |
|
263 |
-
foreach( $choices as $key => $choice ) {
|
264 |
|
265 |
$selected = isset( $choice['default'] ) ? '1' : '0';
|
266 |
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
@@ -268,7 +304,7 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
268 |
|
269 |
printf( '<li class="choice-%d depth-%d">', $key, $depth );
|
270 |
|
271 |
-
// Radio elements
|
272 |
printf( '<input type="radio" id="wpforms-%s-field_%d_%d" name="wpforms[fields][%d]" value="%s" %s %s>',
|
273 |
$form_id,
|
274 |
$field['id'],
|
@@ -291,14 +327,15 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
291 |
* Formats and sanitizes field.
|
292 |
*
|
293 |
* @since 1.0.2
|
|
|
294 |
* @param int $field_id
|
295 |
-
* @param
|
296 |
* @param array $form_data
|
297 |
*/
|
298 |
public function format( $field_id, $field_submit, $form_data ) {
|
299 |
|
300 |
-
$field = $form_data['fields'][$field_id];
|
301 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
302 |
$name = sanitize_text_field( $field['label'] );
|
303 |
$value_raw = sanitize_text_field( $field_submit );
|
304 |
$value = '';
|
@@ -311,37 +348,35 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
311 |
'type' => $this->type,
|
312 |
);
|
313 |
|
314 |
-
if ( 'post_type'
|
315 |
|
316 |
-
// Dynamic population is enabled using post type
|
317 |
$data['dynamic'] = 'post_type';
|
318 |
$data['dynamic_items'] = absint( $value_raw );
|
319 |
$data['dynamic_post_type'] = $field['dynamic_post_type'];
|
320 |
$post = get_post( $value_raw );
|
321 |
|
322 |
-
if ( ! is_wp_error( $post ) && !empty( $post ) && $data['dynamic_post_type']
|
323 |
$data['value'] = esc_html( $post->post_title );
|
324 |
}
|
|
|
325 |
|
326 |
-
|
327 |
-
|
328 |
-
// Dynamic population is enabled using taxonomy
|
329 |
$data['dynamic'] = 'taxonomy';
|
330 |
$data['dynamic_items'] = absint( $value_raw );
|
331 |
$data['dynamic_taxonomy'] = $field['dynamic_taxonomy'];
|
332 |
$term = get_term( $value_raw, $data['dynamic_taxonomy'] );
|
333 |
|
334 |
-
if ( ! is_wp_error( $term ) && !empty( $term ) ) {
|
335 |
$data['value'] = esc_html( $term->name );
|
336 |
}
|
337 |
-
|
338 |
} else {
|
339 |
|
340 |
-
// Normal processing, dynamic population is off
|
341 |
|
342 |
// If show_values is true, that means values posted are the raw values
|
343 |
// and not the labels. So we need to get the label values.
|
344 |
-
if ( !empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
345 |
|
346 |
foreach ( $field['choices'] as $choice ) {
|
347 |
if ( $choice['value'] === $field_submit ) {
|
@@ -357,8 +392,9 @@ class WPForms_Field_Radio extends WPForms_Field {
|
|
357 |
}
|
358 |
}
|
359 |
|
360 |
-
// Push field details to be saved
|
361 |
-
wpforms()->process->fields[$field_id] = $data;
|
362 |
}
|
363 |
}
|
|
|
364 |
new WPForms_Field_Radio;
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Field_Radio extends WPForms_Field {
|
12 |
|
13 |
/**
|
17 |
*/
|
18 |
public function init() {
|
19 |
|
20 |
+
// Define field type information.
|
21 |
$this->name = __( 'Multiple Choice', 'wpforms' );
|
22 |
$this->type = 'radio';
|
23 |
$this->icon = 'fa-list-ul';
|
45 |
* Field options panel inside the builder.
|
46 |
*
|
47 |
* @since 1.0.0
|
48 |
+
*
|
49 |
* @param array $field
|
50 |
*/
|
51 |
public function field_options( $field ) {
|
52 |
|
53 |
+
// --------------------------------------------------------------------//
|
54 |
+
// Basic field options.
|
55 |
+
// --------------------------------------------------------------------//
|
56 |
|
57 |
+
// Options open markup.
|
58 |
+
$this->field_option( 'basic-options', $field, array(
|
59 |
+
'markup' => 'open',
|
60 |
+
) );
|
61 |
|
62 |
+
// Label.
|
63 |
$this->field_option( 'label', $field );
|
64 |
|
65 |
+
// Choices.
|
66 |
$this->field_option( 'choices', $field );
|
67 |
|
68 |
+
// Description.
|
69 |
$this->field_option( 'description', $field );
|
70 |
|
71 |
+
// Required toggle.
|
72 |
$this->field_option( 'required', $field );
|
73 |
|
74 |
+
// Options close markup.
|
75 |
+
$this->field_option( 'basic-options', $field, array(
|
76 |
+
'markup' => 'close',
|
77 |
+
) );
|
78 |
|
79 |
+
// --------------------------------------------------------------------//
|
80 |
+
// Advanced field options.
|
81 |
+
// --------------------------------------------------------------------//
|
82 |
|
83 |
+
// Options open markup.
|
84 |
+
$this->field_option( 'advanced-options', $field, array(
|
85 |
+
'markup' => 'open',
|
86 |
+
) );
|
87 |
|
88 |
+
// Show Values toggle option.
|
89 |
$tooltip = __( 'Check this to manually set form field values.', 'wpforms' );
|
90 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
91 |
+
$show_values = $this->field_element(
|
92 |
+
'checkbox',
|
93 |
+
$field,
|
94 |
+
array(
|
95 |
+
'slug' => 'show_values',
|
96 |
+
'value' => $show_values,
|
97 |
+
'desc' => __( 'Show Values', 'wpforms' ),
|
98 |
+
'tooltip' => $tooltip,
|
99 |
+
),
|
100 |
+
false
|
101 |
+
);
|
102 |
+
$this->field_element( 'row', $field, array(
|
103 |
+
'slug' => 'show_values',
|
104 |
+
'content' => $show_values,
|
105 |
+
) );
|
106 |
|
107 |
+
// Input columns.
|
108 |
$this->field_option( 'input_columns', $field );
|
109 |
|
110 |
+
// Hide label.
|
111 |
$this->field_option( 'label_hide', $field );
|
112 |
|
113 |
+
// Custom CSS classes.
|
114 |
$this->field_option( 'css', $field );
|
115 |
|
116 |
+
// Dynamic choice auto-populating toggle.
|
117 |
$this->field_option( 'dynamic_choices', $field );
|
118 |
|
119 |
+
// Dynamic choice source.
|
120 |
$this->field_option( 'dynamic_choices_source', $field );
|
121 |
|
122 |
+
// Options close markup.
|
123 |
+
$this->field_option( 'advanced-options', $field, array(
|
124 |
+
'markup' => 'close',
|
125 |
+
) );
|
126 |
}
|
127 |
|
128 |
/**
|
129 |
* Field preview inside the builder.
|
130 |
*
|
131 |
* @since 1.0.0
|
132 |
+
*
|
133 |
* @param array $field
|
134 |
*/
|
135 |
public function field_preview( $field ) {
|
136 |
|
137 |
+
$values = ! empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
138 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
139 |
|
140 |
+
// Label.
|
141 |
$this->field_preview_option( 'label', $field );
|
142 |
|
143 |
+
// Field radio elements.
|
144 |
echo '<ul class="primary-input">';
|
145 |
|
146 |
// Check to see if this field is configured for Dynamic Choices,
|
147 |
// either auto populating from a post type or a taxonomy.
|
148 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
149 |
|
150 |
// Post type dynamic populating
|
151 |
$source = $field['dynamic_post_type'];
|
155 |
'post_type' => $source,
|
156 |
'posts_per_page' => -1,
|
157 |
'orderby' => 'title',
|
158 |
+
'order' => 'ASC',
|
159 |
);
|
160 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ), true );
|
161 |
$values = array();
|
162 |
|
163 |
foreach ( $posts as $post ) {
|
164 |
+
$values[] = array(
|
165 |
+
'label' => $post->post_title,
|
166 |
+
);
|
167 |
}
|
168 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
169 |
|
170 |
+
// Taxonomy dynamic populating.
|
|
|
|
|
171 |
$source = $field['dynamic_taxonomy'];
|
172 |
$total = wp_count_terms( $source );
|
173 |
$args = array(
|
174 |
'taxonomy' => $source,
|
175 |
'hide_empty' => false,
|
176 |
);
|
177 |
+
$terms = wpforms_get_hierarchical_object(
|
178 |
+
apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $this->form_id ),
|
179 |
+
true
|
180 |
+
);
|
181 |
$values = array();
|
182 |
|
183 |
foreach ( $terms as $term ) {
|
184 |
+
$values[] = array(
|
185 |
+
'label' => $term->name,
|
186 |
+
);
|
187 |
}
|
188 |
}
|
189 |
|
190 |
+
// Notify if currently empty.
|
191 |
if ( empty( $values ) ) {
|
192 |
+
$values = array(
|
193 |
+
'label' => __( '(empty)', 'wpforms' ),
|
194 |
+
);
|
195 |
}
|
196 |
|
197 |
// Individual radio options
|
205 |
|
206 |
echo '</ul>';
|
207 |
|
208 |
+
// Dynamic population is enabled and contains more than 20 items.
|
209 |
+
if ( isset( $total ) && $total > 20 ) {
|
210 |
echo '<div class="wpforms-alert-dynamic wpforms-alert wpforms-alert-warning">';
|
211 |
printf( __( 'Showing the first 20 choices.<br> All %d choices will be displayed when viewing the form.', 'wpforms' ), absint( $total ) );
|
212 |
echo '</div>';
|
213 |
}
|
214 |
|
215 |
+
// Description.
|
216 |
$this->field_preview_option( 'description', $field );
|
217 |
}
|
218 |
|
220 |
* Field display on the form front-end.
|
221 |
*
|
222 |
* @since 1.0.0
|
223 |
+
*
|
224 |
* @param array $field
|
225 |
+
* @param array $field_atts
|
226 |
* @param array $form_data
|
227 |
*/
|
228 |
public function field_display( $field, $field_atts, $form_data ) {
|
229 |
|
230 |
+
// Setup and sanitize the necessary data.
|
231 |
$field = apply_filters( 'wpforms_radio_field_display', $field, $field_atts, $form_data );
|
232 |
+
$field_required = ! empty( $field['required'] ) ? ' required' : '';
|
233 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
234 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
235 |
$field_data = '';
|
236 |
$form_id = absint( $form_data['id'] );
|
237 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
238 |
$choices = $field['choices'];
|
239 |
|
240 |
+
if ( ! empty( $field_atts['input_data'] ) ) {
|
241 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
242 |
$field_data .= ' data-' . $key . '="' . $val . '"';
|
243 |
}
|
245 |
|
246 |
// Check to see if this field is configured for Dynamic Choices,
|
247 |
// either auto populating from a post type or a taxonomy.
|
248 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
249 |
|
250 |
+
// Post type dynamic populating.
|
251 |
$source = $field['dynamic_post_type'];
|
252 |
$args = array(
|
253 |
'post_type' => $source,
|
254 |
'posts_per_page' => -1,
|
255 |
'orderby' => 'title',
|
256 |
+
'order' => 'ASC',
|
257 |
);
|
258 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] ), true );
|
259 |
$choices = array();
|
268 |
|
269 |
$field['show_values'] = true;
|
270 |
|
271 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
272 |
|
273 |
+
// Taxonomy dynamic populating.
|
274 |
$source = $field['dynamic_taxonomy'];
|
275 |
$args = array(
|
276 |
'taxonomy' => $source,
|
277 |
'hide_empty' => false,
|
278 |
);
|
279 |
+
$terms = wpforms_get_hierarchical_object(
|
280 |
+
apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $form_data['id'] ),
|
281 |
+
true
|
282 |
+
);
|
283 |
$choices = array();
|
284 |
|
285 |
foreach ( $terms as $term ) {
|
293 |
$field['show_values'] = true;
|
294 |
}
|
295 |
|
296 |
+
// List.
|
297 |
printf( '<ul id="%s" class="%s" %s>', $field_id, $field_class, $field_data );
|
298 |
|
299 |
+
foreach ( $choices as $key => $choice ) {
|
300 |
|
301 |
$selected = isset( $choice['default'] ) ? '1' : '0';
|
302 |
$val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
|
304 |
|
305 |
printf( '<li class="choice-%d depth-%d">', $key, $depth );
|
306 |
|
307 |
+
// Radio elements.
|
308 |
printf( '<input type="radio" id="wpforms-%s-field_%d_%d" name="wpforms[fields][%d]" value="%s" %s %s>',
|
309 |
$form_id,
|
310 |
$field['id'],
|
327 |
* Formats and sanitizes field.
|
328 |
*
|
329 |
* @since 1.0.2
|
330 |
+
*
|
331 |
* @param int $field_id
|
332 |
+
* @param string $field_submit
|
333 |
* @param array $form_data
|
334 |
*/
|
335 |
public function format( $field_id, $field_submit, $form_data ) {
|
336 |
|
337 |
+
$field = $form_data['fields'][ $field_id ];
|
338 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
339 |
$name = sanitize_text_field( $field['label'] );
|
340 |
$value_raw = sanitize_text_field( $field_submit );
|
341 |
$value = '';
|
348 |
'type' => $this->type,
|
349 |
);
|
350 |
|
351 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
352 |
|
353 |
+
// Dynamic population is enabled using post type.
|
354 |
$data['dynamic'] = 'post_type';
|
355 |
$data['dynamic_items'] = absint( $value_raw );
|
356 |
$data['dynamic_post_type'] = $field['dynamic_post_type'];
|
357 |
$post = get_post( $value_raw );
|
358 |
|
359 |
+
if ( ! is_wp_error( $post ) && ! empty( $post ) && $data['dynamic_post_type'] === $post->post_type ) {
|
360 |
$data['value'] = esc_html( $post->post_title );
|
361 |
}
|
362 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
363 |
|
364 |
+
// Dynamic population is enabled using taxonomy.
|
|
|
|
|
365 |
$data['dynamic'] = 'taxonomy';
|
366 |
$data['dynamic_items'] = absint( $value_raw );
|
367 |
$data['dynamic_taxonomy'] = $field['dynamic_taxonomy'];
|
368 |
$term = get_term( $value_raw, $data['dynamic_taxonomy'] );
|
369 |
|
370 |
+
if ( ! is_wp_error( $term ) && ! empty( $term ) ) {
|
371 |
$data['value'] = esc_html( $term->name );
|
372 |
}
|
|
|
373 |
} else {
|
374 |
|
375 |
+
// Normal processing, dynamic population is off.
|
376 |
|
377 |
// If show_values is true, that means values posted are the raw values
|
378 |
// and not the labels. So we need to get the label values.
|
379 |
+
if ( ! empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
380 |
|
381 |
foreach ( $field['choices'] as $choice ) {
|
382 |
if ( $choice['value'] === $field_submit ) {
|
392 |
}
|
393 |
}
|
394 |
|
395 |
+
// Push field details to be saved.
|
396 |
+
wpforms()->process->fields[ $field_id ] = $data;
|
397 |
}
|
398 |
}
|
399 |
+
|
400 |
new WPForms_Field_Radio;
|
includes/fields/class-select.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_Field_Select extends WPForms_Field {
|
12 |
|
13 |
/**
|
@@ -45,142 +45,173 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
45 |
* Field options panel inside the builder.
|
46 |
*
|
47 |
* @since 1.0.0
|
|
|
48 |
* @param array $field
|
49 |
*/
|
50 |
public function field_options( $field ) {
|
51 |
|
52 |
-
|
53 |
-
// Basic field options
|
54 |
-
|
55 |
|
56 |
-
// Options open markup
|
57 |
-
$this->field_option( 'basic-options', $field, array(
|
|
|
|
|
58 |
|
59 |
-
// Label
|
60 |
$this->field_option( 'label', $field );
|
61 |
|
62 |
-
// Choices
|
63 |
$this->field_option( 'choices', $field );
|
64 |
|
65 |
-
// Description
|
66 |
$this->field_option( 'description', $field );
|
67 |
|
68 |
-
// Required toggle
|
69 |
$this->field_option( 'required', $field );
|
70 |
|
71 |
-
// Options close markup
|
72 |
-
$this->field_option( 'basic-options', $field, array(
|
|
|
|
|
73 |
|
74 |
-
|
75 |
-
// Advanced field options
|
76 |
-
|
77 |
|
78 |
-
// Options open markup
|
79 |
-
$this->field_option( 'advanced-options', $field, array(
|
|
|
|
|
80 |
|
81 |
-
// Show Values toggle option
|
82 |
-
$tooltip = __( 'Check this to
|
83 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
84 |
-
$show_values = $this->field_element(
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
-
// Size
|
88 |
$this->field_option( 'size', $field );
|
89 |
|
90 |
-
// Placeholder
|
91 |
$this->field_option( 'placeholder', $field );
|
92 |
|
93 |
-
// Hide label
|
94 |
$this->field_option( 'label_hide', $field );
|
95 |
|
96 |
-
// Custom CSS classes
|
97 |
$this->field_option( 'css', $field );
|
98 |
|
99 |
-
// Dynamic choice auto-populating toggle
|
100 |
$this->field_option( 'dynamic_choices', $field );
|
101 |
|
102 |
-
// Dynamic choice source
|
103 |
$this->field_option( 'dynamic_choices_source', $field );
|
104 |
|
105 |
-
// Options close markup
|
106 |
-
$this->field_option( 'advanced-options', $field, array(
|
|
|
|
|
107 |
}
|
108 |
|
109 |
/**
|
110 |
* Field preview inside the builder.
|
111 |
*
|
112 |
* @since 1.0.0
|
|
|
113 |
* @param array $field
|
114 |
*/
|
115 |
public function field_preview( $field ) {
|
116 |
|
117 |
-
$placeholder = !empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
118 |
-
$values = !empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
119 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
120 |
|
121 |
-
// Label
|
122 |
$this->field_preview_option( 'label', $field );
|
123 |
|
124 |
-
// Field select element
|
125 |
echo '<select class="primary-input" disabled>';
|
126 |
|
127 |
-
// Optional placeholder
|
128 |
-
if ( !empty( $placeholder ) ) {
|
129 |
printf( '<option value="" class="placeholder">%s</option>', $placeholder );
|
130 |
}
|
131 |
|
132 |
// Check to see if this field is configured for Dynamic Choices,
|
133 |
// either auto populating from a post type or a taxonomy.
|
134 |
-
if ( 'post_type'
|
135 |
|
136 |
-
// Post type dynamic populating
|
137 |
$source = $field['dynamic_post_type'];
|
138 |
$args = array(
|
139 |
'post_type' => $source,
|
140 |
'posts_per_page' => -1,
|
141 |
'orderby' => 'title',
|
142 |
-
'order' => 'ASC'
|
143 |
);
|
144 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ), true );
|
145 |
$values = array();
|
146 |
|
147 |
foreach ( $posts as $post ) {
|
148 |
-
$values[] = array(
|
|
|
|
|
149 |
}
|
|
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
// Taxonomy dynamic populating
|
154 |
$source = $field['dynamic_taxonomy'];
|
155 |
$args = array(
|
156 |
'taxonomy' => $source,
|
157 |
'hide_empty' => false,
|
158 |
);
|
159 |
-
$terms
|
|
|
|
|
|
|
160 |
$values = array();
|
161 |
|
162 |
foreach ( $terms as $term ) {
|
163 |
-
$values[] = array(
|
|
|
|
|
164 |
}
|
165 |
}
|
166 |
|
167 |
-
// Notify if currently empty
|
168 |
if ( empty( $values ) ) {
|
169 |
-
$values = array(
|
|
|
|
|
170 |
}
|
171 |
|
172 |
-
// Build the select options (even though user can only see 1st option)
|
173 |
foreach ( $values as $key => $value ) {
|
174 |
|
175 |
$default = isset( $value['default'] ) ? $value['default'] : '';
|
176 |
-
$selected = !empty( $placeholder ) ? '' : selected( '1', $default, false );
|
177 |
|
178 |
printf( '<option %s>%s</option>', $selected, $value['label'] );
|
179 |
}
|
180 |
|
181 |
echo '</select>';
|
182 |
|
183 |
-
// Description
|
184 |
$this->field_preview_option( 'description', $field );
|
185 |
}
|
186 |
|
@@ -188,29 +219,31 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
188 |
* Field display on the form front-end.
|
189 |
*
|
190 |
* @since 1.0.0
|
|
|
191 |
* @param array $field
|
|
|
192 |
* @param array $form_data
|
193 |
*/
|
194 |
public function field_display( $field, $field_atts, $form_data ) {
|
195 |
|
196 |
-
// Setup and sanitize the necessary data
|
197 |
$field = apply_filters( 'wpforms_select_field_display', $field, $field_atts, $form_data );
|
198 |
-
$field_placeholder = !empty( $field['placeholder']) ? esc_attr( $field['placeholder'] ) : '';
|
199 |
-
$field_required = !empty( $field['required'] ) ? ' required' : '';
|
200 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
201 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
202 |
$field_data = '';
|
203 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
204 |
$choices = $field['choices'];
|
205 |
$has_default = false;
|
206 |
|
207 |
-
if ( !empty( $field_atts['input_data'] ) ) {
|
208 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
209 |
$field_data .= ' data-' . $key . '="' . $val . '"';
|
210 |
}
|
211 |
}
|
212 |
|
213 |
-
// Check to see if any of the options have selected by default
|
214 |
foreach ( $choices as $choice ) {
|
215 |
if ( isset( $choice['default'] ) ) {
|
216 |
$has_default = true;
|
@@ -218,7 +251,7 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
218 |
}
|
219 |
}
|
220 |
|
221 |
-
// Primary select field
|
222 |
printf( '<select name="wpforms[fields][%d]" id="%s" class="%s" %s %s>',
|
223 |
$field['id'],
|
224 |
$field_id,
|
@@ -227,22 +260,22 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
227 |
$field_data
|
228 |
);
|
229 |
|
230 |
-
// Optional placeholder
|
231 |
-
if ( !empty( $field_placeholder ) ) {
|
232 |
-
printf('<option value="" class="placeholder" disabled %s>%s</option>', selected( false, $has_default, false ), $field_placeholder );
|
233 |
}
|
234 |
|
235 |
// Check to see if this field is configured for Dynamic Choices,
|
236 |
// either auto populating from a post type or a taxonomy.
|
237 |
-
if ( 'post_type'
|
238 |
|
239 |
-
// Post type dynamic populating
|
240 |
$source = $field['dynamic_post_type'];
|
241 |
$args = array(
|
242 |
'post_type' => $source,
|
243 |
'posts_per_page' => -1,
|
244 |
'orderby' => 'title',
|
245 |
-
'order' => 'ASC'
|
246 |
);
|
247 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] ), true );
|
248 |
$choices = array();
|
@@ -250,34 +283,37 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
250 |
foreach ( $posts as $post ) {
|
251 |
$choices[] = array(
|
252 |
'value' => $post->ID,
|
253 |
-
'label' => $post->post_title
|
254 |
);
|
255 |
}
|
256 |
|
257 |
$field['show_values'] = true;
|
258 |
|
259 |
-
} elseif ( 'taxonomy'
|
260 |
|
261 |
-
// Taxonomy dynamic populating
|
262 |
$source = $field['dynamic_taxonomy'];
|
263 |
$args = array(
|
264 |
'taxonomy' => $source,
|
265 |
'hide_empty' => false,
|
266 |
);
|
267 |
-
$terms
|
|
|
|
|
|
|
268 |
$choices = array();
|
269 |
|
270 |
foreach ( $terms as $term ) {
|
271 |
$choices[] = array(
|
272 |
'value' => $term->term_id,
|
273 |
-
'label' => $term->name
|
274 |
);
|
275 |
}
|
276 |
|
277 |
$field['show_values'] = true;
|
278 |
}
|
279 |
|
280 |
-
// Build the select options
|
281 |
foreach ( $choices as $key => $choice ) {
|
282 |
|
283 |
$selected = isset( $choice['default'] ) && empty( $field_placeholder ) ? '1' : '0' ;
|
@@ -293,14 +329,15 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
293 |
* Formats and sanitizes field.
|
294 |
*
|
295 |
* @since 1.0.2
|
|
|
296 |
* @param int $field_id
|
297 |
-
* @param
|
298 |
* @param array $form_data
|
299 |
*/
|
300 |
public function format( $field_id, $field_submit, $form_data ) {
|
301 |
|
302 |
-
$field = $form_data['fields'][$field_id];
|
303 |
-
$dynamic = !empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
304 |
$name = sanitize_text_field( $field['label'] );
|
305 |
$value_raw = sanitize_text_field( $field_submit );
|
306 |
$value = '';
|
@@ -313,7 +350,7 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
313 |
'type' => $this->type,
|
314 |
);
|
315 |
|
316 |
-
if ( 'post_type'
|
317 |
|
318 |
// Dynamic population is enabled using post type
|
319 |
$data['dynamic'] = 'post_type';
|
@@ -321,11 +358,10 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
321 |
$data['dynamic_post_type'] = $field['dynamic_post_type'];
|
322 |
$post = get_post( $value_raw );
|
323 |
|
324 |
-
if ( ! is_wp_error( $post ) && !empty( $post ) && $data['dynamic_post_type']
|
325 |
$data['value'] = esc_html( $post->post_title );
|
326 |
}
|
327 |
-
|
328 |
-
} elseif ( 'taxonomy' == $dynamic && !empty( $field['dynamic_taxonomy'] ) ) {
|
329 |
|
330 |
// Dynamic population is enabled using taxonomy
|
331 |
$data['dynamic'] = 'taxonomy';
|
@@ -333,17 +369,16 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
333 |
$data['dynamic_taxonomy'] = $field['dynamic_taxonomy'];
|
334 |
$term = get_term( $value_raw, $data['dynamic_taxonomy'] );
|
335 |
|
336 |
-
if ( ! is_wp_error( $term ) && !empty( $term ) ) {
|
337 |
$data['value'] = esc_html( $term->name );
|
338 |
}
|
339 |
-
|
340 |
} else {
|
341 |
|
342 |
-
// Normal processing, dynamic population is off
|
343 |
|
344 |
// If show_values is true, that means values posted are the raw values
|
345 |
// and not the labels. So we need to get the label values.
|
346 |
-
if ( !empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
347 |
|
348 |
foreach ( $field['choices'] as $choice ) {
|
349 |
if ( $choice['value'] === $field_submit ) {
|
@@ -360,7 +395,8 @@ class WPForms_Field_Select extends WPForms_Field {
|
|
360 |
}
|
361 |
|
362 |
// Push field details to be saved
|
363 |
-
wpforms()->process->fields[$field_id] = $data;
|
364 |
}
|
365 |
}
|
|
|
366 |
new WPForms_Field_Select;
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
+
*/
|
11 |
class WPForms_Field_Select extends WPForms_Field {
|
12 |
|
13 |
/**
|
45 |
* Field options panel inside the builder.
|
46 |
*
|
47 |
* @since 1.0.0
|
48 |
+
*
|
49 |
* @param array $field
|
50 |
*/
|
51 |
public function field_options( $field ) {
|
52 |
|
53 |
+
// --------------------------------------------------------------------//
|
54 |
+
// Basic field options.
|
55 |
+
// --------------------------------------------------------------------//
|
56 |
|
57 |
+
// Options open markup.
|
58 |
+
$this->field_option( 'basic-options', $field, array(
|
59 |
+
'markup' => 'open',
|
60 |
+
) );
|
61 |
|
62 |
+
// Label.
|
63 |
$this->field_option( 'label', $field );
|
64 |
|
65 |
+
// Choices.
|
66 |
$this->field_option( 'choices', $field );
|
67 |
|
68 |
+
// Description.
|
69 |
$this->field_option( 'description', $field );
|
70 |
|
71 |
+
// Required toggle.
|
72 |
$this->field_option( 'required', $field );
|
73 |
|
74 |
+
// Options close markup.
|
75 |
+
$this->field_option( 'basic-options', $field, array(
|
76 |
+
'markup' => 'close',
|
77 |
+
) );
|
78 |
|
79 |
+
// --------------------------------------------------------------------//
|
80 |
+
// Advanced field options.
|
81 |
+
// --------------------------------------------------------------------//
|
82 |
|
83 |
+
// Options open markup.
|
84 |
+
$this->field_option( 'advanced-options', $field, array(
|
85 |
+
'markup' => 'open',
|
86 |
+
) );
|
87 |
|
88 |
+
// Show Values toggle option.
|
89 |
+
$tooltip = __( 'Check this to manually set form field values.', 'wpforms' );
|
90 |
$show_values = isset( $field['show_values'] ) ? $field['show_values'] : '0';
|
91 |
+
$show_values = $this->field_element(
|
92 |
+
'checkbox',
|
93 |
+
$field,
|
94 |
+
array(
|
95 |
+
'slug' => 'show_values',
|
96 |
+
'value' => $show_values,
|
97 |
+
'desc' => __( 'Show Values', 'wpforms' ),
|
98 |
+
'tooltip' => $tooltip,
|
99 |
+
),
|
100 |
+
false
|
101 |
+
);
|
102 |
+
$this->field_element( 'row', $field, array(
|
103 |
+
'slug' => 'show_values',
|
104 |
+
'content' => $show_values,
|
105 |
+
) );
|
106 |
|
107 |
+
// Size.
|
108 |
$this->field_option( 'size', $field );
|
109 |
|
110 |
+
// Placeholder.
|
111 |
$this->field_option( 'placeholder', $field );
|
112 |
|
113 |
+
// Hide label.
|
114 |
$this->field_option( 'label_hide', $field );
|
115 |
|
116 |
+
// Custom CSS classes.
|
117 |
$this->field_option( 'css', $field );
|
118 |
|
119 |
+
// Dynamic choice auto-populating toggle.
|
120 |
$this->field_option( 'dynamic_choices', $field );
|
121 |
|
122 |
+
// Dynamic choice source.
|
123 |
$this->field_option( 'dynamic_choices_source', $field );
|
124 |
|
125 |
+
// Options close markup.
|
126 |
+
$this->field_option( 'advanced-options', $field, array(
|
127 |
+
'markup' => 'close',
|
128 |
+
) );
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
* Field preview inside the builder.
|
133 |
*
|
134 |
* @since 1.0.0
|
135 |
+
*
|
136 |
* @param array $field
|
137 |
*/
|
138 |
public function field_preview( $field ) {
|
139 |
|
140 |
+
$placeholder = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
|
141 |
+
$values = ! empty( $field['choices'] ) ? $field['choices'] : $this->defaults;
|
142 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
143 |
|
144 |
+
// Label.
|
145 |
$this->field_preview_option( 'label', $field );
|
146 |
|
147 |
+
// Field select element.
|
148 |
echo '<select class="primary-input" disabled>';
|
149 |
|
150 |
+
// Optional placeholder.
|
151 |
+
if ( ! empty( $placeholder ) ) {
|
152 |
printf( '<option value="" class="placeholder">%s</option>', $placeholder );
|
153 |
}
|
154 |
|
155 |
// Check to see if this field is configured for Dynamic Choices,
|
156 |
// either auto populating from a post type or a taxonomy.
|
157 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
158 |
|
159 |
+
// Post type dynamic populating.
|
160 |
$source = $field['dynamic_post_type'];
|
161 |
$args = array(
|
162 |
'post_type' => $source,
|
163 |
'posts_per_page' => -1,
|
164 |
'orderby' => 'title',
|
165 |
+
'order' => 'ASC',
|
166 |
);
|
167 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $this->form_id ), true );
|
168 |
$values = array();
|
169 |
|
170 |
foreach ( $posts as $post ) {
|
171 |
+
$values[] = array(
|
172 |
+
'label' => $post->post_title,
|
173 |
+
);
|
174 |
}
|
175 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
176 |
|
177 |
+
// Taxonomy dynamic populating.
|
|
|
|
|
178 |
$source = $field['dynamic_taxonomy'];
|
179 |
$args = array(
|
180 |
'taxonomy' => $source,
|
181 |
'hide_empty' => false,
|
182 |
);
|
183 |
+
$terms = wpforms_get_hierarchical_object(
|
184 |
+
apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $this->form_id ),
|
185 |
+
true
|
186 |
+
);
|
187 |
$values = array();
|
188 |
|
189 |
foreach ( $terms as $term ) {
|
190 |
+
$values[] = array(
|
191 |
+
'label' => $term->name,
|
192 |
+
);
|
193 |
}
|
194 |
}
|
195 |
|
196 |
+
// Notify if currently empty.
|
197 |
if ( empty( $values ) ) {
|
198 |
+
$values = array(
|
199 |
+
'label' => __( '(empty)', 'wpforms' ),
|
200 |
+
);
|
201 |
}
|
202 |
|
203 |
+
// Build the select options (even though user can only see 1st option).
|
204 |
foreach ( $values as $key => $value ) {
|
205 |
|
206 |
$default = isset( $value['default'] ) ? $value['default'] : '';
|
207 |
+
$selected = ! empty( $placeholder ) ? '' : selected( '1', $default, false );
|
208 |
|
209 |
printf( '<option %s>%s</option>', $selected, $value['label'] );
|
210 |
}
|
211 |
|
212 |
echo '</select>';
|
213 |
|
214 |
+
// Description.
|
215 |
$this->field_preview_option( 'description', $field );
|
216 |
}
|
217 |
|
219 |
* Field display on the form front-end.
|
220 |
*
|
221 |
* @since 1.0.0
|
222 |
+
*
|
223 |
* @param array $field
|
224 |
+
* @param array $field_atts
|
225 |
* @param array $form_data
|
226 |
*/
|
227 |
public function field_display( $field, $field_atts, $form_data ) {
|
228 |
|
229 |
+
// Setup and sanitize the necessary data.
|
230 |
$field = apply_filters( 'wpforms_select_field_display', $field, $field_atts, $form_data );
|
231 |
+
$field_placeholder = ! empty( $field['placeholder']) ? esc_attr( $field['placeholder'] ) : '';
|
232 |
+
$field_required = ! empty( $field['required'] ) ? ' required' : '';
|
233 |
$field_class = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_class'] ) );
|
234 |
$field_id = implode( ' ', array_map( 'sanitize_html_class', $field_atts['input_id'] ) );
|
235 |
$field_data = '';
|
236 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
237 |
$choices = $field['choices'];
|
238 |
$has_default = false;
|
239 |
|
240 |
+
if ( ! empty( $field_atts['input_data'] ) ) {
|
241 |
foreach ( $field_atts['input_data'] as $key => $val ) {
|
242 |
$field_data .= ' data-' . $key . '="' . $val . '"';
|
243 |
}
|
244 |
}
|
245 |
|
246 |
+
// Check to see if any of the options have selected by default.
|
247 |
foreach ( $choices as $choice ) {
|
248 |
if ( isset( $choice['default'] ) ) {
|
249 |
$has_default = true;
|
251 |
}
|
252 |
}
|
253 |
|
254 |
+
// Primary select field.
|
255 |
printf( '<select name="wpforms[fields][%d]" id="%s" class="%s" %s %s>',
|
256 |
$field['id'],
|
257 |
$field_id,
|
260 |
$field_data
|
261 |
);
|
262 |
|
263 |
+
// Optional placeholder.
|
264 |
+
if ( ! empty( $field_placeholder ) ) {
|
265 |
+
printf( '<option value="" class="placeholder" disabled %s>%s</option>', selected( false, $has_default, false ), $field_placeholder );
|
266 |
}
|
267 |
|
268 |
// Check to see if this field is configured for Dynamic Choices,
|
269 |
// either auto populating from a post type or a taxonomy.
|
270 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
271 |
|
272 |
+
// Post type dynamic populating.
|
273 |
$source = $field['dynamic_post_type'];
|
274 |
$args = array(
|
275 |
'post_type' => $source,
|
276 |
'posts_per_page' => -1,
|
277 |
'orderby' => 'title',
|
278 |
+
'order' => 'ASC',
|
279 |
);
|
280 |
$posts = wpforms_get_hierarchical_object( apply_filters( 'wpforms_dynamic_choice_post_type_args', $args, $field, $form_data['id'] ), true );
|
281 |
$choices = array();
|
283 |
foreach ( $posts as $post ) {
|
284 |
$choices[] = array(
|
285 |
'value' => $post->ID,
|
286 |
+
'label' => $post->post_title,
|
287 |
);
|
288 |
}
|
289 |
|
290 |
$field['show_values'] = true;
|
291 |
|
292 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
293 |
|
294 |
+
// Taxonomy dynamic populating.
|
295 |
$source = $field['dynamic_taxonomy'];
|
296 |
$args = array(
|
297 |
'taxonomy' => $source,
|
298 |
'hide_empty' => false,
|
299 |
);
|
300 |
+
$terms = wpforms_get_hierarchical_object(
|
301 |
+
apply_filters( 'wpforms_dynamic_choice_taxonomy_args', $args, $field, $form_data['id'] ),
|
302 |
+
true
|
303 |
+
);
|
304 |
$choices = array();
|
305 |
|
306 |
foreach ( $terms as $term ) {
|
307 |
$choices[] = array(
|
308 |
'value' => $term->term_id,
|
309 |
+
'label' => $term->name,
|
310 |
);
|
311 |
}
|
312 |
|
313 |
$field['show_values'] = true;
|
314 |
}
|
315 |
|
316 |
+
// Build the select options.
|
317 |
foreach ( $choices as $key => $choice ) {
|
318 |
|
319 |
$selected = isset( $choice['default'] ) && empty( $field_placeholder ) ? '1' : '0' ;
|
329 |
* Formats and sanitizes field.
|
330 |
*
|
331 |
* @since 1.0.2
|
332 |
+
*
|
333 |
* @param int $field_id
|
334 |
+
* @param string $field_submit
|
335 |
* @param array $form_data
|
336 |
*/
|
337 |
public function format( $field_id, $field_submit, $form_data ) {
|
338 |
|
339 |
+
$field = $form_data['fields'][ $field_id ];
|
340 |
+
$dynamic = ! empty( $field['dynamic_choices'] ) ? $field['dynamic_choices'] : false;
|
341 |
$name = sanitize_text_field( $field['label'] );
|
342 |
$value_raw = sanitize_text_field( $field_submit );
|
343 |
$value = '';
|
350 |
'type' => $this->type,
|
351 |
);
|
352 |
|
353 |
+
if ( 'post_type' === $dynamic && ! empty( $field['dynamic_post_type'] ) ) {
|
354 |
|
355 |
// Dynamic population is enabled using post type
|
356 |
$data['dynamic'] = 'post_type';
|
358 |
$data['dynamic_post_type'] = $field['dynamic_post_type'];
|
359 |
$post = get_post( $value_raw );
|
360 |
|
361 |
+
if ( ! is_wp_error( $post ) && ! empty( $post ) && $data['dynamic_post_type'] === $post->post_type ) {
|
362 |
$data['value'] = esc_html( $post->post_title );
|
363 |
}
|
364 |
+
} elseif ( 'taxonomy' === $dynamic && ! empty( $field['dynamic_taxonomy'] ) ) {
|
|
|
365 |
|
366 |
// Dynamic population is enabled using taxonomy
|
367 |
$data['dynamic'] = 'taxonomy';
|
369 |
$data['dynamic_taxonomy'] = $field['dynamic_taxonomy'];
|
370 |
$term = get_term( $value_raw, $data['dynamic_taxonomy'] );
|
371 |
|
372 |
+
if ( ! is_wp_error( $term ) && ! empty( $term ) ) {
|
373 |
$data['value'] = esc_html( $term->name );
|
374 |
}
|
|
|
375 |
} else {
|
376 |
|
377 |
+
// Normal processing, dynamic population is off.
|
378 |
|
379 |
// If show_values is true, that means values posted are the raw values
|
380 |
// and not the labels. So we need to get the label values.
|
381 |
+
if ( ! empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
|
382 |
|
383 |
foreach ( $field['choices'] as $choice ) {
|
384 |
if ( $choice['value'] === $field_submit ) {
|
395 |
}
|
396 |
|
397 |
// Push field details to be saved
|
398 |
+
wpforms()->process->fields[ $field_id ] = $data;
|
399 |
}
|
400 |
}
|
401 |
+
|
402 |
new WPForms_Field_Select;
|
includes/fields/class-textarea.php
CHANGED
@@ -124,11 +124,8 @@ class WPForms_Field_Textarea extends WPForms_Field {
|
|
124 |
if ( ! empty( $primary['attr']['value'] ) ) {
|
125 |
$value = $primary['attr']['value'];
|
126 |
unset( $primary['attr']['value'] );
|
127 |
-
|
128 |
-
|
129 |
-
} else {
|
130 |
-
$value = sanitize_text_field( $value );
|
131 |
-
}
|
132 |
}
|
133 |
|
134 |
// Primary field.
|
124 |
if ( ! empty( $primary['attr']['value'] ) ) {
|
125 |
$value = $primary['attr']['value'];
|
126 |
unset( $primary['attr']['value'] );
|
127 |
+
|
128 |
+
$value = wpforms_sanitize_textarea_field( $value );
|
|
|
|
|
|
|
129 |
}
|
130 |
|
131 |
// Primary field.
|
includes/functions.php
CHANGED
@@ -14,7 +14,8 @@
|
|
14 |
* Helper function to trigger displaying a form.
|
15 |
*
|
16 |
* @since 1.0.2
|
17 |
-
*
|
|
|
18 |
* @param bool $title
|
19 |
* @param bool $desc
|
20 |
*/
|
@@ -27,8 +28,10 @@ function wpforms_display( $form_id = false, $title = false, $desc = false ) {
|
|
27 |
* Performs json_decode and unslash.
|
28 |
*
|
29 |
* @since 1.0.0
|
|
|
30 |
* @param string $data
|
31 |
-
*
|
|
|
32 |
*/
|
33 |
function wpforms_decode( $data ) {
|
34 |
|
@@ -43,13 +46,16 @@ function wpforms_decode( $data ) {
|
|
43 |
* Performs json_encode and wp_slash.
|
44 |
*
|
45 |
* @since 1.3.1.3
|
46 |
-
*
|
|
|
|
|
47 |
* @return string
|
48 |
*/
|
49 |
function wpforms_encode( $data = false ) {
|
50 |
|
51 |
-
if( empty( $data ) )
|
52 |
return false;
|
|
|
53 |
|
54 |
return wp_slash( wp_json_encode( $data ) );
|
55 |
}
|
@@ -58,26 +64,31 @@ function wpforms_encode( $data = false ) {
|
|
58 |
* Check if a string is a valid URL.
|
59 |
*
|
60 |
* @since 1.0.0
|
61 |
-
*
|
|
|
|
|
62 |
* @return bool
|
63 |
*/
|
64 |
function wpforms_is_url( $url ) {
|
65 |
|
66 |
if ( preg_match( '_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS', trim( $url ) ) ) {
|
67 |
return true;
|
68 |
-
} else {
|
69 |
-
return false;
|
70 |
}
|
|
|
|
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
* Get current URL.
|
75 |
*
|
76 |
* @since 1.0.0
|
|
|
77 |
* @return string
|
78 |
*/
|
79 |
function wpforms_current_url() {
|
80 |
-
|
|
|
|
|
81 |
return esc_url_raw( $url );
|
82 |
}
|
83 |
|
@@ -85,18 +96,21 @@ function wpforms_current_url() {
|
|
85 |
* Object to array.
|
86 |
*
|
87 |
* @since 1.1.7
|
|
|
88 |
* @param object $object
|
89 |
-
*
|
|
|
90 |
*/
|
91 |
function wpforms_object_to_array( $object ) {
|
92 |
|
93 |
-
if ( !is_object( $object ) && !is_array( $object ) ) {
|
94 |
return $object;
|
95 |
}
|
96 |
|
97 |
if ( is_object( $object ) ) {
|
98 |
$object = get_object_vars( $object );
|
99 |
}
|
|
|
100 |
return array_map( 'wpforms_object_to_array', $object );
|
101 |
}
|
102 |
|
@@ -104,6 +118,11 @@ function wpforms_object_to_array( $object ) {
|
|
104 |
* Get the value of a specific WPForms setting.
|
105 |
*
|
106 |
* @since 1.0.0
|
|
|
|
|
|
|
|
|
|
|
107 |
* @return mixed
|
108 |
*/
|
109 |
function wpforms_setting( $key, $default = false, $option = 'wpforms_settings' ) {
|
@@ -119,7 +138,9 @@ function wpforms_setting( $key, $default = false, $option = 'wpforms_settings' )
|
|
119 |
* Sanitize key, primarily used for looking up options.
|
120 |
*
|
121 |
* @since 1.3.9
|
|
|
122 |
* @param string $key
|
|
|
123 |
* @return string
|
124 |
*/
|
125 |
function wpforms_sanitize_key( $key = '' ) {
|
@@ -131,8 +152,11 @@ function wpforms_sanitize_key( $key = '' ) {
|
|
131 |
* Check if form provided contains the specified field type.
|
132 |
*
|
133 |
* @since 1.0.5
|
|
|
134 |
* @param string $type
|
135 |
-
* @param
|
|
|
|
|
136 |
* @return bool
|
137 |
*/
|
138 |
function wpforms_has_field_type( $type, $form, $multiple = false ) {
|
@@ -142,26 +166,28 @@ function wpforms_has_field_type( $type, $form, $multiple = false ) {
|
|
142 |
$type = (array) $type;
|
143 |
|
144 |
if ( $multiple ) {
|
145 |
-
foreach( $form as $single_form ) {
|
146 |
$field = wpforms_has_field_type( $type, $single_form );
|
147 |
if ( $field ) {
|
148 |
break;
|
149 |
}
|
150 |
}
|
|
|
151 |
return $field;
|
152 |
} else {
|
153 |
|
154 |
-
if ( is_object( $form ) && !empty( $form->post_content ) ) {
|
155 |
$form_data = wpforms_decode( $form->post_content );
|
156 |
} elseif ( is_array( $form ) ) {
|
157 |
$form_data = $form;
|
158 |
}
|
159 |
|
160 |
-
if ( empty( $form_data['fields'] ) )
|
161 |
return false;
|
|
|
162 |
|
163 |
foreach ( $form_data['fields'] as $single_field ) {
|
164 |
-
if ( in_array( $single_field['type'], $type ) ) {
|
165 |
$field = true;
|
166 |
break;
|
167 |
}
|
@@ -175,6 +201,9 @@ function wpforms_has_field_type( $type, $form, $multiple = false ) {
|
|
175 |
* Checks if form provided contains page breaks, if so give details.
|
176 |
*
|
177 |
* @since 1.0.0
|
|
|
|
|
|
|
178 |
* @return mixed
|
179 |
*/
|
180 |
function wpforms_has_pagebreak( $form = false ) {
|
@@ -183,21 +212,22 @@ function wpforms_has_pagebreak( $form = false ) {
|
|
183 |
$pagebreak = false;
|
184 |
$pages = 1;
|
185 |
|
186 |
-
if ( is_object( $form ) && !empty( $form->post_content ) ) {
|
187 |
$form_data = wpforms_decode( $form->post_content );
|
188 |
} elseif ( is_array( $form ) ) {
|
189 |
$form_data = $form;
|
190 |
}
|
191 |
|
192 |
-
if ( empty( $form_data['fields'] ) )
|
193 |
return false;
|
|
|
194 |
|
195 |
$fields = $form_data['fields'];
|
196 |
|
197 |
foreach ( $fields as $field ) {
|
198 |
-
if ( $field['type']
|
199 |
$pagebreak = true;
|
200 |
-
$pages++;
|
201 |
}
|
202 |
}
|
203 |
|
@@ -212,9 +242,11 @@ function wpforms_has_pagebreak( $form = false ) {
|
|
212 |
* Tries to find and return an top or bottom pagebreak.
|
213 |
*
|
214 |
* @since 1.2.1
|
215 |
-
*
|
216 |
-
* @param
|
217 |
-
* @
|
|
|
|
|
218 |
*/
|
219 |
function wpforms_get_pagebreak( $form = false, $type = false ) {
|
220 |
|
@@ -255,7 +287,9 @@ function wpforms_get_pagebreak( $form = false, $type = false ) {
|
|
255 |
* Returns information about pages if the form has multiple pages.
|
256 |
*
|
257 |
* @since 1.3.7
|
|
|
258 |
* @param mixed $form
|
|
|
259 |
* @return mixed false or an array
|
260 |
*/
|
261 |
function wpforms_get_pagebreak_details( $form = false ) {
|
@@ -277,12 +311,12 @@ function wpforms_get_pagebreak_details( $form = false ) {
|
|
277 |
foreach ( $form_data['fields'] as $field ) {
|
278 |
if ( 'pagebreak' === $field['type'] ) {
|
279 |
if ( empty( $field['position'] ) ) {
|
280 |
-
$pages++;
|
281 |
$details['total'] = $pages;
|
282 |
$details['pages'][] = $field;
|
283 |
-
} elseif ( 'top' === $field['position']
|
284 |
$details['top'] = $field;
|
285 |
-
} elseif ( 'bottom' === $field['position']
|
286 |
$details['bottom'] = $field;
|
287 |
}
|
288 |
}
|
@@ -296,6 +330,7 @@ function wpforms_get_pagebreak_details( $form = false ) {
|
|
296 |
$details['bottom'] = array();
|
297 |
}
|
298 |
$details['current'] = 1;
|
|
|
299 |
return $details;
|
300 |
} else {
|
301 |
return false;
|
@@ -307,11 +342,13 @@ function wpforms_get_pagebreak_details( $form = false ) {
|
|
307 |
* and data attributes.
|
308 |
*
|
309 |
* @since 1.3.7
|
|
|
310 |
* @param string $id
|
311 |
* @param array $class
|
312 |
* @param array $datas
|
313 |
* @param array $atts
|
314 |
* @param bool $echo
|
|
|
315 |
* @return string
|
316 |
*/
|
317 |
function wpforms_html_attributes( $id = '', $class = array(), $datas = array(), $atts = array(), $echo = false ) {
|
@@ -352,9 +389,11 @@ function wpforms_html_attributes( $id = '', $class = array(), $datas = array(),
|
|
352 |
* Sanitizes string of CSS classes.
|
353 |
*
|
354 |
* @since 1.2.1
|
|
|
355 |
* @param string $classes
|
356 |
* @param bool $convert True will convert strings to array and vice versa.
|
357 |
-
*
|
|
|
358 |
*/
|
359 |
function wpforms_sanitize_classes( $classes, $convert = false ) {
|
360 |
|
@@ -381,7 +420,9 @@ function wpforms_sanitize_classes( $classes, $convert = false ) {
|
|
381 |
*
|
382 |
* @since 1.0.0
|
383 |
* @link http://stackoverflow.com/a/22500394
|
|
|
384 |
* @param string $size
|
|
|
385 |
* @return int
|
386 |
*/
|
387 |
function wpforms_size_to_bytes( $size ) {
|
@@ -390,10 +431,10 @@ function wpforms_size_to_bytes( $size ) {
|
|
390 |
return $size;
|
391 |
}
|
392 |
|
393 |
-
$suffix = substr( $size, -1 );
|
394 |
-
$value
|
395 |
|
396 |
-
switch( strtoupper( $suffix ) ) {
|
397 |
case 'P':
|
398 |
$value *= 1024;
|
399 |
case 'T':
|
@@ -406,6 +447,7 @@ function wpforms_size_to_bytes( $size ) {
|
|
406 |
$value *= 1024;
|
407 |
break;
|
408 |
}
|
|
|
409 |
return $value;
|
410 |
}
|
411 |
|
@@ -413,15 +455,17 @@ function wpforms_size_to_bytes( $size ) {
|
|
413 |
* Convert bytes to megabytes (or in some cases KB).
|
414 |
*
|
415 |
* @since 1.0.0
|
|
|
416 |
* @param int $bytes
|
|
|
417 |
* @return string
|
418 |
*/
|
419 |
function wpforms_size_to_megabytes( $bytes ) {
|
420 |
|
421 |
if ( $bytes < 1048676 ) {
|
422 |
-
return number_format( $bytes/1024, 1 ) .
|
423 |
} else {
|
424 |
-
return round( number_format( $bytes/1048576, 1 ) ) .
|
425 |
}
|
426 |
}
|
427 |
|
@@ -430,8 +474,10 @@ function wpforms_size_to_megabytes( $bytes ) {
|
|
430 |
*
|
431 |
* @since 1.0.0
|
432 |
* @link http://stackoverflow.com/a/22500394
|
433 |
-
*
|
434 |
-
* @
|
|
|
|
|
435 |
*/
|
436 |
function wpforms_max_upload( $bytes = false ) {
|
437 |
|
@@ -450,7 +496,10 @@ function wpforms_max_upload( $bytes = false ) {
|
|
450 |
* automatically excluded. Optionally a white list can be provided.
|
451 |
*
|
452 |
* @since 1.0.0
|
|
|
453 |
* @param mixed $form
|
|
|
|
|
454 |
* @return mixed boolean or array
|
455 |
*/
|
456 |
function wpforms_get_form_fields( $form = false, $whitelist = array() ) {
|
@@ -459,11 +508,17 @@ function wpforms_get_form_fields( $form = false, $whitelist = array() ) {
|
|
459 |
if ( is_object( $form ) ) {
|
460 |
$form = wpforms_decode( $form->post_content );
|
461 |
} elseif ( is_numeric( $form ) ) {
|
462 |
-
$form = wpforms()->form->get(
|
|
|
|
|
|
|
|
|
|
|
463 |
}
|
464 |
|
465 |
-
if ( !is_array( $form ) || empty( $form['fields'] ) )
|
466 |
return false;
|
|
|
467 |
|
468 |
// White list of field types to allow
|
469 |
$allowed_form_fields = array(
|
@@ -488,13 +543,13 @@ function wpforms_get_form_fields( $form = false, $whitelist = array() ) {
|
|
488 |
);
|
489 |
$allowed_form_fields = apply_filters( 'wpforms_get_form_fields_allowed', $allowed_form_fields );
|
490 |
|
491 |
-
$whitelist = !empty( $whitelist ) ? $whitelist : $allowed_form_fields;
|
492 |
|
493 |
$form_fields = $form['fields'];
|
494 |
|
495 |
-
foreach( $form_fields as $id => $form_field ) {
|
496 |
-
if ( !in_array( $form_field['type'], $whitelist ) ) {
|
497 |
-
unset( $form_fields[$id] );
|
498 |
}
|
499 |
}
|
500 |
|
@@ -505,9 +560,11 @@ function wpforms_get_form_fields( $form = false, $whitelist = array() ) {
|
|
505 |
* Get meta key value for a form field.
|
506 |
*
|
507 |
* @since 1.1.9
|
508 |
-
*
|
509 |
-
* @param string $
|
510 |
-
* @param
|
|
|
|
|
511 |
* @return string
|
512 |
*/
|
513 |
function wpforms_get_form_field_meta( $id = '', $key = '', $form_data = '' ) {
|
@@ -516,8 +573,8 @@ function wpforms_get_form_field_meta( $id = '', $key = '', $form_data = '' ) {
|
|
516 |
return '';
|
517 |
}
|
518 |
|
519 |
-
if ( !empty( $form_data['fields'][$id]['meta'][$key] ) ) {
|
520 |
-
return $form_data['fields'][$id]['meta'][$key];
|
521 |
} else {
|
522 |
return '';
|
523 |
}
|
@@ -527,8 +584,11 @@ function wpforms_get_form_field_meta( $id = '', $key = '', $form_data = '' ) {
|
|
527 |
* Get meta key value for a form field.
|
528 |
*
|
529 |
* @since 1.3.1
|
530 |
-
*
|
531 |
-
* @param
|
|
|
|
|
|
|
532 |
* @return string
|
533 |
*/
|
534 |
function wpforms_get_form_fields_by_meta( $key = '', $value = '', $form_data = '' ) {
|
@@ -539,14 +599,14 @@ function wpforms_get_form_fields_by_meta( $key = '', $value = '', $form_data = '
|
|
539 |
|
540 |
$found = array();
|
541 |
|
542 |
-
foreach( $form_data['fields'] as $id => $field ) {
|
543 |
|
544 |
-
if ( !empty( $field['meta'][$key] ) && $value == $field['meta'][$key] ) {
|
545 |
-
$found[$id] = $field;
|
546 |
}
|
547 |
}
|
548 |
|
549 |
-
if ( !empty( $found ) ) {
|
550 |
return $found;
|
551 |
} else {
|
552 |
return false;
|
@@ -614,6 +674,7 @@ function wpforms_us_states() {
|
|
614 |
'WI' => 'Wisconsin',
|
615 |
'WY' => 'Wyoming',
|
616 |
);
|
|
|
617 |
return apply_filters( 'wpforms_us_states', $states );
|
618 |
}
|
619 |
|
@@ -642,7 +703,7 @@ function wpforms_countries() {
|
|
642 |
'AC' => 'Ascension Island',
|
643 |
'AU' => 'Australia',
|
644 |
'AT' => 'Austria',
|
645 |
-
'AZ' => 'Azerbaijan
|
646 |
'BS' => 'Bahamas',
|
647 |
'BH' => 'Bahrain',
|
648 |
'BD' => 'Bangladesh',
|
@@ -673,7 +734,7 @@ function wpforms_countries() {
|
|
673 |
'KY' => 'Cayman Islands',
|
674 |
'CF' => 'Central African Republic',
|
675 |
'EA' => 'Ceuta and Melilla',
|
676 |
-
'TD' => 'Chad
|
677 |
'CL' => 'Chile',
|
678 |
'CN' => 'China',
|
679 |
'CX' => 'Christmas Island',
|
@@ -699,7 +760,7 @@ function wpforms_countries() {
|
|
699 |
'EC' => 'Ecuador',
|
700 |
'EG' => 'Egypt',
|
701 |
'SV' => 'El Salvador',
|
702 |
-
'GQ' => 'Equatorial Guinea
|
703 |
'ER' => 'Eritrea',
|
704 |
'EE' => 'Estonia',
|
705 |
'ET' => 'Ethiopia',
|
@@ -730,7 +791,7 @@ function wpforms_countries() {
|
|
730 |
'HT' => 'Haiti',
|
731 |
'HM' => 'Heard & McDonald Islands',
|
732 |
'HN' => 'Honduras',
|
733 |
-
'HK' => 'Hong Kong
|
734 |
'HU' => 'Hungary',
|
735 |
'IS' => 'Iceland',
|
736 |
'IN' => 'India',
|
@@ -745,7 +806,7 @@ function wpforms_countries() {
|
|
745 |
'JP' => 'Japan',
|
746 |
'JE' => 'Jersey',
|
747 |
'JO' => 'Jordan',
|
748 |
-
'KZ' => 'Kazakhstan
|
749 |
'KE' => 'Kenya',
|
750 |
'KI' => 'Kiribati',
|
751 |
'XK' => 'Kosovo',
|
@@ -771,7 +832,7 @@ function wpforms_countries() {
|
|
771 |
'MH' => 'Marshall Islands',
|
772 |
'MQ' => 'Martinique',
|
773 |
'MR' => 'Mauritania',
|
774 |
-
'MU' => 'Mauritius
|
775 |
'YT' => 'Mayotte',
|
776 |
'MX' => 'Mexico',
|
777 |
'FM' => 'Micronesia',
|
@@ -819,7 +880,7 @@ function wpforms_countries() {
|
|
819 |
'SH' => 'Saint Helena',
|
820 |
'KN' => 'Saint Kitts and Nevis',
|
821 |
'LC' => 'Saint Lucia',
|
822 |
-
'MF' => 'Saint Martin
|
823 |
'PM' => 'Saint Pierre and Miquelon',
|
824 |
'WS' => 'Samoa',
|
825 |
'SM' => 'San Marino',
|
@@ -883,6 +944,7 @@ function wpforms_countries() {
|
|
883 |
'ZM' => 'Zambia',
|
884 |
'ZW' => 'Zimbabwe',
|
885 |
);
|
|
|
886 |
return apply_filters( 'wpforms_countries', $countries );
|
887 |
}
|
888 |
|
@@ -908,6 +970,7 @@ function wpforms_months() {
|
|
908 |
'Nov' => 'November',
|
909 |
'Dec' => 'December',
|
910 |
);
|
|
|
911 |
return apply_filters( 'wpforms_months', $months );
|
912 |
}
|
913 |
|
@@ -928,6 +991,7 @@ function wpforms_days() {
|
|
928 |
'Fri' => 'Friday',
|
929 |
'Sat' => 'Saturday',
|
930 |
);
|
|
|
931 |
return apply_filters( 'wpforms_days', $days );
|
932 |
}
|
933 |
|
@@ -948,11 +1012,13 @@ function wpforms_get_ip() {
|
|
948 |
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
949 |
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
|
950 |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
951 |
-
} elseif( ! empty( $_SERVER['REMOTE_ADDR'] ) ) {
|
952 |
$ip = $_SERVER['REMOTE_ADDR'];
|
953 |
}
|
|
|
954 |
// Fix potential CSV returned from $_SERVER variables
|
955 |
$ip_array = array_map( 'trim', explode( ',', $ip ) );
|
|
|
956 |
return $ip_array[0];
|
957 |
}
|
958 |
|
@@ -960,7 +1026,9 @@ function wpforms_get_ip() {
|
|
960 |
* Sanitizes hex color.
|
961 |
*
|
962 |
* @since 1.2.1
|
|
|
963 |
* @param string $color
|
|
|
964 |
* @return string
|
965 |
*/
|
966 |
function wpforms_sanitize_hex_color( $color ) {
|
@@ -970,16 +1038,20 @@ function wpforms_sanitize_hex_color( $color ) {
|
|
970 |
}
|
971 |
|
972 |
// 3 or 6 hex digits, or the empty string.
|
973 |
-
if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
|
974 |
return $color;
|
975 |
}
|
|
|
|
|
976 |
}
|
977 |
|
978 |
/**
|
979 |
* Sanitizes error message, primarily used during form frontend output.
|
980 |
*
|
981 |
* @since 1.3.7
|
|
|
982 |
* @param string $error
|
|
|
983 |
* @return string
|
984 |
*/
|
985 |
function wpforms_sanitize_error( $error = '' ) {
|
@@ -994,17 +1066,65 @@ function wpforms_sanitize_error( $error = '' ) {
|
|
994 |
'strong' => array(),
|
995 |
'p' => array(),
|
996 |
);
|
|
|
997 |
return wp_kses( $error, $allow );
|
998 |
}
|
999 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1000 |
/**
|
1001 |
* Detect if we should use a light or dark color based on the color given.
|
1002 |
*
|
1003 |
* @since 1.2.5
|
1004 |
* @link https://docs.woocommerce.com/wc-apidocs/source-function-wc_light_or_dark.html#608-627
|
|
|
1005 |
* @param mixed $color
|
1006 |
-
* @param string $dark (default: '#000000')
|
1007 |
-
* @param string $light (default: '#FFFFFF')
|
|
|
1008 |
* @return string
|
1009 |
*/
|
1010 |
function wpforms_light_or_dark( $color, $dark = '#000000', $light = '#FFFFFF' ) {
|
@@ -1022,12 +1142,14 @@ function wpforms_light_or_dark( $color, $dark = '#000000', $light = '#FFFFFF' )
|
|
1022 |
|
1023 |
/**
|
1024 |
* Builds and returns either a taxonomy or post type object that is
|
1025 |
-
* nests to
|
1026 |
*
|
1027 |
* @since 1.3.9
|
|
|
1028 |
* @param array $args
|
1029 |
* @param bool $flat
|
1030 |
-
*
|
|
|
1031 |
*/
|
1032 |
function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
1033 |
|
@@ -1040,8 +1162,8 @@ function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
|
1040 |
|
1041 |
if ( ! empty( $args['post_type'] ) ) {
|
1042 |
|
1043 |
-
$defaults
|
1044 |
-
'posts_per_page' => -1,
|
1045 |
'orderby' => 'title',
|
1046 |
'order' => 'ASC',
|
1047 |
);
|
@@ -1053,7 +1175,7 @@ function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
|
1053 |
|
1054 |
} elseif ( ! empty( $args['taxonomy'] ) ) {
|
1055 |
|
1056 |
-
$defaults
|
1057 |
'hide_empty' => false,
|
1058 |
);
|
1059 |
$args = wp_parse_args( $args, $defaults );
|
@@ -1069,15 +1191,16 @@ function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
|
1069 |
|
1070 |
foreach ( $items as $item ) {
|
1071 |
if ( $item->{$ref_parent} ) {
|
1072 |
-
$children[ $item->{$ref_id} ]
|
1073 |
$children[ $item->{$ref_id} ]->ID = (int) $item->{$ref_id};
|
1074 |
} else {
|
1075 |
-
$parents[ $item->{$ref_id} ]
|
1076 |
$parents[ $item->{$ref_id} ]->ID = (int) $item->{$ref_id};
|
1077 |
}
|
1078 |
}
|
1079 |
|
1080 |
-
|
|
|
1081 |
foreach ( $children as $child ) {
|
1082 |
_wpforms_get_hierarchical_object_search( $child, $parents, $children, $ref_parent );
|
1083 |
}
|
@@ -1086,6 +1209,7 @@ function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
|
1086 |
if ( $flat ) {
|
1087 |
$parents_flat = array();
|
1088 |
_wpforms_get_hierarchical_object_flatten( $parents, $parents_flat, $ref_name );
|
|
|
1089 |
return $parents_flat;
|
1090 |
}
|
1091 |
|
@@ -1096,7 +1220,8 @@ function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
|
1096 |
* Searches a given array and finds the parent of the provided object.
|
1097 |
*
|
1098 |
* @since 1.3.9
|
1099 |
-
*
|
|
|
1100 |
* @param array $parents
|
1101 |
* @param array $children
|
1102 |
* @param string $ref_parent
|
@@ -1108,14 +1233,16 @@ function _wpforms_get_hierarchical_object_search( $child, &$parents, &$children,
|
|
1108 |
if ( $parent->ID === $child->{$ref_parent} ) {
|
1109 |
|
1110 |
if ( empty( $parent->children ) ) {
|
1111 |
-
$parents[ $id ]->children = array(
|
|
|
|
|
1112 |
} else {
|
1113 |
$parents[ $id ]->children[ $child->ID ] = $child;
|
1114 |
}
|
1115 |
|
1116 |
unset( $children[ $child->ID ] );
|
1117 |
|
1118 |
-
}
|
1119 |
|
1120 |
_wpforms_get_hierarchical_object_search( $child, $parent->children, $children, $ref_parent );
|
1121 |
}
|
@@ -1123,9 +1250,10 @@ function _wpforms_get_hierarchical_object_search( $child, &$parents, &$children,
|
|
1123 |
}
|
1124 |
|
1125 |
/**
|
1126 |
-
* Flattens a
|
1127 |
*
|
1128 |
* @since 1.3.9
|
|
|
1129 |
* @param array $array
|
1130 |
* @param array $output
|
1131 |
* @param string $ref_name
|
@@ -1142,7 +1270,7 @@ function _wpforms_get_hierarchical_object_flatten( $array, &$output, $ref_name =
|
|
1142 |
|
1143 |
if ( ! empty( $item->children ) ) {
|
1144 |
|
1145 |
-
_wpforms_get_hierarchical_object_flatten( $item->children, $output, $ref_name, $level + 1);
|
1146 |
unset( $output[ $item->ID ]->children );
|
1147 |
}
|
1148 |
}
|
@@ -1153,17 +1281,19 @@ function _wpforms_get_hierarchical_object_flatten( $array, &$output, $ref_name =
|
|
1153 |
*
|
1154 |
* @since 1.3.9
|
1155 |
* @link https://gist.github.com/scribu/588429
|
1156 |
-
*
|
1157 |
-
* @param array $
|
1158 |
-
* @param
|
1159 |
-
* @param string $
|
|
|
|
|
1160 |
* @return array
|
1161 |
*/
|
1162 |
function wpforms_array_insert( $array, $pairs, $key, $position = 'after' ) {
|
1163 |
|
1164 |
-
$key_pos = array_search( $key, array_keys( $array ) );
|
1165 |
-
if ( 'after'
|
1166 |
-
$key_pos++;
|
1167 |
}
|
1168 |
|
1169 |
if ( false !== $key_pos ) {
|
@@ -1181,7 +1311,9 @@ function wpforms_array_insert( $array, $pairs, $key, $position = 'after' ) {
|
|
1181 |
* Recursively remove empty strings from an array.
|
1182 |
*
|
1183 |
* @since 1.3.9.1
|
|
|
1184 |
* @param array $data
|
|
|
1185 |
* @return array
|
1186 |
*/
|
1187 |
function wpforms_array_remove_empty_strings( $data ) {
|
@@ -1203,6 +1335,8 @@ function wpforms_array_remove_empty_strings( $data ) {
|
|
1203 |
* Debug mode bool.
|
1204 |
*
|
1205 |
* @since 1.2.3
|
|
|
|
|
1206 |
*/
|
1207 |
function wpforms_debug() {
|
1208 |
|
@@ -1216,7 +1350,7 @@ function wpforms_debug() {
|
|
1216 |
|
1217 |
if ( $debug_option ) {
|
1218 |
$current_user = wp_get_current_user();
|
1219 |
-
if ( $current_user->user_login
|
1220 |
$debug = true;
|
1221 |
}
|
1222 |
}
|
@@ -1228,7 +1362,10 @@ function wpforms_debug() {
|
|
1228 |
* Helper function to display debug data.
|
1229 |
*
|
1230 |
* @since 1.0.0
|
1231 |
-
*
|
|
|
|
|
|
|
1232 |
* @return string
|
1233 |
*/
|
1234 |
function wpforms_debug_data( $data, $echo = true ) {
|
@@ -1237,13 +1374,13 @@ function wpforms_debug_data( $data, $echo = true ) {
|
|
1237 |
|
1238 |
$output = '<textarea style="background:#fff;margin: 20px 0;width:100%;height:500px;font-size:12px;font-family: Consolas,Monaco,monospace;direction: ltr;unicode-bidi: embed;line-height: 1.4;padding: 4px 6px 1px;" readonly>';
|
1239 |
|
1240 |
-
|
1241 |
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
|
1248 |
$output .= '</textarea>';
|
1249 |
|
@@ -1259,15 +1396,17 @@ function wpforms_debug_data( $data, $echo = true ) {
|
|
1259 |
* Log helper.
|
1260 |
*
|
1261 |
* @since 1.0.0
|
|
|
1262 |
* @param string $title
|
1263 |
* @param string $message
|
1264 |
* @param array $args
|
1265 |
*/
|
1266 |
-
function wpforms_log( $title = '', $message = '', $args = array()
|
1267 |
|
1268 |
// Require log title
|
1269 |
-
if ( empty( $title ) )
|
1270 |
return;
|
|
|
1271 |
|
1272 |
// Force logging everything when in debug mode
|
1273 |
if ( ! wpforms_debug() ) {
|
@@ -1282,25 +1421,26 @@ function wpforms_log( $title = '', $message = '', $args = array() ) {
|
|
1282 |
* - Providers (provider)
|
1283 |
* - Conditional Logic (conditional_logic)
|
1284 |
*/
|
1285 |
-
$type = !empty( $args['type'] ) ? (array) $args['type'] : array( 'error' );
|
1286 |
-
$levels = get_option( 'wpforms_logging', array() );
|
1287 |
-
|
1288 |
-
if ( empty( $lvls ) ) {
|
1289 |
return;
|
1290 |
}
|
1291 |
}
|
1292 |
|
1293 |
-
// Meta
|
1294 |
-
if ( !empty( $args['form_id'] ) ) {
|
1295 |
-
$meta = array(
|
1296 |
-
|
|
|
|
|
1297 |
$meta = $args['meta'];
|
1298 |
} else {
|
1299 |
$meta = '';
|
1300 |
}
|
1301 |
|
1302 |
-
// Parent
|
1303 |
-
$parent = !empty( $args['parent'] ) ? $args['parent'] : 0;
|
1304 |
|
1305 |
// Make arrays and objects look nice
|
1306 |
if ( is_array( $message ) || is_object( $message ) ) {
|
@@ -1313,27 +1453,28 @@ function wpforms_log( $title = '', $message = '', $args = array() ) {
|
|
1313 |
|
1314 |
/**
|
1315 |
* Array replace recursive, for PHP 5.2.
|
1316 |
-
*
|
1317 |
*/
|
1318 |
if ( ! function_exists( 'array_replace_recursive' ) ) :
|
1319 |
/**
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
|
|
|
|
1337 |
function array_replace_recursive( $base = array(), $replacements = array() ) {
|
1338 |
// PHP 5.2-compatible version
|
1339 |
// http://php.net/manual/en/function.array-replace-recursive.php#109390.
|
@@ -1355,6 +1496,58 @@ if ( ! function_exists( 'array_replace_recursive' ) ) :
|
|
1355 |
}
|
1356 |
} while ( count( $head_stack ) );
|
1357 |
}
|
|
|
1358 |
return $base;
|
1359 |
}
|
1360 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
* Helper function to trigger displaying a form.
|
15 |
*
|
16 |
* @since 1.0.2
|
17 |
+
*
|
18 |
+
* @param mixed $form_id
|
19 |
* @param bool $title
|
20 |
* @param bool $desc
|
21 |
*/
|
28 |
* Performs json_decode and unslash.
|
29 |
*
|
30 |
* @since 1.0.0
|
31 |
+
*
|
32 |
* @param string $data
|
33 |
+
*
|
34 |
+
* @return array|bool
|
35 |
*/
|
36 |
function wpforms_decode( $data ) {
|
37 |
|
46 |
* Performs json_encode and wp_slash.
|
47 |
*
|
48 |
* @since 1.3.1.3
|
49 |
+
*
|
50 |
+
* @param mixed $data
|
51 |
+
*
|
52 |
* @return string
|
53 |
*/
|
54 |
function wpforms_encode( $data = false ) {
|
55 |
|
56 |
+
if ( empty( $data ) ) {
|
57 |
return false;
|
58 |
+
}
|
59 |
|
60 |
return wp_slash( wp_json_encode( $data ) );
|
61 |
}
|
64 |
* Check if a string is a valid URL.
|
65 |
*
|
66 |
* @since 1.0.0
|
67 |
+
*
|
68 |
+
* @param string $url
|
69 |
+
*
|
70 |
* @return bool
|
71 |
*/
|
72 |
function wpforms_is_url( $url ) {
|
73 |
|
74 |
if ( preg_match( '_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS', trim( $url ) ) ) {
|
75 |
return true;
|
|
|
|
|
76 |
}
|
77 |
+
|
78 |
+
return false;
|
79 |
}
|
80 |
|
81 |
/**
|
82 |
* Get current URL.
|
83 |
*
|
84 |
* @since 1.0.0
|
85 |
+
*
|
86 |
* @return string
|
87 |
*/
|
88 |
function wpforms_current_url() {
|
89 |
+
|
90 |
+
$url = ( ! empty( $_SERVER['HTTPS'] ) ) ? 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
91 |
+
|
92 |
return esc_url_raw( $url );
|
93 |
}
|
94 |
|
96 |
* Object to array.
|
97 |
*
|
98 |
* @since 1.1.7
|
99 |
+
*
|
100 |
* @param object $object
|
101 |
+
*
|
102 |
+
* @return mixed
|
103 |
*/
|
104 |
function wpforms_object_to_array( $object ) {
|
105 |
|
106 |
+
if ( ! is_object( $object ) && ! is_array( $object ) ) {
|
107 |
return $object;
|
108 |
}
|
109 |
|
110 |
if ( is_object( $object ) ) {
|
111 |
$object = get_object_vars( $object );
|
112 |
}
|
113 |
+
|
114 |
return array_map( 'wpforms_object_to_array', $object );
|
115 |
}
|
116 |
|
118 |
* Get the value of a specific WPForms setting.
|
119 |
*
|
120 |
* @since 1.0.0
|
121 |
+
*
|
122 |
+
* @param string $key
|
123 |
+
* @param mixed $default
|
124 |
+
* @param string $option
|
125 |
+
*
|
126 |
* @return mixed
|
127 |
*/
|
128 |
function wpforms_setting( $key, $default = false, $option = 'wpforms_settings' ) {
|
138 |
* Sanitize key, primarily used for looking up options.
|
139 |
*
|
140 |
* @since 1.3.9
|
141 |
+
*
|
142 |
* @param string $key
|
143 |
+
*
|
144 |
* @return string
|
145 |
*/
|
146 |
function wpforms_sanitize_key( $key = '' ) {
|
152 |
* Check if form provided contains the specified field type.
|
153 |
*
|
154 |
* @since 1.0.5
|
155 |
+
*
|
156 |
* @param string $type
|
157 |
+
* @param array $form
|
158 |
+
* @param bool $multiple
|
159 |
+
*
|
160 |
* @return bool
|
161 |
*/
|
162 |
function wpforms_has_field_type( $type, $form, $multiple = false ) {
|
166 |
$type = (array) $type;
|
167 |
|
168 |
if ( $multiple ) {
|
169 |
+
foreach ( $form as $single_form ) {
|
170 |
$field = wpforms_has_field_type( $type, $single_form );
|
171 |
if ( $field ) {
|
172 |
break;
|
173 |
}
|
174 |
}
|
175 |
+
|
176 |
return $field;
|
177 |
} else {
|
178 |
|
179 |
+
if ( is_object( $form ) && ! empty( $form->post_content ) ) {
|
180 |
$form_data = wpforms_decode( $form->post_content );
|
181 |
} elseif ( is_array( $form ) ) {
|
182 |
$form_data = $form;
|
183 |
}
|
184 |
|
185 |
+
if ( empty( $form_data['fields'] ) ) {
|
186 |
return false;
|
187 |
+
}
|
188 |
|
189 |
foreach ( $form_data['fields'] as $single_field ) {
|
190 |
+
if ( in_array( $single_field['type'], $type, true ) ) {
|
191 |
$field = true;
|
192 |
break;
|
193 |
}
|
201 |
* Checks if form provided contains page breaks, if so give details.
|
202 |
*
|
203 |
* @since 1.0.0
|
204 |
+
*
|
205 |
+
* @param mixed $form
|
206 |
+
*
|
207 |
* @return mixed
|
208 |
*/
|
209 |
function wpforms_has_pagebreak( $form = false ) {
|
212 |
$pagebreak = false;
|
213 |
$pages = 1;
|
214 |
|
215 |
+
if ( is_object( $form ) && ! empty( $form->post_content ) ) {
|
216 |
$form_data = wpforms_decode( $form->post_content );
|
217 |
} elseif ( is_array( $form ) ) {
|
218 |
$form_data = $form;
|
219 |
}
|
220 |
|
221 |
+
if ( empty( $form_data['fields'] ) ) {
|
222 |
return false;
|
223 |
+
}
|
224 |
|
225 |
$fields = $form_data['fields'];
|
226 |
|
227 |
foreach ( $fields as $field ) {
|
228 |
+
if ( 'pagebreak' === $field['type'] && empty( $field['position'] ) ) {
|
229 |
$pagebreak = true;
|
230 |
+
$pages ++;
|
231 |
}
|
232 |
}
|
233 |
|
242 |
* Tries to find and return an top or bottom pagebreak.
|
243 |
*
|
244 |
* @since 1.2.1
|
245 |
+
*
|
246 |
+
* @param mixed $form
|
247 |
+
* @param mixed $type
|
248 |
+
*
|
249 |
+
* @return array|bool
|
250 |
*/
|
251 |
function wpforms_get_pagebreak( $form = false, $type = false ) {
|
252 |
|
287 |
* Returns information about pages if the form has multiple pages.
|
288 |
*
|
289 |
* @since 1.3.7
|
290 |
+
*
|
291 |
* @param mixed $form
|
292 |
+
*
|
293 |
* @return mixed false or an array
|
294 |
*/
|
295 |
function wpforms_get_pagebreak_details( $form = false ) {
|
311 |
foreach ( $form_data['fields'] as $field ) {
|
312 |
if ( 'pagebreak' === $field['type'] ) {
|
313 |
if ( empty( $field['position'] ) ) {
|
314 |
+
$pages ++;
|
315 |
$details['total'] = $pages;
|
316 |
$details['pages'][] = $field;
|
317 |
+
} elseif ( 'top' === $field['position'] ) {
|
318 |
$details['top'] = $field;
|
319 |
+
} elseif ( 'bottom' === $field['position'] ) {
|
320 |
$details['bottom'] = $field;
|
321 |
}
|
322 |
}
|
330 |
$details['bottom'] = array();
|
331 |
}
|
332 |
$details['current'] = 1;
|
333 |
+
|
334 |
return $details;
|
335 |
} else {
|
336 |
return false;
|
342 |
* and data attributes.
|
343 |
*
|
344 |
* @since 1.3.7
|
345 |
+
*
|
346 |
* @param string $id
|
347 |
* @param array $class
|
348 |
* @param array $datas
|
349 |
* @param array $atts
|
350 |
* @param bool $echo
|
351 |
+
*
|
352 |
* @return string
|
353 |
*/
|
354 |
function wpforms_html_attributes( $id = '', $class = array(), $datas = array(), $atts = array(), $echo = false ) {
|
389 |
* Sanitizes string of CSS classes.
|
390 |
*
|
391 |
* @since 1.2.1
|
392 |
+
*
|
393 |
* @param string $classes
|
394 |
* @param bool $convert True will convert strings to array and vice versa.
|
395 |
+
*
|
396 |
+
* @return string|array
|
397 |
*/
|
398 |
function wpforms_sanitize_classes( $classes, $convert = false ) {
|
399 |
|
420 |
*
|
421 |
* @since 1.0.0
|
422 |
* @link http://stackoverflow.com/a/22500394
|
423 |
+
*
|
424 |
* @param string $size
|
425 |
+
*
|
426 |
* @return int
|
427 |
*/
|
428 |
function wpforms_size_to_bytes( $size ) {
|
431 |
return $size;
|
432 |
}
|
433 |
|
434 |
+
$suffix = substr( $size, - 1 );
|
435 |
+
$value = substr( $size, 0, - 1 );
|
436 |
|
437 |
+
switch ( strtoupper( $suffix ) ) {
|
438 |
case 'P':
|
439 |
$value *= 1024;
|
440 |
case 'T':
|
447 |
$value *= 1024;
|
448 |
break;
|
449 |
}
|
450 |
+
|
451 |
return $value;
|
452 |
}
|
453 |
|
455 |
* Convert bytes to megabytes (or in some cases KB).
|
456 |
*
|
457 |
* @since 1.0.0
|
458 |
+
*
|
459 |
* @param int $bytes
|
460 |
+
*
|
461 |
* @return string
|
462 |
*/
|
463 |
function wpforms_size_to_megabytes( $bytes ) {
|
464 |
|
465 |
if ( $bytes < 1048676 ) {
|
466 |
+
return number_format( $bytes / 1024, 1 ) . ' KB';
|
467 |
} else {
|
468 |
+
return round( number_format( $bytes / 1048576, 1 ) ) . ' MB';
|
469 |
}
|
470 |
}
|
471 |
|
474 |
*
|
475 |
* @since 1.0.0
|
476 |
* @link http://stackoverflow.com/a/22500394
|
477 |
+
*
|
478 |
+
* @param bool $bytes
|
479 |
+
*
|
480 |
+
* @return mixed
|
481 |
*/
|
482 |
function wpforms_max_upload( $bytes = false ) {
|
483 |
|
496 |
* automatically excluded. Optionally a white list can be provided.
|
497 |
*
|
498 |
* @since 1.0.0
|
499 |
+
*
|
500 |
* @param mixed $form
|
501 |
+
* @param array $whitelist
|
502 |
+
*
|
503 |
* @return mixed boolean or array
|
504 |
*/
|
505 |
function wpforms_get_form_fields( $form = false, $whitelist = array() ) {
|
508 |
if ( is_object( $form ) ) {
|
509 |
$form = wpforms_decode( $form->post_content );
|
510 |
} elseif ( is_numeric( $form ) ) {
|
511 |
+
$form = wpforms()->form->get(
|
512 |
+
$form,
|
513 |
+
array(
|
514 |
+
'content_only' => true,
|
515 |
+
)
|
516 |
+
);
|
517 |
}
|
518 |
|
519 |
+
if ( ! is_array( $form ) || empty( $form['fields'] ) ) {
|
520 |
return false;
|
521 |
+
}
|
522 |
|
523 |
// White list of field types to allow
|
524 |
$allowed_form_fields = array(
|
543 |
);
|
544 |
$allowed_form_fields = apply_filters( 'wpforms_get_form_fields_allowed', $allowed_form_fields );
|
545 |
|
546 |
+
$whitelist = ! empty( $whitelist ) ? $whitelist : $allowed_form_fields;
|
547 |
|
548 |
$form_fields = $form['fields'];
|
549 |
|
550 |
+
foreach ( $form_fields as $id => $form_field ) {
|
551 |
+
if ( ! in_array( $form_field['type'], $whitelist, true ) ) {
|
552 |
+
unset( $form_fields[ $id ] );
|
553 |
}
|
554 |
}
|
555 |
|
560 |
* Get meta key value for a form field.
|
561 |
*
|
562 |
* @since 1.1.9
|
563 |
+
*
|
564 |
+
* @param int|string $id Field ID.
|
565 |
+
* @param string $key Meta key.
|
566 |
+
* @param mixed $form_data Form data array.
|
567 |
+
*
|
568 |
* @return string
|
569 |
*/
|
570 |
function wpforms_get_form_field_meta( $id = '', $key = '', $form_data = '' ) {
|
573 |
return '';
|
574 |
}
|
575 |
|
576 |
+
if ( ! empty( $form_data['fields'][ $id ]['meta'][ $key ] ) ) {
|
577 |
+
return $form_data['fields'][ $id ]['meta'][ $key ];
|
578 |
} else {
|
579 |
return '';
|
580 |
}
|
584 |
* Get meta key value for a form field.
|
585 |
*
|
586 |
* @since 1.3.1
|
587 |
+
*
|
588 |
+
* @param string $key Meta key.
|
589 |
+
* @param string $value
|
590 |
+
* @param mixed $form_data Form data array.
|
591 |
+
*
|
592 |
* @return string
|
593 |
*/
|
594 |
function wpforms_get_form_fields_by_meta( $key = '', $value = '', $form_data = '' ) {
|
599 |
|
600 |
$found = array();
|
601 |
|
602 |
+
foreach ( $form_data['fields'] as $id => $field ) {
|
603 |
|
604 |
+
if ( ! empty( $field['meta'][ $key ] ) && $value == $field['meta'][ $key ] ) {
|
605 |
+
$found[ $id ] = $field;
|
606 |
}
|
607 |
}
|
608 |
|
609 |
+
if ( ! empty( $found ) ) {
|
610 |
return $found;
|
611 |
} else {
|
612 |
return false;
|
674 |
'WI' => 'Wisconsin',
|
675 |
'WY' => 'Wyoming',
|
676 |
);
|
677 |
+
|
678 |
return apply_filters( 'wpforms_us_states', $states );
|
679 |
}
|
680 |
|
703 |
'AC' => 'Ascension Island',
|
704 |
'AU' => 'Australia',
|
705 |
'AT' => 'Austria',
|
706 |
+
'AZ' => 'Azerbaijan',
|
707 |
'BS' => 'Bahamas',
|
708 |
'BH' => 'Bahrain',
|
709 |
'BD' => 'Bangladesh',
|
734 |
'KY' => 'Cayman Islands',
|
735 |
'CF' => 'Central African Republic',
|
736 |
'EA' => 'Ceuta and Melilla',
|
737 |
+
'TD' => 'Chad',
|
738 |
'CL' => 'Chile',
|
739 |
'CN' => 'China',
|
740 |
'CX' => 'Christmas Island',
|
760 |
'EC' => 'Ecuador',
|
761 |
'EG' => 'Egypt',
|
762 |
'SV' => 'El Salvador',
|
763 |
+
'GQ' => 'Equatorial Guinea',
|
764 |
'ER' => 'Eritrea',
|
765 |
'EE' => 'Estonia',
|
766 |
'ET' => 'Ethiopia',
|
791 |
'HT' => 'Haiti',
|
792 |
'HM' => 'Heard & McDonald Islands',
|
793 |
'HN' => 'Honduras',
|
794 |
+
'HK' => 'Hong Kong',
|
795 |
'HU' => 'Hungary',
|
796 |
'IS' => 'Iceland',
|
797 |
'IN' => 'India',
|
806 |
'JP' => 'Japan',
|
807 |
'JE' => 'Jersey',
|
808 |
'JO' => 'Jordan',
|
809 |
+
'KZ' => 'Kazakhstan',
|
810 |
'KE' => 'Kenya',
|
811 |
'KI' => 'Kiribati',
|
812 |
'XK' => 'Kosovo',
|
832 |
'MH' => 'Marshall Islands',
|
833 |
'MQ' => 'Martinique',
|
834 |
'MR' => 'Mauritania',
|
835 |
+
'MU' => 'Mauritius',
|
836 |
'YT' => 'Mayotte',
|
837 |
'MX' => 'Mexico',
|
838 |
'FM' => 'Micronesia',
|
880 |
'SH' => 'Saint Helena',
|
881 |
'KN' => 'Saint Kitts and Nevis',
|
882 |
'LC' => 'Saint Lucia',
|
883 |
+
'MF' => 'Saint Martin',
|
884 |
'PM' => 'Saint Pierre and Miquelon',
|
885 |
'WS' => 'Samoa',
|
886 |
'SM' => 'San Marino',
|
944 |
'ZM' => 'Zambia',
|
945 |
'ZW' => 'Zimbabwe',
|
946 |
);
|
947 |
+
|
948 |
return apply_filters( 'wpforms_countries', $countries );
|
949 |
}
|
950 |
|
970 |
'Nov' => 'November',
|
971 |
'Dec' => 'December',
|
972 |
);
|
973 |
+
|
974 |
return apply_filters( 'wpforms_months', $months );
|
975 |
}
|
976 |
|
991 |
'Fri' => 'Friday',
|
992 |
'Sat' => 'Saturday',
|
993 |
);
|
994 |
+
|
995 |
return apply_filters( 'wpforms_days', $days );
|
996 |
}
|
997 |
|
1012 |
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
1013 |
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
|
1014 |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
1015 |
+
} elseif ( ! empty( $_SERVER['REMOTE_ADDR'] ) ) {
|
1016 |
$ip = $_SERVER['REMOTE_ADDR'];
|
1017 |
}
|
1018 |
+
|
1019 |
// Fix potential CSV returned from $_SERVER variables
|
1020 |
$ip_array = array_map( 'trim', explode( ',', $ip ) );
|
1021 |
+
|
1022 |
return $ip_array[0];
|
1023 |
}
|
1024 |
|
1026 |
* Sanitizes hex color.
|
1027 |
*
|
1028 |
* @since 1.2.1
|
1029 |
+
*
|
1030 |
* @param string $color
|
1031 |
+
*
|
1032 |
* @return string
|
1033 |
*/
|
1034 |
function wpforms_sanitize_hex_color( $color ) {
|
1038 |
}
|
1039 |
|
1040 |
// 3 or 6 hex digits, or the empty string.
|
1041 |
+
if ( preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
|
1042 |
return $color;
|
1043 |
}
|
1044 |
+
|
1045 |
+
return '';
|
1046 |
}
|
1047 |
|
1048 |
/**
|
1049 |
* Sanitizes error message, primarily used during form frontend output.
|
1050 |
*
|
1051 |
* @since 1.3.7
|
1052 |
+
*
|
1053 |
* @param string $error
|
1054 |
+
*
|
1055 |
* @return string
|
1056 |
*/
|
1057 |
function wpforms_sanitize_error( $error = '' ) {
|
1066 |
'strong' => array(),
|
1067 |
'p' => array(),
|
1068 |
);
|
1069 |
+
|
1070 |
return wp_kses( $error, $allow );
|
1071 |
}
|
1072 |
|
1073 |
+
/**
|
1074 |
+
* Sanitizes a string, that can be a multiline.
|
1075 |
+
* If WP core `sanitize_textarea_field()` exists (after 4.7.0) - use it.
|
1076 |
+
* Otherwise - split onto separate lines, sanitize each one, merge again.
|
1077 |
+
*
|
1078 |
+
* @since 1.4.1
|
1079 |
+
*
|
1080 |
+
* @param string $string
|
1081 |
+
*
|
1082 |
+
* @return string If empty var is passed, or not a string - return unmodified. Otherwise - sanitize.
|
1083 |
+
*/
|
1084 |
+
function wpforms_sanitize_textarea_field( $string ) {
|
1085 |
+
|
1086 |
+
if ( empty( $string ) || ! is_string( $string ) ) {
|
1087 |
+
return $string;
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
if ( function_exists( 'sanitize_textarea_field' ) ) {
|
1091 |
+
$string = sanitize_textarea_field( $string );
|
1092 |
+
} else {
|
1093 |
+
$string = implode( "\n", array_map( 'sanitize_text_field', explode( "\n", $string ) ) );
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
return $string;
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
/**
|
1100 |
+
* Sanitizes an array, that consists of values as strings.
|
1101 |
+
* After that - merge all array values into multiline string.
|
1102 |
+
*
|
1103 |
+
* @since 1.4.1
|
1104 |
+
*
|
1105 |
+
* @param array $array
|
1106 |
+
*
|
1107 |
+
* @return mixed If not an array is passed (or empty var) - return unmodified var. Otherwise - a merged array into multiline string.
|
1108 |
+
*/
|
1109 |
+
function wpforms_sanitize_array_combine( $array ) {
|
1110 |
+
|
1111 |
+
if ( empty( $array ) || ! is_array( $array ) ) {
|
1112 |
+
return $array;
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
return implode( "\n", array_map( 'sanitize_text_field', $array ) );
|
1116 |
+
}
|
1117 |
+
|
1118 |
/**
|
1119 |
* Detect if we should use a light or dark color based on the color given.
|
1120 |
*
|
1121 |
* @since 1.2.5
|
1122 |
* @link https://docs.woocommerce.com/wc-apidocs/source-function-wc_light_or_dark.html#608-627
|
1123 |
+
*
|
1124 |
* @param mixed $color
|
1125 |
+
* @param string $dark (default: '#000000').
|
1126 |
+
* @param string $light (default: '#FFFFFF').
|
1127 |
+
*
|
1128 |
* @return string
|
1129 |
*/
|
1130 |
function wpforms_light_or_dark( $color, $dark = '#000000', $light = '#FFFFFF' ) {
|
1142 |
|
1143 |
/**
|
1144 |
* Builds and returns either a taxonomy or post type object that is
|
1145 |
+
* nests to accommodate any hierarchy.
|
1146 |
*
|
1147 |
* @since 1.3.9
|
1148 |
+
*
|
1149 |
* @param array $args
|
1150 |
* @param bool $flat
|
1151 |
+
*
|
1152 |
+
* @return bool|array
|
1153 |
*/
|
1154 |
function wpforms_get_hierarchical_object( $args = array(), $flat = false ) {
|
1155 |
|
1162 |
|
1163 |
if ( ! empty( $args['post_type'] ) ) {
|
1164 |
|
1165 |
+
$defaults = array(
|
1166 |
+
'posts_per_page' => - 1,
|
1167 |
'orderby' => 'title',
|
1168 |
'order' => 'ASC',
|
1169 |
);
|
1175 |
|
1176 |
} elseif ( ! empty( $args['taxonomy'] ) ) {
|
1177 |
|
1178 |
+
$defaults = array(
|
1179 |
'hide_empty' => false,
|
1180 |
);
|
1181 |
$args = wp_parse_args( $args, $defaults );
|
1191 |
|
1192 |
foreach ( $items as $item ) {
|
1193 |
if ( $item->{$ref_parent} ) {
|
1194 |
+
$children[ $item->{$ref_id} ] = $item;
|
1195 |
$children[ $item->{$ref_id} ]->ID = (int) $item->{$ref_id};
|
1196 |
} else {
|
1197 |
+
$parents[ $item->{$ref_id} ] = $item;
|
1198 |
$parents[ $item->{$ref_id} ]->ID = (int) $item->{$ref_id};
|
1199 |
}
|
1200 |
}
|
1201 |
|
1202 |
+
$children_count = count( $children );
|
1203 |
+
while ( $children_count >= 1 ) {
|
1204 |
foreach ( $children as $child ) {
|
1205 |
_wpforms_get_hierarchical_object_search( $child, $parents, $children, $ref_parent );
|
1206 |
}
|
1209 |
if ( $flat ) {
|
1210 |
$parents_flat = array();
|
1211 |
_wpforms_get_hierarchical_object_flatten( $parents, $parents_flat, $ref_name );
|
1212 |
+
|
1213 |
return $parents_flat;
|
1214 |
}
|
1215 |
|
1220 |
* Searches a given array and finds the parent of the provided object.
|
1221 |
*
|
1222 |
* @since 1.3.9
|
1223 |
+
*
|
1224 |
+
* @param object $child
|
1225 |
* @param array $parents
|
1226 |
* @param array $children
|
1227 |
* @param string $ref_parent
|
1233 |
if ( $parent->ID === $child->{$ref_parent} ) {
|
1234 |
|
1235 |
if ( empty( $parent->children ) ) {
|
1236 |
+
$parents[ $id ]->children = array(
|
1237 |
+
$child->ID => $child,
|
1238 |
+
);
|
1239 |
} else {
|
1240 |
$parents[ $id ]->children[ $child->ID ] = $child;
|
1241 |
}
|
1242 |
|
1243 |
unset( $children[ $child->ID ] );
|
1244 |
|
1245 |
+
} elseif ( ! empty( $parent->children ) && is_array( $parent->children ) ) {
|
1246 |
|
1247 |
_wpforms_get_hierarchical_object_search( $child, $parent->children, $children, $ref_parent );
|
1248 |
}
|
1250 |
}
|
1251 |
|
1252 |
/**
|
1253 |
+
* Flattens a hierarchical object.
|
1254 |
*
|
1255 |
* @since 1.3.9
|
1256 |
+
*
|
1257 |
* @param array $array
|
1258 |
* @param array $output
|
1259 |
* @param string $ref_name
|
1270 |
|
1271 |
if ( ! empty( $item->children ) ) {
|
1272 |
|
1273 |
+
_wpforms_get_hierarchical_object_flatten( $item->children, $output, $ref_name, $level + 1 );
|
1274 |
unset( $output[ $item->ID ]->children );
|
1275 |
}
|
1276 |
}
|
1281 |
*
|
1282 |
* @since 1.3.9
|
1283 |
* @link https://gist.github.com/scribu/588429
|
1284 |
+
*
|
1285 |
+
* @param array $array The initial array.
|
1286 |
+
* @param array $pairs The array to insert.
|
1287 |
+
* @param string $key The certain key.
|
1288 |
+
* @param string $position Where to insert the array - before or after the key.
|
1289 |
+
*
|
1290 |
* @return array
|
1291 |
*/
|
1292 |
function wpforms_array_insert( $array, $pairs, $key, $position = 'after' ) {
|
1293 |
|
1294 |
+
$key_pos = array_search( $key, array_keys( $array ), true );
|
1295 |
+
if ( 'after' === $position ) {
|
1296 |
+
$key_pos ++;
|
1297 |
}
|
1298 |
|
1299 |
if ( false !== $key_pos ) {
|
1311 |
* Recursively remove empty strings from an array.
|
1312 |
*
|
1313 |
* @since 1.3.9.1
|
1314 |
+
*
|
1315 |
* @param array $data
|
1316 |
+
*
|
1317 |
* @return array
|
1318 |
*/
|
1319 |
function wpforms_array_remove_empty_strings( $data ) {
|
1335 |
* Debug mode bool.
|
1336 |
*
|
1337 |
* @since 1.2.3
|
1338 |
+
*
|
1339 |
+
* @return bool
|
1340 |
*/
|
1341 |
function wpforms_debug() {
|
1342 |
|
1350 |
|
1351 |
if ( $debug_option ) {
|
1352 |
$current_user = wp_get_current_user();
|
1353 |
+
if ( $current_user->user_login === $debug_option ) {
|
1354 |
$debug = true;
|
1355 |
}
|
1356 |
}
|
1362 |
* Helper function to display debug data.
|
1363 |
*
|
1364 |
* @since 1.0.0
|
1365 |
+
*
|
1366 |
+
* @param mixed $data
|
1367 |
+
* @param bool $echo
|
1368 |
+
*
|
1369 |
* @return string
|
1370 |
*/
|
1371 |
function wpforms_debug_data( $data, $echo = true ) {
|
1374 |
|
1375 |
$output = '<textarea style="background:#fff;margin: 20px 0;width:100%;height:500px;font-size:12px;font-family: Consolas,Monaco,monospace;direction: ltr;unicode-bidi: embed;line-height: 1.4;padding: 4px 6px 1px;" readonly>';
|
1376 |
|
1377 |
+
$output .= "=================== WPFORMS DEBUG ===================\n\n";
|
1378 |
|
1379 |
+
if ( is_array( $data ) || is_object( $data ) ) {
|
1380 |
+
$output .= ( print_r( $data, true ) );
|
1381 |
+
} else {
|
1382 |
+
$output .= $data;
|
1383 |
+
}
|
1384 |
|
1385 |
$output .= '</textarea>';
|
1386 |
|
1396 |
* Log helper.
|
1397 |
*
|
1398 |
* @since 1.0.0
|
1399 |
+
*
|
1400 |
* @param string $title
|
1401 |
* @param string $message
|
1402 |
* @param array $args
|
1403 |
*/
|
1404 |
+
function wpforms_log( $title = '', $message = '', $args = array() ) {
|
1405 |
|
1406 |
// Require log title
|
1407 |
+
if ( empty( $title ) ) {
|
1408 |
return;
|
1409 |
+
}
|
1410 |
|
1411 |
// Force logging everything when in debug mode
|
1412 |
if ( ! wpforms_debug() ) {
|
1421 |
* - Providers (provider)
|
1422 |
* - Conditional Logic (conditional_logic)
|
1423 |
*/
|
1424 |
+
$type = ! empty( $args['type'] ) ? (array) $args['type'] : array( 'error' );
|
1425 |
+
$levels = array_intersect( $type, get_option( 'wpforms_logging', array() ) );
|
1426 |
+
if ( empty( $levels ) ) {
|
|
|
1427 |
return;
|
1428 |
}
|
1429 |
}
|
1430 |
|
1431 |
+
// Meta.
|
1432 |
+
if ( ! empty( $args['form_id'] ) ) {
|
1433 |
+
$meta = array(
|
1434 |
+
'form' => absint( $args['form_id'] ),
|
1435 |
+
);
|
1436 |
+
} elseif ( ! empty( $args['meta'] ) ) {
|
1437 |
$meta = $args['meta'];
|
1438 |
} else {
|
1439 |
$meta = '';
|
1440 |
}
|
1441 |
|
1442 |
+
// Parent.
|
1443 |
+
$parent = ! empty( $args['parent'] ) ? $args['parent'] : 0;
|
1444 |
|
1445 |
// Make arrays and objects look nice
|
1446 |
if ( is_array( $message ) || is_object( $message ) ) {
|
1453 |
|
1454 |
/**
|
1455 |
* Array replace recursive, for PHP 5.2.
|
|
|
1456 |
*/
|
1457 |
if ( ! function_exists( 'array_replace_recursive' ) ) :
|
1458 |
/**
|
1459 |
+
* PHP-agnostic version of {@link array_replace_recursive()}.
|
1460 |
+
*
|
1461 |
+
* The array_replace_recursive() function is a PHP 5.3 function. WordPress
|
1462 |
+
* currently supports down to PHP 5.2, so this method is a workaround
|
1463 |
+
* for PHP 5.2.
|
1464 |
+
*
|
1465 |
+
* Note: array_replace_recursive() supports infinite arguments, but for our use-
|
1466 |
+
* case, we only need to support two arguments.
|
1467 |
+
*
|
1468 |
+
* Subject to removal once WordPress makes PHP 5.3.0 the minimum requirement.
|
1469 |
+
*
|
1470 |
+
* @since 1.2.3
|
1471 |
+
* @see http://php.net/manual/en/function.array-replace-recursive.php#109390
|
1472 |
+
*
|
1473 |
+
* @param array $base Array with keys needing to be replaced.
|
1474 |
+
* @param array $replacements Array with the replaced keys.
|
1475 |
+
*
|
1476 |
+
* @return array
|
1477 |
+
*/
|
1478 |
function array_replace_recursive( $base = array(), $replacements = array() ) {
|
1479 |
// PHP 5.2-compatible version
|
1480 |
// http://php.net/manual/en/function.array-replace-recursive.php#109390.
|
1496 |
}
|
1497 |
} while ( count( $head_stack ) );
|
1498 |
}
|
1499 |
+
|
1500 |
return $base;
|
1501 |
}
|
1502 |
endif;
|
1503 |
+
|
1504 |
+
/**
|
1505 |
+
* Check whether the current page is in AMP mode or not.
|
1506 |
+
* We need to check for specific functions, as there is no special AMP header.
|
1507 |
+
*
|
1508 |
+
* @since 1.4.1
|
1509 |
+
*
|
1510 |
+
* @return bool
|
1511 |
+
*/
|
1512 |
+
function wpforms_is_amp() {
|
1513 |
+
|
1514 |
+
$is_amp = false;
|
1515 |
+
|
1516 |
+
if (
|
1517 |
+
// AMP by Automattic; ampforwp
|
1518 |
+
( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) ||
|
1519 |
+
// Better AMP
|
1520 |
+
( function_exists( 'is_better_amp' ) && is_better_amp() )
|
1521 |
+
) {
|
1522 |
+
$is_amp = true;
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
return apply_filters( 'wpforms_is_amp', $is_amp );
|
1526 |
+
}
|
1527 |
+
|
1528 |
+
/**
|
1529 |
+
* Decode special characters, both alpha- (<) and numeric-based (').
|
1530 |
+
*
|
1531 |
+
* @since 1.4.1
|
1532 |
+
*
|
1533 |
+
* @param string $string
|
1534 |
+
*
|
1535 |
+
* @return string
|
1536 |
+
*/
|
1537 |
+
function wpforms_decode_string( $string ) {
|
1538 |
+
|
1539 |
+
if ( ! is_string( $string) ) {
|
1540 |
+
return $string;
|
1541 |
+
}
|
1542 |
+
|
1543 |
+
return wp_kses_decode_entities( htmlspecialchars_decode( $string ) );
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
/**
|
1547 |
+
* Get a suffix for assets, `.min` if debug is enabled.
|
1548 |
+
*
|
1549 |
+
* @return string
|
1550 |
+
*/
|
1551 |
+
function wpforms_get_min_suffix() {
|
1552 |
+
return wpforms_debug() ? '.min' : '';
|
1553 |
+
}
|
includes/integrations.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Contains various WPForms integrations
|
4 |
*
|
5 |
* @package WPForms
|
6 |
* @author WPForms
|
@@ -16,69 +16,82 @@
|
|
16 |
*/
|
17 |
function wpforms_visual_composer_shortcode() {
|
18 |
|
19 |
-
if ( !is_user_logged_in() )
|
20 |
return;
|
|
|
21 |
|
22 |
-
$wpf = wpforms()->form->get(
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
if ( !empty( $wpf ) ) {
|
25 |
-
$forms = array(
|
26 |
-
|
|
|
|
|
27 |
$forms[ $form->post_title ] = $form->ID;
|
28 |
}
|
29 |
} else {
|
30 |
-
$forms = array(
|
|
|
|
|
31 |
}
|
32 |
|
33 |
-
vc_map(
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
array(
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
array(
|
50 |
-
'type' => 'dropdown',
|
51 |
-
'heading' => __( 'Display Form Title', 'wpforms' ),
|
52 |
-
'param_name' => 'title',
|
53 |
-
'value' => array(
|
54 |
-
__( 'No', 'wpforms' ) => 'false',
|
55 |
-
__( 'Yes', 'wpforms' ) => 'true',
|
56 |
-
),
|
57 |
-
'save_always' => true,
|
58 |
-
'description' => __( 'Would you like to display the forms title?', 'wpforms' ),
|
59 |
-
'dependency' => array(
|
60 |
-
'element' => 'id',
|
61 |
-
'not_empty' => true,
|
62 |
),
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
),
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
'
|
76 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
),
|
78 |
),
|
79 |
-
)
|
80 |
-
)
|
81 |
}
|
|
|
82 |
add_action( 'vc_before_init', 'wpforms_visual_composer_shortcode' );
|
83 |
|
84 |
/**
|
@@ -89,15 +102,16 @@ add_action( 'vc_before_init', 'wpforms_visual_composer_shortcode' );
|
|
89 |
function wpforms_visual_composer_shortcode_css() {
|
90 |
|
91 |
// Load CSS per global setting
|
92 |
-
if ( wpforms_setting( 'disable-css', '1' )
|
93 |
wp_enqueue_style(
|
94 |
'wpforms-full',
|
95 |
WPFORMS_PLUGIN_URL . 'assets/css/wpforms-full.css',
|
96 |
array(),
|
97 |
WPFORMS_VERSION
|
98 |
);
|
99 |
-
}
|
100 |
-
|
|
|
101 |
wp_enqueue_style(
|
102 |
'wpforms-base',
|
103 |
WPFORMS_PLUGIN_URL . 'assets/css/wpforms-base.css',
|
@@ -106,4 +120,5 @@ function wpforms_visual_composer_shortcode_css() {
|
|
106 |
);
|
107 |
}
|
108 |
}
|
109 |
-
|
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Contains various WPForms integrations.
|
4 |
*
|
5 |
* @package WPForms
|
6 |
* @author WPForms
|
16 |
*/
|
17 |
function wpforms_visual_composer_shortcode() {
|
18 |
|
19 |
+
if ( ! is_user_logged_in() ) {
|
20 |
return;
|
21 |
+
}
|
22 |
|
23 |
+
$wpf = wpforms()->form->get(
|
24 |
+
'',
|
25 |
+
array(
|
26 |
+
'orderby' => 'title',
|
27 |
+
)
|
28 |
+
);
|
29 |
|
30 |
+
if ( ! empty( $wpf ) ) {
|
31 |
+
$forms = array(
|
32 |
+
__( 'Select a form to display', 'wpforms' ) => '',
|
33 |
+
);
|
34 |
+
foreach ( $wpf as $form ) {
|
35 |
$forms[ $form->post_title ] = $form->ID;
|
36 |
}
|
37 |
} else {
|
38 |
+
$forms = array(
|
39 |
+
__( 'No forms found', 'wpforms' ) => '',
|
40 |
+
);
|
41 |
}
|
42 |
|
43 |
+
vc_map(
|
44 |
+
array(
|
45 |
+
'name' => __( 'WPForms', 'wpforms' ),
|
46 |
+
'base' => 'wpforms',
|
47 |
+
'icon' => WPFORMS_PLUGIN_URL . 'assets/images/sullie-vc.png',
|
48 |
+
'category' => __( 'Content', 'wpforms' ),
|
49 |
+
'description' => __( 'Add your form', 'wpforms' ),
|
50 |
+
'params' => array(
|
51 |
+
array(
|
52 |
+
'type' => 'dropdown',
|
53 |
+
'heading' => __( 'Form', 'wpforms' ),
|
54 |
+
'param_name' => 'id',
|
55 |
+
'value' => $forms,
|
56 |
+
'save_always' => true,
|
57 |
+
'description' => __( 'Select a form to add it to your post or page.', 'wpforms' ),
|
58 |
+
'admin_label' => true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
),
|
60 |
+
array(
|
61 |
+
'type' => 'dropdown',
|
62 |
+
'heading' => __( 'Display Form Name', 'wpforms' ),
|
63 |
+
'param_name' => 'title',
|
64 |
+
'value' => array(
|
65 |
+
__( 'No', 'wpforms' ) => 'false',
|
66 |
+
__( 'Yes', 'wpforms' ) => 'true',
|
67 |
+
),
|
68 |
+
'save_always' => true,
|
69 |
+
'description' => __( 'Would you like to display the forms name?', 'wpforms' ),
|
70 |
+
'dependency' => array(
|
71 |
+
'element' => 'id',
|
72 |
+
'not_empty' => true,
|
73 |
+
),
|
74 |
),
|
75 |
+
array(
|
76 |
+
'type' => 'dropdown',
|
77 |
+
'heading' => __( 'Display Form Description', 'wpforms' ),
|
78 |
+
'param_name' => 'description',
|
79 |
+
'value' => array(
|
80 |
+
__( 'No', 'wpforms' ) => 'false',
|
81 |
+
__( 'Yes', 'wpforms' ) => 'true',
|
82 |
+
),
|
83 |
+
'save_always' => true,
|
84 |
+
'description' => __( 'Would you like to display the forms description?', 'wpforms' ),
|
85 |
+
'dependency' => array(
|
86 |
+
'element' => 'id',
|
87 |
+
'not_empty' => true,
|
88 |
+
),
|
89 |
),
|
90 |
),
|
91 |
+
)
|
92 |
+
);
|
93 |
}
|
94 |
+
|
95 |
add_action( 'vc_before_init', 'wpforms_visual_composer_shortcode' );
|
96 |
|
97 |
/**
|
102 |
function wpforms_visual_composer_shortcode_css() {
|
103 |
|
104 |
// Load CSS per global setting
|
105 |
+
if ( wpforms_setting( 'disable-css', '1' ) === '1' ) {
|
106 |
wp_enqueue_style(
|
107 |
'wpforms-full',
|
108 |
WPFORMS_PLUGIN_URL . 'assets/css/wpforms-full.css',
|
109 |
array(),
|
110 |
WPFORMS_VERSION
|
111 |
);
|
112 |
+
}
|
113 |
+
|
114 |
+
if ( wpforms_setting( 'disable-css', '1' ) === '2' ) {
|
115 |
wp_enqueue_style(
|
116 |
'wpforms-base',
|
117 |
WPFORMS_PLUGIN_URL . 'assets/css/wpforms-base.css',
|
120 |
);
|
121 |
}
|
122 |
}
|
123 |
+
|
124 |
+
add_action( 'vc_load_iframe_jscss', 'wpforms_visual_composer_shortcode_css' );
|
includes/providers/class-base.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Provider class.
|
4 |
*
|
@@ -7,22 +8,24 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
abstract class WPForms_Provider {
|
12 |
|
13 |
/**
|
14 |
-
* Provider
|
15 |
*
|
16 |
* @since 1.0.0
|
17 |
-
*
|
|
|
18 |
*/
|
19 |
-
|
20 |
|
21 |
/**
|
22 |
* Provider name.
|
23 |
*
|
24 |
* @since 1.0.0
|
25 |
-
*
|
|
|
26 |
*/
|
27 |
public $name;
|
28 |
|
@@ -30,7 +33,8 @@ abstract class WPForms_Provider {
|
|
30 |
* Provider name in slug format.
|
31 |
*
|
32 |
* @since 1.0.0
|
33 |
-
*
|
|
|
34 |
*/
|
35 |
public $slug;
|
36 |
|
@@ -38,6 +42,7 @@ abstract class WPForms_Provider {
|
|
38 |
* Load priority.
|
39 |
*
|
40 |
* @since 1.0.0
|
|
|
41 |
* @var int
|
42 |
*/
|
43 |
public $priority = 10;
|
@@ -46,6 +51,7 @@ abstract class WPForms_Provider {
|
|
46 |
* Holds the API connections.
|
47 |
*
|
48 |
* @since 1.0.0
|
|
|
49 |
* @var mixed
|
50 |
*/
|
51 |
public $api = false;
|
@@ -54,6 +60,7 @@ abstract class WPForms_Provider {
|
|
54 |
* Service icon.
|
55 |
*
|
56 |
* @since 1.0.0
|
|
|
57 |
* @var string
|
58 |
*/
|
59 |
public $icon;
|
@@ -62,6 +69,7 @@ abstract class WPForms_Provider {
|
|
62 |
* Service icon.
|
63 |
*
|
64 |
* @since 1.2.3
|
|
|
65 |
* @var string
|
66 |
*/
|
67 |
public $type;
|
@@ -70,6 +78,7 @@ abstract class WPForms_Provider {
|
|
70 |
* Form data.
|
71 |
*
|
72 |
* @since 1.2.3
|
|
|
73 |
* @var array
|
74 |
*/
|
75 |
public $form_data;
|
@@ -104,10 +113,10 @@ abstract class WPForms_Provider {
|
|
104 |
add_action( 'wpforms_providers_panel_content', array( $this, 'builder_output' ), $this->priority );
|
105 |
|
106 |
// Remove provider from Settings Integrations tab
|
107 |
-
add_action(
|
108 |
|
109 |
// Add new provider from Settings Integrations tab
|
110 |
-
add_action(
|
111 |
|
112 |
// Add providers sections to the Settings Integrations tab
|
113 |
add_action( 'wpforms_settings_providers', array( $this, 'integrations_tab_options' ), $this->priority, 2 );
|
@@ -125,12 +134,15 @@ abstract class WPForms_Provider {
|
|
125 |
* Add to list of registered providers.
|
126 |
*
|
127 |
* @since 1.0.0
|
|
|
128 |
* @param array $providers
|
|
|
129 |
* @return array
|
130 |
*/
|
131 |
function register_provider( $providers = array() ) {
|
132 |
|
133 |
-
$providers[$this->slug] = $this->name;
|
|
|
134 |
return $providers;
|
135 |
}
|
136 |
|
@@ -145,76 +157,150 @@ abstract class WPForms_Provider {
|
|
145 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
146 |
|
147 |
// Check for permissions
|
148 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
149 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
|
152 |
-
|
153 |
// Create new connection
|
154 |
-
|
155 |
|
156 |
-
if ( $_POST['task']
|
157 |
|
158 |
-
$connection = $this->output_connection(
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
}
|
161 |
|
162 |
-
|
163 |
// Create new Provider account
|
164 |
-
|
165 |
|
166 |
-
if ( $_POST['task']
|
167 |
|
168 |
$auth = $this->api_auth( wp_parse_args( $_POST['data'], array() ), $_POST['id'] );
|
169 |
|
170 |
if ( is_wp_error( $auth ) ) {
|
171 |
|
172 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
173 |
|
174 |
} else {
|
175 |
|
176 |
-
$accounts = $this->output_accounts(
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
}
|
180 |
|
181 |
-
|
182 |
// Select/Toggle Provider accounts
|
183 |
-
|
184 |
|
185 |
-
if ( $_POST['task']
|
186 |
|
187 |
-
$lists = $this->output_lists(
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
if ( is_wp_error( $lists ) ) {
|
190 |
|
191 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
192 |
|
193 |
} else {
|
194 |
|
195 |
-
wp_send_json_success(
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
}
|
198 |
|
199 |
-
|
200 |
// Select/Toggle Provider account lists
|
201 |
-
|
202 |
|
203 |
-
if ( $_POST['task']
|
204 |
|
205 |
-
$fields
|
|
|
|
|
|
|
206 |
|
207 |
if ( is_wp_error( $fields ) ) {
|
208 |
|
209 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
210 |
|
211 |
} else {
|
212 |
|
213 |
-
$groups
|
214 |
-
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
}
|
220 |
|
@@ -225,6 +311,7 @@ abstract class WPForms_Provider {
|
|
225 |
* Process and submit entry to provider.
|
226 |
*
|
227 |
* @since 1.0.0
|
|
|
228 |
* @param array $fields
|
229 |
* @param array $entry
|
230 |
* @param array $form_data
|
@@ -237,10 +324,13 @@ abstract class WPForms_Provider {
|
|
237 |
* Process conditional fields.
|
238 |
*
|
239 |
* @since 1.0.0
|
|
|
240 |
* @param array $fields
|
241 |
* @param array $entry
|
242 |
* @param array $form_data
|
243 |
* @param array $connection
|
|
|
|
|
244 |
*/
|
245 |
public function process_conditionals( $fields, $entry, $form_data, $connection ) {
|
246 |
|
@@ -265,8 +355,11 @@ abstract class WPForms_Provider {
|
|
265 |
* variations.
|
266 |
*
|
267 |
* @since 1.0.0
|
268 |
-
*
|
269 |
-
* @
|
|
|
|
|
|
|
270 |
*/
|
271 |
public function get_form_fields( $form = false, $whitelist = array() ) {
|
272 |
|
@@ -274,11 +367,17 @@ abstract class WPForms_Provider {
|
|
274 |
if ( is_object( $form ) ) {
|
275 |
$form = wpforms_decode( $form->post_content );
|
276 |
} elseif ( is_numeric( $form ) ) {
|
277 |
-
$form = wpforms()->form->get(
|
|
|
|
|
|
|
|
|
|
|
278 |
}
|
279 |
|
280 |
-
if ( !is_array( $form ) || empty( $form['fields'] ) )
|
281 |
return false;
|
|
|
282 |
|
283 |
// White list of field types to allow
|
284 |
$allowed_form_fields = array(
|
@@ -294,17 +393,17 @@ abstract class WPForms_Provider {
|
|
294 |
'hidden',
|
295 |
'date-time',
|
296 |
'phone',
|
297 |
-
'number'
|
298 |
);
|
299 |
$allowed_form_fields = apply_filters( 'wpforms_providers_fields', $allowed_form_fields );
|
300 |
|
301 |
-
$whitelist = !empty( $whitelist ) ? $whitelist : $allowed_form_fields;
|
302 |
|
303 |
$form_fields = $form['fields'];
|
304 |
|
305 |
-
foreach( $form_fields as $id => $form_field ) {
|
306 |
-
if ( !in_array( $form_field['type'], $whitelist ) ) {
|
307 |
-
unset( $form_fields[$id] );
|
308 |
}
|
309 |
}
|
310 |
|
@@ -318,13 +417,17 @@ abstract class WPForms_Provider {
|
|
318 |
* provider field types.
|
319 |
*
|
320 |
* @since 1.0.0
|
|
|
321 |
* @param array $form_fields
|
322 |
* @param string $form_field_type
|
|
|
|
|
323 |
*/
|
324 |
public function get_form_field_select( $form_fields = array(), $form_field_type = '' ) {
|
325 |
|
326 |
-
if ( empty( $form_fields ) || empty( $form_field_type ) )
|
327 |
return array();
|
|
|
328 |
|
329 |
$formatted = array();
|
330 |
|
@@ -332,13 +435,19 @@ abstract class WPForms_Provider {
|
|
332 |
foreach ( $form_fields as $id => $form_field ) {
|
333 |
|
334 |
// Email
|
335 |
-
if (
|
336 |
-
|
|
|
|
|
|
|
337 |
}
|
338 |
|
339 |
// Address
|
340 |
-
if (
|
341 |
-
|
|
|
|
|
|
|
342 |
}
|
343 |
}
|
344 |
|
@@ -346,19 +455,19 @@ abstract class WPForms_Provider {
|
|
346 |
foreach ( $form_fields as $id => $form_field ) {
|
347 |
|
348 |
// Complex Name field
|
349 |
-
if ( $form_field['type']
|
350 |
|
351 |
-
// Full Name
|
352 |
$formatted[] = array(
|
353 |
'id' => $form_field['id'],
|
354 |
'key' => 'value',
|
355 |
'type' => $form_field['type'],
|
356 |
'subtype' => '',
|
357 |
'provider_type' => $form_field_type,
|
358 |
-
'label' =>
|
359 |
);
|
360 |
|
361 |
-
// First Name
|
362 |
if ( strpos( $form_field['format'], 'first' ) !== false ) {
|
363 |
$formatted[] = array(
|
364 |
'id' => $form_field['id'],
|
@@ -366,11 +475,11 @@ abstract class WPForms_Provider {
|
|
366 |
'type' => $form_field['type'],
|
367 |
'subtype' => 'first',
|
368 |
'provider_type' => $form_field_type,
|
369 |
-
'label' =>
|
370 |
);
|
371 |
}
|
372 |
|
373 |
-
// Middle Name
|
374 |
if ( strpos( $form_field['format'], 'middle' ) !== false ) {
|
375 |
$formatted[] = array(
|
376 |
'id' => $form_field['id'],
|
@@ -378,11 +487,11 @@ abstract class WPForms_Provider {
|
|
378 |
'type' => $form_field['type'],
|
379 |
'subtype' => 'middle',
|
380 |
'provider_type' => $form_field_type,
|
381 |
-
'label' =>
|
382 |
);
|
383 |
}
|
384 |
|
385 |
-
//
|
386 |
if ( strpos( $form_field['format'], 'last' ) !== false ) {
|
387 |
$formatted[] = array(
|
388 |
'id' => $form_field['id'],
|
@@ -390,11 +499,11 @@ abstract class WPForms_Provider {
|
|
390 |
'type' => $form_field['type'],
|
391 |
'subtype' => 'last',
|
392 |
'provider_type' => $form_field_type,
|
393 |
-
'label' =>
|
394 |
);
|
395 |
}
|
396 |
|
397 |
-
|
398 |
} else {
|
399 |
|
400 |
$formatted[] = array(
|
@@ -411,11 +520,11 @@ abstract class WPForms_Provider {
|
|
411 |
return $formatted;
|
412 |
}
|
413 |
|
414 |
-
|
415 |
//
|
416 |
-
//
|
417 |
//
|
418 |
-
|
419 |
|
420 |
/**
|
421 |
* Authenticate with the provider API.
|
@@ -431,6 +540,7 @@ abstract class WPForms_Provider {
|
|
431 |
* Establish connection object to provider API.
|
432 |
*
|
433 |
* @since 1.0.0
|
|
|
434 |
* @param string $account_id
|
435 |
* @return mixed array or error object
|
436 |
*/
|
@@ -441,6 +551,7 @@ abstract class WPForms_Provider {
|
|
441 |
* Retrieve provider account lists.
|
442 |
*
|
443 |
* @since 1.0.0
|
|
|
444 |
* @param string $connection_id
|
445 |
* @param string $account_id
|
446 |
* @return mixed array or error object
|
@@ -452,9 +563,10 @@ abstract class WPForms_Provider {
|
|
452 |
* Retrieve provider account list groups.
|
453 |
*
|
454 |
* @since 1.0.0
|
|
|
455 |
* @param string $connection_id
|
456 |
* @param string $account_id
|
457 |
-
* @
|
458 |
*/
|
459 |
public function api_groups( $connection_id = '', $account_id = '', $list_id = '' ) {
|
460 |
}
|
@@ -463,19 +575,20 @@ abstract class WPForms_Provider {
|
|
463 |
* Retrieve provider account list fields.
|
464 |
*
|
465 |
* @since 1.0.0
|
|
|
466 |
* @param string $connection_id
|
467 |
* @param string $account_id
|
468 |
-
* @
|
469 |
*/
|
470 |
public function api_fields( $connection_id = '', $account_id = '', $list_id = '' ) {
|
471 |
}
|
472 |
|
473 |
|
474 |
-
|
475 |
//
|
476 |
-
//
|
477 |
//
|
478 |
-
|
479 |
|
480 |
/**
|
481 |
* Connection HTML.
|
@@ -483,9 +596,11 @@ abstract class WPForms_Provider {
|
|
483 |
* This method compiles all the HTML necessary for a connection to a provider.
|
484 |
*
|
485 |
* @since 1.0.0
|
|
|
486 |
* @param string $connection_id
|
487 |
* @param array $connection
|
488 |
-
* @param mixed $form
|
|
|
489 |
* @return string
|
490 |
*/
|
491 |
public function output_connection( $connection_id = '', $connection = array(), $form = '' ) {
|
@@ -494,28 +609,29 @@ abstract class WPForms_Provider {
|
|
494 |
$connection_id = 'connection_' . uniqid();
|
495 |
}
|
496 |
|
497 |
-
if ( empty( $connection ) || empty( $form ) )
|
498 |
-
return;
|
|
|
499 |
|
500 |
$output = sprintf( '<div class="wpforms-provider-connection" data-provider="%s" data-connection_id="%s">', $this->slug, $connection_id );
|
501 |
|
502 |
-
|
503 |
|
504 |
-
|
505 |
|
506 |
-
|
507 |
|
508 |
-
|
509 |
-
|
510 |
|
511 |
-
|
512 |
|
513 |
-
|
514 |
-
|
515 |
|
516 |
-
|
517 |
|
518 |
-
|
519 |
|
520 |
$output .= '</div>';
|
521 |
|
@@ -526,22 +642,25 @@ abstract class WPForms_Provider {
|
|
526 |
* Connection header HTML.
|
527 |
*
|
528 |
* @since 1.0.0
|
|
|
529 |
* @param string $connection_id
|
530 |
* @param array $connection
|
|
|
531 |
* @return string
|
532 |
*/
|
533 |
public function output_connection_header( $connection_id = '', $connection = array() ) {
|
534 |
|
535 |
-
if ( empty( $connection_id ) || empty( $connection ) )
|
536 |
-
return;
|
|
|
537 |
|
538 |
$output = '<div class="wpforms-provider-connection-header">';
|
539 |
|
540 |
-
|
541 |
|
542 |
-
|
543 |
|
544 |
-
|
545 |
|
546 |
$output .= '</div>';
|
547 |
|
@@ -552,7 +671,6 @@ abstract class WPForms_Provider {
|
|
552 |
* Provider account authorize fields HTML.
|
553 |
*
|
554 |
* @since 1.0.0
|
555 |
-
* @return string
|
556 |
*/
|
557 |
public function output_auth() {
|
558 |
}
|
@@ -561,36 +679,40 @@ abstract class WPForms_Provider {
|
|
561 |
* Provider account select HTML.
|
562 |
*
|
563 |
* @since 1.0.0
|
|
|
564 |
* @param string $connection_id
|
565 |
* @param array $connection
|
|
|
566 |
* @return string
|
567 |
*/
|
568 |
public function output_accounts( $connection_id = '', $connection = array() ) {
|
569 |
|
570 |
-
if ( empty( $connection_id ) || empty( $connection ) )
|
571 |
-
return;
|
|
|
572 |
|
573 |
$providers = get_option( 'wpforms_providers' );
|
574 |
|
575 |
-
if ( empty( $providers[$this->slug] ) )
|
576 |
-
return;
|
|
|
577 |
|
578 |
$output = '<div class="wpforms-provider-accounts wpforms-connection-block">';
|
579 |
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
|
595 |
$output .= '</div>';
|
596 |
|
@@ -601,17 +723,20 @@ abstract class WPForms_Provider {
|
|
601 |
* Provider account lists HTML.
|
602 |
*
|
603 |
* @since 1.0.0
|
|
|
604 |
* @param string $connection_id
|
605 |
* @param array $connection
|
606 |
-
*
|
|
|
607 |
*/
|
608 |
-
public function output_lists( $connection_id ='', $connection = array() ) {
|
609 |
|
610 |
-
if ( empty( $connection_id ) || empty( $connection['account_id'] ) )
|
611 |
-
return;
|
|
|
612 |
|
613 |
$lists = $this->api_lists( $connection_id, $connection['account_id'] );
|
614 |
-
$selected = !empty( $connection['list_id'] ) ? $connection['list_id'] : '';
|
615 |
|
616 |
if ( is_wp_error( $lists ) ) {
|
617 |
return $lists;
|
@@ -619,9 +744,9 @@ abstract class WPForms_Provider {
|
|
619 |
|
620 |
$output = '<div class="wpforms-provider-lists wpforms-connection-block">';
|
621 |
|
622 |
-
|
623 |
|
624 |
-
|
625 |
|
626 |
if ( ! empty( $lists ) ) {
|
627 |
foreach ( $lists as $list ) {
|
@@ -634,7 +759,7 @@ abstract class WPForms_Provider {
|
|
634 |
}
|
635 |
}
|
636 |
|
637 |
-
|
638 |
|
639 |
$output .= '</div>';
|
640 |
|
@@ -645,52 +770,56 @@ abstract class WPForms_Provider {
|
|
645 |
* Provider account list groups HTML.
|
646 |
*
|
647 |
* @since 1.0.0
|
|
|
648 |
* @param string $connection_id
|
649 |
* @param array $connection
|
|
|
650 |
* @return string
|
651 |
*/
|
652 |
public function output_groups( $connection_id = '', $connection = array() ) {
|
653 |
|
654 |
-
if ( empty( $connection_id ) || empty( $connection['account_id'] ) || empty( $connection['list_id'] ) )
|
655 |
-
return;
|
|
|
656 |
|
657 |
$groupsets = $this->api_groups( $connection_id, $connection['account_id'], $connection['list_id'] );
|
658 |
|
659 |
-
if ( is_wp_error( $groupsets ) )
|
660 |
-
return;
|
|
|
661 |
|
662 |
$output = '<div class="wpforms-provider-groups wpforms-connection-block">';
|
663 |
|
664 |
-
|
665 |
|
666 |
-
|
667 |
|
668 |
-
|
669 |
|
670 |
-
|
671 |
|
672 |
-
|
673 |
|
674 |
-
|
675 |
|
676 |
-
|
677 |
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
|
693 |
-
|
694 |
|
695 |
$output .= '</div>';
|
696 |
|
@@ -701,69 +830,76 @@ abstract class WPForms_Provider {
|
|
701 |
* Provider account list fields HTML.
|
702 |
*
|
703 |
* @since 1.0.0
|
|
|
704 |
* @param string $connection_id
|
705 |
* @param array $connection
|
706 |
* @param mixed $form
|
707 |
-
*
|
|
|
708 |
*/
|
709 |
public function output_fields( $connection_id = '', $connection = array(), $form = '' ) {
|
710 |
|
711 |
-
if ( empty( $connection_id ) || empty( $connection['account_id'] ) || empty( $connection['list_id'] ) || empty( $form ) )
|
712 |
-
return;
|
|
|
713 |
|
714 |
$provider_fields = $this->api_fields( $connection_id, $connection['account_id'], $connection['list_id'] );
|
715 |
$form_fields = $this->get_form_fields( $form );
|
716 |
|
717 |
-
if ( is_wp_error( $provider_fields ) )
|
718 |
return $provider_fields;
|
|
|
719 |
|
720 |
$output = '<div class="wpforms-provider-fields wpforms-connection-block">';
|
721 |
|
722 |
-
|
723 |
|
724 |
-
|
725 |
-
|
726 |
|
727 |
-
|
728 |
|
729 |
-
|
730 |
|
731 |
-
|
732 |
|
733 |
-
|
734 |
|
735 |
-
|
736 |
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
|
|
|
|
|
|
741 |
|
742 |
-
|
743 |
|
744 |
-
|
745 |
|
746 |
-
|
747 |
|
748 |
-
|
749 |
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
|
756 |
-
|
757 |
|
758 |
-
|
759 |
|
760 |
-
|
761 |
|
762 |
-
|
763 |
|
764 |
-
|
765 |
|
766 |
-
|
767 |
|
768 |
$output .= '</div>';
|
769 |
|
@@ -774,15 +910,17 @@ abstract class WPForms_Provider {
|
|
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(
|
@@ -793,8 +931,8 @@ abstract class WPForms_Provider {
|
|
793 |
'parent' => 'providers',
|
794 |
'subsection' => $connection_id,
|
795 |
'actions' => array(
|
796 |
-
'go'
|
797 |
-
'stop'
|
798 |
),
|
799 |
'action_desc' => __( 'this connection if', 'wpforms' ),
|
800 |
'reference' => __( 'Marketing provider connection', 'wpforms' ),
|
@@ -808,19 +946,20 @@ abstract class WPForms_Provider {
|
|
808 |
* Provider account list options HTML.
|
809 |
*
|
810 |
* @since 1.0.0
|
|
|
811 |
* @param string $connection_id
|
812 |
* @param array $connection
|
813 |
-
*
|
814 |
* @return string
|
815 |
*/
|
816 |
-
public function output_options( $connection_id = '', $connection = array()
|
817 |
}
|
818 |
|
819 |
-
|
820 |
//
|
821 |
-
//
|
822 |
//
|
823 |
-
|
824 |
|
825 |
/**
|
826 |
* Fetch and store the current form data when in the builder.
|
@@ -830,7 +969,12 @@ abstract class WPForms_Provider {
|
|
830 |
public function builder_form_data() {
|
831 |
|
832 |
if ( ! empty( $_GET['form_id'] ) && empty( $this->form_data ) ) {
|
833 |
-
$this->form_data
|
|
|
|
|
|
|
|
|
|
|
834 |
}
|
835 |
}
|
836 |
|
@@ -844,14 +988,16 @@ abstract class WPForms_Provider {
|
|
844 |
$form_data = $this->form_data;
|
845 |
$providers = get_option( 'wpforms_providers' );
|
846 |
|
847 |
-
if ( !empty( $form_data['providers'][$this->slug] ) && !empty( $providers[$this->slug] ) ) {
|
848 |
-
|
849 |
-
foreach( $form_data['providers'][$this->slug] as $connection_id => $connection ) {
|
850 |
|
851 |
-
|
852 |
|
853 |
-
|
854 |
|
|
|
|
|
|
|
|
|
855 |
echo $this->output_connection( $connection_id, $connection, $form_data );
|
856 |
}
|
857 |
}
|
@@ -867,20 +1013,20 @@ abstract class WPForms_Provider {
|
|
867 |
public function builder_sidebar() {
|
868 |
|
869 |
$form_data = $this->form_data;
|
870 |
-
$configured = !empty( $form_data['providers'][$this->slug] ) ? 'configured' : '';
|
871 |
$configured = apply_filters( 'wpforms_providers_' . $this->slug . '_configured', $configured );
|
872 |
|
873 |
echo '<a href="#" class="wpforms-panel-sidebar-section icon ' . $configured . ' wpforms-panel-sidebar-section-' . esc_attr( $this->slug ) . '" data-section="' . esc_attr( $this->slug ) . '">';
|
874 |
|
875 |
-
|
876 |
|
877 |
-
|
878 |
|
879 |
-
|
880 |
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
|
885 |
echo '</a>';
|
886 |
}
|
@@ -892,7 +1038,8 @@ abstract class WPForms_Provider {
|
|
892 |
*/
|
893 |
public function builder_output() {
|
894 |
?>
|
895 |
-
<div class="wpforms-panel-content-section wpforms-panel-content-section-<?php echo $this->slug; ?>"
|
|
|
896 |
|
897 |
<?php $this->builder_output_before(); ?>
|
898 |
|
@@ -900,7 +1047,9 @@ abstract class WPForms_Provider {
|
|
900 |
|
901 |
<?php echo $this->name; ?>
|
902 |
|
903 |
-
<button class="wpforms-provider-connections-add" data-form_id="<?php echo absint( $_GET['form_id'] ); ?>"
|
|
|
|
|
904 |
|
905 |
</div>
|
906 |
|
@@ -936,11 +1085,11 @@ abstract class WPForms_Provider {
|
|
936 |
public function builder_output_after() {
|
937 |
}
|
938 |
|
939 |
-
|
940 |
//
|
941 |
-
//
|
942 |
//
|
943 |
-
|
944 |
|
945 |
/**
|
946 |
* Form fields to add a new provider account.
|
@@ -948,7 +1097,6 @@ abstract class WPForms_Provider {
|
|
948 |
* @since 1.0.0
|
949 |
*/
|
950 |
public function integrations_tab_new_form() {
|
951 |
-
|
952 |
}
|
953 |
|
954 |
/**
|
@@ -962,24 +1110,36 @@ abstract class WPForms_Provider {
|
|
962 |
check_ajax_referer( 'wpforms-admin', 'nonce' );
|
963 |
|
964 |
// Check for permissions
|
965 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
966 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
967 |
}
|
968 |
|
969 |
if ( empty( $_POST['provider'] ) || empty( $_POST['key'] ) ) {
|
970 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
971 |
}
|
972 |
|
973 |
$providers = get_option( 'wpforms_providers', false );
|
974 |
|
975 |
-
if ( !empty( $providers[$_POST['provider']][$_POST['key']] ) ) {
|
976 |
|
977 |
-
unset( $providers[$_POST['provider']][$_POST['key']] );
|
978 |
update_option( 'wpforms_providers', $providers );
|
979 |
wp_send_json_success();
|
980 |
|
981 |
} else {
|
982 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
983 |
}
|
984 |
}
|
985 |
|
@@ -990,19 +1150,28 @@ abstract class WPForms_Provider {
|
|
990 |
*/
|
991 |
public function integrations_tab_add() {
|
992 |
|
993 |
-
if ( $_POST['provider']
|
994 |
return;
|
|
|
995 |
|
996 |
// Run a security check
|
997 |
check_ajax_referer( 'wpforms-admin', 'nonce' );
|
998 |
|
999 |
// Check for permissions
|
1000 |
-
if ( !current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
1001 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
1002 |
}
|
1003 |
|
1004 |
if ( empty( $_POST['data'] ) ) {
|
1005 |
-
wp_send_json_error(
|
|
|
|
|
|
|
|
|
1006 |
}
|
1007 |
|
1008 |
$data = wp_parse_args( $_POST['data'], array() );
|
@@ -1010,45 +1179,53 @@ abstract class WPForms_Provider {
|
|
1010 |
|
1011 |
if ( is_wp_error( $auth ) ) {
|
1012 |
|
1013 |
-
wp_send_json_error(
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
|
|
|
|
1017 |
|
1018 |
} else {
|
1019 |
|
1020 |
$account = '<li>';
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
$account .= '</li>';
|
1025 |
|
1026 |
-
wp_send_json_success(
|
|
|
|
|
|
|
|
|
1027 |
}
|
1028 |
}
|
1029 |
|
1030 |
-
|
1031 |
/**
|
1032 |
* Add provider to the Settings Integrations tab
|
1033 |
*
|
1034 |
* @since 1.0.0
|
|
|
1035 |
* @param array $active
|
1036 |
* @param array $settings
|
1037 |
*/
|
1038 |
public function integrations_tab_options( $active, $settings ) {
|
1039 |
|
1040 |
-
$slug =
|
1041 |
$name = esc_html( $this->name );
|
1042 |
-
$connected = !empty( $active[$this->slug] );
|
1043 |
-
$accounts = !empty( $settings[$this->slug] ) ? $settings[$this->slug] : '';
|
1044 |
$class = $connected && $accounts ? 'connected' : '';
|
1045 |
$arrow = 'right';
|
|
|
|
|
1046 |
|
1047 |
// This lets us highlight a specific service by a special link
|
1048 |
-
if ( !empty( $_GET['wpforms-integration'] ) ) {
|
1049 |
-
if ( $this->slug
|
1050 |
$class .= ' focus-in';
|
1051 |
-
$arrow
|
1052 |
} else {
|
1053 |
$class .= ' focus-out';
|
1054 |
}
|
@@ -1066,8 +1243,13 @@ abstract class WPForms_Provider {
|
|
1066 |
|
1067 |
<div class="wpforms-settings-provider-info">
|
1068 |
<h3><?php echo $name; ?></h3>
|
1069 |
-
<p
|
1070 |
-
|
|
|
|
|
|
|
|
|
|
|
1071 |
</div>
|
1072 |
|
1073 |
</div>
|
@@ -1077,12 +1259,12 @@ abstract class WPForms_Provider {
|
|
1077 |
<div class="wpforms-settings-provider-accounts-list">
|
1078 |
<ul>
|
1079 |
<?php
|
1080 |
-
if ( !empty( $accounts ) ) {
|
1081 |
foreach ( $accounts as $key => $account ) {
|
1082 |
echo '<li class="wpforms-clear">';
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
echo '</li>';
|
1087 |
}
|
1088 |
}
|
@@ -1091,19 +1273,23 @@ abstract class WPForms_Provider {
|
|
1091 |
</div>
|
1092 |
|
1093 |
<p class="wpforms-settings-provider-accounts-toggle">
|
1094 |
-
<a class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey" href="#" data-provider="<?php echo $slug; ?>"
|
|
|
|
|
1095 |
</p>
|
1096 |
|
1097 |
<div class="wpforms-settings-provider-accounts-connect">
|
1098 |
|
1099 |
<form>
|
1100 |
-
|
1101 |
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
|
1106 |
-
|
|
|
|
|
1107 |
</form>
|
1108 |
</div>
|
1109 |
|
@@ -1117,8 +1303,10 @@ abstract class WPForms_Provider {
|
|
1117 |
* Error wrapper for WP_Error.
|
1118 |
*
|
1119 |
* @since 1.0.0
|
1120 |
-
*
|
1121 |
* @param string $message
|
|
|
|
|
1122 |
* @return object
|
1123 |
*/
|
1124 |
public function error( $message = '', $parent = '0' ) {
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Provider class.
|
5 |
*
|
8 |
* @since 1.0.0
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2016, WPForms LLC
|
11 |
+
*/
|
12 |
abstract class WPForms_Provider {
|
13 |
|
14 |
/**
|
15 |
+
* Provider addon version.
|
16 |
*
|
17 |
* @since 1.0.0
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
*/
|
21 |
+
protected $version;
|
22 |
|
23 |
/**
|
24 |
* Provider name.
|
25 |
*
|
26 |
* @since 1.0.0
|
27 |
+
*
|
28 |
+
* @var string
|
29 |
*/
|
30 |
public $name;
|
31 |
|
33 |
* Provider name in slug format.
|
34 |
*
|
35 |
* @since 1.0.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
*/
|
39 |
public $slug;
|
40 |
|
42 |
* Load priority.
|
43 |
*
|
44 |
* @since 1.0.0
|
45 |
+
*
|
46 |
* @var int
|
47 |
*/
|
48 |
public $priority = 10;
|
51 |
* Holds the API connections.
|
52 |
*
|
53 |
* @since 1.0.0
|
54 |
+
*
|
55 |
* @var mixed
|
56 |
*/
|
57 |
public $api = false;
|
60 |
* Service icon.
|
61 |
*
|
62 |
* @since 1.0.0
|
63 |
+
*
|
64 |
* @var string
|
65 |
*/
|
66 |
public $icon;
|
69 |
* Service icon.
|
70 |
*
|
71 |
* @since 1.2.3
|
72 |
+
*
|
73 |
* @var string
|
74 |
*/
|
75 |
public $type;
|
78 |
* Form data.
|
79 |
*
|
80 |
* @since 1.2.3
|
81 |
+
*
|
82 |
* @var array
|
83 |
*/
|
84 |
public $form_data;
|
113 |
add_action( 'wpforms_providers_panel_content', array( $this, 'builder_output' ), $this->priority );
|
114 |
|
115 |
// Remove provider from Settings Integrations tab
|
116 |
+
add_action( 'wp_ajax_wpforms_settings_provider_disconnect', array( $this, 'integrations_tab_disconnect' ) );
|
117 |
|
118 |
// Add new provider from Settings Integrations tab
|
119 |
+
add_action( 'wp_ajax_wpforms_settings_provider_add', array( $this, 'integrations_tab_add' ) );
|
120 |
|
121 |
// Add providers sections to the Settings Integrations tab
|
122 |
add_action( 'wpforms_settings_providers', array( $this, 'integrations_tab_options' ), $this->priority, 2 );
|
134 |
* Add to list of registered providers.
|
135 |
*
|
136 |
* @since 1.0.0
|
137 |
+
*
|
138 |
* @param array $providers
|
139 |
+
*
|
140 |
* @return array
|
141 |
*/
|
142 |
function register_provider( $providers = array() ) {
|
143 |
|
144 |
+
$providers[ $this->slug ] = $this->name;
|
145 |
+
|
146 |
return $providers;
|
147 |
}
|
148 |
|
157 |
check_ajax_referer( 'wpforms-builder', 'nonce' );
|
158 |
|
159 |
// Check for permissions
|
160 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
161 |
+
wp_send_json_error(
|
162 |
+
array(
|
163 |
+
'error' => __( 'You do not have permission', 'wpforms' ),
|
164 |
+
)
|
165 |
+
);
|
166 |
}
|
167 |
|
168 |
+
// --------------------------------------------------------------------//
|
169 |
// Create new connection
|
170 |
+
// --------------------------------------------------------------------//
|
171 |
|
172 |
+
if ( 'new_connection' === $_POST['task'] ) {
|
173 |
|
174 |
+
$connection = $this->output_connection(
|
175 |
+
'',
|
176 |
+
array(
|
177 |
+
'connection_name' => $_POST['name'],
|
178 |
+
),
|
179 |
+
$_POST['id']
|
180 |
+
);
|
181 |
+
wp_send_json_success(
|
182 |
+
array(
|
183 |
+
'html' => $connection,
|
184 |
+
)
|
185 |
+
);
|
186 |
}
|
187 |
|
188 |
+
// --------------------------------------------------------------------//
|
189 |
// Create new Provider account
|
190 |
+
// --------------------------------------------------------------------//
|
191 |
|
192 |
+
if ( 'new_account' === $_POST['task'] ) {
|
193 |
|
194 |
$auth = $this->api_auth( wp_parse_args( $_POST['data'], array() ), $_POST['id'] );
|
195 |
|
196 |
if ( is_wp_error( $auth ) ) {
|
197 |
|
198 |
+
wp_send_json_error(
|
199 |
+
array(
|
200 |
+
'error' => $auth->get_error_message(),
|
201 |
+
)
|
202 |
+
);
|
203 |
|
204 |
} else {
|
205 |
|
206 |
+
$accounts = $this->output_accounts(
|
207 |
+
$_POST['connection_id'],
|
208 |
+
array(
|
209 |
+
'account_id' => $auth,
|
210 |
+
)
|
211 |
+
);
|
212 |
+
wp_send_json_success(
|
213 |
+
array(
|
214 |
+
'html' => $accounts,
|
215 |
+
)
|
216 |
+
);
|
217 |
}
|
218 |
}
|
219 |
|
220 |
+
// --------------------------------------------------------------------//
|
221 |
// Select/Toggle Provider accounts
|
222 |
+
// --------------------------------------------------------------------//
|
223 |
|
224 |
+
if ( 'select_account' === $_POST['task'] ) {
|
225 |
|
226 |
+
$lists = $this->output_lists(
|
227 |
+
$_POST['connection_id'],
|
228 |
+
array(
|
229 |
+
'account_id' => $_POST['account_id'],
|
230 |
+
)
|
231 |
+
);
|
232 |
|
233 |
if ( is_wp_error( $lists ) ) {
|
234 |
|
235 |
+
wp_send_json_error(
|
236 |
+
array(
|
237 |
+
'error' => $lists->get_error_message(),
|
238 |
+
)
|
239 |
+
);
|
240 |
|
241 |
} else {
|
242 |
|
243 |
+
wp_send_json_success(
|
244 |
+
array(
|
245 |
+
'html' => $lists,
|
246 |
+
)
|
247 |
+
);
|
248 |
}
|
249 |
}
|
250 |
|
251 |
+
// --------------------------------------------------------------------//
|
252 |
// Select/Toggle Provider account lists
|
253 |
+
// --------------------------------------------------------------------//
|
254 |
|
255 |
+
if ( 'select_list' === $_POST['task'] ) {
|
256 |
|
257 |
+
$fields = $this->output_fields( $_POST['connection_id'], array(
|
258 |
+
'account_id' => $_POST['account_id'],
|
259 |
+
'list_id' => $_POST['list_id'],
|
260 |
+
), $_POST['id'] );
|
261 |
|
262 |
if ( is_wp_error( $fields ) ) {
|
263 |
|
264 |
+
wp_send_json_error(
|
265 |
+
array(
|
266 |
+
'error' => $fields->get_error_message(),
|
267 |
+
)
|
268 |
+
);
|
269 |
|
270 |
} else {
|
271 |
|
272 |
+
$groups = $this->output_groups(
|
273 |
+
$_POST['connection_id'],
|
274 |
+
array(
|
275 |
+
'account_id' => $_POST['account_id'],
|
276 |
+
'list_id' => $_POST['list_id'],
|
277 |
+
)
|
278 |
+
);
|
279 |
+
|
280 |
+
$conditionals = $this->output_conditionals(
|
281 |
+
$_POST['connection_id'],
|
282 |
+
array(
|
283 |
+
'account_id' => $_POST['account_id'],
|
284 |
+
'list_id' => $_POST['list_id'],
|
285 |
+
),
|
286 |
+
array(
|
287 |
+
'id' => absint( $_POST['form_id'] ),
|
288 |
+
)
|
289 |
+
);
|
290 |
|
291 |
+
$options = $this->output_options(
|
292 |
+
$_POST['connection_id'],
|
293 |
+
array(
|
294 |
+
'account_id' => $_POST['account_id'],
|
295 |
+
'list_id' => $_POST['list_id'],
|
296 |
+
)
|
297 |
+
);
|
298 |
+
|
299 |
+
wp_send_json_success(
|
300 |
+
array(
|
301 |
+
'html' => $groups . $fields . $conditionals . $options,
|
302 |
+
)
|
303 |
+
);
|
304 |
}
|
305 |
}
|
306 |
|
311 |
* Process and submit entry to provider.
|
312 |
*
|
313 |
* @since 1.0.0
|
314 |
+
*
|
315 |
* @param array $fields
|
316 |
* @param array $entry
|
317 |
* @param array $form_data
|
324 |
* Process conditional fields.
|
325 |
*
|
326 |
* @since 1.0.0
|
327 |
+
*
|
328 |
* @param array $fields
|
329 |
* @param array $entry
|
330 |
* @param array $form_data
|
331 |
* @param array $connection
|
332 |
+
*
|
333 |
+
* @return bool
|
334 |
*/
|
335 |
public function process_conditionals( $fields, $entry, $form_data, $connection ) {
|
336 |
|
355 |
* variations.
|
356 |
*
|
357 |
* @since 1.0.0
|
358 |
+
*
|
359 |
+
* @param object|bool $form
|
360 |
+
* @param array $whitelist
|
361 |
+
*
|
362 |
+
* @return bool|array
|
363 |
*/
|
364 |
public function get_form_fields( $form = false, $whitelist = array() ) {
|
365 |
|
367 |
if ( is_object( $form ) ) {
|
368 |
$form = wpforms_decode( $form->post_content );
|
369 |
} elseif ( is_numeric( $form ) ) {
|
370 |
+
$form = wpforms()->form->get(
|
371 |
+
$form,
|
372 |
+
array(
|
373 |
+
'content_only' => true,
|
374 |
+
)
|
375 |
+
);
|
376 |
}
|
377 |
|
378 |
+
if ( ! is_array( $form ) || empty( $form['fields'] ) ) {
|
379 |
return false;
|
380 |
+
}
|
381 |
|
382 |
// White list of field types to allow
|
383 |
$allowed_form_fields = array(
|
393 |
'hidden',
|
394 |
'date-time',
|
395 |
'phone',
|
396 |
+
'number',
|
397 |
);
|
398 |
$allowed_form_fields = apply_filters( 'wpforms_providers_fields', $allowed_form_fields );
|
399 |
|
400 |
+
$whitelist = ! empty( $whitelist ) ? $whitelist : $allowed_form_fields;
|
401 |
|
402 |
$form_fields = $form['fields'];
|
403 |
|
404 |
+
foreach ( $form_fields as $id => $form_field ) {
|
405 |
+
if ( ! in_array( $form_field['type'], $whitelist, true ) ) {
|
406 |
+
unset( $form_fields[ $id ] );
|
407 |
}
|
408 |
}
|
409 |
|
417 |
* provider field types.
|
418 |
*
|
419 |
* @since 1.0.0
|
420 |
+
*
|
421 |
* @param array $form_fields
|
422 |
* @param string $form_field_type
|
423 |
+
*
|
424 |
+
* @return array
|
425 |
*/
|
426 |
public function get_form_field_select( $form_fields = array(), $form_field_type = '' ) {
|
427 |
|
428 |
+
if ( empty( $form_fields ) || empty( $form_field_type ) ) {
|
429 |
return array();
|
430 |
+
}
|
431 |
|
432 |
$formatted = array();
|
433 |
|
435 |
foreach ( $form_fields as $id => $form_field ) {
|
436 |
|
437 |
// Email
|
438 |
+
if (
|
439 |
+
'email' === $form_field_type &&
|
440 |
+
! in_array( $form_field['type'], array( 'text', 'email' ), true )
|
441 |
+
) {
|
442 |
+
unset( $form_fields[ $id ] );
|
443 |
}
|
444 |
|
445 |
// Address
|
446 |
+
if (
|
447 |
+
'address' === $form_field_type &&
|
448 |
+
! in_array( $form_field['type'], array( 'address' ), true )
|
449 |
+
) {
|
450 |
+
unset( $form_fields[ $id ] );
|
451 |
}
|
452 |
}
|
453 |
|
455 |
foreach ( $form_fields as $id => $form_field ) {
|
456 |
|
457 |
// Complex Name field
|
458 |
+
if ( 'name' === $form_field['type'] ) {
|
459 |
|
460 |
+
// Full Name.
|
461 |
$formatted[] = array(
|
462 |
'id' => $form_field['id'],
|
463 |
'key' => 'value',
|
464 |
'type' => $form_field['type'],
|
465 |
'subtype' => '',
|
466 |
'provider_type' => $form_field_type,
|
467 |
+
'label' => sprintf( _x( '%s (Full)', 'Name field label', 'wpforms'), $form_field['label'] ),
|
468 |
);
|
469 |
|
470 |
+
// First Name.
|
471 |
if ( strpos( $form_field['format'], 'first' ) !== false ) {
|
472 |
$formatted[] = array(
|
473 |
'id' => $form_field['id'],
|
475 |
'type' => $form_field['type'],
|
476 |
'subtype' => 'first',
|
477 |
'provider_type' => $form_field_type,
|
478 |
+
'label' => sprintf( _x( '%s (First)', 'Name field label', 'wpforms'), $form_field['label'] ),
|
479 |
);
|
480 |
}
|
481 |
|
482 |
+
// Middle Name.
|
483 |
if ( strpos( $form_field['format'], 'middle' ) !== false ) {
|
484 |
$formatted[] = array(
|
485 |
'id' => $form_field['id'],
|
487 |
'type' => $form_field['type'],
|
488 |
'subtype' => 'middle',
|
489 |
'provider_type' => $form_field_type,
|
490 |
+
'label' => sprintf( _x( '%s (Middle)', 'Name field label', 'wpforms'), $form_field['label'] ),
|
491 |
);
|
492 |
}
|
493 |
|
494 |
+
// Last Name.
|
495 |
if ( strpos( $form_field['format'], 'last' ) !== false ) {
|
496 |
$formatted[] = array(
|
497 |
'id' => $form_field['id'],
|
499 |
'type' => $form_field['type'],
|
500 |
'subtype' => 'last',
|
501 |
'provider_type' => $form_field_type,
|
502 |
+
'label' => sprintf( _x( '%s (Last)', 'Name field label', 'wpforms'), $form_field['label'] ),
|
503 |
);
|
504 |
}
|
505 |
|
506 |
+
// All other fields
|
507 |
} else {
|
508 |
|
509 |
$formatted[] = array(
|
520 |
return $formatted;
|
521 |
}
|
522 |
|
523 |
+
// ************************************************************************//
|
524 |
//
|
525 |
+
// API methods - these methods interact directly with the provider API.
|
526 |
//
|
527 |
+
// ************************************************************************//
|
528 |
|
529 |
/**
|
530 |
* Authenticate with the provider API.
|
540 |
* Establish connection object to provider API.
|
541 |
*
|
542 |
* @since 1.0.0
|
543 |
+
*
|
544 |
* @param string $account_id
|
545 |
* @return mixed array or error object
|
546 |
*/
|
551 |
* Retrieve provider account lists.
|
552 |
*
|
553 |
* @since 1.0.0
|
554 |
+
*
|
555 |
* @param string $connection_id
|
556 |
* @param string $account_id
|
557 |
* @return mixed array or error object
|
563 |
* Retrieve provider account list groups.
|
564 |
*
|
565 |
* @since 1.0.0
|
566 |
+
*
|
567 |
* @param string $connection_id
|
568 |
* @param string $account_id
|
569 |
+
* @param string $list_id
|
570 |
*/
|
571 |
public function api_groups( $connection_id = '', $account_id = '', $list_id = '' ) {
|
572 |
}
|
575 |
* Retrieve provider account list fields.
|
576 |
*
|
577 |
* @since 1.0.0
|
578 |
+
*
|
579 |
* @param string $connection_id
|
580 |
* @param string $account_id
|
581 |
+
* @param string $list_id
|
582 |
*/
|
583 |
public function api_fields( $connection_id = '', $account_id = '', $list_id = '' ) {
|
584 |
}
|
585 |
|
586 |
|
587 |
+
// ************************************************************************//
|
588 |
//
|
589 |
+
// Output methods - these methods generally return HTML for the builder.
|
590 |
//
|
591 |
+
// ************************************************************************//
|
592 |
|
593 |
/**
|
594 |
* Connection HTML.
|
596 |
* This method compiles all the HTML necessary for a connection to a provider.
|
597 |
*
|
598 |
* @since 1.0.0
|
599 |
+
*
|
600 |
* @param string $connection_id
|
601 |
* @param array $connection
|
602 |
+
* @param mixed $form Form id or form data.
|
603 |
+
*
|
604 |
* @return string
|
605 |
*/
|
606 |
public function output_connection( $connection_id = '', $connection = array(), $form = '' ) {
|
609 |
$connection_id = 'connection_' . uniqid();
|
610 |
}
|
611 |
|
612 |
+
if ( empty( $connection ) || empty( $form ) ) {
|
613 |
+
return '';
|
614 |
+
}
|
615 |
|
616 |
$output = sprintf( '<div class="wpforms-provider-connection" data-provider="%s" data-connection_id="%s">', $this->slug, $connection_id );
|
617 |
|
618 |
+
$output .= $this->output_connection_header( $connection_id, $connection );
|
619 |
|
620 |
+
$output .= $this->output_auth();
|
621 |
|
622 |
+
$output .= $this->output_accounts( $connection_id, $connection );
|
623 |
|
624 |
+
$lists = $this->output_lists( $connection_id, $connection );
|
625 |
+
$output .= ! is_wp_error( $lists ) ? $lists : '';
|
626 |
|
627 |
+
$output .= $this->output_groups( $connection_id, $connection );
|
628 |
|
629 |
+
$fields = $this->output_fields( $connection_id, $connection, $form );
|
630 |
+
$output .= ! is_wp_error( $fields ) ? $fields : '';
|
631 |
|
632 |
+
$output .= $this->output_conditionals( $connection_id, $connection, $form );
|
633 |
|
634 |
+
$output .= $this->output_options( $connection_id, $connection );
|
635 |
|
636 |
$output .= '</div>';
|
637 |
|
642 |
* Connection header HTML.
|
643 |
*
|
644 |
* @since 1.0.0
|
645 |
+
*
|
646 |
* @param string $connection_id
|
647 |
* @param array $connection
|
648 |
+
*
|
649 |
* @return string
|
650 |
*/
|
651 |
public function output_connection_header( $connection_id = '', $connection = array() ) {
|
652 |
|
653 |
+
if ( empty( $connection_id ) || empty( $connection ) ) {
|
654 |
+
return '';
|
655 |
+
}
|
656 |
|
657 |
$output = '<div class="wpforms-provider-connection-header">';
|
658 |
|
659 |
+
$output .= sprintf( '<span>%s</span>', sanitize_text_field( $connection['connection_name'] ) );
|
660 |
|
661 |
+
$output .= '<button class="wpforms-provider-connection-delete"><i class="fa fa-times-circle"></i></button>';
|
662 |
|
663 |
+
$output .= sprintf( '<input type="hidden" name="providers[%s][%s][connection_name]" value="%s">', $this->slug, $connection_id, esc_attr( $connection['connection_name'] ) );
|
664 |
|
665 |
$output .= '</div>';
|
666 |
|
671 |
* Provider account authorize fields HTML.
|
672 |
*
|
673 |
* @since 1.0.0
|
|
|
674 |
*/
|
675 |
public function output_auth() {
|
676 |
}
|
679 |
* Provider account select HTML.
|
680 |
*
|
681 |
* @since 1.0.0
|
682 |
+
*
|
683 |
* @param string $connection_id
|
684 |
* @param array $connection
|
685 |
+
*
|
686 |
* @return string
|
687 |
*/
|
688 |
public function output_accounts( $connection_id = '', $connection = array() ) {
|
689 |
|
690 |
+
if ( empty( $connection_id ) || empty( $connection ) ) {
|
691 |
+
return '';
|
692 |
+
}
|
693 |
|
694 |
$providers = get_option( 'wpforms_providers' );
|
695 |
|
696 |
+
if ( empty( $providers[ $this->slug ] ) ) {
|
697 |
+
return '';
|
698 |
+
}
|
699 |
|
700 |
$output = '<div class="wpforms-provider-accounts wpforms-connection-block">';
|
701 |
|
702 |
+
$output .= sprintf( '<h4>%s</h4>', __( 'Select Account', 'wpforms' ) );
|
703 |
+
|
704 |
+
$output .= sprintf( '<select name="providers[%s][%s][account_id]">', $this->slug, $connection_id );
|
705 |
+
foreach ( $providers[ $this->slug ] as $key => $provider_details ) {
|
706 |
+
$selected = ! empty( $connection['account_id'] ) ? $connection['account_id'] : '';
|
707 |
+
$output .= sprintf(
|
708 |
+
'<option value="%s" %s>%s</option>',
|
709 |
+
$key,
|
710 |
+
selected( $selected, $key, false ),
|
711 |
+
esc_html( $provider_details['label'] )
|
712 |
+
);
|
713 |
+
}
|
714 |
+
$output .= sprintf( '<option value="">%s</a>', __( 'Add New Account', 'wpforms' ) );
|
715 |
+
$output .= '</select>';
|
716 |
|
717 |
$output .= '</div>';
|
718 |
|
723 |
* Provider account lists HTML.
|
724 |
*
|
725 |
* @since 1.0.0
|
726 |
+
*
|
727 |
* @param string $connection_id
|
728 |
* @param array $connection
|
729 |
+
*
|
730 |
+
* @return WP_Error|string
|
731 |
*/
|
732 |
+
public function output_lists( $connection_id = '', $connection = array() ) {
|
733 |
|
734 |
+
if ( empty( $connection_id ) || empty( $connection['account_id'] ) ) {
|
735 |
+
return '';
|
736 |
+
}
|
737 |
|
738 |
$lists = $this->api_lists( $connection_id, $connection['account_id'] );
|
739 |
+
$selected = ! empty( $connection['list_id'] ) ? $connection['list_id'] : '';
|
740 |
|
741 |
if ( is_wp_error( $lists ) ) {
|
742 |
return $lists;
|
744 |
|
745 |
$output = '<div class="wpforms-provider-lists wpforms-connection-block">';
|
746 |
|
747 |
+
$output .= sprintf( '<h4>%s</h4>', __( 'Select List', 'wpforms' ) );
|
748 |
|
749 |
+
$output .= sprintf( '<select name="providers[%s][%s][list_id]">', $this->slug, $connection_id );
|
750 |
|
751 |
if ( ! empty( $lists ) ) {
|
752 |
foreach ( $lists as $list ) {
|
759 |
}
|
760 |
}
|
761 |
|
762 |
+
$output .= '</select>';
|
763 |
|
764 |
$output .= '</div>';
|
765 |
|
770 |
* Provider account list groups HTML.
|
771 |
*
|
772 |
* @since 1.0.0
|
773 |
+
*
|
774 |
* @param string $connection_id
|
775 |
* @param array $connection
|
776 |
+
*
|
777 |
* @return string
|
778 |
*/
|
779 |
public function output_groups( $connection_id = '', $connection = array() ) {
|
780 |
|
781 |
+
if ( empty( $connection_id ) || empty( $connection['account_id'] ) || empty( $connection['list_id'] ) ) {
|
782 |
+
return '';
|
783 |
+
}
|
784 |
|
785 |
$groupsets = $this->api_groups( $connection_id, $connection['account_id'], $connection['list_id'] );
|
786 |
|
787 |
+
if ( is_wp_error( $groupsets ) ) {
|
788 |
+
return '';
|
789 |
+
}
|
790 |
|
791 |
$output = '<div class="wpforms-provider-groups wpforms-connection-block">';
|
792 |
|
793 |
+
$output .= sprintf( '<h4>%s</h4>', __( 'Select Groups', 'wpforms' ) );
|
794 |
|
795 |
+
$output .= sprintf( '<p>%s</p>', __( 'We also noticed that you have some segments in your list. You can select specific list segments below if needed. This is optional.', 'wpforms' ) );
|
796 |
|
797 |
+
$output .= '<div class="wpforms-provider-groups-list">';
|
798 |
|
799 |
+
foreach ( $groupsets as $groupset ) {
|
800 |
|
801 |
+
$output .= sprintf( '<p>%s</p>', esc_html( $groupset['name'] ) );
|
802 |
|
803 |
+
foreach ( $groupset['groups'] as $group ) {
|
804 |
|
805 |
+
$selected = ! empty( $connection['groups'] ) && ! empty( $connection['groups'][ $groupset['id'] ] ) ? in_array( $group['name'], $connection['groups'][ $groupset['id'] ], true ) : false;
|
806 |
|
807 |
+
$output .= sprintf(
|
808 |
+
'<span><input id="group_%s" type="checkbox" value="%s" name="providers[%s][%s][groups][%s][%s]" %s><label for="group_%s">%s</label></span>',
|
809 |
+
esc_attr( $group['id'] ),
|
810 |
+
esc_attr( $group['name'] ),
|
811 |
+
$this->slug,
|
812 |
+
$connection_id,
|
813 |
+
$groupset['id'],
|
814 |
+
$group['id'],
|
815 |
+
checked( $selected, true, false ),
|
816 |
+
esc_attr( $group['id'] ),
|
817 |
+
esc_attr( $group['name'] )
|
818 |
+
);
|
819 |
+
}
|
820 |
+
}
|
821 |
|
822 |
+
$output .= '</div>';
|
823 |
|
824 |
$output .= '</div>';
|
825 |
|
830 |
* Provider account list fields HTML.
|
831 |
*
|
832 |
* @since 1.0.0
|
833 |
+
*
|
834 |
* @param string $connection_id
|
835 |
* @param array $connection
|
836 |
* @param mixed $form
|
837 |
+
*
|
838 |
+
* @return WP_Error|string
|
839 |
*/
|
840 |
public function output_fields( $connection_id = '', $connection = array(), $form = '' ) {
|
841 |
|
842 |
+
if ( empty( $connection_id ) || empty( $connection['account_id'] ) || empty( $connection['list_id'] ) || empty( $form ) ) {
|
843 |
+
return '';
|
844 |
+
}
|
845 |
|
846 |
$provider_fields = $this->api_fields( $connection_id, $connection['account_id'], $connection['list_id'] );
|
847 |
$form_fields = $this->get_form_fields( $form );
|
848 |
|
849 |
+
if ( is_wp_error( $provider_fields ) ) {
|
850 |
return $provider_fields;
|
851 |
+
}
|
852 |
|
853 |
$output = '<div class="wpforms-provider-fields wpforms-connection-block">';
|
854 |
|
855 |
+
$output .= sprintf( '<h4>%s</h4>', __( 'List Fields', 'wpforms' ) );
|
856 |
|
857 |
+
// Table with all the fields
|
858 |
+
$output .= '<table>';
|
859 |
|
860 |
+
$output .= sprintf( '<thead><tr><th>%s</th><th>%s</th></thead>', __( 'List Fields', 'wpforms' ), __( 'Available Form Fields', 'wpforms' ) );
|
861 |
|
862 |
+
$output .= '<tbody>';
|
863 |
|
864 |
+
foreach ( $provider_fields as $provider_field ) :
|
865 |
|
866 |
+
$output .= '<tr>';
|
867 |
|
868 |
+
$output .= '<td>';
|
869 |
|
870 |
+
$output .= esc_html( $provider_field['name'] );
|
871 |
+
if (
|
872 |
+
! empty( $provider_field['req'] ) &&
|
873 |
+
$provider_field['req'] == '1'
|
874 |
+
) {
|
875 |
+
$output .= '<span class="required">*</span>';
|
876 |
+
}
|
877 |
|
878 |
+
$output .= '<td>';
|
879 |
|
880 |
+
$output .= sprintf( '<select name="providers[%s][%s][fields][%s]">', $this->slug, $connection_id, esc_attr( $provider_field['tag'] ) );
|
881 |
|
882 |
+
$output .= '<option value=""></option>';
|
883 |
|
884 |
+
$options = $this->get_form_field_select( $form_fields, $provider_field['field_type'] );
|
885 |
|
886 |
+
foreach ( $options as $option ) {
|
887 |
+
$value = sprintf( '%d.%s.%s', $option['id'], $option['key'], $option['provider_type'] );
|
888 |
+
$selected = ! empty( $connection['fields'][ $provider_field['tag'] ] ) ? selected( $connection['fields'][ $provider_field['tag'] ], $value, false ) : '';
|
889 |
+
$output .= sprintf( '<option value="%s" %s>%s</option>', esc_attr( $value ), $selected, esc_html( $option['label'] ) );
|
890 |
+
}
|
891 |
|
892 |
+
$output .= '</select>';
|
893 |
|
894 |
+
$output .= '</td>';
|
895 |
|
896 |
+
$output .= '</tr>';
|
897 |
|
898 |
+
endforeach;
|
899 |
|
900 |
+
$output .= '</tbody>';
|
901 |
|
902 |
+
$output .= '</table>';
|
903 |
|
904 |
$output .= '</div>';
|
905 |
|
910 |
* Provider connection conditional options HTML
|
911 |
*
|
912 |
* @since 1.0.0
|
913 |
+
*
|
914 |
* @param string $connection_id
|
915 |
* @param array $connection
|
916 |
+
* @param string|array $form
|
917 |
+
*
|
918 |
* @return string
|
919 |
*/
|
920 |
public function output_conditionals( $connection_id = '', $connection = array(), $form = '' ) {
|
921 |
|
922 |
if ( empty( $connection['account_id'] ) ) {
|
923 |
+
return '';
|
924 |
}
|
925 |
|
926 |
return wpforms_conditional_logic()->builder_block(
|
931 |
'parent' => 'providers',
|
932 |
'subsection' => $connection_id,
|
933 |
'actions' => array(
|
934 |
+
'go' => __( 'Process', 'wpforms' ),
|
935 |
+
'stop' => __( 'Don\'t process', 'wpforms' ),
|
936 |
),
|
937 |
'action_desc' => __( 'this connection if', 'wpforms' ),
|
938 |
'reference' => __( 'Marketing provider connection', 'wpforms' ),
|
946 |
* Provider account list options HTML.
|
947 |
*
|
948 |
* @since 1.0.0
|
949 |
+
*
|
950 |
* @param string $connection_id
|
951 |
* @param array $connection
|
952 |
+
*
|
953 |
* @return string
|
954 |
*/
|
955 |
+
public function output_options( $connection_id = '', $connection = array() ) {
|
956 |
}
|
957 |
|
958 |
+
// ************************************************************************//
|
959 |
//
|
960 |
+
// Builder methods - these methods _build_ the Builder.
|
961 |
//
|
962 |
+
// ************************************************************************//
|
963 |
|
964 |
/**
|
965 |
* Fetch and store the current form data when in the builder.
|
969 |
public function builder_form_data() {
|
970 |
|
971 |
if ( ! empty( $_GET['form_id'] ) && empty( $this->form_data ) ) {
|
972 |
+
$this->form_data = wpforms()->form->get(
|
973 |
+
absint( $_GET['form_id'] ),
|
974 |
+
array(
|
975 |
+
'content_only' => true,
|
976 |
+
)
|
977 |
+
);
|
978 |
}
|
979 |
}
|
980 |
|
988 |
$form_data = $this->form_data;
|
989 |
$providers = get_option( 'wpforms_providers' );
|
990 |
|
991 |
+
if ( ! empty( $form_data['providers'][ $this->slug ] ) && ! empty( $providers[ $this->slug ] ) ) {
|
|
|
|
|
992 |
|
993 |
+
foreach ( $form_data['providers'][ $this->slug ] as $connection_id => $connection ) {
|
994 |
|
995 |
+
foreach ( $providers[ $this->slug ] as $account_id => $connections ) {
|
996 |
|
997 |
+
if (
|
998 |
+
! empty( $connection['account_id'] ) &&
|
999 |
+
$connection['account_id'] == $account_id
|
1000 |
+
) {
|
1001 |
echo $this->output_connection( $connection_id, $connection, $form_data );
|
1002 |
}
|
1003 |
}
|
1013 |
public function builder_sidebar() {
|
1014 |
|
1015 |
$form_data = $this->form_data;
|
1016 |
+
$configured = ! empty( $form_data['providers'][ $this->slug ] ) ? 'configured' : '';
|
1017 |
$configured = apply_filters( 'wpforms_providers_' . $this->slug . '_configured', $configured );
|
1018 |
|
1019 |
echo '<a href="#" class="wpforms-panel-sidebar-section icon ' . $configured . ' wpforms-panel-sidebar-section-' . esc_attr( $this->slug ) . '" data-section="' . esc_attr( $this->slug ) . '">';
|
1020 |
|
1021 |
+
echo '<img src="' . esc_url( $this->icon ) . '">';
|
1022 |
|
1023 |
+
echo esc_html( $this->name );
|
1024 |
|
1025 |
+
echo '<i class="fa fa-angle-right wpforms-toggle-arrow"></i>';
|
1026 |
|
1027 |
+
if ( ! empty( $configured ) ) {
|
1028 |
+
echo '<i class="fa fa-check-circle-o"></i>';
|
1029 |
+
}
|
1030 |
|
1031 |
echo '</a>';
|
1032 |
}
|
1038 |
*/
|
1039 |
public function builder_output() {
|
1040 |
?>
|
1041 |
+
<div class="wpforms-panel-content-section wpforms-panel-content-section-<?php echo esc_attr( $this->slug ); ?>"
|
1042 |
+
id="<?php echo esc_attr( $this->slug ); ?>-provider">
|
1043 |
|
1044 |
<?php $this->builder_output_before(); ?>
|
1045 |
|
1047 |
|
1048 |
<?php echo $this->name; ?>
|
1049 |
|
1050 |
+
<button class="wpforms-provider-connections-add" data-form_id="<?php echo absint( $_GET['form_id'] ); ?>"
|
1051 |
+
data-provider="<?php echo esc_attr( $this->slug ); ?>"
|
1052 |
+
data-type="<?php echo esc_attr( strtolower( $this->type ) ); ?>"><?php printf( _x( 'Add New %s', 'Provider Type', 'wpforms' ), esc_html( $this->type ) ); ?></button>
|
1053 |
|
1054 |
</div>
|
1055 |
|
1085 |
public function builder_output_after() {
|
1086 |
}
|
1087 |
|
1088 |
+
// ************************************************************************//
|
1089 |
//
|
1090 |
+
// Integrations tab methods - these methods relate to the settings page.
|
1091 |
//
|
1092 |
+
// ************************************************************************//
|
1093 |
|
1094 |
/**
|
1095 |
* Form fields to add a new provider account.
|
1097 |
* @since 1.0.0
|
1098 |
*/
|
1099 |
public function integrations_tab_new_form() {
|
|
|
1100 |
}
|
1101 |
|
1102 |
/**
|
1110 |
check_ajax_referer( 'wpforms-admin', 'nonce' );
|
1111 |
|
1112 |
// Check for permissions
|
1113 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
1114 |
+
wp_send_json_error(
|
1115 |
+
array(
|
1116 |
+
'error' => __( 'You do not have permission', 'wpforms' ),
|
1117 |
+
)
|
1118 |
+
);
|
1119 |
}
|
1120 |
|
1121 |
if ( empty( $_POST['provider'] ) || empty( $_POST['key'] ) ) {
|
1122 |
+
wp_send_json_error(
|
1123 |
+
array(
|
1124 |
+
'error' => __( 'Missing data', 'wpforms' ),
|
1125 |
+
)
|
1126 |
+
);
|
1127 |
}
|
1128 |
|
1129 |
$providers = get_option( 'wpforms_providers', false );
|
1130 |
|
1131 |
+
if ( ! empty( $providers[ $_POST['provider'] ][ $_POST['key'] ] ) ) {
|
1132 |
|
1133 |
+
unset( $providers[ $_POST['provider'] ][ $_POST['key'] ] );
|
1134 |
update_option( 'wpforms_providers', $providers );
|
1135 |
wp_send_json_success();
|
1136 |
|
1137 |
} else {
|
1138 |
+
wp_send_json_error(
|
1139 |
+
array(
|
1140 |
+
'error' => __( 'Connection missing', 'wpforms' ),
|
1141 |
+
)
|
1142 |
+
);
|
1143 |
}
|
1144 |
}
|
1145 |
|
1150 |
*/
|
1151 |
public function integrations_tab_add() {
|
1152 |
|
1153 |
+
if ( $_POST['provider'] !== $this->slug ) {
|
1154 |
return;
|
1155 |
+
}
|
1156 |
|
1157 |
// Run a security check
|
1158 |
check_ajax_referer( 'wpforms-admin', 'nonce' );
|
1159 |
|
1160 |
// Check for permissions
|
1161 |
+
if ( ! current_user_can( apply_filters( 'wpforms_manage_cap', 'manage_options' ) ) ) {
|
1162 |
+
wp_send_json_error(
|
1163 |
+
array(
|
1164 |
+
'error' => __( 'You do not have permission', 'wpforms' ),
|
1165 |
+
)
|
1166 |
+
);
|
1167 |
}
|
1168 |
|
1169 |
if ( empty( $_POST['data'] ) ) {
|
1170 |
+
wp_send_json_error(
|
1171 |
+
array(
|
1172 |
+
'error' => __( 'Missing data', 'wpforms' ),
|
1173 |
+
)
|
1174 |
+
);
|
1175 |
}
|
1176 |
|
1177 |
$data = wp_parse_args( $_POST['data'], array() );
|
1179 |
|
1180 |
if ( is_wp_error( $auth ) ) {
|
1181 |
|
1182 |
+
wp_send_json_error(
|
1183 |
+
array(
|
1184 |
+
'error' => __( 'Could not connect to the provider.', 'wpforms' ),
|
1185 |
+
'error_msg' => $auth->get_error_message(),
|
1186 |
+
)
|
1187 |
+
);
|
1188 |
|
1189 |
} else {
|
1190 |
|
1191 |
$account = '<li>';
|
1192 |
+
$account .= '<span class="label">' . sanitize_text_field( $data['label'] ) . '</span>';
|
1193 |
+
$account .= '<span class="date">' . sprintf( _x( 'Connected on: %s', 'Connection date', 'wpforms' ), date_i18n( get_option( 'date_format', time() ) ) ) . '</span>';
|
1194 |
+
$account .= '<a href="#" data-provider="' . $this->slug . '" data-key="' . esc_attr( $auth ) . '">' . __( 'Disconnect', 'wpforms' ) . '</a>';
|
1195 |
$account .= '</li>';
|
1196 |
|
1197 |
+
wp_send_json_success(
|
1198 |
+
array(
|
1199 |
+
'html' => $account,
|
1200 |
+
)
|
1201 |
+
);
|
1202 |
}
|
1203 |
}
|
1204 |
|
|
|
1205 |
/**
|
1206 |
* Add provider to the Settings Integrations tab
|
1207 |
*
|
1208 |
* @since 1.0.0
|
1209 |
+
*
|
1210 |
* @param array $active
|
1211 |
* @param array $settings
|
1212 |
*/
|
1213 |
public function integrations_tab_options( $active, $settings ) {
|
1214 |
|
1215 |
+
$slug = esc_attr( $this->slug );
|
1216 |
$name = esc_html( $this->name );
|
1217 |
+
$connected = ! empty( $active[ $this->slug ] );
|
1218 |
+
$accounts = ! empty( $settings[ $this->slug ] ) ? $settings[ $this->slug ] : '';
|
1219 |
$class = $connected && $accounts ? 'connected' : '';
|
1220 |
$arrow = 'right';
|
1221 |
+
/* translators: %s - provider name. */
|
1222 |
+
$title_connect_to = sprintf( __( 'Connect to %s', 'wpforms'), $name );
|
1223 |
|
1224 |
// This lets us highlight a specific service by a special link
|
1225 |
+
if ( ! empty( $_GET['wpforms-integration'] ) ) {
|
1226 |
+
if ( $this->slug === $_GET['wpforms-integration'] ) {
|
1227 |
$class .= ' focus-in';
|
1228 |
+
$arrow = 'down';
|
1229 |
} else {
|
1230 |
$class .= ' focus-out';
|
1231 |
}
|
1243 |
|
1244 |
<div class="wpforms-settings-provider-info">
|
1245 |
<h3><?php echo $name; ?></h3>
|
1246 |
+
<p>
|
1247 |
+
<?php
|
1248 |
+
/* translators: %s - provider name. */
|
1249 |
+
printf( __( 'Integrate %s with WPForms', 'wpforms' ), $name );
|
1250 |
+
?>
|
1251 |
+
</p>
|
1252 |
+
<span class="connected-indicator green"><i class="fa fa-check-circle-o"></i> <?php _e( 'Connected', 'wpforms' ); ?></span>
|
1253 |
</div>
|
1254 |
|
1255 |
</div>
|
1259 |
<div class="wpforms-settings-provider-accounts-list">
|
1260 |
<ul>
|
1261 |
<?php
|
1262 |
+
if ( ! empty( $accounts ) ) {
|
1263 |
foreach ( $accounts as $key => $account ) {
|
1264 |
echo '<li class="wpforms-clear">';
|
1265 |
+
echo '<span class="label">' . esc_html( $account['label'] ) . '</span>';
|
1266 |
+
echo '<span class="date">' . sprintf( _x( 'Connected on: %s', 'Connection date', 'wpforms' ), date_i18n( get_option( 'date_format' ), $account['date'] ) ) . '</span>';
|
1267 |
+
echo '<span class="remove"><a href="#" data-provider="' . $slug . '" data-key="' . $key . '">' . __( 'Disconnect', 'wpforms' ) . '</a><span>';
|
1268 |
echo '</li>';
|
1269 |
}
|
1270 |
}
|
1273 |
</div>
|
1274 |
|
1275 |
<p class="wpforms-settings-provider-accounts-toggle">
|
1276 |
+
<a class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey" href="#" data-provider="<?php echo $slug; ?>">
|
1277 |
+
<i class="fa fa-plus"></i> <?php _ex( 'Add New Account', 'New Provider Account', 'wpforms' ); ?>
|
1278 |
+
</a>
|
1279 |
</p>
|
1280 |
|
1281 |
<div class="wpforms-settings-provider-accounts-connect">
|
1282 |
|
1283 |
<form>
|
1284 |
+
<p><?php _e( 'Please fill out all of the fields below to add your new provider account.', 'wpforms' ); ?></span></p>
|
1285 |
|
1286 |
+
<p class="wpforms-settings-provider-accounts-connect-fields">
|
1287 |
+
<?php $this->integrations_tab_new_form(); ?>
|
1288 |
+
</p>
|
1289 |
|
1290 |
+
<button type="submit" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-settings-provider-connect" data-provider="<?php echo $slug; ?>" title="<?php echo esc_attr( $title_connect_to ); ?>">
|
1291 |
+
<?php echo $title_connect_to; ?>
|
1292 |
+
</button>
|
1293 |
</form>
|
1294 |
</div>
|
1295 |
|
1303 |
* Error wrapper for WP_Error.
|
1304 |
*
|
1305 |
* @since 1.0.0
|
1306 |
+
*
|
1307 |
* @param string $message
|
1308 |
+
* @param string $parent
|
1309 |
+
*
|
1310 |
* @return object
|
1311 |
*/
|
1312 |
public function error( $message = '', $parent = '0' ) {
|
includes/providers/class-constant-contact.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Constant Contact integration.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.3.6
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2017, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Constant_Contact extends WPForms_Provider {
|
12 |
|
13 |
/**
|
@@ -49,9 +50,9 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
49 |
|
50 |
if ( is_admin() ) {
|
51 |
// Admin notice requesting connecting
|
52 |
-
add_action( 'admin_notices',
|
53 |
add_action( 'wp_ajax_wpforms_constant_contact_dismiss', array( $this, 'connect_dismiss' ) );
|
54 |
-
add_action( 'wpforms_admin_page',
|
55 |
|
56 |
// Provide option to override sign up link
|
57 |
$sign_up = get_option( 'wpforms_constant_contact_signup', false );
|
@@ -65,22 +66,27 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
65 |
* Process and submit entry to provider.
|
66 |
*
|
67 |
* @since 1.3.6
|
|
|
68 |
* @param array $fields
|
69 |
* @param array $entry
|
70 |
* @param array $form_data
|
|
|
|
|
|
|
71 |
*/
|
72 |
public function process_entry( $fields, $entry, $form_data, $entry_id = 0 ) {
|
73 |
|
74 |
// Only run if this form has a connections for this provider
|
75 |
-
if ( empty( $form_data['providers'][$this->slug] ) )
|
76 |
return;
|
|
|
77 |
|
78 |
$providers = get_option( 'wpforms_providers' );
|
79 |
$results = array();
|
80 |
|
81 |
// Fire for each connection ------------------------------------------//
|
82 |
|
83 |
-
foreach ( $form_data['providers'][$this->slug] as $connection ) :
|
84 |
|
85 |
// Before proceeding make sure required fields are configured
|
86 |
if ( empty( $connection['fields']['email'] ) ) {
|
@@ -93,7 +99,7 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
93 |
$account_id = $connection['account_id'];
|
94 |
$email_data = explode( '.', $connection['fields']['email'] );
|
95 |
$email_id = $email_data[0];
|
96 |
-
$email = $fields[$email_id]['value'];
|
97 |
$data = array();
|
98 |
|
99 |
$this->api_connect( $account_id );
|
@@ -105,7 +111,7 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
105 |
|
106 |
// Check for conditionals
|
107 |
$pass = $this->process_conditionals( $fields, $entry, $form_data, $connection );
|
108 |
-
if (
|
109 |
wpforms_log(
|
110 |
__( 'Constant Contact Subscription stopped by conditional logic', 'wpforms' ),
|
111 |
$fields,
|
@@ -119,7 +125,7 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
119 |
}
|
120 |
|
121 |
// Check to see if the lead already exists in Constant Contact.
|
122 |
-
$response = wp_remote_get( 'https://api.constantcontact.com/v2/contacts?api_key=' . $this->api_key . '&access_token=' . $this->access_token . '&email=' . $email
|
123 |
$contact = json_decode( wp_remote_retrieve_body( $response ), true );
|
124 |
|
125 |
// Return early if there was a problem.
|
@@ -139,7 +145,7 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
139 |
// Setup Merge Vars ---------------------------------------------//
|
140 |
$merge_vars = array();
|
141 |
|
142 |
-
foreach( $connection['fields'] as $name => $merge_var ) {
|
143 |
|
144 |
// Don't include Email or Full name fields
|
145 |
if ( 'email' == $name ) {
|
@@ -153,15 +159,15 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
153 |
|
154 |
$merge_var = explode( '.', $merge_var );
|
155 |
$id = $merge_var[0];
|
156 |
-
$key = !empty( $merge_var[1] ) ? $merge_var[1] : 'value';
|
157 |
-
$type = !empty( $merge_var[2] ) ? $merge_var[2] : 'text';
|
158 |
|
159 |
// Check if mapped form field has a value
|
160 |
-
if ( empty( $fields[$id][$key] ) ) {
|
161 |
continue;
|
162 |
}
|
163 |
|
164 |
-
$value = $fields[$id][$key];
|
165 |
|
166 |
// Constant Contact doesn't native URL field so it has to be
|
167 |
// stored in a custom field.
|
@@ -179,10 +185,10 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
179 |
// separate it.
|
180 |
if ( 'full_name' == $name ) {
|
181 |
$names = explode( ' ', $value );
|
182 |
-
if ( !empty( $names[0] ) ) {
|
183 |
$merge_vars['first_name'] = $names[0];
|
184 |
}
|
185 |
-
if ( !empty( $names[1] ) ) {
|
186 |
$merge_vars['last_name'] = $names[1];
|
187 |
}
|
188 |
continue;
|
@@ -193,34 +199,34 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
193 |
if ( 'address' == $name ) {
|
194 |
|
195 |
// Only support Address fields
|
196 |
-
if ( 'address' != $fields[$id]['type'] ) {
|
197 |
continue;
|
198 |
}
|
199 |
|
200 |
// Postal code may be in extended US format
|
201 |
$postal = array( 'code' => '', 'subcode' => '' );
|
202 |
-
if ( !empty( $fields[$id]['postal'] ) ) {
|
203 |
-
$p = explode( '-', $fields[$id]['postal'] );
|
204 |
-
$postal['code'] = !empty( $p[0] ) ? $p[0] : '';
|
205 |
-
$postal['subcode'] = !empty( $p[1] ) ? $p[1] : '';
|
206 |
}
|
207 |
|
208 |
$merge_vars['addresses'] = array(
|
209 |
array(
|
210 |
'address_type' => 'BUSINESS',
|
211 |
-
'city' => !empty( $fields[$id]['city'] ) ? $fields[$id]['city'] : '',
|
212 |
-
'country_code' => !empty( $fields[$id]['country'] ) ? $fields[$id]['country'] : '',
|
213 |
-
'line1' => !empty( $fields[$id]['address1'] ) ? $fields[$id]['address1'] : '',
|
214 |
-
'line2' => !empty( $fields[$id]['address2'] ) ? $fields[$id]['address2'] : '',
|
215 |
'postal_code' => $postal['code'],
|
216 |
-
'state' => !empty( $fields[$id]['state'] ) ? $fields[$id]['state'] : '',
|
217 |
'sub_postal_code' => $postal['subcode'],
|
218 |
),
|
219 |
);
|
220 |
continue;
|
221 |
}
|
222 |
|
223 |
-
$merge_vars[$name] = $value;
|
224 |
}
|
225 |
|
226 |
// Process in API ------------------------------------------------//
|
@@ -237,7 +243,7 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
237 |
|
238 |
// If they are already assigned to this list, return early.
|
239 |
if ( isset( $list['id'] ) && $list_id == $list['id'] ) {
|
240 |
-
return
|
241 |
}
|
242 |
}
|
243 |
|
@@ -263,7 +269,6 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
263 |
$args = array(
|
264 |
'body' => json_encode( $data ),
|
265 |
'method' => 'PUT',
|
266 |
-
'sslverify' => false,
|
267 |
'headers' => array(
|
268 |
'Content-Type' => 'application/json',
|
269 |
),
|
@@ -285,7 +290,6 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
285 |
// Args to use
|
286 |
$args = array(
|
287 |
'body' => json_encode( $data ),
|
288 |
-
'sslverify' => false,
|
289 |
'headers' => array(
|
290 |
'Content-Type' => 'application/json',
|
291 |
),
|
@@ -311,28 +315,31 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
311 |
endforeach;
|
312 |
}
|
313 |
|
314 |
-
|
315 |
//
|
316 |
-
//
|
317 |
//
|
318 |
-
|
319 |
|
320 |
/**
|
321 |
* Authenticate with the API.
|
322 |
*
|
323 |
* @since 1.3.6
|
|
|
324 |
* @param array $data
|
325 |
* @param string $form_id
|
|
|
326 |
* @return mixed id or error object
|
327 |
*/
|
328 |
public function api_auth( $data = array(), $form_id = '' ) {
|
329 |
|
330 |
$id = uniqid();
|
331 |
$providers = get_option( 'wpforms_providers', array() );
|
332 |
-
|
333 |
-
|
334 |
-
'
|
335 |
-
'
|
|
|
336 |
);
|
337 |
update_option( 'wpforms_providers', $providers );
|
338 |
|
@@ -342,19 +349,21 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
342 |
/**
|
343 |
* Establish connection object to API.
|
344 |
*
|
345 |
-
* @since 1.3.6
|
|
|
346 |
* @param string $account_id
|
347 |
-
*
|
|
|
348 |
*/
|
349 |
public function api_connect( $account_id ) {
|
350 |
|
351 |
-
if ( !empty( $this->api[$account_id] ) ) {
|
352 |
-
return $this->api[$account_id];
|
353 |
} else {
|
354 |
$providers = get_option( 'wpforms_providers' );
|
355 |
-
if ( !empty( $providers[$this->slug][$account_id] ) ) {
|
356 |
-
$this->api[$account_id] = true;
|
357 |
-
$this->access_token
|
358 |
} else {
|
359 |
return $this->error( 'API error' );
|
360 |
}
|
@@ -365,26 +374,28 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
365 |
* Retrieve provider account lists.
|
366 |
*
|
367 |
* @since 1.3.6
|
|
|
368 |
* @param string $connection_id
|
369 |
* @param string $account_id
|
|
|
370 |
* @return mixed array or error object
|
371 |
*/
|
372 |
public function api_lists( $connection_id = '', $account_id = '' ) {
|
373 |
|
374 |
$this->api_connect( $account_id );
|
375 |
|
376 |
-
$request = wp_remote_get( 'https://api.constantcontact.com/v2/lists?api_key=' . $this->api_key . '&access_token=' . $this->access_token
|
377 |
$lists = json_decode( wp_remote_retrieve_body( $request ), true );
|
378 |
-
$return = array();
|
379 |
|
380 |
if ( empty( $lists ) ) {
|
381 |
wpforms_log(
|
382 |
-
__( 'Constant Contact API
|
383 |
'',
|
384 |
array(
|
385 |
'type' => array( 'provider', 'error' ),
|
386 |
)
|
387 |
);
|
|
|
388 |
return $this->error( 'API list error: Constant API error' );
|
389 |
}
|
390 |
|
@@ -395,8 +406,11 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
395 |
* Retrieve provider account list fields.
|
396 |
*
|
397 |
* @since 1.3.6
|
|
|
398 |
* @param string $connection_id
|
399 |
* @param string $account_id
|
|
|
|
|
400 |
* @return mixed array or error object
|
401 |
*/
|
402 |
public function api_fields( $connection_id = '', $account_id = '', $list_id = '' ) {
|
@@ -454,11 +468,11 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
454 |
}
|
455 |
|
456 |
|
457 |
-
|
458 |
//
|
459 |
-
//
|
460 |
//
|
461 |
-
|
462 |
|
463 |
/**
|
464 |
* Provider account authorize fields HTML.
|
@@ -469,32 +483,32 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
469 |
public function output_auth() {
|
470 |
|
471 |
$providers = get_option( 'wpforms_providers' );
|
472 |
-
$class = !empty( $providers[$this->slug] ) ? 'hidden' : '';
|
473 |
|
474 |
$output = '<div class="wpforms-provider-account-add ' . $class . ' wpforms-connection-block">';
|
475 |
|
476 |
-
|
477 |
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
|
493 |
-
|
494 |
|
495 |
-
|
496 |
|
497 |
-
|
498 |
|
499 |
$output .= '</div>';
|
500 |
|
@@ -505,8 +519,10 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
505 |
* Provider account list groups HTML.
|
506 |
*
|
507 |
* @since 1.3.6
|
|
|
508 |
* @param string $connection_id
|
509 |
* @param array $connection
|
|
|
510 |
* @return string
|
511 |
*/
|
512 |
public function output_groups( $connection_id = '', $connection = array() ) {
|
@@ -524,25 +540,26 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
524 |
// Only display if Constant Contact account has not been setup
|
525 |
$providers = get_option( 'wpforms_providers', array() );
|
526 |
|
527 |
-
if ( !empty( $providers[$this->slug] ) ) {
|
528 |
return;
|
529 |
}
|
530 |
?>
|
531 |
<div class="wpforms-alert wpforms-alert-info">
|
532 |
<p><?php _e( 'Get the most out of <strong>WPForms</strong> — use it with an active Constant Contact account.', 'wpforms' ); ?></p>
|
533 |
<p>
|
534 |
-
<a href="<?php echo $this->sign_up; ?>" style="margin-right: 10px;" class="button-primary" target="_blank"
|
|
|
535 |
<?php printf( __( 'Learn More about the <a href="%s" target="_blank" rel="noopener noreferrer">power of email marketing</a>', 'wpforms' ), admin_url( 'admin.php?page=wpforms-page&wpforms-page=constant-contact' ) ); ?>
|
536 |
</p>
|
537 |
</div>
|
538 |
<?php
|
539 |
}
|
540 |
|
541 |
-
|
542 |
//
|
543 |
-
//
|
544 |
//
|
545 |
-
|
546 |
|
547 |
/**
|
548 |
* Form fields to add a new provider account.
|
@@ -552,17 +569,17 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
552 |
public function integrations_tab_new_form() {
|
553 |
|
554 |
$output = '<p>';
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
$output .= '</p>';
|
559 |
|
560 |
$output .= '<p class="wpforms-alert wpforms-alert-warning">';
|
561 |
-
|
562 |
$output .= '</p>';
|
563 |
|
564 |
$output .= '<p class=""><strong><a onclick="window.open(this.href,\'\',\'resizable=yes,location=no,width=800,height=600,status\'); return false" href="https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?response_type=code&client_id=c58xq3r27udz59h9rrq7qnvf&redirect_uri=https://wpforms.com/oauth/constant-contact/" class="btn">';
|
565 |
-
|
566 |
$output .= '</a></strong></p>';
|
567 |
|
568 |
$output .= sprintf( '<input type="text" name="authcode" placeholder="%s %s" class="wpforms-required">', $this->name, __( 'Authorization Code', 'wpforms' ) );
|
@@ -572,11 +589,11 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
572 |
echo $output;
|
573 |
}
|
574 |
|
575 |
-
|
576 |
//
|
577 |
-
//
|
578 |
//
|
579 |
-
|
580 |
|
581 |
/**
|
582 |
* Add admin notices to connect to Constant Contact.
|
@@ -591,12 +608,12 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
591 |
}
|
592 |
|
593 |
// Don't display on WPForms admin content pages
|
594 |
-
if ( !empty( $_GET['wpforms-page'] ) ) {
|
595 |
return;
|
596 |
}
|
597 |
|
598 |
// Don't display if user is about to connect via Settings page
|
599 |
-
if ( !empty( $_GET['wpforms-integration'] ) && $this->slug == $_GET['wpforms-integration'] ) {
|
600 |
return;
|
601 |
}
|
602 |
|
@@ -605,18 +622,19 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
605 |
$cc_notice = get_option( 'wpforms_constant_contact', false );
|
606 |
$providers = get_option( 'wpforms_providers', array() );
|
607 |
|
608 |
-
if ( ! $cc_notice
|
609 |
return;
|
610 |
}
|
611 |
|
612 |
// Output the notice message.
|
613 |
$connect = admin_url( 'admin.php?page=wpforms-settings&wpforms-integration=constant-contact#!wpforms-tab-providers' );
|
614 |
-
$learn_more = admin_url( 'admin.php?page=wpforms-page&wpforms-page=constant-contact ');
|
615 |
?>
|
616 |
<div class="notice notice-info is-dismissible wpforms-constant-contact-notice">
|
617 |
<p><?php _e( 'Get the most out of the <strong>WPForms</strong> plugin — use it with an active Constant Contact account.', 'wpforms' ); ?></p>
|
618 |
<p>
|
619 |
-
<a href="<?php echo $this->sign_up; ?>" class="button-primary" target="_blank"
|
|
|
620 |
<a href="<?php echo $connect; ?>" class="button-secondary"><?php _e( 'Connect your existing account', 'wpforms' ); ?></a>
|
621 |
<?php printf( __( 'Learn More about the <a href="%s">power of email marketing</a>', 'wpforms' ), $learn_more ); ?>
|
622 |
</p>
|
@@ -625,12 +643,15 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
625 |
.wpforms-constant-contact-notice {
|
626 |
border-left-color: #1a5285;
|
627 |
}
|
|
|
628 |
.wpforms-constant-contact-notice p:first-of-type {
|
629 |
margin: 16px 0 8px;
|
630 |
}
|
|
|
631 |
.wpforms-constant-contact-notice p:last-of-type {
|
632 |
margin: 8px 0 16px;
|
633 |
}
|
|
|
634 |
.wpforms-constant-contact-notice .button-primary,
|
635 |
.wpforms-constant-contact-notice .button-secondary {
|
636 |
display: inline-block;
|
@@ -638,10 +659,10 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
638 |
}
|
639 |
</style>
|
640 |
<script type="text/javascript">
|
641 |
-
jQuery(function($){
|
642 |
-
$(document).on('click', '.wpforms-constant-contact-notice button', function(
|
643 |
event.preventDefault();
|
644 |
-
$.post(
|
645 |
$('.wpforms-constant-contact-notice').remove();
|
646 |
});
|
647 |
});
|
@@ -677,15 +698,16 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
677 |
<p><?php _e( 'Wondering if email marketing is really worth your time?', 'wpforms' ); ?></p>
|
678 |
<p><?php _e( 'Email is hands-down the most effective way to nurture leads and turn them into customers, with a return on investment (ROI) of <strong>$44 back for every $1 spent</strong> according to Direct Marketing Association.', 'wpforms' ); ?></p>
|
679 |
<p><?php _e( 'Here are 3 big reasons why every smart business in the world has an email list:', 'wpforms' ); ?></p>
|
680 |
-
<a href="<?php echo $this->sign_up; ?>" target="_blank" rel="noopener noreferrer"><img
|
|
|
681 |
<ol class="reasons">
|
682 |
<li><?php _e( '<strong>Email is still #1</strong> - At least 91% of consumers check their email on a daily basis. You get direct access to your subscribers, without having to play by social media's rules and algorithms.', 'wpforms' ); ?></li>
|
683 |
<li><?php _e( '<strong>You own your email list</strong> - Unlike with social media, your list is your property and no one can revoke your access to it.', 'wpforms' ); ?></li>
|
684 |
<li><?php _e( '<strong>Email converts</strong> - People who buy products marketed through email spend 138% more than those who don't receive email offers.', 'wpforms' ); ?></li>
|
685 |
</ol>
|
686 |
<p><?php _e( 'That's why it's crucial to start collecting email addresses and building your list as soon as possible.', 'wpforms' ); ?></p>
|
687 |
-
<p><?php printf( __( 'For more details, see this guide on <a href="%s" target="_blank" rel="noopener noreferrer">why building your email list is so important
|
688 |
-
<hr
|
689 |
<h2><?php _e( 'You've Already Started - Here's the Next Step (It's Easy)', 'wpforms' ); ?></h2>
|
690 |
<p><?php _e( 'Here are the 3 things you need to build an email list:', 'wpforms' ); ?></p>
|
691 |
<ol>
|
@@ -694,7 +716,8 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
694 |
<li><strong><?php _e( 'The Best Email Marketing Service', 'wpforms' ); ?></strong></li>
|
695 |
</ol>
|
696 |
<p><?php _e( 'With a powerful email marketing service like Constant Contact, you can instantly send out mass notifications and beautifully designed newsletters to engage your subscribers.', 'wpforms' ); ?></p>
|
697 |
-
<p><a href="<?php echo $this->sign_up; ?>" class="button" target="_blank"
|
|
|
698 |
<p><?php _e( 'WPForms plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site - even if you don't have a Constant Contact account.', 'wpforms' ); ?></p>
|
699 |
<p><?php _e( 'But when you combine WPForms with Constant Contact, you can nurture your contacts and engage with them even after they leave your website. When you use Constant Contact + WPForms together, you can:', 'wpforms' ); ?></p>
|
700 |
<ul>
|
@@ -702,8 +725,9 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
702 |
<li><?php _e( 'Create and send professional email newsletters', 'wpforms' ); ?></li>
|
703 |
<li><?php _e( 'Get expert marketing and support', 'wpforms' ); ?></li>
|
704 |
</ul>
|
705 |
-
<p><a href="<?php echo $this->sign_up; ?>" target="_blank"
|
706 |
-
|
|
|
707 |
<h2><?php _e( 'WPForms Makes List Building Easy', 'wpforms' ); ?></h2>
|
708 |
<p><?php _e( 'When creating WPForms, our goal was to make a WordPress forms plugin that's both EASY and POWERFUL.', 'wpforms' ); ?></p>
|
709 |
<p><?php _e( 'We made the form creation process extremely intuitive, so you can create a form to start capturing emails within 5 minutes or less.', 'wpforms' ); ?></p>
|
@@ -733,27 +757,32 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
733 |
.notice {
|
734 |
display: none;
|
735 |
}
|
736 |
-
|
|
|
737 |
padding: 15px;
|
738 |
max-width: 970px;
|
739 |
}
|
|
|
740 |
.about-wrap h1 {
|
741 |
color: #1a5285;
|
742 |
font-size: 30px;
|
743 |
margin: 0 0 15px 0;
|
744 |
}
|
|
|
745 |
.about-wrap h2 {
|
746 |
color: #1a5285;
|
747 |
font-size: 26px;
|
748 |
margin: 0 0 15px 0;
|
749 |
text-align: left;
|
750 |
}
|
|
|
751 |
.about-wrap p {
|
752 |
font-size: 16px;
|
753 |
font-weight: 300;
|
754 |
color: #333;
|
755 |
margin: 1.2em 0;
|
756 |
}
|
|
|
757 |
.about-wrap ul,
|
758 |
.about-wrap ol {
|
759 |
margin: 1.6em 2.5em 2em;
|
@@ -761,48 +790,60 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
761 |
font-size: 16px;
|
762 |
font-weight: 300;
|
763 |
}
|
|
|
764 |
.about-wrap ul {
|
765 |
list-style: disc;
|
766 |
}
|
|
|
767 |
.about-wrap li {
|
768 |
margin-bottom: 0.8em;
|
769 |
}
|
|
|
770 |
.about-wrap hr {
|
771 |
margin: 2.2em 0;
|
772 |
}
|
|
|
773 |
.about-wrap .logo {
|
774 |
float: right;
|
775 |
margin-top: 0.8em;
|
776 |
}
|
|
|
777 |
.about-wrap .reasons {
|
778 |
-
margin: 2.2em
|
779 |
-
margin-right: 400px;
|
780 |
}
|
|
|
781 |
.about-wrap .reasons li {
|
782 |
margin-bottom: 1.4em;
|
783 |
}
|
|
|
784 |
.about-wrap .steps {
|
785 |
clear: both;
|
786 |
overflow: hidden;
|
787 |
}
|
|
|
788 |
.about-wrap .step {
|
789 |
width: 46%;
|
790 |
float: left;
|
791 |
}
|
|
|
792 |
.about-wrap .step {
|
793 |
margin-bottom: 1.4em;
|
794 |
}
|
|
|
795 |
.about-wrap .step2,
|
796 |
.about-wrap .step4 {
|
797 |
float: right;
|
798 |
}
|
|
|
799 |
.about-wrap .step3 {
|
800 |
clear: both;
|
801 |
}
|
|
|
802 |
.about-wrap .dashicons-yes {
|
803 |
color: #19BE19;
|
804 |
font-size: 26px;
|
805 |
}
|
|
|
806 |
.about-wrap .button {
|
807 |
background-color: #0078C3;
|
808 |
border: 1px solid #005990;
|
@@ -816,31 +857,39 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
816 |
padding: 14px 30px;
|
817 |
text-align: center;
|
818 |
}
|
|
|
819 |
.about-wrap .button:hover,
|
820 |
.about-wrap .button:focus {
|
821 |
background-color: #005990;
|
822 |
color: #fff
|
823 |
}
|
|
|
824 |
@media only screen and (max-width: 767px) {
|
825 |
.about-wrap {
|
826 |
padding: 0;
|
827 |
}
|
|
|
828 |
.about-wrap h1 {
|
829 |
font-size: 26px;
|
830 |
}
|
|
|
831 |
.about-wrap h2 {
|
832 |
font-size: 22px;
|
833 |
}
|
|
|
834 |
.about-wrap p {
|
835 |
font-size: 14px;
|
836 |
}
|
|
|
837 |
.about-wrap ul,
|
838 |
.about-wrap ol {
|
839 |
font-size: 14px;
|
840 |
}
|
|
|
841 |
.about-wrap .logo {
|
842 |
width: 120px;
|
843 |
}
|
|
|
844 |
.about-wrap .reasons {
|
845 |
margin-right: 150px;
|
846 |
}
|
@@ -849,4 +898,5 @@ class WPForms_Constant_Contact extends WPForms_Provider {
|
|
849 |
<?php
|
850 |
}
|
851 |
}
|
852 |
-
|
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Constant Contact integration.
|
5 |
*
|
8 |
* @since 1.3.6
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2017, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Constant_Contact extends WPForms_Provider {
|
13 |
|
14 |
/**
|
50 |
|
51 |
if ( is_admin() ) {
|
52 |
// Admin notice requesting connecting
|
53 |
+
add_action( 'admin_notices', array( $this, 'connect_request' ) );
|
54 |
add_action( 'wp_ajax_wpforms_constant_contact_dismiss', array( $this, 'connect_dismiss' ) );
|
55 |
+
add_action( 'wpforms_admin_page', array( $this, 'learn_more_page' ) );
|
56 |
|
57 |
// Provide option to override sign up link
|
58 |
$sign_up = get_option( 'wpforms_constant_contact_signup', false );
|
66 |
* Process and submit entry to provider.
|
67 |
*
|
68 |
* @since 1.3.6
|
69 |
+
*
|
70 |
* @param array $fields
|
71 |
* @param array $entry
|
72 |
* @param array $form_data
|
73 |
+
* @param int $entry_id
|
74 |
+
*
|
75 |
+
* @return void
|
76 |
*/
|
77 |
public function process_entry( $fields, $entry, $form_data, $entry_id = 0 ) {
|
78 |
|
79 |
// Only run if this form has a connections for this provider
|
80 |
+
if ( empty( $form_data['providers'][ $this->slug ] ) ) {
|
81 |
return;
|
82 |
+
}
|
83 |
|
84 |
$providers = get_option( 'wpforms_providers' );
|
85 |
$results = array();
|
86 |
|
87 |
// Fire for each connection ------------------------------------------//
|
88 |
|
89 |
+
foreach ( $form_data['providers'][ $this->slug ] as $connection ) :
|
90 |
|
91 |
// Before proceeding make sure required fields are configured
|
92 |
if ( empty( $connection['fields']['email'] ) ) {
|
99 |
$account_id = $connection['account_id'];
|
100 |
$email_data = explode( '.', $connection['fields']['email'] );
|
101 |
$email_id = $email_data[0];
|
102 |
+
$email = $fields[ $email_id ]['value'];
|
103 |
$data = array();
|
104 |
|
105 |
$this->api_connect( $account_id );
|
111 |
|
112 |
// Check for conditionals
|
113 |
$pass = $this->process_conditionals( $fields, $entry, $form_data, $connection );
|
114 |
+
if ( ! $pass ) {
|
115 |
wpforms_log(
|
116 |
__( 'Constant Contact Subscription stopped by conditional logic', 'wpforms' ),
|
117 |
$fields,
|
125 |
}
|
126 |
|
127 |
// Check to see if the lead already exists in Constant Contact.
|
128 |
+
$response = wp_remote_get( 'https://api.constantcontact.com/v2/contacts?api_key=' . $this->api_key . '&access_token=' . $this->access_token . '&email=' . $email );
|
129 |
$contact = json_decode( wp_remote_retrieve_body( $response ), true );
|
130 |
|
131 |
// Return early if there was a problem.
|
145 |
// Setup Merge Vars ---------------------------------------------//
|
146 |
$merge_vars = array();
|
147 |
|
148 |
+
foreach ( $connection['fields'] as $name => $merge_var ) {
|
149 |
|
150 |
// Don't include Email or Full name fields
|
151 |
if ( 'email' == $name ) {
|
159 |
|
160 |
$merge_var = explode( '.', $merge_var );
|
161 |
$id = $merge_var[0];
|
162 |
+
$key = ! empty( $merge_var[1] ) ? $merge_var[1] : 'value';
|
163 |
+
$type = ! empty( $merge_var[2] ) ? $merge_var[2] : 'text';
|
164 |
|
165 |
// Check if mapped form field has a value
|
166 |
+
if ( empty( $fields[ $id ][ $key ] ) ) {
|
167 |
continue;
|
168 |
}
|
169 |
|
170 |
+
$value = $fields[ $id ][ $key ];
|
171 |
|
172 |
// Constant Contact doesn't native URL field so it has to be
|
173 |
// stored in a custom field.
|
185 |
// separate it.
|
186 |
if ( 'full_name' == $name ) {
|
187 |
$names = explode( ' ', $value );
|
188 |
+
if ( ! empty( $names[0] ) ) {
|
189 |
$merge_vars['first_name'] = $names[0];
|
190 |
}
|
191 |
+
if ( ! empty( $names[1] ) ) {
|
192 |
$merge_vars['last_name'] = $names[1];
|
193 |
}
|
194 |
continue;
|
199 |
if ( 'address' == $name ) {
|
200 |
|
201 |
// Only support Address fields
|
202 |
+
if ( 'address' != $fields[ $id ]['type'] ) {
|
203 |
continue;
|
204 |
}
|
205 |
|
206 |
// Postal code may be in extended US format
|
207 |
$postal = array( 'code' => '', 'subcode' => '' );
|
208 |
+
if ( ! empty( $fields[ $id ]['postal'] ) ) {
|
209 |
+
$p = explode( '-', $fields[ $id ]['postal'] );
|
210 |
+
$postal['code'] = ! empty( $p[0] ) ? $p[0] : '';
|
211 |
+
$postal['subcode'] = ! empty( $p[1] ) ? $p[1] : '';
|
212 |
}
|
213 |
|
214 |
$merge_vars['addresses'] = array(
|
215 |
array(
|
216 |
'address_type' => 'BUSINESS',
|
217 |
+
'city' => ! empty( $fields[ $id ]['city'] ) ? $fields[ $id ]['city'] : '',
|
218 |
+
'country_code' => ! empty( $fields[ $id ]['country'] ) ? $fields[ $id ]['country'] : '',
|
219 |
+
'line1' => ! empty( $fields[ $id ]['address1'] ) ? $fields[ $id ]['address1'] : '',
|
220 |
+
'line2' => ! empty( $fields[ $id ]['address2'] ) ? $fields[ $id ]['address2'] : '',
|
221 |
'postal_code' => $postal['code'],
|
222 |
+
'state' => ! empty( $fields[ $id ]['state'] ) ? $fields[ $id ]['state'] : '',
|
223 |
'sub_postal_code' => $postal['subcode'],
|
224 |
),
|
225 |
);
|
226 |
continue;
|
227 |
}
|
228 |
|
229 |
+
$merge_vars[ $name ] = $value;
|
230 |
}
|
231 |
|
232 |
// Process in API ------------------------------------------------//
|
243 |
|
244 |
// If they are already assigned to this list, return early.
|
245 |
if ( isset( $list['id'] ) && $list_id == $list['id'] ) {
|
246 |
+
return;
|
247 |
}
|
248 |
}
|
249 |
|
269 |
$args = array(
|
270 |
'body' => json_encode( $data ),
|
271 |
'method' => 'PUT',
|
|
|
272 |
'headers' => array(
|
273 |
'Content-Type' => 'application/json',
|
274 |
),
|
290 |
// Args to use
|
291 |
$args = array(
|
292 |
'body' => json_encode( $data ),
|
|
|
293 |
'headers' => array(
|
294 |
'Content-Type' => 'application/json',
|
295 |
),
|
315 |
endforeach;
|
316 |
}
|
317 |
|
318 |
+
// ************************************************************************//
|
319 |
//
|
320 |
+
// API methods - these methods interact directly with the provider API.
|
321 |
//
|
322 |
+
// ************************************************************************//
|
323 |
|
324 |
/**
|
325 |
* Authenticate with the API.
|
326 |
*
|
327 |
* @since 1.3.6
|
328 |
+
*
|
329 |
* @param array $data
|
330 |
* @param string $form_id
|
331 |
+
*
|
332 |
* @return mixed id or error object
|
333 |
*/
|
334 |
public function api_auth( $data = array(), $form_id = '' ) {
|
335 |
|
336 |
$id = uniqid();
|
337 |
$providers = get_option( 'wpforms_providers', array() );
|
338 |
+
|
339 |
+
$providers[ $this->slug ][ $id ] = array(
|
340 |
+
'access_token' => sanitize_text_field( $data['authcode'] ),
|
341 |
+
'label' => sanitize_text_field( $data['label'] ),
|
342 |
+
'date' => time(),
|
343 |
);
|
344 |
update_option( 'wpforms_providers', $providers );
|
345 |
|
349 |
/**
|
350 |
* Establish connection object to API.
|
351 |
*
|
352 |
+
* @since 1.3.6
|
353 |
+
*
|
354 |
* @param string $account_id
|
355 |
+
*
|
356 |
+
* @return mixed array or error object.
|
357 |
*/
|
358 |
public function api_connect( $account_id ) {
|
359 |
|
360 |
+
if ( ! empty( $this->api[ $account_id ] ) ) {
|
361 |
+
return $this->api[ $account_id ];
|
362 |
} else {
|
363 |
$providers = get_option( 'wpforms_providers' );
|
364 |
+
if ( ! empty( $providers[ $this->slug ][ $account_id ] ) ) {
|
365 |
+
$this->api[ $account_id ] = true;
|
366 |
+
$this->access_token = $providers[ $this->slug ][ $account_id ]['access_token'];
|
367 |
} else {
|
368 |
return $this->error( 'API error' );
|
369 |
}
|
374 |
* Retrieve provider account lists.
|
375 |
*
|
376 |
* @since 1.3.6
|
377 |
+
*
|
378 |
* @param string $connection_id
|
379 |
* @param string $account_id
|
380 |
+
*
|
381 |
* @return mixed array or error object
|
382 |
*/
|
383 |
public function api_lists( $connection_id = '', $account_id = '' ) {
|
384 |
|
385 |
$this->api_connect( $account_id );
|
386 |
|
387 |
+
$request = wp_remote_get( 'https://api.constantcontact.com/v2/lists?api_key=' . $this->api_key . '&access_token=' . $this->access_token );
|
388 |
$lists = json_decode( wp_remote_retrieve_body( $request ), true );
|
|
|
389 |
|
390 |
if ( empty( $lists ) ) {
|
391 |
wpforms_log(
|
392 |
+
__( 'Constant Contact API Error', 'wpforms' ),
|
393 |
'',
|
394 |
array(
|
395 |
'type' => array( 'provider', 'error' ),
|
396 |
)
|
397 |
);
|
398 |
+
|
399 |
return $this->error( 'API list error: Constant API error' );
|
400 |
}
|
401 |
|
406 |
* Retrieve provider account list fields.
|
407 |
*
|
408 |
* @since 1.3.6
|
409 |
+
*
|
410 |
* @param string $connection_id
|
411 |
* @param string $account_id
|
412 |
+
* @param string $list_id
|
413 |
+
*
|
414 |
* @return mixed array or error object
|
415 |
*/
|
416 |
public function api_fields( $connection_id = '', $account_id = '', $list_id = '' ) {
|
468 |
}
|
469 |
|
470 |
|
471 |
+
// ************************************************************************//
|
472 |
//
|
473 |
+
// Output methods - these methods generally return HTML for the builder.
|
474 |
//
|
475 |
+
// ************************************************************************//
|
476 |
|
477 |
/**
|
478 |
* Provider account authorize fields HTML.
|
483 |
public function output_auth() {
|
484 |
|
485 |
$providers = get_option( 'wpforms_providers' );
|
486 |
+
$class = ! empty( $providers[ $this->slug ] ) ? 'hidden' : '';
|
487 |
|
488 |
$output = '<div class="wpforms-provider-account-add ' . $class . ' wpforms-connection-block">';
|
489 |
|
490 |
+
$output .= sprintf( '<h4>%s</h4>', __( 'Add New Account', 'wpforms' ) );
|
491 |
|
492 |
+
$output .= '<p>';
|
493 |
+
$output .= __( 'Please fill out all of the fields below to register your new Constant Contact account.', 'wpforms' );
|
494 |
+
$output .= '<br><a href="https://wpforms.com/docs/how-to-connect-constant-contact-with-wpforms/" target="_blank" rel="noopener noreferrer">';
|
495 |
+
$output .= __( 'Click here for documentation on connecting WPForms with Constant Contact.', 'wpforms' );
|
496 |
+
$output .= '</a>';
|
497 |
+
$output .= '</p>';
|
498 |
|
499 |
+
$output .= '<p class="wpforms-alert wpforms-alert-warning">';
|
500 |
+
$output .= __( 'Because Constant Contact requires external authentication, you will need to register WPForms with Constant Contact before you can proceed.', 'wpforms' );
|
501 |
+
$output .= '</p>';
|
502 |
|
503 |
+
$output .= '<p class=""><strong><a onclick="window.open(this.href,\'\',\'resizable=yes,location=no,width=750,height=500,status\'); return false" href="https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?response_type=code&client_id=c58xq3r27udz59h9rrq7qnvf&redirect_uri=https://wpforms.com/oauth/constant-contact/" class="btn">';
|
504 |
+
$output .= __( 'Click here to register with Constant Contact', 'wpforms' );
|
505 |
+
$output .= '</a></strong></p>';
|
506 |
|
507 |
+
$output .= sprintf( '<input type="text" data-name="authcode" placeholder="%s %s" class="wpforms-required">', $this->name, __( 'Authorization Code', 'wpforms' ) );
|
508 |
|
509 |
+
$output .= sprintf( '<input type="text" data-name="label" placeholder="%s %s" class="wpforms-required">', $this->name, __( 'Account Nickname', 'wpforms' ) );
|
510 |
|
511 |
+
$output .= sprintf( '<button data-provider="%s">%s</button>', $this->slug, __( 'Connect', 'wpforms' ) );
|
512 |
|
513 |
$output .= '</div>';
|
514 |
|
519 |
* Provider account list groups HTML.
|
520 |
*
|
521 |
* @since 1.3.6
|
522 |
+
*
|
523 |
* @param string $connection_id
|
524 |
* @param array $connection
|
525 |
+
*
|
526 |
* @return string
|
527 |
*/
|
528 |
public function output_groups( $connection_id = '', $connection = array() ) {
|
540 |
// Only display if Constant Contact account has not been setup
|
541 |
$providers = get_option( 'wpforms_providers', array() );
|
542 |
|
543 |
+
if ( ! empty( $providers[ $this->slug ] ) ) {
|
544 |
return;
|
545 |
}
|
546 |
?>
|
547 |
<div class="wpforms-alert wpforms-alert-info">
|
548 |
<p><?php _e( 'Get the most out of <strong>WPForms</strong> — use it with an active Constant Contact account.', 'wpforms' ); ?></p>
|
549 |
<p>
|
550 |
+
<a href="<?php echo $this->sign_up; ?>" style="margin-right: 10px;" class="button-primary" target="_blank"
|
551 |
+
rel="noopener noreferrer"><?php _e( 'Try Constant Contact for Free', 'wpforms' ); ?></a>
|
552 |
<?php printf( __( 'Learn More about the <a href="%s" target="_blank" rel="noopener noreferrer">power of email marketing</a>', 'wpforms' ), admin_url( 'admin.php?page=wpforms-page&wpforms-page=constant-contact' ) ); ?>
|
553 |
</p>
|
554 |
</div>
|
555 |
<?php
|
556 |
}
|
557 |
|
558 |
+
// ************************************************************************//
|
559 |
//
|
560 |
+
// Integrations tab methods - these methods relate to the settings page.
|
561 |
//
|
562 |
+
// ************************************************************************//
|
563 |
|
564 |
/**
|
565 |
* Form fields to add a new provider account.
|
569 |
public function integrations_tab_new_form() {
|
570 |
|
571 |
$output = '<p>';
|
572 |
+
$output .= '<a href="https://wpforms.com/docs/how-to-connect-constant-contact-with-wpforms/" target="_blank" rel="noopener noreferrer">';
|
573 |
+
$output .= __( 'Click here for documentation on connecting WPForms with Constant Contact.', 'wpforms' );
|
574 |
+
$output .= '</a>';
|
575 |
$output .= '</p>';
|
576 |
|
577 |
$output .= '<p class="wpforms-alert wpforms-alert-warning">';
|
578 |
+
$output .= __( 'Because Constant Contact requires external authentication, you will need to register WPForms with Constant Contact before you can proceed.', 'wpforms' );
|
579 |
$output .= '</p>';
|
580 |
|
581 |
$output .= '<p class=""><strong><a onclick="window.open(this.href,\'\',\'resizable=yes,location=no,width=800,height=600,status\'); return false" href="https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?response_type=code&client_id=c58xq3r27udz59h9rrq7qnvf&redirect_uri=https://wpforms.com/oauth/constant-contact/" class="btn">';
|
582 |
+
$output .= __( 'Click here to register with Constant Contact', 'wpforms' );
|
583 |
$output .= '</a></strong></p>';
|
584 |
|
585 |
$output .= sprintf( '<input type="text" name="authcode" placeholder="%s %s" class="wpforms-required">', $this->name, __( 'Authorization Code', 'wpforms' ) );
|
589 |
echo $output;
|
590 |
}
|
591 |
|
592 |
+
// ************************************************************************//
|
593 |
//
|
594 |
+
// Other functionality.
|
595 |
//
|
596 |
+
// ************************************************************************//
|
597 |
|
598 |
/**
|
599 |
* Add admin notices to connect to Constant Contact.
|
608 |
}
|
609 |
|
610 |
// Don't display on WPForms admin content pages
|
611 |
+
if ( ! empty( $_GET['wpforms-page'] ) ) {
|
612 |
return;
|
613 |
}
|
614 |
|
615 |
// Don't display if user is about to connect via Settings page
|
616 |
+
if ( ! empty( $_GET['wpforms-integration'] ) && $this->slug == $_GET['wpforms-integration'] ) {
|
617 |
return;
|
618 |
}
|
619 |
|
622 |
$cc_notice = get_option( 'wpforms_constant_contact', false );
|
623 |
$providers = get_option( 'wpforms_providers', array() );
|
624 |
|
625 |
+
if ( ! $cc_notice || ! empty( $providers[ $this->slug ] ) ) {
|
626 |
return;
|
627 |
}
|
628 |
|
629 |
// Output the notice message.
|
630 |
$connect = admin_url( 'admin.php?page=wpforms-settings&wpforms-integration=constant-contact#!wpforms-tab-providers' );
|
631 |
+
$learn_more = admin_url( 'admin.php?page=wpforms-page&wpforms-page=constant-contact ' );
|
632 |
?>
|
633 |
<div class="notice notice-info is-dismissible wpforms-constant-contact-notice">
|
634 |
<p><?php _e( 'Get the most out of the <strong>WPForms</strong> plugin — use it with an active Constant Contact account.', 'wpforms' ); ?></p>
|
635 |
<p>
|
636 |
+
<a href="<?php echo $this->sign_up; ?>" class="button-primary" target="_blank"
|
637 |
+
rel="noopener noreferrer"><?php _e( 'Try Constant Contact for Free', 'wpforms' ); ?></a>
|
638 |
<a href="<?php echo $connect; ?>" class="button-secondary"><?php _e( 'Connect your existing account', 'wpforms' ); ?></a>
|
639 |
<?php printf( __( 'Learn More about the <a href="%s">power of email marketing</a>', 'wpforms' ), $learn_more ); ?>
|
640 |
</p>
|
643 |
.wpforms-constant-contact-notice {
|
644 |
border-left-color: #1a5285;
|
645 |
}
|
646 |
+
|
647 |
.wpforms-constant-contact-notice p:first-of-type {
|
648 |
margin: 16px 0 8px;
|
649 |
}
|
650 |
+
|
651 |
.wpforms-constant-contact-notice p:last-of-type {
|
652 |
margin: 8px 0 16px;
|
653 |
}
|
654 |
+
|
655 |
.wpforms-constant-contact-notice .button-primary,
|
656 |
.wpforms-constant-contact-notice .button-secondary {
|
657 |
display: inline-block;
|
659 |
}
|
660 |
</style>
|
661 |
<script type="text/javascript">
|
662 |
+
jQuery(function ($) {
|
663 |
+
$(document).on('click', '.wpforms-constant-contact-notice button', function (event) {
|
664 |
event.preventDefault();
|
665 |
+
$.post(ajaxurl, {action: 'wpforms_constant_contact_dismiss'});
|
666 |
$('.wpforms-constant-contact-notice').remove();
|
667 |
});
|
668 |
});
|
698 |
<p><?php _e( 'Wondering if email marketing is really worth your time?', 'wpforms' ); ?></p>
|
699 |
<p><?php _e( 'Email is hands-down the most effective way to nurture leads and turn them into customers, with a return on investment (ROI) of <strong>$44 back for every $1 spent</strong> according to Direct Marketing Association.', 'wpforms' ); ?></p>
|
700 |
<p><?php _e( 'Here are 3 big reasons why every smart business in the world has an email list:', 'wpforms' ); ?></p>
|
701 |
+
<a href="<?php echo $this->sign_up; ?>" target="_blank" rel="noopener noreferrer"><img
|
702 |
+
src="<?php echo WPFORMS_PLUGIN_URL; ?>assets/images/cc-about-logo.png" class="logo"></a>
|
703 |
<ol class="reasons">
|
704 |
<li><?php _e( '<strong>Email is still #1</strong> - At least 91% of consumers check their email on a daily basis. You get direct access to your subscribers, without having to play by social media's rules and algorithms.', 'wpforms' ); ?></li>
|
705 |
<li><?php _e( '<strong>You own your email list</strong> - Unlike with social media, your list is your property and no one can revoke your access to it.', 'wpforms' ); ?></li>
|
706 |
<li><?php _e( '<strong>Email converts</strong> - People who buy products marketed through email spend 138% more than those who don't receive email offers.', 'wpforms' ); ?></li>
|
707 |
</ol>
|
708 |
<p><?php _e( 'That's why it's crucial to start collecting email addresses and building your list as soon as possible.', 'wpforms' ); ?></p>
|
709 |
+
<p><?php printf( __( 'For more details, see this guide on <a href="%s" target="_blank" rel="noopener noreferrer">why building your email list is so important</a>.', 'wpforms' ), $more ); ?></p>
|
710 |
+
<hr/>
|
711 |
<h2><?php _e( 'You've Already Started - Here's the Next Step (It's Easy)', 'wpforms' ); ?></h2>
|
712 |
<p><?php _e( 'Here are the 3 things you need to build an email list:', 'wpforms' ); ?></p>
|
713 |
<ol>
|
716 |
<li><strong><?php _e( 'The Best Email Marketing Service', 'wpforms' ); ?></strong></li>
|
717 |
</ol>
|
718 |
<p><?php _e( 'With a powerful email marketing service like Constant Contact, you can instantly send out mass notifications and beautifully designed newsletters to engage your subscribers.', 'wpforms' ); ?></p>
|
719 |
+
<p><a href="<?php echo $this->sign_up; ?>" class="button" target="_blank"
|
720 |
+
rel="noopener noreferrer"><?php _e( 'Get Started with Constant Contact for Free', 'wpforms' ); ?></a></p>
|
721 |
<p><?php _e( 'WPForms plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site - even if you don't have a Constant Contact account.', 'wpforms' ); ?></p>
|
722 |
<p><?php _e( 'But when you combine WPForms with Constant Contact, you can nurture your contacts and engage with them even after they leave your website. When you use Constant Contact + WPForms together, you can:', 'wpforms' ); ?></p>
|
723 |
<ul>
|
725 |
<li><?php _e( 'Create and send professional email newsletters', 'wpforms' ); ?></li>
|
726 |
<li><?php _e( 'Get expert marketing and support', 'wpforms' ); ?></li>
|
727 |
</ul>
|
728 |
+
<p><a href="<?php echo $this->sign_up; ?>" target="_blank"
|
729 |
+
rel="noopener noreferrer"><strong><?php _e( 'Try Constant Contact Today', 'wpforms' ); ?></strong></a></p>
|
730 |
+
<hr/>
|
731 |
<h2><?php _e( 'WPForms Makes List Building Easy', 'wpforms' ); ?></h2>
|
732 |
<p><?php _e( 'When creating WPForms, our goal was to make a WordPress forms plugin that's both EASY and POWERFUL.', 'wpforms' ); ?></p>
|
733 |
<p><?php _e( 'We made the form creation process extremely intuitive, so you can create a form to start capturing emails within 5 minutes or less.', 'wpforms' ); ?></p>
|
757 |
.notice {
|
758 |
display: none;
|
759 |
}
|
760 |
+
|
761 |
+
.about-wrap {
|
762 |
padding: 15px;
|
763 |
max-width: 970px;
|
764 |
}
|
765 |
+
|
766 |
.about-wrap h1 {
|
767 |
color: #1a5285;
|
768 |
font-size: 30px;
|
769 |
margin: 0 0 15px 0;
|
770 |
}
|
771 |
+
|
772 |
.about-wrap h2 {
|
773 |
color: #1a5285;
|
774 |
font-size: 26px;
|
775 |
margin: 0 0 15px 0;
|
776 |
text-align: left;
|
777 |
}
|
778 |
+
|
779 |
.about-wrap p {
|
780 |
font-size: 16px;
|
781 |
font-weight: 300;
|
782 |
color: #333;
|
783 |
margin: 1.2em 0;
|
784 |
}
|
785 |
+
|
786 |
.about-wrap ul,
|
787 |
.about-wrap ol {
|
788 |
margin: 1.6em 2.5em 2em;
|
790 |
font-size: 16px;
|
791 |
font-weight: 300;
|
792 |
}
|
793 |
+
|
794 |
.about-wrap ul {
|
795 |
list-style: disc;
|
796 |
}
|
797 |
+
|
798 |
.about-wrap li {
|
799 |
margin-bottom: 0.8em;
|
800 |
}
|
801 |
+
|
802 |
.about-wrap hr {
|
803 |
margin: 2.2em 0;
|
804 |
}
|
805 |
+
|
806 |
.about-wrap .logo {
|
807 |
float: right;
|
808 |
margin-top: 0.8em;
|
809 |
}
|
810 |
+
|
811 |
.about-wrap .reasons {
|
812 |
+
margin: 2.2em 400px 2.2em 2em;
|
|
|
813 |
}
|
814 |
+
|
815 |
.about-wrap .reasons li {
|
816 |
margin-bottom: 1.4em;
|
817 |
}
|
818 |
+
|
819 |
.about-wrap .steps {
|
820 |
clear: both;
|
821 |
overflow: hidden;
|
822 |
}
|
823 |
+
|
824 |
.about-wrap .step {
|
825 |
width: 46%;
|
826 |
float: left;
|
827 |
}
|
828 |
+
|
829 |
.about-wrap .step {
|
830 |
margin-bottom: 1.4em;
|
831 |
}
|
832 |
+
|
833 |
.about-wrap .step2,
|
834 |
.about-wrap .step4 {
|
835 |
float: right;
|
836 |
}
|
837 |
+
|
838 |
.about-wrap .step3 {
|
839 |
clear: both;
|
840 |
}
|
841 |
+
|
842 |
.about-wrap .dashicons-yes {
|
843 |
color: #19BE19;
|
844 |
font-size: 26px;
|
845 |
}
|
846 |
+
|
847 |
.about-wrap .button {
|
848 |
background-color: #0078C3;
|
849 |
border: 1px solid #005990;
|
857 |
padding: 14px 30px;
|
858 |
text-align: center;
|
859 |
}
|
860 |
+
|
861 |
.about-wrap .button:hover,
|
862 |
.about-wrap .button:focus {
|
863 |
background-color: #005990;
|
864 |
color: #fff
|
865 |
}
|
866 |
+
|
867 |
@media only screen and (max-width: 767px) {
|
868 |
.about-wrap {
|
869 |
padding: 0;
|
870 |
}
|
871 |
+
|
872 |
.about-wrap h1 {
|
873 |
font-size: 26px;
|
874 |
}
|
875 |
+
|
876 |
.about-wrap h2 {
|
877 |
font-size: 22px;
|
878 |
}
|
879 |
+
|
880 |
.about-wrap p {
|
881 |
font-size: 14px;
|
882 |
}
|
883 |
+
|
884 |
.about-wrap ul,
|
885 |
.about-wrap ol {
|
886 |
font-size: 14px;
|
887 |
}
|
888 |
+
|
889 |
.about-wrap .logo {
|
890 |
width: 120px;
|
891 |
}
|
892 |
+
|
893 |
.about-wrap .reasons {
|
894 |
margin-right: 150px;
|
895 |
}
|
898 |
<?php
|
899 |
}
|
900 |
}
|
901 |
+
|
902 |
+
new WPForms_Constant_Contact;
|
includes/templates/class-base.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Base form template.
|
4 |
*
|
@@ -94,10 +95,10 @@ abstract class WPForms_Template {
|
|
94 |
|
95 |
$type = $this->core ? '_core' : '';
|
96 |
|
97 |
-
add_filter( "wpforms_form_templates{$type}",
|
98 |
-
add_filter( 'wpforms_create_form_args',
|
99 |
-
add_filter( 'wpforms_save_form_args',
|
100 |
-
add_filter( 'wpforms_builder_template_active', array( $this, 'template_active'
|
101 |
}
|
102 |
|
103 |
/**
|
@@ -112,7 +113,9 @@ abstract class WPForms_Template {
|
|
112 |
* Add basic template details to the Add New Form admin screen.
|
113 |
*
|
114 |
* @since 1.0.0
|
|
|
115 |
* @param array $templates
|
|
|
116 |
* @return array
|
117 |
*/
|
118 |
function template_details( $templates ) {
|
@@ -132,8 +135,10 @@ abstract class WPForms_Template {
|
|
132 |
* Add template data when form is created.
|
133 |
*
|
134 |
* @since 1.0.0
|
|
|
135 |
* @param array $args
|
136 |
* @param array $data
|
|
|
137 |
* @return array
|
138 |
*/
|
139 |
function template_data( $args, $data ) {
|
@@ -143,6 +148,7 @@ abstract class WPForms_Template {
|
|
143 |
$args['post_content'] = wpforms_encode( $this->data );
|
144 |
}
|
145 |
}
|
|
|
146 |
return $args;
|
147 |
}
|
148 |
|
@@ -150,20 +156,23 @@ abstract class WPForms_Template {
|
|
150 |
* Replace template on post update if triggered.
|
151 |
*
|
152 |
* @since 1.0.0
|
|
|
153 |
* @param array $form
|
154 |
* @param array $data
|
155 |
* @param array $args
|
|
|
156 |
* @return array
|
157 |
*/
|
158 |
function template_replace( $form, $data, $args ) {
|
159 |
|
160 |
if ( ! empty( $args['template'] ) ) {
|
161 |
if ( $args['template'] === $this->slug ) {
|
162 |
-
$new
|
163 |
-
$new['settings']
|
164 |
$form['post_content'] = wpforms_encode( $new );
|
165 |
}
|
166 |
}
|
|
|
167 |
return $form;
|
168 |
}
|
169 |
|
@@ -171,8 +180,10 @@ abstract class WPForms_Template {
|
|
171 |
* Pass information about the active template back to the builder.
|
172 |
*
|
173 |
* @since 1.0.0
|
|
|
174 |
* @param array $details
|
175 |
* @param object $form
|
|
|
176 |
* @return array
|
177 |
*/
|
178 |
function template_active( $details, $form ) {
|
@@ -207,7 +218,9 @@ abstract class WPForms_Template {
|
|
207 |
* should display.
|
208 |
*
|
209 |
* @since 1.0.0
|
|
|
210 |
* @param array $form_data
|
|
|
211 |
* @return boolean
|
212 |
*/
|
213 |
function template_modal_conditional( $form_data ) {
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Base form template.
|
5 |
*
|
95 |
|
96 |
$type = $this->core ? '_core' : '';
|
97 |
|
98 |
+
add_filter( "wpforms_form_templates{$type}", array( $this, 'template_details' ), $this->priority );
|
99 |
+
add_filter( 'wpforms_create_form_args', array( $this, 'template_data' ), 10, 2 );
|
100 |
+
add_filter( 'wpforms_save_form_args', array( $this, 'template_replace' ), 10, 4 );
|
101 |
+
add_filter( 'wpforms_builder_template_active', array( $this, 'template_active' ), 10, 2 );
|
102 |
}
|
103 |
|
104 |
/**
|
113 |
* Add basic template details to the Add New Form admin screen.
|
114 |
*
|
115 |
* @since 1.0.0
|
116 |
+
*
|
117 |
* @param array $templates
|
118 |
+
*
|
119 |
* @return array
|
120 |
*/
|
121 |
function template_details( $templates ) {
|
135 |
* Add template data when form is created.
|
136 |
*
|
137 |
* @since 1.0.0
|
138 |
+
*
|
139 |
* @param array $args
|
140 |
* @param array $data
|
141 |
+
*
|
142 |
* @return array
|
143 |
*/
|
144 |
function template_data( $args, $data ) {
|
148 |
$args['post_content'] = wpforms_encode( $this->data );
|
149 |
}
|
150 |
}
|
151 |
+
|
152 |
return $args;
|
153 |
}
|
154 |
|
156 |
* Replace template on post update if triggered.
|
157 |
*
|
158 |
* @since 1.0.0
|
159 |
+
*
|
160 |
* @param array $form
|
161 |
* @param array $data
|
162 |
* @param array $args
|
163 |
+
*
|
164 |
* @return array
|
165 |
*/
|
166 |
function template_replace( $form, $data, $args ) {
|
167 |
|
168 |
if ( ! empty( $args['template'] ) ) {
|
169 |
if ( $args['template'] === $this->slug ) {
|
170 |
+
$new = $this->data;
|
171 |
+
$new['settings'] = ! empty( $form['post_content']['settings'] ) ? $form['post_content']['settings'] : array();
|
172 |
$form['post_content'] = wpforms_encode( $new );
|
173 |
}
|
174 |
}
|
175 |
+
|
176 |
return $form;
|
177 |
}
|
178 |
|
180 |
* Pass information about the active template back to the builder.
|
181 |
*
|
182 |
* @since 1.0.0
|
183 |
+
*
|
184 |
* @param array $details
|
185 |
* @param object $form
|
186 |
+
*
|
187 |
* @return array
|
188 |
*/
|
189 |
function template_active( $details, $form ) {
|
218 |
* should display.
|
219 |
*
|
220 |
* @since 1.0.0
|
221 |
+
*
|
222 |
* @param array $form_data
|
223 |
+
*
|
224 |
* @return boolean
|
225 |
*/
|
226 |
function template_modal_conditional( $form_data ) {
|
includes/templates/class-blank.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Blank form template.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Template_Blank extends WPForms_Template {
|
12 |
|
13 |
/**
|
@@ -38,4 +39,5 @@ class WPForms_Template_Blank extends WPForms_Template {
|
|
38 |
);
|
39 |
}
|
40 |
}
|
|
|
41 |
new WPForms_Template_Blank;
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Blank form template.
|
5 |
*
|
8 |
* @since 1.0.0
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2016, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Template_Blank extends WPForms_Template {
|
13 |
|
14 |
/**
|
39 |
);
|
40 |
}
|
41 |
}
|
42 |
+
|
43 |
new WPForms_Template_Blank;
|
includes/templates/class-contact.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Contact form template.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Template_Contact extends WPForms_Template {
|
12 |
|
13 |
/**
|
@@ -27,21 +28,21 @@ class WPForms_Template_Contact extends WPForms_Template {
|
|
27 |
$this->data = array(
|
28 |
'field_id' => '3',
|
29 |
'fields' => array(
|
30 |
-
'0'
|
31 |
-
'id'
|
32 |
-
'type'
|
33 |
-
'label'
|
34 |
-
'required'
|
35 |
-
'size'
|
36 |
),
|
37 |
-
'1'
|
38 |
-
'id'
|
39 |
-
'type'
|
40 |
-
'label'
|
41 |
-
'required'
|
42 |
-
'size'
|
43 |
),
|
44 |
-
'2'
|
45 |
'id' => '2',
|
46 |
'type' => 'textarea',
|
47 |
'label' => __( 'Comment or Message', 'wpforms' ),
|
@@ -53,7 +54,7 @@ class WPForms_Template_Contact extends WPForms_Template {
|
|
53 |
),
|
54 |
),
|
55 |
'settings' => array(
|
56 |
-
'notifications'
|
57 |
'1' => array(
|
58 |
'sender_name' => '{field_id="0"}',
|
59 |
'sender_address' => '{field_id="1"}',
|
@@ -69,4 +70,5 @@ class WPForms_Template_Contact extends WPForms_Template {
|
|
69 |
);
|
70 |
}
|
71 |
}
|
|
|
72 |
new WPForms_Template_Contact;
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Contact form template.
|
5 |
*
|
8 |
* @since 1.0.0
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2016, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Template_Contact extends WPForms_Template {
|
13 |
|
14 |
/**
|
28 |
$this->data = array(
|
29 |
'field_id' => '3',
|
30 |
'fields' => array(
|
31 |
+
'0' => array(
|
32 |
+
'id' => '0',
|
33 |
+
'type' => 'name',
|
34 |
+
'label' => __( 'Name', 'wpforms' ),
|
35 |
+
'required' => '1',
|
36 |
+
'size' => 'medium',
|
37 |
),
|
38 |
+
'1' => array(
|
39 |
+
'id' => '1',
|
40 |
+
'type' => 'email',
|
41 |
+
'label' => __( 'Email', 'wpforms' ),
|
42 |
+
'required' => '1',
|
43 |
+
'size' => 'medium',
|
44 |
),
|
45 |
+
'2' => array(
|
46 |
'id' => '2',
|
47 |
'type' => 'textarea',
|
48 |
'label' => __( 'Comment or Message', 'wpforms' ),
|
54 |
),
|
55 |
),
|
56 |
'settings' => array(
|
57 |
+
'notifications' => array(
|
58 |
'1' => array(
|
59 |
'sender_name' => '{field_id="0"}',
|
60 |
'sender_address' => '{field_id="1"}',
|
70 |
);
|
71 |
}
|
72 |
}
|
73 |
+
|
74 |
new WPForms_Template_Contact;
|
includes/templates/class-subscribe.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Scribe to Email list form template.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.0.0
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Template_Subscribe extends WPForms_Template {
|
12 |
|
13 |
/**
|
@@ -30,19 +31,19 @@ class WPForms_Template_Subscribe extends WPForms_Template {
|
|
30 |
$this->data = array(
|
31 |
'field_id' => '2',
|
32 |
'fields' => array(
|
33 |
-
'0'
|
34 |
-
'id'
|
35 |
-
'type'
|
36 |
-
'label'
|
37 |
-
'required'
|
38 |
-
'size'
|
39 |
),
|
40 |
-
'1'
|
41 |
-
'id'
|
42 |
-
'type'
|
43 |
-
'label'
|
44 |
-
'required'
|
45 |
-
'size'
|
46 |
),
|
47 |
),
|
48 |
'settings' => array(
|
@@ -61,7 +62,9 @@ class WPForms_Template_Subscribe extends WPForms_Template {
|
|
61 |
* should display.
|
62 |
*
|
63 |
* @since 1.0.0
|
|
|
64 |
* @param array $form_data
|
|
|
65 |
* @return boolean
|
66 |
*/
|
67 |
function template_modal_conditional( $form_data ) {
|
@@ -77,4 +80,5 @@ class WPForms_Template_Subscribe extends WPForms_Template {
|
|
77 |
}
|
78 |
}
|
79 |
}
|
|
|
80 |
new WPForms_Template_Subscribe;
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Scribe to Email list form template.
|
5 |
*
|
8 |
* @since 1.0.0
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2016, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Template_Subscribe extends WPForms_Template {
|
13 |
|
14 |
/**
|
31 |
$this->data = array(
|
32 |
'field_id' => '2',
|
33 |
'fields' => array(
|
34 |
+
'0' => array(
|
35 |
+
'id' => '0',
|
36 |
+
'type' => 'name',
|
37 |
+
'label' => __( 'Name', 'wpforms' ),
|
38 |
+
'required' => '1',
|
39 |
+
'size' => 'medium',
|
40 |
),
|
41 |
+
'1' => array(
|
42 |
+
'id' => '1',
|
43 |
+
'type' => 'email',
|
44 |
+
'label' => __( 'Email', 'wpforms' ),
|
45 |
+
'required' => '1',
|
46 |
+
'size' => 'medium',
|
47 |
),
|
48 |
),
|
49 |
'settings' => array(
|
62 |
* should display.
|
63 |
*
|
64 |
* @since 1.0.0
|
65 |
+
*
|
66 |
* @param array $form_data
|
67 |
+
*
|
68 |
* @return boolean
|
69 |
*/
|
70 |
function template_modal_conditional( $form_data ) {
|
80 |
}
|
81 |
}
|
82 |
}
|
83 |
+
|
84 |
new WPForms_Template_Subscribe;
|
includes/templates/class-suggestion.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Suggestion form template.
|
4 |
*
|
@@ -7,7 +8,7 @@
|
|
7 |
* @since 1.1.3.2
|
8 |
* @license GPL-2.0+
|
9 |
* @copyright Copyright (c) 2016, WPForms LLC
|
10 |
-
*/
|
11 |
class WPForms_Template_Suggestion extends WPForms_Template {
|
12 |
|
13 |
/**
|
@@ -27,26 +28,26 @@ class WPForms_Template_Suggestion extends WPForms_Template {
|
|
27 |
$this->data = array(
|
28 |
'field_id' => '5',
|
29 |
'fields' => array(
|
30 |
-
'0'
|
31 |
-
'id'
|
32 |
-
'type'
|
33 |
-
'label'
|
34 |
-
'required'
|
35 |
-
'size'
|
36 |
),
|
37 |
-
'1'
|
38 |
'id' => '1',
|
39 |
'type' => 'email',
|
40 |
-
'label' => __( '
|
41 |
'description' => __( 'Please enter your email, so we can follow up with you.', 'wpforms' ),
|
42 |
'required' => '1',
|
43 |
'size' => 'medium',
|
44 |
),
|
45 |
-
'2'
|
46 |
-
'id'
|
47 |
-
'type'
|
48 |
-
'label'
|
49 |
-
'choices'
|
50 |
'1' => array(
|
51 |
'label' => __( 'Sales', 'wpforms' ),
|
52 |
),
|
@@ -60,25 +61,25 @@ class WPForms_Template_Suggestion extends WPForms_Template {
|
|
60 |
'label' => __( 'Other', 'wpforms' ),
|
61 |
),
|
62 |
),
|
63 |
-
'required'
|
64 |
),
|
65 |
-
'3'
|
66 |
-
'id'
|
67 |
-
'type'
|
68 |
-
'label'
|
69 |
-
'required'
|
70 |
-
'size'
|
71 |
),
|
72 |
-
'4'
|
73 |
-
'id'
|
74 |
-
'type'
|
75 |
-
'label'
|
76 |
-
'required'
|
77 |
-
'size'
|
78 |
),
|
79 |
),
|
80 |
'settings' => array(
|
81 |
-
'notifications'
|
82 |
'1' => array(
|
83 |
'sender_name' => '{field_id="0"}',
|
84 |
'sender_address' => '{field_id="1"}',
|
@@ -94,4 +95,5 @@ class WPForms_Template_Suggestion extends WPForms_Template {
|
|
94 |
);
|
95 |
}
|
96 |
}
|
|
|
97 |
new WPForms_Template_Suggestion;
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Suggestion form template.
|
5 |
*
|
8 |
* @since 1.1.3.2
|
9 |
* @license GPL-2.0+
|
10 |
* @copyright Copyright (c) 2016, WPForms LLC
|
11 |
+
*/
|
12 |
class WPForms_Template_Suggestion extends WPForms_Template {
|
13 |
|
14 |
/**
|
28 |
$this->data = array(
|
29 |
'field_id' => '5',
|
30 |
'fields' => array(
|
31 |
+
'0' => array(
|
32 |
+
'id' => '0',
|
33 |
+
'type' => 'name',
|
34 |
+
'label' => __( 'Name', 'wpforms' ),
|
35 |
+
'required' => '1',
|
36 |
+
'size' => 'medium',
|
37 |
),
|
38 |
+
'1' => array(
|
39 |
'id' => '1',
|
40 |
'type' => 'email',
|
41 |
+
'label' => __( 'Email', 'wpforms' ),
|
42 |
'description' => __( 'Please enter your email, so we can follow up with you.', 'wpforms' ),
|
43 |
'required' => '1',
|
44 |
'size' => 'medium',
|
45 |
),
|
46 |
+
'2' => array(
|
47 |
+
'id' => '2',
|
48 |
+
'type' => 'radio',
|
49 |
+
'label' => __( 'Which department do you have a suggestion for?', 'wpforms' ),
|
50 |
+
'choices' => array(
|
51 |
'1' => array(
|
52 |
'label' => __( 'Sales', 'wpforms' ),
|
53 |
),
|
61 |
'label' => __( 'Other', 'wpforms' ),
|
62 |
),
|
63 |
),
|
64 |
+
'required' => '1',
|
65 |
),
|
66 |
+
'3' => array(
|
67 |
+
'id' => '3',
|
68 |
+
'type' => 'text',
|
69 |
+
'label' => __( 'Subject', 'wpforms' ),
|
70 |
+
'required' => '1',
|
71 |
+
'size' => 'medium',
|
72 |
),
|
73 |
+
'4' => array(
|
74 |
+
'id' => '4',
|
75 |
+
'type' => 'textarea',
|
76 |
+
'label' => __( 'Message', 'wpforms' ),
|
77 |
+
'required' => '1',
|
78 |
+
'size' => 'medium',
|
79 |
),
|
80 |
),
|
81 |
'settings' => array(
|
82 |
+
'notifications' => array(
|
83 |
'1' => array(
|
84 |
'sender_name' => '{field_id="0"}',
|
85 |
'sender_address' => '{field_id="1"}',
|
95 |
);
|
96 |
}
|
97 |
}
|
98 |
+
|
99 |
new WPForms_Template_Suggestion;
|
languages/wpforms-ru_RU.mo
ADDED
Binary file
|
languages/wpforms-ru_RU.po
ADDED
@@ -0,0 +1,4564 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2017 WPForms
|
2 |
+
# This file is distributed under the same license as the WPForms package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: WPForms 1.4.0.1\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
|
7 |
+
"POT-Creation-Date: 2017-09-26 15:04:59+00:00\n"
|
8 |
+
"PO-Revision-Date: 2017-09-28 16:22+0300\n"
|
9 |
+
"Last-Translator: \n"
|
10 |
+
"Language-Team: \n"
|
11 |
+
"Language: ru_RU\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 2.0.4\n"
|
16 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
17 |
+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
18 |
+
|
19 |
+
#: includes/admin/admin.php:128 pro/includes/admin/class-addons.php:241
|
20 |
+
msgid "Activate"
|
21 |
+
msgstr "Активировать"
|
22 |
+
|
23 |
+
#: includes/admin/admin.php:129 pro/includes/admin/class-addons.php:198
|
24 |
+
msgid "Active"
|
25 |
+
msgstr "Активный"
|
26 |
+
|
27 |
+
#: includes/admin/admin.php:130 pro/includes/admin/class-addons.php:236
|
28 |
+
msgid "Deactivate"
|
29 |
+
msgstr "Деактивировать"
|
30 |
+
|
31 |
+
#: includes/admin/admin.php:131 pro/includes/admin/class-addons.php:204
|
32 |
+
msgid "Inactive"
|
33 |
+
msgstr "Неактивный"
|
34 |
+
|
35 |
+
#: includes/admin/admin.php:132 pro/includes/admin/class-addons.php:246
|
36 |
+
msgid "Install Addon"
|
37 |
+
msgstr "Установить"
|
38 |
+
|
39 |
+
#: includes/admin/admin.php:134 includes/admin/builder/class-builder.php:297
|
40 |
+
#: includes/admin/class-editor.php:97
|
41 |
+
#: pro/includes/admin/entries/class-entries-single.php:601
|
42 |
+
msgid "Cancel"
|
43 |
+
msgstr "Отменить"
|
44 |
+
|
45 |
+
#: includes/admin/admin.php:135 includes/admin/builder/class-builder.php:299
|
46 |
+
#: includes/admin/class-editor.php:71 includes/class-preview.php:160
|
47 |
+
msgid "Close"
|
48 |
+
msgstr "Закрыть"
|
49 |
+
|
50 |
+
#: includes/admin/admin.php:136
|
51 |
+
msgid "Are you sure you want to delete this entry?"
|
52 |
+
msgstr "Вы уверены, что хотите удалить эту запись?"
|
53 |
+
|
54 |
+
#: includes/admin/admin.php:137
|
55 |
+
msgid "Are you sure you want to delete ALL entries?"
|
56 |
+
msgstr "Вы уверены, что хотите удалить ВСЕ записи?"
|
57 |
+
|
58 |
+
#: includes/admin/admin.php:138
|
59 |
+
#: pro/includes/admin/entries/class-entries-single.php:508
|
60 |
+
msgid "Hide Empty Fields"
|
61 |
+
msgstr "Спрятать пустые поля"
|
62 |
+
|
63 |
+
#: includes/admin/admin.php:139
|
64 |
+
#: pro/includes/admin/entries/class-entries-single.php:508
|
65 |
+
msgid "Show Empty Fields"
|
66 |
+
msgstr "Показать пустые поля"
|
67 |
+
|
68 |
+
#: includes/admin/admin.php:140
|
69 |
+
msgid "Entries Field Columns"
|
70 |
+
msgstr "Колонки таблицы записей"
|
71 |
+
|
72 |
+
#: includes/admin/admin.php:141
|
73 |
+
msgid "Are you sure you want to delete this note?"
|
74 |
+
msgstr "Вы уверены, что хотите удалить эту заметку?"
|
75 |
+
|
76 |
+
#: includes/admin/admin.php:142
|
77 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:364
|
78 |
+
msgid "Unstar entry"
|
79 |
+
msgstr "Снять отметку с записи"
|
80 |
+
|
81 |
+
#: includes/admin/admin.php:143
|
82 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:364
|
83 |
+
msgid "Star entry"
|
84 |
+
msgstr "Отметить запись"
|
85 |
+
|
86 |
+
#: includes/admin/admin.php:144
|
87 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:369
|
88 |
+
msgid "Mark entry read"
|
89 |
+
msgstr "Отметить прочитанным"
|
90 |
+
|
91 |
+
#: includes/admin/admin.php:145
|
92 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:369
|
93 |
+
msgid "Mark entry unread"
|
94 |
+
msgstr "Отметить непрочитанным"
|
95 |
+
|
96 |
+
#: includes/admin/admin.php:146
|
97 |
+
msgid "Select fields"
|
98 |
+
msgstr "Выбрать поля"
|
99 |
+
|
100 |
+
#: includes/admin/admin.php:147
|
101 |
+
msgid "Are you sure you want to delete this form?"
|
102 |
+
msgstr "Вы действительно хотите удалить эту форму?"
|
103 |
+
|
104 |
+
#: includes/admin/admin.php:148
|
105 |
+
msgid "Are you sure you want to duplicate this form?"
|
106 |
+
msgstr "Вы действительно хотите создать дубликат этой формы?"
|
107 |
+
|
108 |
+
#: includes/admin/admin.php:149 includes/admin/builder/class-builder.php:307
|
109 |
+
msgid "Heads up!"
|
110 |
+
msgstr "Осторожно!"
|
111 |
+
|
112 |
+
#: includes/admin/admin.php:151 includes/admin/builder/class-builder.php:298
|
113 |
+
msgid "OK"
|
114 |
+
msgstr "OK"
|
115 |
+
|
116 |
+
#: includes/admin/admin.php:152
|
117 |
+
msgid "Are you sure you want to disconnect this account?"
|
118 |
+
msgstr "Вы действительно хотите отключить эту учетную запись?"
|
119 |
+
|
120 |
+
#: includes/admin/admin.php:153
|
121 |
+
msgid "Could not authenticate with the provider."
|
122 |
+
msgstr "Не удалось выполнить аутентификацию с поставщиком."
|
123 |
+
|
124 |
+
#: includes/admin/admin.php:154
|
125 |
+
msgid "Save and Refresh"
|
126 |
+
msgstr "Сохранить и обновить"
|
127 |
+
|
128 |
+
#: includes/admin/admin.php:155
|
129 |
+
msgid "Upload or Choose Your Image"
|
130 |
+
msgstr "Загрузить или выбрать изображение"
|
131 |
+
|
132 |
+
#: includes/admin/admin.php:156
|
133 |
+
msgid "Use Image"
|
134 |
+
msgstr "Использовать изображение"
|
135 |
+
|
136 |
+
#. translators: %1$s - WPForms plugin name; %2$s - opening a link tag; %3$s -
|
137 |
+
#. closing a link tag.
|
138 |
+
#: includes/admin/admin.php:351
|
139 |
+
msgid ""
|
140 |
+
"Your site is running an outdated version of PHP that is no longer supported "
|
141 |
+
"and may cause issues with %1$s. %2$sRead more%3$s for additional information."
|
142 |
+
msgstr ""
|
143 |
+
"Ваш сайт работает на очень старой версии PHP, которая большая не "
|
144 |
+
"поддерживается и может быть причиной проблем в работе %1$s. %2$sПрочтите "
|
145 |
+
"больше%3$s на нашем сайте."
|
146 |
+
|
147 |
+
#: includes/admin/ajax-actions.php:24
|
148 |
+
msgid "You do not have permission."
|
149 |
+
msgstr "У вас недостаточно прав."
|
150 |
+
|
151 |
+
#: includes/admin/ajax-actions.php:29
|
152 |
+
msgid "No data provided"
|
153 |
+
msgstr "Данные не были предоставлены"
|
154 |
+
|
155 |
+
#: includes/admin/ajax-actions.php:69
|
156 |
+
msgid "An error occurred and the form could not be saved"
|
157 |
+
msgstr "Произошла ошибка и форма не может быть сохранена"
|
158 |
+
|
159 |
+
#: includes/admin/ajax-actions.php:95
|
160 |
+
msgid "No form name provided"
|
161 |
+
msgstr "Имя формы не было предоставлено"
|
162 |
+
|
163 |
+
#: includes/admin/ajax-actions.php:132
|
164 |
+
msgid "Error creating form"
|
165 |
+
msgstr "Ошибка при создании формы"
|
166 |
+
|
167 |
+
#: includes/admin/ajax-actions.php:150
|
168 |
+
msgid "No form ID provided"
|
169 |
+
msgstr "ID формы не предоставлен"
|
170 |
+
|
171 |
+
#: includes/admin/ajax-actions.php:173
|
172 |
+
msgid "Error updating form template"
|
173 |
+
msgstr "Ошибка при обновлении формы"
|
174 |
+
|
175 |
+
#: includes/admin/ajax-actions.php:281 includes/fields/class-base.php:405
|
176 |
+
msgid "post type"
|
177 |
+
msgstr "тип записи"
|
178 |
+
|
179 |
+
#: includes/admin/ajax-actions.php:309 includes/fields/class-base.php:412
|
180 |
+
msgid "taxonomy"
|
181 |
+
msgstr "таксономия"
|
182 |
+
|
183 |
+
#: includes/admin/builder/class-builder.php:284
|
184 |
+
#: includes/class-conditional-logic-core.php:441
|
185 |
+
msgid "AND"
|
186 |
+
msgstr "И"
|
187 |
+
|
188 |
+
#: includes/admin/builder/class-builder.php:286
|
189 |
+
msgid "Add New Choices"
|
190 |
+
msgstr "Добавить новые варианты"
|
191 |
+
|
192 |
+
#: includes/admin/builder/class-builder.php:287
|
193 |
+
#: includes/fields/class-base.php:363
|
194 |
+
msgid "Bulk Add"
|
195 |
+
msgstr "Массово добавить"
|
196 |
+
|
197 |
+
#: includes/admin/builder/class-builder.php:288
|
198 |
+
msgid "Hide Bulk Add"
|
199 |
+
msgstr "Спрятать массовое добавление"
|
200 |
+
|
201 |
+
#: includes/admin/builder/class-builder.php:289
|
202 |
+
msgid "Add Choices (one per line)"
|
203 |
+
msgstr "Добавить варианты (по одной в строке)"
|
204 |
+
|
205 |
+
#: includes/admin/builder/class-builder.php:290
|
206 |
+
msgid ""
|
207 |
+
"Blue\n"
|
208 |
+
"Red\n"
|
209 |
+
"Green"
|
210 |
+
msgstr ""
|
211 |
+
"Синий\n"
|
212 |
+
"Красный\n"
|
213 |
+
"Зеленый"
|
214 |
+
|
215 |
+
#: includes/admin/builder/class-builder.php:291
|
216 |
+
msgid "Show presets"
|
217 |
+
msgstr "Показать пресеты"
|
218 |
+
|
219 |
+
#: includes/admin/builder/class-builder.php:292
|
220 |
+
msgid "Hide presets"
|
221 |
+
msgstr "Скрыть пресеты"
|
222 |
+
|
223 |
+
#: includes/admin/builder/class-builder.php:296
|
224 |
+
msgid ""
|
225 |
+
"The {source} {type} contains over {limit} items ({total}). This may make the "
|
226 |
+
"field difficult for your vistors to use and/or cause the form to be slow."
|
227 |
+
msgstr ""
|
228 |
+
"{source} {type} содержит более {limit} элементов ({total}). Это может "
|
229 |
+
"затруднить использование вашими посетителями поля и/или привести к "
|
230 |
+
"замедлению формы."
|
231 |
+
|
232 |
+
#: includes/admin/builder/class-builder.php:300
|
233 |
+
msgid ""
|
234 |
+
"Due to form changes, conditional logic rules have been removed or updated:"
|
235 |
+
msgstr ""
|
236 |
+
"Из-за изменений формы, правила условной логики были удалены или обновлены:"
|
237 |
+
|
238 |
+
#: includes/admin/builder/class-builder.php:301
|
239 |
+
msgid ""
|
240 |
+
"Are you sure you want to disable conditional logic? This will remove the "
|
241 |
+
"rules for this field or setting."
|
242 |
+
msgstr ""
|
243 |
+
"Вы уверены, что хотите отключить условную логику? Это действие удалит все "
|
244 |
+
"правила для этого поля или настройки."
|
245 |
+
|
246 |
+
#: includes/admin/builder/class-builder.php:302
|
247 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:212
|
248 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:223
|
249 |
+
#: pro/includes/admin/entries/class-entries-list.php:399
|
250 |
+
#: pro/includes/admin/entries/class-entries-list.php:413
|
251 |
+
msgid "Field"
|
252 |
+
msgstr "Поле"
|
253 |
+
|
254 |
+
#: includes/admin/builder/class-builder.php:303
|
255 |
+
msgid "Field Locked"
|
256 |
+
msgstr "Поле заблокировано"
|
257 |
+
|
258 |
+
#: includes/admin/builder/class-builder.php:304
|
259 |
+
msgid "This field cannot be deleted or duplicated."
|
260 |
+
msgstr "Это поле нельзя удалить или дублировать."
|
261 |
+
|
262 |
+
#: includes/admin/builder/class-builder.php:305
|
263 |
+
msgid "Available Fields"
|
264 |
+
msgstr "Доступные поля"
|
265 |
+
|
266 |
+
#: includes/admin/builder/class-builder.php:306
|
267 |
+
msgid "No fields available"
|
268 |
+
msgstr "Нет доступных полей"
|
269 |
+
|
270 |
+
#: includes/admin/builder/class-builder.php:309
|
271 |
+
msgid "No email fields"
|
272 |
+
msgstr "Нет полей электронной почты"
|
273 |
+
|
274 |
+
#: includes/admin/builder/class-builder.php:310
|
275 |
+
msgid "Are you sure you want to delete this notification?"
|
276 |
+
msgstr "Вы уверены, что хотите удалить это уведомление?"
|
277 |
+
|
278 |
+
#: includes/admin/builder/class-builder.php:311
|
279 |
+
msgid "Enter a notification name"
|
280 |
+
msgstr "Введите название уведомления"
|
281 |
+
|
282 |
+
#: includes/admin/builder/class-builder.php:312
|
283 |
+
msgid "Eg: User Confirmation"
|
284 |
+
msgstr "Например: Подтверждение пользователя"
|
285 |
+
|
286 |
+
#: includes/admin/builder/class-builder.php:313
|
287 |
+
msgid "You must provide a notification name"
|
288 |
+
msgstr "Вы должны указать название уведомления"
|
289 |
+
|
290 |
+
#: includes/admin/builder/class-builder.php:314
|
291 |
+
msgid ""
|
292 |
+
"Form must contain one notification. To disable all notifications use the "
|
293 |
+
"Notifications dropdown setting."
|
294 |
+
msgstr ""
|
295 |
+
"Форма должна содержать как минимум одно уведомление. Чтобы отключить все "
|
296 |
+
"уведомления, используйте настройку включения/отключения уведомлений."
|
297 |
+
|
298 |
+
#: includes/admin/builder/class-builder.php:315 lite/wpforms-lite.php:84
|
299 |
+
#: pro/wpforms-pro.php:408
|
300 |
+
msgid "Default Notification"
|
301 |
+
msgstr "Стандартное уведомление"
|
302 |
+
|
303 |
+
#: includes/admin/builder/class-builder.php:316
|
304 |
+
#: includes/admin/builder/class-builder.php:491
|
305 |
+
msgid "Save"
|
306 |
+
msgstr "Сохранить"
|
307 |
+
|
308 |
+
#: includes/admin/builder/class-builder.php:317
|
309 |
+
msgid "Saving ..."
|
310 |
+
msgstr "Сохранение ..."
|
311 |
+
|
312 |
+
#: includes/admin/builder/class-builder.php:318
|
313 |
+
msgid "Saved!"
|
314 |
+
msgstr "Сохранено!"
|
315 |
+
|
316 |
+
#: includes/admin/builder/class-builder.php:319
|
317 |
+
msgid "Save and Exit"
|
318 |
+
msgstr "Сохранить и выйти"
|
319 |
+
|
320 |
+
#: includes/admin/builder/class-builder.php:321
|
321 |
+
#: includes/fields/class-base.php:550
|
322 |
+
msgid "Show Layouts"
|
323 |
+
msgstr "Показать макеты"
|
324 |
+
|
325 |
+
#: includes/admin/builder/class-builder.php:322
|
326 |
+
msgid "Hide Layouts"
|
327 |
+
msgstr "Скрыть макеты"
|
328 |
+
|
329 |
+
#: includes/admin/builder/class-builder.php:323
|
330 |
+
msgid "Select your layout"
|
331 |
+
msgstr "Выберите ваш макет"
|
332 |
+
|
333 |
+
#: includes/admin/builder/class-builder.php:324
|
334 |
+
msgid "Select your column"
|
335 |
+
msgstr "Выберите вашу колонку"
|
336 |
+
|
337 |
+
#: includes/admin/builder/class-builder.php:325
|
338 |
+
#: includes/admin/builder/class-builder.php:446
|
339 |
+
msgid "Loading"
|
340 |
+
msgstr "Загрузка"
|
341 |
+
|
342 |
+
#: includes/admin/builder/class-builder.php:331
|
343 |
+
msgid "Use Template"
|
344 |
+
msgstr "Использовать шаблон"
|
345 |
+
|
346 |
+
#: includes/admin/builder/class-builder.php:332
|
347 |
+
msgid ""
|
348 |
+
"Changing templates on an existing form will DELETE existing form fields. Are "
|
349 |
+
"you sure you want apply the new template?"
|
350 |
+
msgstr ""
|
351 |
+
"Изменение шаблонов в существующей форме УДАЛИТ существующие поля формы. Вы "
|
352 |
+
"уверены, что хотите применить новый шаблон?"
|
353 |
+
|
354 |
+
#: includes/admin/builder/class-builder.php:333
|
355 |
+
msgid ""
|
356 |
+
"You are almost done. To embed this form on your site, please paste the "
|
357 |
+
"following shortcode inside a post or page."
|
358 |
+
msgstr ""
|
359 |
+
"Вы почти закончили. Чтобы внедрить эту форму на сайт, пожалуйста, вставьте "
|
360 |
+
"следующий шорткод внутри записи или страницы."
|
361 |
+
|
362 |
+
#: includes/admin/builder/class-builder.php:334
|
363 |
+
msgid "Or you can follow the instructions in this video."
|
364 |
+
msgstr "Или вы можете следовать инструкциям в этом видео."
|
365 |
+
|
366 |
+
#: includes/admin/builder/class-builder.php:335
|
367 |
+
#: includes/admin/builder/class-builder.php:496
|
368 |
+
msgid "Exit"
|
369 |
+
msgstr "Выход"
|
370 |
+
|
371 |
+
#: includes/admin/builder/class-builder.php:337
|
372 |
+
msgid "If you exit without saving, your changes will be lost."
|
373 |
+
msgstr "Если не сохранитесь, внесённые изменения будут утеряны."
|
374 |
+
|
375 |
+
#: includes/admin/builder/class-builder.php:338
|
376 |
+
msgid "Are you sure you want to delete this field?"
|
377 |
+
msgstr "Вы уверены, что хотите удалить это поле?"
|
378 |
+
|
379 |
+
#: includes/admin/builder/class-builder.php:339
|
380 |
+
msgid "Are you sure you want to duplicate this field?"
|
381 |
+
msgstr "Вы уверено, что хотите создать дубликат этого поля?"
|
382 |
+
|
383 |
+
#: includes/admin/builder/class-builder.php:340
|
384 |
+
msgid "(copy)"
|
385 |
+
msgstr "(копия)"
|
386 |
+
|
387 |
+
#: includes/admin/builder/class-builder.php:341
|
388 |
+
msgid "Please enter a form name."
|
389 |
+
msgstr "Пожалуйста, введите название формы."
|
390 |
+
|
391 |
+
#: includes/admin/builder/class-builder.php:342
|
392 |
+
msgid "This item must contain at least one choice."
|
393 |
+
msgstr "Этот элемент должен содержать по крайней мере один вариант."
|
394 |
+
|
395 |
+
#: includes/admin/builder/class-builder.php:343
|
396 |
+
#: includes/fields/class-base.php:253 includes/fields/class-base.php:599
|
397 |
+
#: lite/wpforms-lite.php:76 pro/wpforms-pro.php:401
|
398 |
+
msgid "Off"
|
399 |
+
msgstr "Выкл"
|
400 |
+
|
401 |
+
#: includes/admin/builder/class-builder.php:344
|
402 |
+
#: includes/fields/class-base.php:253 lite/wpforms-lite.php:75
|
403 |
+
#: pro/wpforms-pro.php:400
|
404 |
+
msgid "On"
|
405 |
+
msgstr "Вкл"
|
406 |
+
|
407 |
+
#: includes/admin/builder/class-builder.php:345
|
408 |
+
msgid "or"
|
409 |
+
msgstr "или"
|
410 |
+
|
411 |
+
#: includes/admin/builder/class-builder.php:346
|
412 |
+
#: includes/templates/class-suggestion.php:61
|
413 |
+
msgid "Other"
|
414 |
+
msgstr "Другое"
|
415 |
+
|
416 |
+
#: includes/admin/builder/class-builder.php:347
|
417 |
+
#: includes/class-conditional-logic-core.php:367
|
418 |
+
msgid "is"
|
419 |
+
msgstr "является"
|
420 |
+
|
421 |
+
#: includes/admin/builder/class-builder.php:348
|
422 |
+
#: includes/class-conditional-logic-core.php:368
|
423 |
+
msgid "is not"
|
424 |
+
msgstr "не является"
|
425 |
+
|
426 |
+
#: includes/admin/builder/class-builder.php:349
|
427 |
+
#: includes/class-conditional-logic-core.php:369
|
428 |
+
msgid "empty"
|
429 |
+
msgstr "пусто"
|
430 |
+
|
431 |
+
#: includes/admin/builder/class-builder.php:350
|
432 |
+
#: includes/class-conditional-logic-core.php:370
|
433 |
+
msgid "not empty"
|
434 |
+
msgstr "не пусто"
|
435 |
+
|
436 |
+
#: includes/admin/builder/class-builder.php:351
|
437 |
+
#: includes/class-conditional-logic-core.php:375
|
438 |
+
msgid "contains"
|
439 |
+
msgstr "содержит"
|
440 |
+
|
441 |
+
#: includes/admin/builder/class-builder.php:352
|
442 |
+
#: includes/class-conditional-logic-core.php:376
|
443 |
+
msgid "does not contain"
|
444 |
+
msgstr "не содержит"
|
445 |
+
|
446 |
+
#: includes/admin/builder/class-builder.php:353
|
447 |
+
#: includes/class-conditional-logic-core.php:377
|
448 |
+
msgid "starts with"
|
449 |
+
msgstr "начинается с"
|
450 |
+
|
451 |
+
#: includes/admin/builder/class-builder.php:354
|
452 |
+
#: includes/class-conditional-logic-core.php:378
|
453 |
+
msgid "ends with"
|
454 |
+
msgstr "заканчивается на"
|
455 |
+
|
456 |
+
#: includes/admin/builder/class-builder.php:355
|
457 |
+
msgid ""
|
458 |
+
"Form entries must be stored to accept payments. Please enable saving form "
|
459 |
+
"entries in the General settings first."
|
460 |
+
msgstr ""
|
461 |
+
"Записи формы должны храниться для принятия платежей. Сначала включите "
|
462 |
+
"сохранение записей в основных настройках формы."
|
463 |
+
|
464 |
+
#: includes/admin/builder/class-builder.php:356
|
465 |
+
#: pro/includes/fields/class-page-break.php:199
|
466 |
+
#: pro/includes/fields/class-page-break.php:521
|
467 |
+
msgid "Previous"
|
468 |
+
msgstr "Предыдущий"
|
469 |
+
|
470 |
+
#: includes/admin/builder/class-builder.php:357
|
471 |
+
#: includes/class-conditional-logic-core.php:441
|
472 |
+
msgid "Create new rule"
|
473 |
+
msgstr "Создать новое правило"
|
474 |
+
|
475 |
+
#: includes/admin/builder/class-builder.php:358
|
476 |
+
msgid "Add new group"
|
477 |
+
msgstr "Добавить новую группу"
|
478 |
+
|
479 |
+
#: includes/admin/builder/class-builder.php:359
|
480 |
+
#: includes/class-conditional-logic-core.php:442
|
481 |
+
msgid "Delete rule"
|
482 |
+
msgstr "Удалить правило"
|
483 |
+
|
484 |
+
#: includes/admin/builder/class-builder.php:361
|
485 |
+
#: includes/admin/builder/functions.php:255 includes/fields/class-base.php:496
|
486 |
+
msgid "Show Smart Tags"
|
487 |
+
msgstr "Показать смарт-теги"
|
488 |
+
|
489 |
+
#: includes/admin/builder/class-builder.php:362
|
490 |
+
msgid "Hide Smart Tags"
|
491 |
+
msgstr "Скрыть смарт-теги"
|
492 |
+
|
493 |
+
#: includes/admin/builder/class-builder.php:363
|
494 |
+
#: includes/class-conditional-logic-core.php:326
|
495 |
+
msgid "-- Select Field --"
|
496 |
+
msgstr "-- Выбрать поле --"
|
497 |
+
|
498 |
+
#: includes/admin/builder/class-builder.php:364
|
499 |
+
#: includes/class-conditional-logic-core.php:421
|
500 |
+
msgid "-- Select Choice --"
|
501 |
+
msgstr "-- Выбрать вариант --"
|
502 |
+
|
503 |
+
#: includes/admin/builder/class-builder.php:397
|
504 |
+
msgid "Countries"
|
505 |
+
msgstr "Страны"
|
506 |
+
|
507 |
+
#: includes/admin/builder/class-builder.php:401
|
508 |
+
msgid "Countries Postal Code"
|
509 |
+
msgstr "Почтовый индекс стран"
|
510 |
+
|
511 |
+
#: includes/admin/builder/class-builder.php:405
|
512 |
+
msgid "States"
|
513 |
+
msgstr "Штаты"
|
514 |
+
|
515 |
+
#: includes/admin/builder/class-builder.php:409
|
516 |
+
msgid "States Postal Code"
|
517 |
+
msgstr "Почтовый индекс штатов"
|
518 |
+
|
519 |
+
#: includes/admin/builder/class-builder.php:413
|
520 |
+
msgid "Months"
|
521 |
+
msgstr "Месяцы"
|
522 |
+
|
523 |
+
#: includes/admin/builder/class-builder.php:417
|
524 |
+
msgid "Days"
|
525 |
+
msgstr "Дни"
|
526 |
+
|
527 |
+
#: includes/admin/builder/class-builder.php:469
|
528 |
+
msgid "Now editing"
|
529 |
+
msgstr "Сейчас редактируется"
|
530 |
+
|
531 |
+
#: includes/admin/builder/class-builder.php:479
|
532 |
+
#: pro/includes/admin/entries/class-entries-list.php:528
|
533 |
+
msgid "Preview Form"
|
534 |
+
msgstr "Предпросмотр формы"
|
535 |
+
|
536 |
+
#: includes/admin/builder/class-builder.php:481
|
537 |
+
#: includes/admin/overview/class-overview-table.php:182
|
538 |
+
msgid "Preview"
|
539 |
+
msgstr "Предпросмотр"
|
540 |
+
|
541 |
+
#: includes/admin/builder/class-builder.php:484
|
542 |
+
msgid "Embed Form"
|
543 |
+
msgstr "Встроить форму"
|
544 |
+
|
545 |
+
#: includes/admin/builder/class-builder.php:486
|
546 |
+
msgid "Embed"
|
547 |
+
msgstr "Шорткод"
|
548 |
+
|
549 |
+
#: includes/admin/builder/class-builder.php:489
|
550 |
+
msgid "Save Form"
|
551 |
+
msgstr "Сохранить форму"
|
552 |
+
|
553 |
+
#: includes/admin/builder/functions.php:194
|
554 |
+
msgid "Field #"
|
555 |
+
msgstr "Поле #"
|
556 |
+
|
557 |
+
#: includes/admin/builder/panels/class-fields.php:21
|
558 |
+
msgid "Fields"
|
559 |
+
msgstr "Поля"
|
560 |
+
|
561 |
+
#: includes/admin/builder/panels/class-fields.php:66
|
562 |
+
msgid "Add Fields"
|
563 |
+
msgstr "Добавить новые поля"
|
564 |
+
|
565 |
+
#: includes/admin/builder/panels/class-fields.php:73
|
566 |
+
msgid "Field Options"
|
567 |
+
msgstr "Параметры поля"
|
568 |
+
|
569 |
+
#: includes/admin/builder/panels/class-fields.php:100
|
570 |
+
msgid ""
|
571 |
+
"You need to <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup"
|
572 |
+
"\">setup your form</a> before you can manage the fields."
|
573 |
+
msgstr ""
|
574 |
+
"Вам нужно <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup"
|
575 |
+
"\">настроить вашу форм</a>, прежде чем вы cможете управлять полями."
|
576 |
+
|
577 |
+
#: includes/admin/builder/panels/class-fields.php:123
|
578 |
+
#: includes/admin/builder/panels/class-settings.php:130
|
579 |
+
msgid "Submit"
|
580 |
+
msgstr "Отправить"
|
581 |
+
|
582 |
+
#: includes/admin/builder/panels/class-fields.php:143
|
583 |
+
msgid "Standard Fields"
|
584 |
+
msgstr "Стандартные поля"
|
585 |
+
|
586 |
+
#: includes/admin/builder/panels/class-fields.php:147
|
587 |
+
msgid "Fancy Fields"
|
588 |
+
msgstr "Сложные поля"
|
589 |
+
|
590 |
+
#: includes/admin/builder/panels/class-fields.php:151
|
591 |
+
msgid "Payment Fields"
|
592 |
+
msgstr "Поля оплаты"
|
593 |
+
|
594 |
+
#: includes/admin/builder/panels/class-fields.php:201
|
595 |
+
msgid "You don't have any fields yet."
|
596 |
+
msgstr "У вас еще нет полей."
|
597 |
+
|
598 |
+
#: includes/admin/builder/panels/class-fields.php:232
|
599 |
+
msgid "You don't have any fields yet. Add some!"
|
600 |
+
msgstr "У вас еще нет полей. Добавьте некоторые!"
|
601 |
+
|
602 |
+
#: includes/admin/builder/panels/class-fields.php:252
|
603 |
+
#: includes/fields/class-base.php:796
|
604 |
+
msgid "Duplicate Field"
|
605 |
+
msgstr "Дублировать поле"
|
606 |
+
|
607 |
+
#: includes/admin/builder/panels/class-fields.php:254
|
608 |
+
#: includes/fields/class-base.php:797
|
609 |
+
msgid "Delete Field"
|
610 |
+
msgstr "Удалить поле"
|
611 |
+
|
612 |
+
#: includes/admin/builder/panels/class-fields.php:256
|
613 |
+
#: includes/fields/class-base.php:798
|
614 |
+
msgid "Click to edit. Drag to reorder."
|
615 |
+
msgstr "Нажмите, чтобы изменить. Перетащите, чтобы изменить порядок."
|
616 |
+
|
617 |
+
#: includes/admin/builder/panels/class-providers.php:21
|
618 |
+
msgid "Marketing"
|
619 |
+
msgstr "Маркетинг"
|
620 |
+
|
621 |
+
#: includes/admin/builder/panels/class-providers.php:55
|
622 |
+
msgid ""
|
623 |
+
"We need to save your progress to continue to the Marketing panel. Is that OK?"
|
624 |
+
msgstr ""
|
625 |
+
"Нам нужно сохранить ваш прогресс, чтобы перейти к маркетинговой панели. Вы "
|
626 |
+
"согласны?"
|
627 |
+
|
628 |
+
#: includes/admin/builder/panels/class-providers.php:56
|
629 |
+
msgid "Are you sure you want to delete this connecton?"
|
630 |
+
msgstr "Вы уверены, что хотите удалить это соединение?"
|
631 |
+
|
632 |
+
#: includes/admin/builder/panels/class-providers.php:57
|
633 |
+
msgid "Enter a %type% nickname"
|
634 |
+
msgstr "Введите для %type% псевдоним"
|
635 |
+
|
636 |
+
#: includes/admin/builder/panels/class-providers.php:58
|
637 |
+
msgid "Eg: Newsletter Optin"
|
638 |
+
msgstr "Например: Подписка на рассылку"
|
639 |
+
|
640 |
+
#: includes/admin/builder/panels/class-providers.php:59
|
641 |
+
msgid "You must provide a connection nickname"
|
642 |
+
msgstr "Вы должны указать псевдоним соединения"
|
643 |
+
|
644 |
+
#: includes/admin/builder/panels/class-providers.php:60
|
645 |
+
msgid "Field required"
|
646 |
+
msgstr "Поле обязательное"
|
647 |
+
|
648 |
+
#: includes/admin/builder/panels/class-providers.php:97
|
649 |
+
#: pro/includes/admin/builder/panels/class-payments.php:60
|
650 |
+
msgid ""
|
651 |
+
"You need to <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup"
|
652 |
+
"\">setup your form</a> before you can manage these settings."
|
653 |
+
msgstr ""
|
654 |
+
"Вам нужно <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup"
|
655 |
+
"\">настроить вашу форм</a>, прежде чем вы cможете управлять этими "
|
656 |
+
"настройками."
|
657 |
+
|
658 |
+
#: includes/admin/builder/panels/class-providers.php:108
|
659 |
+
msgid "Install Your Marketing Integration"
|
660 |
+
msgstr "Установите вашу маркетинговую интеграцию"
|
661 |
+
|
662 |
+
#: includes/admin/builder/panels/class-providers.php:109
|
663 |
+
msgid ""
|
664 |
+
"It seems you do not have any marketing addons activated. You can head over "
|
665 |
+
"to the <a href=\"%s\">Addons page</a> to install and activate the addon for "
|
666 |
+
"your provider."
|
667 |
+
msgstr ""
|
668 |
+
"Кажется, у вас нет никаких активированных маркетинговых расширений. Вы "
|
669 |
+
"можете перейти на <a href=\"%s\">страницу всех расширений</a> , чтобы "
|
670 |
+
"установить и активировать расширения для вашего провайдера."
|
671 |
+
|
672 |
+
#: includes/admin/builder/panels/class-providers.php:115
|
673 |
+
msgid "Select Your Marketing Integration"
|
674 |
+
msgstr "Выберите вашу маркетинговую интеграцию"
|
675 |
+
|
676 |
+
#: includes/admin/builder/panels/class-providers.php:116
|
677 |
+
msgid ""
|
678 |
+
"Select your email marketing service provider or CRM from the options on the "
|
679 |
+
"left. If you don't see your email marketing service listed, then let us know "
|
680 |
+
"and we'll do our best to get it added as fast as possible."
|
681 |
+
msgstr ""
|
682 |
+
"Выберите провайдера электронного маркетинга или CRM из вариантов слева. Если "
|
683 |
+
"вы не видите вашего сервиса электронного маркетинга, то дайте нам знать и мы "
|
684 |
+
"сделаем все возможное, чтобы добавить его как можно быстрее."
|
685 |
+
|
686 |
+
#: includes/admin/builder/panels/class-settings.php:21
|
687 |
+
#: includes/admin/class-menu.php:84 includes/admin/class-menu.php:195
|
688 |
+
msgid "Settings"
|
689 |
+
msgstr "Настройки"
|
690 |
+
|
691 |
+
#: includes/admin/builder/panels/class-settings.php:57
|
692 |
+
#: includes/admin/builder/panels/class-settings.php:87
|
693 |
+
#: includes/admin/class-settings.php:166 includes/admin/class-settings.php:247
|
694 |
+
msgid "General"
|
695 |
+
msgstr "Общие"
|
696 |
+
|
697 |
+
#: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:61
|
698 |
+
#: lite/wpforms-lite.php:71 pro/wpforms-pro.php:387 pro/wpforms-pro.php:396
|
699 |
+
msgid "Notifications"
|
700 |
+
msgstr "Уведомления"
|
701 |
+
|
702 |
+
#: includes/admin/builder/panels/class-settings.php:59
|
703 |
+
#: includes/admin/builder/panels/class-settings.php:187
|
704 |
+
msgid "Confirmation"
|
705 |
+
msgstr "Подтверждение"
|
706 |
+
|
707 |
+
#: includes/admin/builder/panels/class-settings.php:77
|
708 |
+
msgid ""
|
709 |
+
"You need to <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup"
|
710 |
+
"\">setup your form</a> before you can manage the settings."
|
711 |
+
msgstr ""
|
712 |
+
"Вам нужно <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup"
|
713 |
+
"\">настроить вашу форм</a>, прежде чем вы cможете управлять настройками."
|
714 |
+
|
715 |
+
#: includes/admin/builder/panels/class-settings.php:94
|
716 |
+
#: includes/admin/builder/panels/class-setup.php:55
|
717 |
+
#: includes/class-smart-tags.php:37
|
718 |
+
msgid "Form Name"
|
719 |
+
msgstr "Название формы"
|
720 |
+
|
721 |
+
#: includes/admin/builder/panels/class-settings.php:104
|
722 |
+
msgid "Form Description"
|
723 |
+
msgstr "Описание формы"
|
724 |
+
|
725 |
+
#: includes/admin/builder/panels/class-settings.php:111
|
726 |
+
msgid "Hide form name and description area"
|
727 |
+
msgstr "Скрыть имя и описание формы"
|
728 |
+
|
729 |
+
#: includes/admin/builder/panels/class-settings.php:118
|
730 |
+
msgid "Form CSS Class"
|
731 |
+
msgstr "CSS класс формы"
|
732 |
+
|
733 |
+
#: includes/admin/builder/panels/class-settings.php:120
|
734 |
+
msgid ""
|
735 |
+
"Enter CSS class names for the form wrapper. Multiple class names should be "
|
736 |
+
"separated with spaces."
|
737 |
+
msgstr ""
|
738 |
+
"Введите имена классов CSS для обертки формы. Имена классов должны быть "
|
739 |
+
"разделены пробелами."
|
740 |
+
|
741 |
+
#: includes/admin/builder/panels/class-settings.php:128
|
742 |
+
msgid "Submit Button Text"
|
743 |
+
msgstr "Текст кнопки Отправить"
|
744 |
+
|
745 |
+
#: includes/admin/builder/panels/class-settings.php:138
|
746 |
+
msgid "Submit Button Processing Text"
|
747 |
+
msgstr "Текст на кнопке во время отправки"
|
748 |
+
|
749 |
+
#: includes/admin/builder/panels/class-settings.php:140
|
750 |
+
msgid ""
|
751 |
+
"Enter the submit button text you would like the button display while the "
|
752 |
+
"form submit is processing."
|
753 |
+
msgstr ""
|
754 |
+
"Введите текст для кнопки Отправить, который вы хотите, чтобы отображался на "
|
755 |
+
"кнопке во время отправки формы."
|
756 |
+
|
757 |
+
#: includes/admin/builder/panels/class-settings.php:148
|
758 |
+
msgid "Submit Button CSS Class"
|
759 |
+
msgstr "CSS класс кнопки отправки формы"
|
760 |
+
|
761 |
+
#: includes/admin/builder/panels/class-settings.php:150
|
762 |
+
msgid ""
|
763 |
+
"Enter CSS class names for the form submit button. Multiple names should be "
|
764 |
+
"separated with spaces."
|
765 |
+
msgstr ""
|
766 |
+
"Введите имена классов CSS для кнопки отправки формы. Несколько имен следует "
|
767 |
+
"разделять пробелами."
|
768 |
+
|
769 |
+
#: includes/admin/builder/panels/class-settings.php:158
|
770 |
+
msgid "Enable anti-spam honeypot"
|
771 |
+
msgstr "Включить анти-спам"
|
772 |
+
|
773 |
+
#: includes/admin/builder/panels/class-settings.php:169
|
774 |
+
msgid "Enable Google invisible reCAPTCHA"
|
775 |
+
msgstr "Включить невидимую Google reCAPTCHA"
|
776 |
+
|
777 |
+
#: includes/admin/builder/panels/class-settings.php:169
|
778 |
+
msgid "Enable Google reCAPTCHA (v2)"
|
779 |
+
msgstr "Включить Google reCAPTCHA (v2)"
|
780 |
+
|
781 |
+
#: includes/admin/builder/panels/class-settings.php:194
|
782 |
+
msgid "Confirmation Type"
|
783 |
+
msgstr "Тип подтверждения"
|
784 |
+
|
785 |
+
#: includes/admin/builder/panels/class-settings.php:198
|
786 |
+
#: includes/templates/class-suggestion.php:76 lite/wpforms-lite.php:189
|
787 |
+
#: pro/wpforms-pro.php:542
|
788 |
+
msgid "Message"
|
789 |
+
msgstr "Сообщение"
|
790 |
+
|
791 |
+
#: includes/admin/builder/panels/class-settings.php:199
|
792 |
+
msgid "Show Page"
|
793 |
+
msgstr "Показать страницу"
|
794 |
+
|
795 |
+
#: includes/admin/builder/panels/class-settings.php:200
|
796 |
+
msgid "Go to URL (Redirect)"
|
797 |
+
msgstr "Перенаправить на URL (редирект)"
|
798 |
+
|
799 |
+
#: includes/admin/builder/panels/class-settings.php:209
|
800 |
+
msgid "Confirmation Message"
|
801 |
+
msgstr "Подтверждающее сообщение"
|
802 |
+
|
803 |
+
#: includes/admin/builder/panels/class-settings.php:211
|
804 |
+
msgid "Thanks for contacting us! We will be in touch with you shortly."
|
805 |
+
msgstr "Спасибо, что написали нам! Мы скоро свяжемся с вами."
|
806 |
+
|
807 |
+
#: includes/admin/builder/panels/class-settings.php:222
|
808 |
+
msgid "Automatically scroll to the confirmation message"
|
809 |
+
msgstr "Автоматически прокрутить к сообщению подтверждения"
|
810 |
+
|
811 |
+
#: includes/admin/builder/panels/class-settings.php:235
|
812 |
+
msgid "Confirmation Page"
|
813 |
+
msgstr "Страница подтверждения"
|
814 |
+
|
815 |
+
#: includes/admin/builder/panels/class-settings.php:245
|
816 |
+
msgid "Confirmation Redirect URL"
|
817 |
+
msgstr "URL-адрес перенаправления подтверждения"
|
818 |
+
|
819 |
+
#: includes/admin/builder/panels/class-setup.php:21
|
820 |
+
msgid "Setup"
|
821 |
+
msgstr "Настройка"
|
822 |
+
|
823 |
+
#: includes/admin/builder/panels/class-setup.php:56
|
824 |
+
msgid "Enter your form name here…"
|
825 |
+
msgstr "Ведите название формы здесь…"
|
826 |
+
|
827 |
+
#: includes/admin/builder/panels/class-setup.php:60
|
828 |
+
msgid "Select a Template"
|
829 |
+
msgstr "Выберите шаблон"
|
830 |
+
|
831 |
+
#: includes/admin/builder/panels/class-setup.php:64
|
832 |
+
msgid ""
|
833 |
+
"To speed up the process, you can select from one of our pre-made templates "
|
834 |
+
"or start with a <strong><a href=\"#\" class=\"wpforms-trigger-blank\">blank "
|
835 |
+
"form.</a></strong>"
|
836 |
+
msgstr ""
|
837 |
+
"Чтобы ускорить процесс, вы можете выбрать один из наших предварительно "
|
838 |
+
"изготовленных шаблонов или начать с <strong><a href=\"#\" class=\"wpforms-"
|
839 |
+
"trigger-blank\">пустой формы.</a></strong>"
|
840 |
+
|
841 |
+
#: includes/admin/builder/panels/class-setup.php:70
|
842 |
+
msgid "Additional Templates"
|
843 |
+
msgstr "Дополнительные шаблоны"
|
844 |
+
|
845 |
+
#. translators: %1$s - opening tag, %2$s - closing tag, %3$s - opening tag,
|
846 |
+
#. %4$s - closing tag.
|
847 |
+
#: includes/admin/builder/panels/class-setup.php:80
|
848 |
+
msgid ""
|
849 |
+
"Have a suggestion for a new template? %1$sWe'd love to hear it%2$s. Also, "
|
850 |
+
"you can %3$screate your own templates%4$s!"
|
851 |
+
msgstr ""
|
852 |
+
"У вас есть предложение по новой форме? %1$sМы с удовольствием вас выслушаем"
|
853 |
+
"%2$s. Также вы можете %3$sсоздать ваши собственные шаблоны%4$s!"
|
854 |
+
|
855 |
+
#: includes/admin/builder/panels/class-setup.php:93
|
856 |
+
msgid "Search additional templates..."
|
857 |
+
msgstr "Поиск дополнительных шаблонов..."
|
858 |
+
|
859 |
+
#. translators:%1$s - opening a tag, %2$s - close tag, %3$s - opening tag, %4$s
|
860 |
+
#. - close tag.
|
861 |
+
#: includes/admin/builder/panels/class-setup.php:104
|
862 |
+
msgid ""
|
863 |
+
"More are available in the %1$sForm Templates Pack addon%2$s or by "
|
864 |
+
"%3$screating your own%4$s."
|
865 |
+
msgstr ""
|
866 |
+
"Больше доступно в %1$sрасширении Шаблонов форм%2$s или %3$sсоздайте свои%4$s."
|
867 |
+
|
868 |
+
#: includes/admin/builder/panels/class-setup.php:147
|
869 |
+
msgid "Selected"
|
870 |
+
msgstr "Выбранный"
|
871 |
+
|
872 |
+
#: includes/admin/builder/panels/class-setup.php:157
|
873 |
+
msgctxt "Template name"
|
874 |
+
msgid "%s template"
|
875 |
+
msgstr "Шаблон %s"
|
876 |
+
|
877 |
+
#: includes/admin/builder/panels/class-setup.php:157
|
878 |
+
msgctxt "Template name"
|
879 |
+
msgid "Create a %s"
|
880 |
+
msgstr "Шаблон: %s"
|
881 |
+
|
882 |
+
#: includes/admin/class-editor.php:44 includes/admin/class-editor.php:46
|
883 |
+
#: includes/admin/class-editor.php:101
|
884 |
+
msgid "Add Form"
|
885 |
+
msgstr "Добавить форму"
|
886 |
+
|
887 |
+
#: includes/admin/class-editor.php:70
|
888 |
+
msgid "Insert Form"
|
889 |
+
msgstr "Вставить форму"
|
890 |
+
|
891 |
+
#: includes/admin/class-editor.php:79
|
892 |
+
msgid "Select a form below to insert"
|
893 |
+
msgstr "Выберите форму ниже, чтобы вставить"
|
894 |
+
|
895 |
+
#: includes/admin/class-editor.php:85
|
896 |
+
msgid "Show form name"
|
897 |
+
msgstr "Показать название формы"
|
898 |
+
|
899 |
+
#: includes/admin/class-editor.php:86
|
900 |
+
msgid "Show form description"
|
901 |
+
msgstr "Показать описание формы"
|
902 |
+
|
903 |
+
#: includes/admin/class-editor.php:89
|
904 |
+
#: includes/admin/overview/class-overview-table.php:333
|
905 |
+
#: pro/includes/admin/entries/class-entries-list.php:311
|
906 |
+
msgid ""
|
907 |
+
"Whoops, you haven't created a form yet. Want to <a href=\"%s\">give it a go</"
|
908 |
+
"a>?"
|
909 |
+
msgstr ""
|
910 |
+
"Упс, вы еще не создали формы еще. Хотите <a href=\"%s\">создать форму</a>?"
|
911 |
+
|
912 |
+
#. Plugin Name of the plugin/theme
|
913 |
+
#. Author of the plugin/theme
|
914 |
+
#: includes/admin/class-menu.php:39 includes/admin/class-menu.php:40
|
915 |
+
#: includes/admin/class-menu.php:51 includes/admin/class-menu.php:103
|
916 |
+
#: includes/integrations.php:45
|
917 |
+
msgid "WPForms"
|
918 |
+
msgstr "WPForms"
|
919 |
+
|
920 |
+
#: includes/admin/class-menu.php:52
|
921 |
+
msgid "All Forms"
|
922 |
+
msgstr "Все формы"
|
923 |
+
|
924 |
+
#: includes/admin/class-menu.php:61
|
925 |
+
msgid "WPForms Builder"
|
926 |
+
msgstr "Конструктор WPForms"
|
927 |
+
|
928 |
+
#: includes/admin/class-menu.php:62
|
929 |
+
#: includes/admin/overview/class-overview.php:124
|
930 |
+
msgid "Add New"
|
931 |
+
msgstr "Новая форма"
|
932 |
+
|
933 |
+
#: includes/admin/class-menu.php:71
|
934 |
+
msgid "Form Entries"
|
935 |
+
msgstr "Записи формы"
|
936 |
+
|
937 |
+
#: includes/admin/class-menu.php:72
|
938 |
+
#: includes/admin/overview/class-overview-table.php:174
|
939 |
+
#: pro/includes/admin/entries/class-entries-list.php:332
|
940 |
+
#: pro/wpforms-pro.php:322
|
941 |
+
msgid "Entries"
|
942 |
+
msgstr "Записи"
|
943 |
+
|
944 |
+
#: includes/admin/class-menu.php:83
|
945 |
+
msgid "WPForms Settings"
|
946 |
+
msgstr "Настройки WPForms"
|
947 |
+
|
948 |
+
#: includes/admin/class-menu.php:93
|
949 |
+
msgid "WPForms Tools"
|
950 |
+
msgstr "Инструменты WPForms"
|
951 |
+
|
952 |
+
#: includes/admin/class-menu.php:94
|
953 |
+
msgid "Tools"
|
954 |
+
msgstr "Инструменты"
|
955 |
+
|
956 |
+
#: includes/admin/class-menu.php:104
|
957 |
+
msgid "Info"
|
958 |
+
msgstr "Информация"
|
959 |
+
|
960 |
+
#: includes/admin/class-menu.php:113 pro/includes/admin/class-addons.php:83
|
961 |
+
msgid "WPForms Addons"
|
962 |
+
msgstr "Расширения WPForms"
|
963 |
+
|
964 |
+
#: includes/admin/class-menu.php:114
|
965 |
+
msgid "Addons"
|
966 |
+
msgstr "Расширения"
|
967 |
+
|
968 |
+
#: includes/admin/class-review.php:92
|
969 |
+
msgid ""
|
970 |
+
"Hey, I noticed you collected over 50 entries from WPForms - that’s awesome! "
|
971 |
+
"Could you please do me a BIG favor and give it a 5-star rating on WordPress "
|
972 |
+
"to help us spread the word and boost our motivation?"
|
973 |
+
msgstr ""
|
974 |
+
"Я заметил, что у вас уже больше 50 записей с WPForms - это прекрасно! Могли "
|
975 |
+
"бы вы сделать мне большое одолжение и поставить 5-звездочный рейтинг на "
|
976 |
+
"сайте WordPress.org, чтобы помочь в разработке и подпитать нашу мотивацию?"
|
977 |
+
|
978 |
+
#: includes/admin/class-review.php:93 includes/admin/class-review.php:150
|
979 |
+
msgid "~ Syed Balkhi<br>Co-Founder of WPForms"
|
980 |
+
msgstr "~ Сайед Балхи<br>Соучредитель WPForms"
|
981 |
+
|
982 |
+
#: includes/admin/class-review.php:95 includes/admin/class-review.php:152
|
983 |
+
msgid "Ok, you deserve it"
|
984 |
+
msgstr "Хорошо, вы это заслуживаете"
|
985 |
+
|
986 |
+
#: includes/admin/class-review.php:96 includes/admin/class-review.php:153
|
987 |
+
msgid "Nope, maybe later"
|
988 |
+
msgstr "Нет, может быть позже"
|
989 |
+
|
990 |
+
#: includes/admin/class-review.php:97 includes/admin/class-review.php:154
|
991 |
+
msgid "I already did"
|
992 |
+
msgstr "Уже сделано"
|
993 |
+
|
994 |
+
#: includes/admin/class-review.php:149
|
995 |
+
msgid ""
|
996 |
+
"Hey, I noticed you created a contact form with WPForms - that’s awesome! "
|
997 |
+
"Could you please do me a BIG favor and give it a 5-star rating on WordPress "
|
998 |
+
"to help us spread the word and boost our motivation?"
|
999 |
+
msgstr ""
|
1000 |
+
"Эй, я заметил, у вас контактную форму WPForms - это прекрасно! Могли бы вы "
|
1001 |
+
"сделать мне большое одолжение и поставить 5-звездочный рейтинг на WordPress, "
|
1002 |
+
"чтобы помочь нам рассказать о плагине другим и подпитать нашу мотивацию?"
|
1003 |
+
|
1004 |
+
#: includes/admin/class-review.php:202
|
1005 |
+
msgid ""
|
1006 |
+
"Please rate <strong>WPForms</strong> <a href=\"%s\" target=\"_blank\" rel="
|
1007 |
+
"\"noopener\">★★★★★</a> on <a href=\"%s\" "
|
1008 |
+
"target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you "
|
1009 |
+
"from the WPForms team!"
|
1010 |
+
msgstr ""
|
1011 |
+
"Пожалуйста, оцените <strong>WPForms</strong> на <a href=\"%s\" target="
|
1012 |
+
"\"_blank\" rel=\"noopener\">★★★★★</a> на <a "
|
1013 |
+
"href=\"%s\" target=\"_blank\">WordPress.org,</a> чтобы подпитать нашу "
|
1014 |
+
"мотивацию. Спасибо вам от команды WPForms!"
|
1015 |
+
|
1016 |
+
#: includes/admin/class-settings.php:142
|
1017 |
+
msgid "Settings were successfully saved."
|
1018 |
+
msgstr "Настройки успешно сохранены."
|
1019 |
+
|
1020 |
+
#: includes/admin/class-settings.php:168 includes/admin/class-settings.php:173
|
1021 |
+
#: includes/admin/class-settings.php:178 includes/admin/class-settings.php:183
|
1022 |
+
#: pro/wpforms-pro.php:154
|
1023 |
+
msgid "Save Settings"
|
1024 |
+
msgstr "Сохранить настройки"
|
1025 |
+
|
1026 |
+
#: includes/admin/class-settings.php:171 includes/admin/class-settings.php:276
|
1027 |
+
#: includes/admin/class-settings.php:365 includes/fields/class-email.php:21
|
1028 |
+
#: includes/fields/class-email.php:68 includes/fields/class-email.php:306
|
1029 |
+
#: includes/templates/class-contact.php:41
|
1030 |
+
#: includes/templates/class-subscribe.php:44
|
1031 |
+
#: includes/templates/class-suggestion.php:41
|
1032 |
+
#: pro/includes/templates/class-donation.php:43
|
1033 |
+
#: pro/includes/templates/class-order.php:43
|
1034 |
+
#: pro/includes/templates/class-request-quote.php:47
|
1035 |
+
msgid "Email"
|
1036 |
+
msgstr "Email"
|
1037 |
+
|
1038 |
+
#: includes/admin/class-settings.php:176 includes/admin/class-settings.php:316
|
1039 |
+
msgid "reCAPTCHA"
|
1040 |
+
msgstr "reCAPTCHA"
|
1041 |
+
|
1042 |
+
#: includes/admin/class-settings.php:181
|
1043 |
+
msgid "Validation"
|
1044 |
+
msgstr "Валидация"
|
1045 |
+
|
1046 |
+
#: includes/admin/class-settings.php:186 includes/admin/class-settings.php:386
|
1047 |
+
#: includes/admin/class-settings.php:393
|
1048 |
+
msgid "Integrations"
|
1049 |
+
msgstr "Интеграции"
|
1050 |
+
|
1051 |
+
#: includes/admin/class-settings.php:225
|
1052 |
+
msgid ""
|
1053 |
+
"reCAPTCHA is a free anti-spam service from Google which helps to protect "
|
1054 |
+
"your website from spam and abuse while letting real people pass through with "
|
1055 |
+
"ease."
|
1056 |
+
msgstr ""
|
1057 |
+
"reCAPTCHA - бесплатная служба защиты от нежелательной почты от Google, "
|
1058 |
+
"которая помогает защитить ваш сайт от спама и злоупотреблений, позволяя "
|
1059 |
+
"реальным людям проходить ее с легкостью."
|
1060 |
+
|
1061 |
+
#: includes/admin/class-settings.php:226
|
1062 |
+
msgid ""
|
1063 |
+
"Google's original <a href=\"https://www.google.com/recaptcha/intro/\" target="
|
1064 |
+
"\"_blank\" rel=\"noopener noreferrer\">v2 reCAPTCHA</a> prompts users to "
|
1065 |
+
"check a box to prove they're human, whereas <a href=\"https://www.google.com/"
|
1066 |
+
"recaptcha/intro/invisible.html\" target=\"_blank\" rel=\"noopener noreferrer"
|
1067 |
+
"\">Invisible reCAPTCHA</a> uses advanced technology to detect real users "
|
1068 |
+
"without requiring any input."
|
1069 |
+
msgstr ""
|
1070 |
+
"<a href=\"https://www.google.com/recaptcha/intro/\" target=\"_blank\" rel="
|
1071 |
+
"\"noopener noreferrer\">v2 reCAPTCHA от</a> от Google предлагает "
|
1072 |
+
"пользователям установить флажок, чтобы доказать, что они люди, тогда как <a "
|
1073 |
+
"href=\"https://www.google.com/recaptcha/intro/invisible.html\" target="
|
1074 |
+
"\"_blank\" rel=\"noopener noreferrer\">Invisible reCAPTCHA</a> использует "
|
1075 |
+
"передовые технологии для обнаружения реальных пользователей, не требуя ввода."
|
1076 |
+
|
1077 |
+
#: includes/admin/class-settings.php:227
|
1078 |
+
msgid ""
|
1079 |
+
"Sites already using v2 reCAPTCHA will need to create new site keys before "
|
1080 |
+
"switching to the Invisible reCAPTCHA."
|
1081 |
+
msgstr ""
|
1082 |
+
"Сайтам, уже использующим v2 reCAPTCHA, необходимо будет создать новые ключи "
|
1083 |
+
"сайта до перехода на Invisible reCAPTCHA."
|
1084 |
+
|
1085 |
+
#: includes/admin/class-settings.php:228
|
1086 |
+
msgid ""
|
1087 |
+
"<a href=\"%s\" rel=\"noopener noreferrer\" target=\"_blank\">Read our walk "
|
1088 |
+
"through</a> to learn more and for step-by-step directions."
|
1089 |
+
msgstr ""
|
1090 |
+
"<a href=\"%s\" rel=\"noopener noreferrer\" target=\"_blank\">Прочитайте наш "
|
1091 |
+
"туториал</a>, чтобы узнать больше и для получения пошагового руководства."
|
1092 |
+
|
1093 |
+
#: includes/admin/class-settings.php:235
|
1094 |
+
msgid "License"
|
1095 |
+
msgstr "Лицензия"
|
1096 |
+
|
1097 |
+
#: includes/admin/class-settings.php:235
|
1098 |
+
msgid "Your license key provides access to updates and addons."
|
1099 |
+
msgstr "Ваш лицензионный ключ обеспечивает доступ к обновлениям и расширениям."
|
1100 |
+
|
1101 |
+
#: includes/admin/class-settings.php:242
|
1102 |
+
msgid "License Key"
|
1103 |
+
msgstr "Лицензионный ключ"
|
1104 |
+
|
1105 |
+
#: includes/admin/class-settings.php:254
|
1106 |
+
msgid "Include Form Styling"
|
1107 |
+
msgstr "Включить стили формы"
|
1108 |
+
|
1109 |
+
#: includes/admin/class-settings.php:255
|
1110 |
+
msgid "Determines which CSS files to load for the site."
|
1111 |
+
msgstr "Определяет, какие файлы CSS загружать на сайте."
|
1112 |
+
|
1113 |
+
#: includes/admin/class-settings.php:260
|
1114 |
+
msgid "Base and form theme styling"
|
1115 |
+
msgstr "Базовые стили и скин формы"
|
1116 |
+
|
1117 |
+
#: includes/admin/class-settings.php:261
|
1118 |
+
msgid "Base styling only"
|
1119 |
+
msgstr "Только базовый стиль"
|
1120 |
+
|
1121 |
+
#: includes/admin/class-settings.php:262
|
1122 |
+
msgid "No styling"
|
1123 |
+
msgstr "Без стилей"
|
1124 |
+
|
1125 |
+
#: includes/admin/class-settings.php:267
|
1126 |
+
msgid "Load Assets Globally"
|
1127 |
+
msgstr "Загружать CSS/JS файлы глобально на сайте"
|
1128 |
+
|
1129 |
+
#: includes/admin/class-settings.php:268
|
1130 |
+
msgid ""
|
1131 |
+
"Check this if you would like to load WPForms assets site-wide. Only check if "
|
1132 |
+
"your site is having compatibility issues or instructed to by support."
|
1133 |
+
msgstr ""
|
1134 |
+
"Установите этот флажок, если вы хотите загрузить CSS/JS файлы WPForms по "
|
1135 |
+
"всему сайту. Актуально только если у вашего сайта проблемы с совместимостью "
|
1136 |
+
"или вам сказала это сделать служба поддержки."
|
1137 |
+
|
1138 |
+
#: includes/admin/class-settings.php:283
|
1139 |
+
msgid "Template"
|
1140 |
+
msgstr "Шаблон"
|
1141 |
+
|
1142 |
+
#: includes/admin/class-settings.php:284
|
1143 |
+
msgid ""
|
1144 |
+
"Determines how email notifications will be formatted. HTML Templates are the "
|
1145 |
+
"default."
|
1146 |
+
msgstr ""
|
1147 |
+
"Определяет способ форматирования уведомлений по электронной почте. Шаблон "
|
1148 |
+
"HTML выбран по умолчанию."
|
1149 |
+
|
1150 |
+
#: includes/admin/class-settings.php:288
|
1151 |
+
msgid "HTML Template"
|
1152 |
+
msgstr "HTML шаблон"
|
1153 |
+
|
1154 |
+
#: includes/admin/class-settings.php:289
|
1155 |
+
msgid "Plain text"
|
1156 |
+
msgstr "Простой текст"
|
1157 |
+
|
1158 |
+
#: includes/admin/class-settings.php:294
|
1159 |
+
msgid "Header Image"
|
1160 |
+
msgstr "Картинка шапки"
|
1161 |
+
|
1162 |
+
#: includes/admin/class-settings.php:295
|
1163 |
+
msgid ""
|
1164 |
+
"Upload or choose a logo to be displayed at the top of email notifications."
|
1165 |
+
"<br>Recommended size is 300x100 or smaller for best support on all devices."
|
1166 |
+
msgstr ""
|
1167 |
+
"Загрузите или выберите логотип, который будет отображаться в верхней части "
|
1168 |
+
"email уведомлений. <br>Рекомендуемый размер 300x100 или меньше для лучшей "
|
1169 |
+
"поддержки на всех устройствах."
|
1170 |
+
|
1171 |
+
#: includes/admin/class-settings.php:300
|
1172 |
+
msgid "Background Color"
|
1173 |
+
msgstr "Цвет фона"
|
1174 |
+
|
1175 |
+
#: includes/admin/class-settings.php:301
|
1176 |
+
msgid "Customize the background color of the HTML email template."
|
1177 |
+
msgstr "Настройте цвет фона HTML шаблона электронной почты."
|
1178 |
+
|
1179 |
+
#: includes/admin/class-settings.php:307
|
1180 |
+
msgid "Carbon Copy"
|
1181 |
+
msgstr "Копия письма"
|
1182 |
+
|
1183 |
+
#: includes/admin/class-settings.php:308
|
1184 |
+
msgid ""
|
1185 |
+
"Check this if you would like to enable the ability to CC: email addresses in "
|
1186 |
+
"the form notification settings."
|
1187 |
+
msgstr ""
|
1188 |
+
"Установите этот флажок, если вы хотите включить возможность использования "
|
1189 |
+
"CC: email адресов в настройках уведомлений формы."
|
1190 |
+
|
1191 |
+
#: includes/admin/class-settings.php:323
|
1192 |
+
#: pro/includes/fields/class-date-time.php:154
|
1193 |
+
msgid "Type"
|
1194 |
+
msgstr "Тип"
|
1195 |
+
|
1196 |
+
#: includes/admin/class-settings.php:327
|
1197 |
+
msgid "v2 reCAPTCHA"
|
1198 |
+
msgstr "v2 reCAPTCHA"
|
1199 |
+
|
1200 |
+
#: includes/admin/class-settings.php:328
|
1201 |
+
msgid "Invisible reCAPTCHA"
|
1202 |
+
msgstr "Невидимая reCAPTCHA"
|
1203 |
+
|
1204 |
+
#: includes/admin/class-settings.php:333
|
1205 |
+
msgid "Site Key"
|
1206 |
+
msgstr "Ключ сайта"
|
1207 |
+
|
1208 |
+
#: includes/admin/class-settings.php:338
|
1209 |
+
msgid "Secret Key"
|
1210 |
+
msgstr "Секретный ключ"
|
1211 |
+
|
1212 |
+
#: includes/admin/class-settings.php:346
|
1213 |
+
msgid "Validation Messages"
|
1214 |
+
msgstr "Сообщения о валидации"
|
1215 |
+
|
1216 |
+
#: includes/admin/class-settings.php:346
|
1217 |
+
msgid ""
|
1218 |
+
"These messages are displayed to the user as they fill out a form in real-"
|
1219 |
+
"time."
|
1220 |
+
msgstr ""
|
1221 |
+
"Эти сообщения отображаются пользователям в режиме реального времени, пока "
|
1222 |
+
"они заполняют форму."
|
1223 |
+
|
1224 |
+
#: includes/admin/class-settings.php:353 includes/fields/class-base.php:337
|
1225 |
+
msgid "Required"
|
1226 |
+
msgstr "Обязательное поле"
|
1227 |
+
|
1228 |
+
#: includes/admin/class-settings.php:355 includes/class-frontend.php:1005
|
1229 |
+
#: includes/fields/class-base.php:901 includes/fields/class-name.php:485
|
1230 |
+
#: includes/fields/class-number.php:152
|
1231 |
+
#: pro/includes/fields/class-address.php:767
|
1232 |
+
#: pro/includes/fields/class-date-time.php:563
|
1233 |
+
#: pro/includes/fields/class-file-upload.php:332
|
1234 |
+
#: pro/includes/fields/class-password.php:371
|
1235 |
+
#: pro/includes/fields/class-payment-dropdown.php:208
|
1236 |
+
#: pro/includes/fields/class-payment-multiple.php:175
|
1237 |
+
#: pro/includes/fields/class-payment-single.php:189
|
1238 |
+
#: pro/includes/fields/class-url.php:154
|
1239 |
+
msgid "This field is required."
|
1240 |
+
msgstr "Это поле обязательное."
|
1241 |
+
|
1242 |
+
#: includes/admin/class-settings.php:359
|
1243 |
+
msgid "Website URL"
|
1244 |
+
msgstr "Адрес сайта"
|
1245 |
+
|
1246 |
+
#: includes/admin/class-settings.php:361 includes/class-frontend.php:1006
|
1247 |
+
#: pro/includes/fields/class-url.php:159
|
1248 |
+
msgid "Please enter a valid URL."
|
1249 |
+
msgstr "Пожалуйста, введите действующий URL."
|
1250 |
+
|
1251 |
+
#: includes/admin/class-settings.php:367 includes/class-frontend.php:1007
|
1252 |
+
msgid "Please enter a valid email address."
|
1253 |
+
msgstr "Пожалуйста, введите правильный email адрес."
|
1254 |
+
|
1255 |
+
#: includes/admin/class-settings.php:371
|
1256 |
+
msgid "Number"
|
1257 |
+
msgstr "Число"
|
1258 |
+
|
1259 |
+
#: includes/admin/class-settings.php:373 includes/class-frontend.php:1008
|
1260 |
+
#: includes/fields/class-number.php:157
|
1261 |
+
msgid "Please enter a valid number."
|
1262 |
+
msgstr "Введите корректное число."
|
1263 |
+
|
1264 |
+
#: includes/admin/class-settings.php:377
|
1265 |
+
msgid "Confirm Value"
|
1266 |
+
msgstr "Подтвердить значение"
|
1267 |
+
|
1268 |
+
#: includes/admin/class-settings.php:379 includes/class-frontend.php:1009
|
1269 |
+
#: pro/includes/fields/class-password.php:394
|
1270 |
+
msgid "Field values do not match."
|
1271 |
+
msgstr "Значения полей не совпадают."
|
1272 |
+
|
1273 |
+
#: includes/admin/class-settings.php:386 includes/admin/class-settings.php:393
|
1274 |
+
msgid ""
|
1275 |
+
"Manage integrations with popular providers such as Constant Contact, "
|
1276 |
+
"MailChimp, Zapier, and more."
|
1277 |
+
msgstr ""
|
1278 |
+
"Управляйте интеграцией с популярными поставщиками, такими как Constant "
|
1279 |
+
"Contact, MailChimp, Zapier и другими."
|
1280 |
+
|
1281 |
+
#: includes/admin/class-settings.php:495
|
1282 |
+
msgid "Want to better protect your contact forms from spam?"
|
1283 |
+
msgstr "Хотите лучше защитить свои контактные формы от спама?"
|
1284 |
+
|
1285 |
+
#: includes/admin/class-settings.php:497
|
1286 |
+
msgid ""
|
1287 |
+
"WPForms custom captcha addon allows you to add custom questions captcha or "
|
1288 |
+
"math questions captcha to your WordPress forms. Since we know spam is a huge "
|
1289 |
+
"problem for contact forms, WPForms goes above and beyond to help you protect "
|
1290 |
+
"your forms."
|
1291 |
+
msgstr ""
|
1292 |
+
"Расширение Captcha для WPForms позволяет добавлять пользовательские вопросы "
|
1293 |
+
"к капче или математические вопросы в вашу WordPress форму. Поскольку мы "
|
1294 |
+
"знаем, что спам - это огромная проблема для контактных форм, WPForms идет "
|
1295 |
+
"дальше, чтобы помочь вам защитить ваши формы."
|
1296 |
+
|
1297 |
+
#: includes/admin/class-settings.php:499
|
1298 |
+
msgid "Click here to Upgrade"
|
1299 |
+
msgstr "Нажмите здесь для Обновления"
|
1300 |
+
|
1301 |
+
#: includes/admin/class-tools.php:89
|
1302 |
+
msgid "Import/Export"
|
1303 |
+
msgstr "Импорт/Экспорт"
|
1304 |
+
|
1305 |
+
#: includes/admin/class-tools.php:90
|
1306 |
+
msgid "System Info"
|
1307 |
+
msgstr "Информация о системе"
|
1308 |
+
|
1309 |
+
#: includes/admin/class-tools.php:99
|
1310 |
+
msgid ""
|
1311 |
+
"Import was successfully finished. You can go and <a href=\"%s\">check your "
|
1312 |
+
"forms</a>."
|
1313 |
+
msgstr ""
|
1314 |
+
"Импорт успешно завершен. Вы можете пойти и <a href=\"%s\">проверить ваши "
|
1315 |
+
"формы</a>."
|
1316 |
+
|
1317 |
+
#: includes/admin/class-tools.php:130
|
1318 |
+
msgid "Form Import"
|
1319 |
+
msgstr "Импорт формы"
|
1320 |
+
|
1321 |
+
#: includes/admin/class-tools.php:131
|
1322 |
+
msgid "Select an export file."
|
1323 |
+
msgstr "Выберите файл экспорта."
|
1324 |
+
|
1325 |
+
#: includes/admin/class-tools.php:136
|
1326 |
+
msgid "No file chosen"
|
1327 |
+
msgstr "Файл не выбран"
|
1328 |
+
|
1329 |
+
#: includes/admin/class-tools.php:138
|
1330 |
+
msgid "Choose a file…"
|
1331 |
+
msgstr "Выберите файл…"
|
1332 |
+
|
1333 |
+
#: includes/admin/class-tools.php:144
|
1334 |
+
msgid "Import"
|
1335 |
+
msgstr "Импорт"
|
1336 |
+
|
1337 |
+
#: includes/admin/class-tools.php:150
|
1338 |
+
msgid "Form Export"
|
1339 |
+
msgstr "Экспорт формы"
|
1340 |
+
|
1341 |
+
#: includes/admin/class-tools.php:151
|
1342 |
+
msgid ""
|
1343 |
+
"Form exports files can be used to create a backup of your forms or to import "
|
1344 |
+
"forms into another site."
|
1345 |
+
msgstr ""
|
1346 |
+
"Файлы экспорта форм могут использоваться для создания резервной копии ваших "
|
1347 |
+
"форм или для импорта форм на другой сайт."
|
1348 |
+
|
1349 |
+
#: includes/admin/class-tools.php:156
|
1350 |
+
msgid "Select form(s)"
|
1351 |
+
msgstr "Выберите форму(ы)"
|
1352 |
+
|
1353 |
+
#: includes/admin/class-tools.php:163
|
1354 |
+
msgid "You need to create a form before you can use form export."
|
1355 |
+
msgstr ""
|
1356 |
+
"Вам необходимо создать форму, прежде чем вы сможете использовать экспорт "
|
1357 |
+
"формы."
|
1358 |
+
|
1359 |
+
#: includes/admin/class-tools.php:169
|
1360 |
+
msgid "Export"
|
1361 |
+
msgstr "Экспорт"
|
1362 |
+
|
1363 |
+
#: includes/admin/class-tools.php:174
|
1364 |
+
msgid "Form Template Export"
|
1365 |
+
msgstr "Шаблон формы"
|
1366 |
+
|
1367 |
+
#: includes/admin/class-tools.php:177
|
1368 |
+
msgid ""
|
1369 |
+
"The following code can be used to register your custom form template. Copy "
|
1370 |
+
"and paste the following code to your theme's functions.php file or include "
|
1371 |
+
"it within an external file."
|
1372 |
+
msgstr ""
|
1373 |
+
"Следующий код может использоваться для регистрации вашего собственного "
|
1374 |
+
"шаблона форм. Скопируйте и вставьте следующий код в файл functions.php вашей "
|
1375 |
+
"темы или включите его во внешний файл."
|
1376 |
+
|
1377 |
+
#: includes/admin/class-tools.php:178
|
1378 |
+
msgid ""
|
1379 |
+
"For more information <a href=\"%s\" target=\"blank\" rel=\"noopener "
|
1380 |
+
"noreferrer\">see our documentation</a>."
|
1381 |
+
msgstr ""
|
1382 |
+
"Для получения дополнительной информации <a href=\"%s\" target=\"blank\" rel="
|
1383 |
+
"\"noopener noreferrer\">почитайте нашу документацию</a>."
|
1384 |
+
|
1385 |
+
#: includes/admin/class-tools.php:182
|
1386 |
+
msgid ""
|
1387 |
+
"Select a form to generate PHP code that can be used to register a custom "
|
1388 |
+
"form template."
|
1389 |
+
msgstr ""
|
1390 |
+
"Выберите форму для генерации PHP-кода, который можно использовать для "
|
1391 |
+
"регистрации пользовательского шаблона формы."
|
1392 |
+
|
1393 |
+
#: includes/admin/class-tools.php:194
|
1394 |
+
msgid "You need to create a form before you can generate a template."
|
1395 |
+
msgstr "Вам нужно создать форму, прежде чем вы сможете сгенерировать шаблон."
|
1396 |
+
|
1397 |
+
#: includes/admin/class-tools.php:200
|
1398 |
+
msgid "Export Template"
|
1399 |
+
msgstr "Экспорт шаблона"
|
1400 |
+
|
1401 |
+
#: includes/admin/class-tools.php:215
|
1402 |
+
msgid "System Information"
|
1403 |
+
msgstr "Системная информация"
|
1404 |
+
|
1405 |
+
#: includes/admin/class-tools.php:277
|
1406 |
+
msgid "Please upload a valid .json form export file."
|
1407 |
+
msgstr "Пожалуйста, загрузите корректный файл .json экспорта."
|
1408 |
+
|
1409 |
+
#: includes/admin/class-tools.php:278
|
1410 |
+
#: pro/includes/admin/entries/class-entries-export.php:340
|
1411 |
+
msgid "Error"
|
1412 |
+
msgstr "Ошибка"
|
1413 |
+
|
1414 |
+
#: includes/admin/class-tools.php:402 includes/admin/class-tools.php:406
|
1415 |
+
#: pro/includes/admin/entries/class-entries-single.php:733
|
1416 |
+
#: pro/includes/admin/entries/class-entries-single.php:1087
|
1417 |
+
msgid "M j, Y @ g:ia"
|
1418 |
+
msgstr "M j, Y @ g:ia"
|
1419 |
+
|
1420 |
+
#: includes/admin/class-welcome.php:39 includes/admin/class-welcome.php:40
|
1421 |
+
#: includes/admin/class-welcome.php:117
|
1422 |
+
msgid "Welcome to WPForms"
|
1423 |
+
msgstr "Добро пожаловать в WPForms"
|
1424 |
+
|
1425 |
+
#: includes/admin/class-welcome.php:113
|
1426 |
+
msgid "Sullie the WPForms mascot"
|
1427 |
+
msgstr "Сулли - эмблема WPForms"
|
1428 |
+
|
1429 |
+
#: includes/admin/class-welcome.php:118
|
1430 |
+
msgid ""
|
1431 |
+
"Thank you for choosing WPForms - the most powerful drag & drop WordPress "
|
1432 |
+
"form builder in the market."
|
1433 |
+
msgstr ""
|
1434 |
+
"Благодарим вас за то, что вы выбрали WPForms - самый мощный инструмент для "
|
1435 |
+
"создания форм в конструкторе для WordPress на рынке."
|
1436 |
+
|
1437 |
+
#: includes/admin/class-welcome.php:121 includes/admin/class-welcome.php:122
|
1438 |
+
msgid "Watch how to create your first form"
|
1439 |
+
msgstr "Посмотрите, как создать свою первую форму"
|
1440 |
+
|
1441 |
+
#: includes/admin/class-welcome.php:127
|
1442 |
+
msgid ""
|
1443 |
+
"WPForms makes it easy to create forms in WordPress. You can watch the video "
|
1444 |
+
"tutorial or read our guide on how create your first form."
|
1445 |
+
msgstr ""
|
1446 |
+
"WPForms упрощает создание форм в WordPress. Вы можете посмотреть видеоурок "
|
1447 |
+
"или прочитать наше руководство о том, как создать свою первую форму."
|
1448 |
+
|
1449 |
+
#: includes/admin/class-welcome.php:131 includes/admin/class-welcome.php:282
|
1450 |
+
msgid "Create Your First Form"
|
1451 |
+
msgstr "Создайте свою первую форму"
|
1452 |
+
|
1453 |
+
#: includes/admin/class-welcome.php:134
|
1454 |
+
msgid "Read the Full Guide"
|
1455 |
+
msgstr "Прочтите полное руководство"
|
1456 |
+
|
1457 |
+
#: includes/admin/class-welcome.php:146
|
1458 |
+
msgid "Welcome Features & Addons"
|
1459 |
+
msgstr "Возможности & Расширения"
|
1460 |
+
|
1461 |
+
#: includes/admin/class-welcome.php:147
|
1462 |
+
msgid ""
|
1463 |
+
"WPForms is both easy to use and extremely powerful. We have tons of helpful "
|
1464 |
+
"features that allow us to give you everything you need from a form builder."
|
1465 |
+
msgstr ""
|
1466 |
+
"WPForms одновременно легок в использовании и невероятно функционален. У нас "
|
1467 |
+
"есть множество полезных функций, которые позволяют дать вам все, что вам "
|
1468 |
+
"может понадобиться в конструкторе форм."
|
1469 |
+
|
1470 |
+
#: includes/admin/class-welcome.php:153
|
1471 |
+
msgid "Drag & Drop Form Builder"
|
1472 |
+
msgstr "Drag & Drop Конструктор Форм"
|
1473 |
+
|
1474 |
+
#: includes/admin/class-welcome.php:154
|
1475 |
+
msgid ""
|
1476 |
+
"Easily create an amazing form in just a few minutes without writing any code."
|
1477 |
+
msgstr ""
|
1478 |
+
"Легко создайте отличную форму всего за несколько минут, не написав никакого "
|
1479 |
+
"кода."
|
1480 |
+
|
1481 |
+
#: includes/admin/class-welcome.php:159
|
1482 |
+
msgid "Form Templates"
|
1483 |
+
msgstr "Шаблоны форм"
|
1484 |
+
|
1485 |
+
#: includes/admin/class-welcome.php:160
|
1486 |
+
msgid "Start with pre-built form templates to save even more time."
|
1487 |
+
msgstr ""
|
1488 |
+
"Начните с заранее настроенных шаблонов форм, чтобы сэкономить еще больше "
|
1489 |
+
"времени."
|
1490 |
+
|
1491 |
+
#: includes/admin/class-welcome.php:165
|
1492 |
+
msgid "Responsive Mobile Friendly"
|
1493 |
+
msgstr "Доступный на мобильном"
|
1494 |
+
|
1495 |
+
#: includes/admin/class-welcome.php:166
|
1496 |
+
msgid ""
|
1497 |
+
"WPForms is 100% responsive meaning it works on mobile, tablets & desktop."
|
1498 |
+
msgstr ""
|
1499 |
+
"WPForms на 100% мобилен, что означает работу на мобильных устройствах, "
|
1500 |
+
"планшетах и настольных компьютерах."
|
1501 |
+
|
1502 |
+
#: includes/admin/class-welcome.php:171
|
1503 |
+
msgid "Smart Conditional Logic"
|
1504 |
+
msgstr "Умная условная логика"
|
1505 |
+
|
1506 |
+
#: includes/admin/class-welcome.php:172
|
1507 |
+
msgid "Easily create high performance forms with our smart conditional logic."
|
1508 |
+
msgstr ""
|
1509 |
+
"Легко создайте высокопроизводительные формы с помощью нашей условной логики."
|
1510 |
+
|
1511 |
+
#: includes/admin/class-welcome.php:177
|
1512 |
+
msgid "Instant Notifications"
|
1513 |
+
msgstr "Мгновенные уведомления"
|
1514 |
+
|
1515 |
+
#: includes/admin/class-welcome.php:178
|
1516 |
+
msgid ""
|
1517 |
+
"Respond to leads quickly with our instant form notification feature for your "
|
1518 |
+
"team."
|
1519 |
+
msgstr ""
|
1520 |
+
"Быстро реагируйте на запросы с помощью нашей функции мгновенного уведомления "
|
1521 |
+
"о форме для вашей команды."
|
1522 |
+
|
1523 |
+
#: includes/admin/class-welcome.php:183
|
1524 |
+
msgid "Entry Management"
|
1525 |
+
msgstr "Управление записями"
|
1526 |
+
|
1527 |
+
#: includes/admin/class-welcome.php:184
|
1528 |
+
msgid "View all your leads in one place to streamline your workflow."
|
1529 |
+
msgstr ""
|
1530 |
+
"Просматривайте всех своих лидов в одном месте, чтобы оптимизировать рабочий "
|
1531 |
+
"процесс."
|
1532 |
+
|
1533 |
+
#: includes/admin/class-welcome.php:189
|
1534 |
+
msgid "Payments Made Easy"
|
1535 |
+
msgstr "Платежи с легкостью"
|
1536 |
+
|
1537 |
+
#: includes/admin/class-welcome.php:190
|
1538 |
+
msgid ""
|
1539 |
+
"Easily collect payments, donations, and online orders without hiring a "
|
1540 |
+
"developer."
|
1541 |
+
msgstr ""
|
1542 |
+
"Легко собирайте платежи, пожертвования и онлайн-заказы без найма "
|
1543 |
+
"разработчика."
|
1544 |
+
|
1545 |
+
#: includes/admin/class-welcome.php:195
|
1546 |
+
msgid "Marketing & Subscriptions"
|
1547 |
+
msgstr "Маркетинг и подписки"
|
1548 |
+
|
1549 |
+
#: includes/admin/class-welcome.php:196
|
1550 |
+
msgid ""
|
1551 |
+
"Create subscription forms and connect with your email marketing service."
|
1552 |
+
msgstr ""
|
1553 |
+
"Создайте форму подписки и подключитесь к вашей службе email маркетинга."
|
1554 |
+
|
1555 |
+
#: includes/admin/class-welcome.php:201
|
1556 |
+
msgid "Easy to Embed"
|
1557 |
+
msgstr "Легко вставить"
|
1558 |
+
|
1559 |
+
#: includes/admin/class-welcome.php:202
|
1560 |
+
msgid ""
|
1561 |
+
"Easily embed your forms in blog posts, pages, sidebar widgets, footer, etc."
|
1562 |
+
msgstr ""
|
1563 |
+
"Легко встраивайте свои формы в записи в блогах, страницах, виджетах боковой "
|
1564 |
+
"панели, подвале и т.д."
|
1565 |
+
|
1566 |
+
#: includes/admin/class-welcome.php:207
|
1567 |
+
msgid "Spam Protection"
|
1568 |
+
msgstr "Защита от спама"
|
1569 |
+
|
1570 |
+
#: includes/admin/class-welcome.php:208
|
1571 |
+
msgid "Our smart captcha and honeypot automatically prevent spam submissions."
|
1572 |
+
msgstr ""
|
1573 |
+
"Наш умная-captcha и honeypot автоматически предотвращают отправку спама."
|
1574 |
+
|
1575 |
+
#: includes/admin/class-welcome.php:214
|
1576 |
+
msgid "See All Features"
|
1577 |
+
msgstr "Все возможности"
|
1578 |
+
|
1579 |
+
#: includes/admin/class-welcome.php:226 lite/wpforms-lite.php:442
|
1580 |
+
msgid "Upgrade to PRO"
|
1581 |
+
msgstr "Обновить до PRO"
|
1582 |
+
|
1583 |
+
#: includes/admin/class-welcome.php:228
|
1584 |
+
msgid "PayPal"
|
1585 |
+
msgstr "PayPal"
|
1586 |
+
|
1587 |
+
#: includes/admin/class-welcome.php:229
|
1588 |
+
msgid "Post Submissions"
|
1589 |
+
msgstr "Предложение записей"
|
1590 |
+
|
1591 |
+
#: includes/admin/class-welcome.php:230
|
1592 |
+
#: pro/includes/admin/entries/class-entries-single.php:843
|
1593 |
+
msgid "Stripe"
|
1594 |
+
msgstr "Stripe"
|
1595 |
+
|
1596 |
+
#: includes/admin/class-welcome.php:231
|
1597 |
+
msgid "Signatures"
|
1598 |
+
msgstr "Подписи"
|
1599 |
+
|
1600 |
+
#: includes/admin/class-welcome.php:232
|
1601 |
+
msgid "User Registration"
|
1602 |
+
msgstr "Регистрация пользователя"
|
1603 |
+
|
1604 |
+
#: includes/admin/class-welcome.php:233
|
1605 |
+
msgid "Form Abandonment"
|
1606 |
+
msgstr "Form Abandonment"
|
1607 |
+
|
1608 |
+
#: includes/admin/class-welcome.php:234
|
1609 |
+
msgid "Geolocation"
|
1610 |
+
msgstr "Геолокация"
|
1611 |
+
|
1612 |
+
#: includes/admin/class-welcome.php:235
|
1613 |
+
msgid "Unlimited Sites"
|
1614 |
+
msgstr "Неограниченное число сайтов"
|
1615 |
+
|
1616 |
+
#: includes/admin/class-welcome.php:236
|
1617 |
+
msgid "Zapier"
|
1618 |
+
msgstr "Zapier"
|
1619 |
+
|
1620 |
+
#: includes/admin/class-welcome.php:237
|
1621 |
+
msgid "Priority Support"
|
1622 |
+
msgstr "Приоритетная поддержка"
|
1623 |
+
|
1624 |
+
#: includes/admin/class-welcome.php:242
|
1625 |
+
msgid "PRO"
|
1626 |
+
msgstr "PRO"
|
1627 |
+
|
1628 |
+
#: includes/admin/class-welcome.php:245
|
1629 |
+
msgid "per year"
|
1630 |
+
msgstr "в год"
|
1631 |
+
|
1632 |
+
#: includes/admin/class-welcome.php:247 pro/includes/admin/class-addons.php:249
|
1633 |
+
msgid "Upgrade Now"
|
1634 |
+
msgstr "Обновить сейчас"
|
1635 |
+
|
1636 |
+
#: includes/admin/class-welcome.php:258
|
1637 |
+
msgid "Testimonials"
|
1638 |
+
msgstr "Отзывы"
|
1639 |
+
|
1640 |
+
#: includes/admin/class-welcome.php:262
|
1641 |
+
msgid ""
|
1642 |
+
"WPForms is by far the easiest form plugin to use. My clients love it – it’s "
|
1643 |
+
"one of the few plugins they can use without any training. As a developer I "
|
1644 |
+
"appreciate how fast, modern, clean and extensible it is."
|
1645 |
+
msgstr ""
|
1646 |
+
"WPForms на сегодняшний день является самым простым плагином для "
|
1647 |
+
"использования. Мои клиенты любят его - это один из немногих плагинов, "
|
1648 |
+
"которые они могут использовать без какой-либо подготовки. Как разработчик я "
|
1649 |
+
"ценю, насколько быстрым, современным, чистым и расширяемым он является."
|
1650 |
+
|
1651 |
+
#: includes/admin/class-welcome.php:268
|
1652 |
+
msgid ""
|
1653 |
+
"As a business owner, time is my most valuable asset. WPForms allow me to "
|
1654 |
+
"create smart online forms with just a few clicks. With their pre-built form "
|
1655 |
+
"templates and the drag & drop builder, I can create a new form that works in "
|
1656 |
+
"less than 2 minutes without writing a single line of code. Well worth the "
|
1657 |
+
"investment."
|
1658 |
+
msgstr ""
|
1659 |
+
"Для владельца бизнеса время является самым важным активом. WPForms позволяет "
|
1660 |
+
"мне создать умные онлайн формы с помощью всего пары кликов. С шаблонами для "
|
1661 |
+
"форм и drag & drop билдеров форм я могу создать новые формы, которые "
|
1662 |
+
"действительно работают, меньше чем за 2 минуты, не прикасаясь к коду. Это "
|
1663 |
+
"очень даже стоит инвестиций."
|
1664 |
+
|
1665 |
+
#: includes/admin/class-welcome.php:285
|
1666 |
+
msgid "Upgrade to WPForms Pro"
|
1667 |
+
msgstr "Обновиться до WPForms Pro"
|
1668 |
+
|
1669 |
+
#: includes/admin/overview/class-overview-table.php:53
|
1670 |
+
#: includes/fields/class-name.php:21 includes/fields/class-name.php:276
|
1671 |
+
#: includes/templates/class-contact.php:34
|
1672 |
+
#: includes/templates/class-subscribe.php:37
|
1673 |
+
#: includes/templates/class-suggestion.php:34
|
1674 |
+
#: pro/includes/templates/class-donation.php:36
|
1675 |
+
#: pro/includes/templates/class-order.php:36
|
1676 |
+
#: pro/includes/templates/class-request-quote.php:33
|
1677 |
+
msgid "Name"
|
1678 |
+
msgstr "Имя"
|
1679 |
+
|
1680 |
+
#: includes/admin/overview/class-overview-table.php:54
|
1681 |
+
msgid "Shortcode"
|
1682 |
+
msgstr "Шорткод"
|
1683 |
+
|
1684 |
+
#: includes/admin/overview/class-overview-table.php:55
|
1685 |
+
msgid "Created"
|
1686 |
+
msgstr "Создано"
|
1687 |
+
|
1688 |
+
#: includes/admin/overview/class-overview-table.php:142
|
1689 |
+
#: includes/admin/overview/class-overview-table.php:159
|
1690 |
+
msgid "Edit this form"
|
1691 |
+
msgstr "Редактировать форму"
|
1692 |
+
|
1693 |
+
#: includes/admin/overview/class-overview-table.php:160
|
1694 |
+
msgid "Edit"
|
1695 |
+
msgstr "Изменить"
|
1696 |
+
|
1697 |
+
#: includes/admin/overview/class-overview-table.php:173
|
1698 |
+
msgid "View entries"
|
1699 |
+
msgstr "Посмотреть записи"
|
1700 |
+
|
1701 |
+
#: includes/admin/overview/class-overview-table.php:181
|
1702 |
+
msgid "View preview"
|
1703 |
+
msgstr "Предпросмотр"
|
1704 |
+
|
1705 |
+
#: includes/admin/overview/class-overview-table.php:198
|
1706 |
+
msgid "Duplicate this form"
|
1707 |
+
msgstr "Дублировать эту форму"
|
1708 |
+
|
1709 |
+
#: includes/admin/overview/class-overview-table.php:199
|
1710 |
+
msgid "Duplicate"
|
1711 |
+
msgstr "Дублировать"
|
1712 |
+
|
1713 |
+
#: includes/admin/overview/class-overview-table.php:215
|
1714 |
+
msgid "Delete this form"
|
1715 |
+
msgstr "Удалить эту форму"
|
1716 |
+
|
1717 |
+
#: includes/admin/overview/class-overview-table.php:216
|
1718 |
+
#: includes/admin/overview/class-overview-table.php:235
|
1719 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:418
|
1720 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:439
|
1721 |
+
msgid "Delete"
|
1722 |
+
msgstr "Удалить"
|
1723 |
+
|
1724 |
+
#: includes/admin/overview/class-overview-table.php:275
|
1725 |
+
msgid "Form was successfully deleted."
|
1726 |
+
msgstr "Форма была успешна удалена."
|
1727 |
+
|
1728 |
+
#: includes/admin/overview/class-overview-table.php:277
|
1729 |
+
msgid "Forms were successfully deleted."
|
1730 |
+
msgstr "Формы были успешно удалены."
|
1731 |
+
|
1732 |
+
#: includes/admin/overview/class-overview-table.php:287
|
1733 |
+
#: includes/admin/overview/class-overview-table.php:318
|
1734 |
+
msgid "Security check failed. Please try again."
|
1735 |
+
msgstr "Ошибка во время проверки безопасности. Пожалуйста, попробуйте еще раз."
|
1736 |
+
|
1737 |
+
#: includes/admin/overview/class-overview-table.php:306
|
1738 |
+
msgid "Form was successfully duplicated."
|
1739 |
+
msgstr "Форма была успешно продублирована."
|
1740 |
+
|
1741 |
+
#: includes/admin/overview/class-overview-table.php:308
|
1742 |
+
msgid "Forms were successfully duplicated."
|
1743 |
+
msgstr "Формы были успешно продублированы."
|
1744 |
+
|
1745 |
+
#: includes/admin/overview/class-overview.php:76
|
1746 |
+
msgid "Number of forms per page:"
|
1747 |
+
msgstr "Количество форм на странице:"
|
1748 |
+
|
1749 |
+
#: includes/admin/overview/class-overview.php:123
|
1750 |
+
msgid "Forms Overview"
|
1751 |
+
msgstr "Обзор форм"
|
1752 |
+
|
1753 |
+
#: includes/admin/settings-api.php:69
|
1754 |
+
msgid "The callback function used for the %s setting is missing."
|
1755 |
+
msgstr "Функция обратного вызова, используемая для %s, отсутствует."
|
1756 |
+
|
1757 |
+
#: includes/admin/settings-api.php:97
|
1758 |
+
msgid "You're using WPForms Lite - no license needed. Enjoy!"
|
1759 |
+
msgstr "Вы используете WPForms Lite - лицензия не требуется. Наслаждайтесь!"
|
1760 |
+
|
1761 |
+
#: includes/admin/settings-api.php:98
|
1762 |
+
msgid ""
|
1763 |
+
"To unlock more features consider <a href=\"%s\" target=\"_blank\" rel="
|
1764 |
+
"\"noopener noreferrer\">upgrading to Pro</a>.</p>"
|
1765 |
+
msgstr ""
|
1766 |
+
"Чтобы разблокировать больше функций, рассмотрите возможность <a href=\"%s\" "
|
1767 |
+
"target=\"_blank\" rel=\"noopener noreferrer\">обновления до Pro</a>.</p>"
|
1768 |
+
|
1769 |
+
#: includes/admin/settings-api.php:106
|
1770 |
+
msgid "Verify Key"
|
1771 |
+
msgstr "Проверка ключа"
|
1772 |
+
|
1773 |
+
#: includes/admin/settings-api.php:110
|
1774 |
+
msgid "Deactivate Key"
|
1775 |
+
msgstr "Деактивировать ключ"
|
1776 |
+
|
1777 |
+
#: includes/admin/settings-api.php:114
|
1778 |
+
msgid "Your license key type is %s."
|
1779 |
+
msgstr "Тип лицензионного ключа - %s."
|
1780 |
+
|
1781 |
+
#: includes/admin/settings-api.php:115
|
1782 |
+
msgid ""
|
1783 |
+
"If your license has been upgraded or is incorrect, <a href=\"#\" id="
|
1784 |
+
"\"wpforms-setting-license-key-refresh\">click here to force a refresh</a>."
|
1785 |
+
msgstr ""
|
1786 |
+
"Если ваша лицензия была обновлена или указана неверно, <a href=\"#\" id="
|
1787 |
+
"\"wpforms-setting-license-key-refresh\">нажмите здесь, чтобы принудительно "
|
1788 |
+
"обновить</a>."
|
1789 |
+
|
1790 |
+
#: includes/admin/settings-api.php:253
|
1791 |
+
msgid "Upload Image"
|
1792 |
+
msgstr "Загрузить изображение"
|
1793 |
+
|
1794 |
+
#: includes/class-conditional-logic-core.php:158
|
1795 |
+
msgid "this field if"
|
1796 |
+
msgstr "это поле, если"
|
1797 |
+
|
1798 |
+
#: includes/class-conditional-logic-core.php:165
|
1799 |
+
msgid "Show"
|
1800 |
+
msgstr "Показать"
|
1801 |
+
|
1802 |
+
#: includes/class-conditional-logic-core.php:166
|
1803 |
+
msgid "Hide"
|
1804 |
+
msgstr "Спрятать"
|
1805 |
+
|
1806 |
+
#: includes/class-conditional-logic-core.php:201
|
1807 |
+
#: includes/class-conditional-logic-core.php:258
|
1808 |
+
msgid "Enable conditional logic"
|
1809 |
+
msgstr "Включить условную логику"
|
1810 |
+
|
1811 |
+
#: includes/class-conditional-logic-core.php:202
|
1812 |
+
msgid "Check this option to enable conditional logic on this field."
|
1813 |
+
msgstr "Установите этот флажок, чтобы включить условную логику в этом поле."
|
1814 |
+
|
1815 |
+
#: includes/class-conditional-logic-core.php:260
|
1816 |
+
msgid "Check this option to enable conditional logic."
|
1817 |
+
msgstr "Установите этот флажок, чтобы включить условную логику."
|
1818 |
+
|
1819 |
+
#: includes/class-conditional-logic-core.php:457
|
1820 |
+
msgid "Add rule group"
|
1821 |
+
msgstr "Добавить группу правил"
|
1822 |
+
|
1823 |
+
#: includes/class-frontend.php:1010
|
1824 |
+
#: pro/includes/fields/class-file-upload.php:367
|
1825 |
+
#: pro/includes/fields/class-file-upload.php:383
|
1826 |
+
#: pro/includes/fields/class-file-upload.php:400 pro/wpforms-pro.php:187
|
1827 |
+
msgid "File type is not allowed."
|
1828 |
+
msgstr "Тип файла не разрешается."
|
1829 |
+
|
1830 |
+
#: includes/class-frontend.php:1011 pro/wpforms-pro.php:193
|
1831 |
+
msgid "File exceeds max size allowed."
|
1832 |
+
msgstr "Размер файла превышает максимально разрешенный размер."
|
1833 |
+
|
1834 |
+
#: includes/class-frontend.php:1012 pro/wpforms-pro.php:199
|
1835 |
+
msgid "Please enter time in 12-hour AM/PM format (eg 8:45 AM)."
|
1836 |
+
msgstr "Введите время в 12-часовом формате AM / PM (например, 8:45 AM)."
|
1837 |
+
|
1838 |
+
#: includes/class-frontend.php:1013 pro/wpforms-pro.php:205
|
1839 |
+
msgid "Please enter time in 24-hour format (eg 22:45)."
|
1840 |
+
msgstr "Введите время в 24-часовом формате (например, 22:45)."
|
1841 |
+
|
1842 |
+
#: includes/class-frontend.php:1014
|
1843 |
+
#: pro/includes/fields/class-payment-total.php:199 pro/wpforms-pro.php:211
|
1844 |
+
msgid "Payment is required."
|
1845 |
+
msgstr "Оплата обязательна."
|
1846 |
+
|
1847 |
+
#: includes/class-frontend.php:1015 pro/wpforms-pro.php:217
|
1848 |
+
msgid "Please enter a valid credit card number."
|
1849 |
+
msgstr "Укажите действительный номер карты."
|
1850 |
+
|
1851 |
+
#: includes/class-frontend.php:1078
|
1852 |
+
msgid "<a href=\"%s\">Go to the full page</a> to view and submit the form."
|
1853 |
+
msgstr ""
|
1854 |
+
"<a href=\"%s\">Перейдите на полную страницу</a> для просмотра и заполнения "
|
1855 |
+
"формы."
|
1856 |
+
|
1857 |
+
#: includes/class-logging.php:38
|
1858 |
+
msgid "WPForms Logs"
|
1859 |
+
msgstr "Логи WPForms"
|
1860 |
+
|
1861 |
+
#: includes/class-logging.php:38
|
1862 |
+
msgid "Logs"
|
1863 |
+
msgstr "Логи"
|
1864 |
+
|
1865 |
+
#: includes/class-preview.php:123
|
1866 |
+
msgid "Hide empty fields"
|
1867 |
+
msgstr "Скрыть пустые поля"
|
1868 |
+
|
1869 |
+
#: includes/class-preview.php:125 includes/class-preview.php:165
|
1870 |
+
msgid "Show empty fields"
|
1871 |
+
msgstr "Показать пустые поля"
|
1872 |
+
|
1873 |
+
#: includes/class-preview.php:134
|
1874 |
+
msgid "Hide notes"
|
1875 |
+
msgstr "Скрыть заметки"
|
1876 |
+
|
1877 |
+
#: includes/class-preview.php:136 includes/class-preview.php:166
|
1878 |
+
msgid "Show notes"
|
1879 |
+
msgstr "Показать заметки"
|
1880 |
+
|
1881 |
+
#: includes/class-preview.php:145
|
1882 |
+
msgid "Normal view"
|
1883 |
+
msgstr "Обычный вид"
|
1884 |
+
|
1885 |
+
#: includes/class-preview.php:147 includes/class-preview.php:167
|
1886 |
+
msgid "Compact view"
|
1887 |
+
msgstr "Компактный вид"
|
1888 |
+
|
1889 |
+
#: includes/class-preview.php:158
|
1890 |
+
msgid "Entry #%d"
|
1891 |
+
msgstr "Запись #%d"
|
1892 |
+
|
1893 |
+
#: includes/class-preview.php:161
|
1894 |
+
#: pro/includes/admin/entries/class-entries-single.php:987
|
1895 |
+
msgid "Print"
|
1896 |
+
msgstr "Печать"
|
1897 |
+
|
1898 |
+
#: includes/class-preview.php:175
|
1899 |
+
#: pro/includes/admin/entries/class-entries-single.php:520
|
1900 |
+
msgid "This entry does not have any fields"
|
1901 |
+
msgstr "У этой записи нет заполненных полей"
|
1902 |
+
|
1903 |
+
#. translators: %d - field ID
|
1904 |
+
#: includes/class-preview.php:192
|
1905 |
+
#: pro/includes/admin/entries/class-entries-single.php:536
|
1906 |
+
msgid "Field ID #%d"
|
1907 |
+
msgstr "Поле ID #%d"
|
1908 |
+
|
1909 |
+
#: includes/class-preview.php:196
|
1910 |
+
#: pro/includes/admin/entries/class-entries-single.php:541
|
1911 |
+
msgid "Empty"
|
1912 |
+
msgstr "Пусто"
|
1913 |
+
|
1914 |
+
#: includes/class-preview.php:207
|
1915 |
+
#: pro/includes/admin/entries/class-entries-single.php:578
|
1916 |
+
msgid "Notes"
|
1917 |
+
msgstr "Заметки"
|
1918 |
+
|
1919 |
+
#. translators: %1$s - user name; %2$s - date
|
1920 |
+
#: includes/class-preview.php:221
|
1921 |
+
msgid "Added by %1$s on %2$s"
|
1922 |
+
msgstr "Добавил(а) %1$s %2$s"
|
1923 |
+
|
1924 |
+
#: includes/class-preview.php:266
|
1925 |
+
msgid ""
|
1926 |
+
"This is the WPForms preview page. All your form previews will be handled on "
|
1927 |
+
"this page."
|
1928 |
+
msgstr ""
|
1929 |
+
"Это предварительный просмотр страницы WPForms. Все ваши образцы формы будут "
|
1930 |
+
"обрабатываться на этой странице."
|
1931 |
+
|
1932 |
+
#: includes/class-preview.php:267
|
1933 |
+
msgid ""
|
1934 |
+
"The page is set to private, so it is not publicly accessible. Please do not "
|
1935 |
+
"delete this page :) ."
|
1936 |
+
msgstr ""
|
1937 |
+
"Страница настроена как приватная, так что она публично недоступна. "
|
1938 |
+
"Пожалуйста, не удаляйте эту страницу :) ."
|
1939 |
+
|
1940 |
+
#: includes/class-preview.php:272
|
1941 |
+
msgid "WPForms Preview"
|
1942 |
+
msgstr "Предпросмотр WPForms"
|
1943 |
+
|
1944 |
+
#: includes/class-preview.php:375
|
1945 |
+
msgid "This is a preview of your form. This page is not publicly accessible."
|
1946 |
+
msgstr ""
|
1947 |
+
"Это предварительный просмотр вашей формы. Эта страница недоступна для "
|
1948 |
+
"общественности."
|
1949 |
+
|
1950 |
+
#: includes/class-preview.php:377
|
1951 |
+
msgid "Close this window"
|
1952 |
+
msgstr "Закрыть это окно"
|
1953 |
+
|
1954 |
+
#: includes/class-preview.php:379
|
1955 |
+
msgctxt "Form name"
|
1956 |
+
msgid "%s Preview"
|
1957 |
+
msgstr "Просмотр %s"
|
1958 |
+
|
1959 |
+
#: includes/class-process.php:79
|
1960 |
+
msgid "Invalid form."
|
1961 |
+
msgstr "Неверная форма."
|
1962 |
+
|
1963 |
+
#: includes/class-process.php:111
|
1964 |
+
msgid "Incorrect reCAPTCHA, please try again."
|
1965 |
+
msgstr "Ошибка reCAPTCHA, пожалуйста, попробуйте еще раз."
|
1966 |
+
|
1967 |
+
#: includes/class-process.php:114
|
1968 |
+
msgid "reCAPTCHA is required."
|
1969 |
+
msgstr "reCAPTCHA обязательна."
|
1970 |
+
|
1971 |
+
#: includes/class-process.php:126 includes/class-process.php:174
|
1972 |
+
msgid "Form has not been submitted, please see the errors below."
|
1973 |
+
msgstr "Форма не была отправлена, пожалуйста, проверьте ошибки."
|
1974 |
+
|
1975 |
+
#: includes/class-process.php:135
|
1976 |
+
msgid "WPForms honeypot field triggered."
|
1977 |
+
msgstr "Сработало анти-спам поле WPForms."
|
1978 |
+
|
1979 |
+
#: includes/class-process.php:354 pro/wpforms-pro.php:380
|
1980 |
+
msgctxt "Form name"
|
1981 |
+
msgid "New %s Entry"
|
1982 |
+
msgstr "Новая запись: %s"
|
1983 |
+
|
1984 |
+
#: includes/class-smart-tags.php:34
|
1985 |
+
msgid "Site Administrator Email"
|
1986 |
+
msgstr "Электронная почта администратора"
|
1987 |
+
|
1988 |
+
#: includes/class-smart-tags.php:35
|
1989 |
+
msgid "Entry ID"
|
1990 |
+
msgstr "ID Записи"
|
1991 |
+
|
1992 |
+
#: includes/class-smart-tags.php:36
|
1993 |
+
msgid "Form ID"
|
1994 |
+
msgstr "ID формы"
|
1995 |
+
|
1996 |
+
#: includes/class-smart-tags.php:38
|
1997 |
+
msgid "Embedded Post/Page Title"
|
1998 |
+
msgstr "Заголовок записи, где встроено"
|
1999 |
+
|
2000 |
+
#: includes/class-smart-tags.php:39
|
2001 |
+
msgid "Embedded Post Page URL"
|
2002 |
+
msgstr "URL записи, где встроено"
|
2003 |
+
|
2004 |
+
#: includes/class-smart-tags.php:40
|
2005 |
+
msgid "Embedded Post/Page ID"
|
2006 |
+
msgstr "ID записи, где встроено"
|
2007 |
+
|
2008 |
+
#: includes/class-smart-tags.php:41
|
2009 |
+
#: pro/includes/admin/entries/class-entries-export.php:203
|
2010 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:165
|
2011 |
+
#: pro/includes/fields/class-date-time.php:73
|
2012 |
+
#: pro/includes/fields/class-date-time.php:130
|
2013 |
+
#: pro/includes/fields/class-date-time.php:269
|
2014 |
+
#: pro/includes/fields/class-date-time.php:277
|
2015 |
+
#: pro/includes/fields/class-date-time.php:368
|
2016 |
+
msgid "Date"
|
2017 |
+
msgstr "Дата"
|
2018 |
+
|
2019 |
+
#: includes/class-smart-tags.php:42
|
2020 |
+
msgid "Query String Variable"
|
2021 |
+
msgstr "Переменная строка запроса"
|
2022 |
+
|
2023 |
+
#: includes/class-smart-tags.php:43
|
2024 |
+
msgid "User IP Address"
|
2025 |
+
msgstr "IP адрес пользователя"
|
2026 |
+
|
2027 |
+
#: includes/class-smart-tags.php:44
|
2028 |
+
msgid "User ID"
|
2029 |
+
msgstr "ID пользователя"
|
2030 |
+
|
2031 |
+
#: includes/class-smart-tags.php:45
|
2032 |
+
msgid "User Name"
|
2033 |
+
msgstr "Имя пользователя"
|
2034 |
+
|
2035 |
+
#: includes/class-smart-tags.php:46
|
2036 |
+
msgid "User Email"
|
2037 |
+
msgstr "Email пользователя"
|
2038 |
+
|
2039 |
+
#: includes/class-smart-tags.php:47
|
2040 |
+
msgid "Author ID"
|
2041 |
+
msgstr "ID автора"
|
2042 |
+
|
2043 |
+
#: includes/class-smart-tags.php:48
|
2044 |
+
msgid "Author Name"
|
2045 |
+
msgstr "Имя автора"
|
2046 |
+
|
2047 |
+
#: includes/class-smart-tags.php:49
|
2048 |
+
msgid "Author Email"
|
2049 |
+
msgstr "Email автора"
|
2050 |
+
|
2051 |
+
#: includes/class-smart-tags.php:50
|
2052 |
+
msgid "Referrer URL"
|
2053 |
+
msgstr "URL отправителя"
|
2054 |
+
|
2055 |
+
#: includes/class-smart-tags.php:51
|
2056 |
+
msgid "Login URL"
|
2057 |
+
msgstr "URL логина"
|
2058 |
+
|
2059 |
+
#: includes/class-smart-tags.php:52
|
2060 |
+
msgid "Logout URL"
|
2061 |
+
msgstr "Страница выхода"
|
2062 |
+
|
2063 |
+
#: includes/class-smart-tags.php:53
|
2064 |
+
msgid "Register URL"
|
2065 |
+
msgstr "URL страницы регистрации"
|
2066 |
+
|
2067 |
+
#: includes/class-smart-tags.php:54
|
2068 |
+
msgid "Lost Password URL"
|
2069 |
+
msgstr "URL-адрес страницы восстановления пароля"
|
2070 |
+
|
2071 |
+
#: includes/class-widget.php:43
|
2072 |
+
msgctxt "Widget"
|
2073 |
+
msgid "Display a form."
|
2074 |
+
msgstr "Показать форму."
|
2075 |
+
|
2076 |
+
#: includes/class-widget.php:52
|
2077 |
+
msgctxt "Widget"
|
2078 |
+
msgid "WPForms"
|
2079 |
+
msgstr "WPForms"
|
2080 |
+
|
2081 |
+
#: includes/class-widget.php:120
|
2082 |
+
msgctxt "Widget"
|
2083 |
+
msgid "Title:"
|
2084 |
+
msgstr "Заголовок:"
|
2085 |
+
|
2086 |
+
#: includes/class-widget.php:129
|
2087 |
+
msgctxt "Widget"
|
2088 |
+
msgid "Form:"
|
2089 |
+
msgstr "Форма:"
|
2090 |
+
|
2091 |
+
#: includes/class-widget.php:135
|
2092 |
+
msgctxt "Widget"
|
2093 |
+
msgid "Select your form"
|
2094 |
+
msgstr "Выберите вашу форму"
|
2095 |
+
|
2096 |
+
#: includes/class-widget.php:141
|
2097 |
+
msgctxt "Widget"
|
2098 |
+
msgid "No forms"
|
2099 |
+
msgstr "Форм нет"
|
2100 |
+
|
2101 |
+
#: includes/class-widget.php:149
|
2102 |
+
msgctxt "Widget"
|
2103 |
+
msgid "Display form name"
|
2104 |
+
msgstr "Показывать заголовок формы"
|
2105 |
+
|
2106 |
+
#: includes/class-widget.php:153
|
2107 |
+
msgctxt "Widget"
|
2108 |
+
msgid "Display form description"
|
2109 |
+
msgstr "Показывать описание формы"
|
2110 |
+
|
2111 |
+
#: includes/emails/class-emails.php:331
|
2112 |
+
msgid ""
|
2113 |
+
"You cannot send emails with WPForms_WP_Emails until init/admin_init has been "
|
2114 |
+
"reached"
|
2115 |
+
msgstr ""
|
2116 |
+
"Вы не можете отправлять email с WPForms пока не дошло дело до хука init/"
|
2117 |
+
"admin_init"
|
2118 |
+
|
2119 |
+
#: includes/emails/class-emails.php:472 includes/emails/class-emails.php:495
|
2120 |
+
#: includes/fields/class-checkbox.php:193 includes/fields/class-radio.php:193
|
2121 |
+
#: includes/fields/class-select.php:199
|
2122 |
+
msgid "(empty)"
|
2123 |
+
msgstr "(пусто)"
|
2124 |
+
|
2125 |
+
#: includes/emails/class-emails.php:473 includes/emails/class-emails.php:496
|
2126 |
+
msgid "Field ID #"
|
2127 |
+
msgstr "ID поля #"
|
2128 |
+
|
2129 |
+
#: includes/emails/class-emails.php:505
|
2130 |
+
msgid "An empty form was submitted."
|
2131 |
+
msgstr "Была отправлена пустая форма."
|
2132 |
+
|
2133 |
+
#. translators: %s - link to a site.
|
2134 |
+
#: includes/emails/templates/footer-default.php:41
|
2135 |
+
msgid "Sent from %s"
|
2136 |
+
msgstr "Отправлено c %s"
|
2137 |
+
|
2138 |
+
#: includes/fields/class-base.php:315
|
2139 |
+
msgid ""
|
2140 |
+
"Enter text for the form field label. Field labels are recommended and can be "
|
2141 |
+
"hidden in the Advanced Settings."
|
2142 |
+
msgstr ""
|
2143 |
+
"Введите текст для названия этого поля формы. В настройках вы сможете скрыть "
|
2144 |
+
"их, но эти названия полей рекомендованы для использования."
|
2145 |
+
|
2146 |
+
#: includes/fields/class-base.php:316
|
2147 |
+
msgid "Label"
|
2148 |
+
msgstr "Заголовок"
|
2149 |
+
|
2150 |
+
#: includes/fields/class-base.php:325
|
2151 |
+
msgid "Enter text for the form field description."
|
2152 |
+
msgstr "Введите текст для описания поля формы."
|
2153 |
+
|
2154 |
+
#: includes/fields/class-base.php:326
|
2155 |
+
msgid "Description"
|
2156 |
+
msgstr "Описание"
|
2157 |
+
|
2158 |
+
#: includes/fields/class-base.php:336
|
2159 |
+
msgid ""
|
2160 |
+
"Check this option to mark the field required. A form will not submit unless "
|
2161 |
+
"all required fields are provided."
|
2162 |
+
msgstr ""
|
2163 |
+
"Установите этот флажок, чтобы пометить поле в качестве обязательного. Форма "
|
2164 |
+
"не будет отправлена, если все необходимые поля не заполнены."
|
2165 |
+
|
2166 |
+
#: includes/fields/class-base.php:353
|
2167 |
+
msgid "Enter code for the form field."
|
2168 |
+
msgstr "Введите код для поля формы."
|
2169 |
+
|
2170 |
+
#: includes/fields/class-base.php:354
|
2171 |
+
msgid "Code"
|
2172 |
+
msgstr "Код"
|
2173 |
+
|
2174 |
+
#: includes/fields/class-base.php:362 includes/fields/class-base.php:444
|
2175 |
+
msgid "Add choices for the form field."
|
2176 |
+
msgstr "Добавьте варианты выбора для поля."
|
2177 |
+
|
2178 |
+
#: includes/fields/class-base.php:375
|
2179 |
+
msgid "Choices"
|
2180 |
+
msgstr "Варианты"
|
2181 |
+
|
2182 |
+
#. translators: %1$s - source name; %2$s - type name.
|
2183 |
+
#: includes/fields/class-base.php:421
|
2184 |
+
msgid "Choices are dynamically populated from the %1$s %2$s"
|
2185 |
+
msgstr "Варианты динамически загружаются из: %1$s - %2$s"
|
2186 |
+
|
2187 |
+
#: includes/fields/class-base.php:453
|
2188 |
+
msgid "Items"
|
2189 |
+
msgstr "Элементы"
|
2190 |
+
|
2191 |
+
#: includes/fields/class-base.php:495
|
2192 |
+
msgid "Enter text for the default form field value."
|
2193 |
+
msgstr "Введите текст для значения поля формы по умолчанию."
|
2194 |
+
|
2195 |
+
#: includes/fields/class-base.php:497 includes/fields/class-name.php:283
|
2196 |
+
#: includes/fields/class-name.php:298 includes/fields/class-name.php:313
|
2197 |
+
#: includes/fields/class-name.php:328 pro/includes/fields/class-address.php:329
|
2198 |
+
#: pro/includes/fields/class-address.php:348
|
2199 |
+
#: pro/includes/fields/class-address.php:369
|
2200 |
+
#: pro/includes/fields/class-address.php:387
|
2201 |
+
#: pro/includes/fields/class-address.php:407
|
2202 |
+
#: pro/includes/fields/class-address.php:431
|
2203 |
+
msgid "Default Value"
|
2204 |
+
msgstr "Значение по умолчанию"
|
2205 |
+
|
2206 |
+
#: includes/fields/class-base.php:507
|
2207 |
+
msgid "Select the default form field size."
|
2208 |
+
msgstr "Выберите размер поля по умолчанию."
|
2209 |
+
|
2210 |
+
#: includes/fields/class-base.php:509
|
2211 |
+
msgid "Small"
|
2212 |
+
msgstr "Небольшой"
|
2213 |
+
|
2214 |
+
#: includes/fields/class-base.php:510
|
2215 |
+
msgid "Medium"
|
2216 |
+
msgstr "Средний"
|
2217 |
+
|
2218 |
+
#: includes/fields/class-base.php:511
|
2219 |
+
msgid "Large"
|
2220 |
+
msgstr "Большой"
|
2221 |
+
|
2222 |
+
#: includes/fields/class-base.php:513
|
2223 |
+
msgid "Field Size"
|
2224 |
+
msgstr "Размер поля"
|
2225 |
+
|
2226 |
+
#: includes/fields/class-base.php:526
|
2227 |
+
msgid "Advanced Options"
|
2228 |
+
msgstr "Расширенные Опции"
|
2229 |
+
|
2230 |
+
#: includes/fields/class-base.php:537
|
2231 |
+
msgid "Enter text for the form field placeholder."
|
2232 |
+
msgstr "Введите текст для замещающего текста поля."
|
2233 |
+
|
2234 |
+
#: includes/fields/class-base.php:538
|
2235 |
+
msgid "Placeholder Text"
|
2236 |
+
msgstr "Замещающий текст"
|
2237 |
+
|
2238 |
+
#: includes/fields/class-base.php:548
|
2239 |
+
msgid ""
|
2240 |
+
"Enter CSS class names for the form field container. Class names should be "
|
2241 |
+
"separated with spaces."
|
2242 |
+
msgstr ""
|
2243 |
+
"Введите имена классов CSS для контейнера поля формы. Имена классов должны "
|
2244 |
+
"быть разделены пробелами."
|
2245 |
+
|
2246 |
+
#: includes/fields/class-base.php:553
|
2247 |
+
msgid "CSS Classes"
|
2248 |
+
msgstr "Классы CSS"
|
2249 |
+
|
2250 |
+
#: includes/fields/class-base.php:562
|
2251 |
+
msgid "Check this option to hide the form field label."
|
2252 |
+
msgstr "Установите этот флажок, чтобы скрыть метку поля формы."
|
2253 |
+
|
2254 |
+
#: includes/fields/class-base.php:564
|
2255 |
+
msgid "Hide Label"
|
2256 |
+
msgstr "Скрыть название поля"
|
2257 |
+
|
2258 |
+
#: includes/fields/class-base.php:572
|
2259 |
+
msgid "Check this option to hide the form field sub-label."
|
2260 |
+
msgstr "Установите этот флажок, чтобы скрыть дополнительную метку поля формы."
|
2261 |
+
|
2262 |
+
#: includes/fields/class-base.php:574
|
2263 |
+
msgid "Hide Sub-Labels"
|
2264 |
+
msgstr "Скрыть подзаголовки"
|
2265 |
+
|
2266 |
+
#: includes/fields/class-base.php:582
|
2267 |
+
msgid "Select the layout for displaying field choices."
|
2268 |
+
msgstr "Выберите макет отображения вариантов выбора поля."
|
2269 |
+
|
2270 |
+
#: includes/fields/class-base.php:584
|
2271 |
+
msgid "One Column"
|
2272 |
+
msgstr "Одна колонка"
|
2273 |
+
|
2274 |
+
#: includes/fields/class-base.php:585
|
2275 |
+
msgid "Two Columns"
|
2276 |
+
msgstr "Две колонки"
|
2277 |
+
|
2278 |
+
#: includes/fields/class-base.php:586
|
2279 |
+
msgid "Three Columns"
|
2280 |
+
msgstr "Три колонки"
|
2281 |
+
|
2282 |
+
#: includes/fields/class-base.php:588
|
2283 |
+
msgid "Choice Layout"
|
2284 |
+
msgstr "Выбор макета"
|
2285 |
+
|
2286 |
+
#: includes/fields/class-base.php:597
|
2287 |
+
msgid "Select auto-populate method to use."
|
2288 |
+
msgstr "Выберите метод автоматического заполнения."
|
2289 |
+
|
2290 |
+
#: includes/fields/class-base.php:600 includes/fields/class-base.php:621
|
2291 |
+
msgid "Post Type"
|
2292 |
+
msgstr "Тип записи"
|
2293 |
+
|
2294 |
+
#: includes/fields/class-base.php:601 includes/fields/class-base.php:632
|
2295 |
+
msgid "Taxonomy"
|
2296 |
+
msgstr "Таксономия"
|
2297 |
+
|
2298 |
+
#: includes/fields/class-base.php:603
|
2299 |
+
msgid "Dynamic Choices"
|
2300 |
+
msgstr "Динамические варианты"
|
2301 |
+
|
2302 |
+
#: includes/fields/class-base.php:642
|
2303 |
+
msgid "Select %s to use for auto-populating field choices."
|
2304 |
+
msgstr ""
|
2305 |
+
"Выберите %s, чтобы использовать для автоматического заполнения вариантов "
|
2306 |
+
"выбора поля."
|
2307 |
+
|
2308 |
+
#: includes/fields/class-base.php:643
|
2309 |
+
msgid "Dynamic %s Source"
|
2310 |
+
msgstr "Динамический источник для %s"
|
2311 |
+
|
2312 |
+
#: includes/fields/class-base.php:757
|
2313 |
+
msgid "You do no have permission."
|
2314 |
+
msgstr "У вас недостаточно прав."
|
2315 |
+
|
2316 |
+
#: includes/fields/class-base.php:762
|
2317 |
+
msgid "No form ID found"
|
2318 |
+
msgstr "ID формы не найден"
|
2319 |
+
|
2320 |
+
#: includes/fields/class-base.php:767
|
2321 |
+
msgid "No field type found"
|
2322 |
+
msgstr "Тип поля не найден"
|
2323 |
+
|
2324 |
+
#: includes/fields/class-checkbox.php:21
|
2325 |
+
msgid "Checkboxes"
|
2326 |
+
msgstr "Чекбоксы"
|
2327 |
+
|
2328 |
+
#: includes/fields/class-checkbox.php:27 includes/fields/class-radio.php:27
|
2329 |
+
#: includes/fields/class-select.php:27
|
2330 |
+
msgid "First Choice"
|
2331 |
+
msgstr "Первый вариант"
|
2332 |
+
|
2333 |
+
#: includes/fields/class-checkbox.php:32 includes/fields/class-radio.php:32
|
2334 |
+
#: includes/fields/class-select.php:32
|
2335 |
+
msgid "Second Choice"
|
2336 |
+
msgstr "Второй вариант"
|
2337 |
+
|
2338 |
+
#: includes/fields/class-checkbox.php:37 includes/fields/class-radio.php:37
|
2339 |
+
#: includes/fields/class-select.php:37
|
2340 |
+
msgid "Third Choice"
|
2341 |
+
msgstr "Третий вариант"
|
2342 |
+
|
2343 |
+
#: includes/fields/class-checkbox.php:89 includes/fields/class-radio.php:89
|
2344 |
+
#: includes/fields/class-select.php:89
|
2345 |
+
msgid "Check this to manually set form field values."
|
2346 |
+
msgstr "Установите этот флажок для ручного ввода данных формы."
|
2347 |
+
|
2348 |
+
#: includes/fields/class-checkbox.php:97 includes/fields/class-radio.php:97
|
2349 |
+
#: includes/fields/class-select.php:97
|
2350 |
+
msgid "Show Values"
|
2351 |
+
msgstr "Показать значения"
|
2352 |
+
|
2353 |
+
#: includes/fields/class-checkbox.php:211 includes/fields/class-radio.php:211
|
2354 |
+
msgid ""
|
2355 |
+
"Showing the first 20 choices.<br> All %d choices will be displayed when "
|
2356 |
+
"viewing the form."
|
2357 |
+
msgstr ""
|
2358 |
+
"Показаны первые 20 вариантов.<br>Все %d вариантов будут отображаться при "
|
2359 |
+
"просмотре формы."
|
2360 |
+
|
2361 |
+
#: includes/fields/class-email.php:91 includes/fields/class-email.php:311
|
2362 |
+
msgid "Confirm Email"
|
2363 |
+
msgstr "Подтвердите email"
|
2364 |
+
|
2365 |
+
#: includes/fields/class-email.php:207
|
2366 |
+
msgid "Enable Email Confirmation"
|
2367 |
+
msgstr "Включить подтверждение адреса email"
|
2368 |
+
|
2369 |
+
#: includes/fields/class-email.php:208
|
2370 |
+
msgid "Check this option to ask users to provide an email address twice."
|
2371 |
+
msgstr ""
|
2372 |
+
"Установите этот флажок, чтобы попросить пользователя дважды ввести адрес "
|
2373 |
+
"электронной почты."
|
2374 |
+
|
2375 |
+
#: includes/fields/class-email.php:246
|
2376 |
+
#: pro/includes/fields/class-password.php:227
|
2377 |
+
msgid "Confirmation Placeholder Text"
|
2378 |
+
msgstr "Замещающий текст подтверждения"
|
2379 |
+
|
2380 |
+
#: includes/fields/class-email.php:247
|
2381 |
+
#: pro/includes/fields/class-password.php:228
|
2382 |
+
msgid "Enter text for the confirmation field placeholder."
|
2383 |
+
msgstr "Введите текст для замещающего текста подтверждения."
|
2384 |
+
|
2385 |
+
#: includes/fields/class-name.php:82 includes/fields/class-name.php:377
|
2386 |
+
msgid "First"
|
2387 |
+
msgstr "Имя"
|
2388 |
+
|
2389 |
+
#: includes/fields/class-name.php:103 includes/fields/class-name.php:382
|
2390 |
+
msgid "Middle"
|
2391 |
+
msgstr "Отчество"
|
2392 |
+
|
2393 |
+
#: includes/fields/class-name.php:124 includes/fields/class-name.php:387
|
2394 |
+
msgid "Last"
|
2395 |
+
msgstr "Фамилия"
|
2396 |
+
|
2397 |
+
#: includes/fields/class-name.php:220
|
2398 |
+
#: pro/includes/fields/class-date-time.php:60
|
2399 |
+
#: pro/includes/fields/class-date-time.php:147
|
2400 |
+
#: pro/includes/fields/class-date-time.php:187
|
2401 |
+
#: pro/includes/fields/class-phone.php:78
|
2402 |
+
msgid "Format"
|
2403 |
+
msgstr "Формат"
|
2404 |
+
|
2405 |
+
#: includes/fields/class-name.php:221
|
2406 |
+
msgid "Select format to use for the name form field"
|
2407 |
+
msgstr "Выберите формат для поля имени"
|
2408 |
+
|
2409 |
+
#: includes/fields/class-name.php:232
|
2410 |
+
msgid "Simple"
|
2411 |
+
msgstr "Просто"
|
2412 |
+
|
2413 |
+
#: includes/fields/class-name.php:233
|
2414 |
+
msgid "First Last"
|
2415 |
+
msgstr "Имя Фамилия"
|
2416 |
+
|
2417 |
+
#: includes/fields/class-name.php:234
|
2418 |
+
msgid "First Middle Last"
|
2419 |
+
msgstr "Имя Отчество Фамилия"
|
2420 |
+
|
2421 |
+
#: includes/fields/class-name.php:276
|
2422 |
+
msgid "Name field advanced options."
|
2423 |
+
msgstr "Дополнительные опции поля имени."
|
2424 |
+
|
2425 |
+
#: includes/fields/class-name.php:279 includes/fields/class-name.php:294
|
2426 |
+
#: includes/fields/class-name.php:309 includes/fields/class-name.php:324
|
2427 |
+
#: pro/includes/fields/class-address.php:325
|
2428 |
+
#: pro/includes/fields/class-address.php:344
|
2429 |
+
#: pro/includes/fields/class-address.php:365
|
2430 |
+
#: pro/includes/fields/class-address.php:383
|
2431 |
+
#: pro/includes/fields/class-address.php:403
|
2432 |
+
#: pro/includes/fields/class-address.php:427
|
2433 |
+
#: pro/includes/fields/class-date-time.php:135
|
2434 |
+
#: pro/includes/fields/class-date-time.php:179
|
2435 |
+
msgid "Placeholder"
|
2436 |
+
msgstr "Замещающий текст"
|
2437 |
+
|
2438 |
+
#: includes/fields/class-name.php:291
|
2439 |
+
msgid "First Name"
|
2440 |
+
msgstr "Имя"
|
2441 |
+
|
2442 |
+
#: includes/fields/class-name.php:291
|
2443 |
+
msgid "First name field advanced options."
|
2444 |
+
msgstr "Дополнительные опции поля имени."
|
2445 |
+
|
2446 |
+
#: includes/fields/class-name.php:306
|
2447 |
+
msgid "Middle Name"
|
2448 |
+
msgstr "Отчество"
|
2449 |
+
|
2450 |
+
#: includes/fields/class-name.php:306
|
2451 |
+
msgid "Middle name field advanced options."
|
2452 |
+
msgstr "Дополнительные опции поля отчества."
|
2453 |
+
|
2454 |
+
#: includes/fields/class-name.php:321
|
2455 |
+
msgid "Last Name"
|
2456 |
+
msgstr "Фамилия"
|
2457 |
+
|
2458 |
+
#: includes/fields/class-name.php:321
|
2459 |
+
msgid "Last name field advanced options."
|
2460 |
+
msgstr "Дополнительные опции поля фамилии."
|
2461 |
+
|
2462 |
+
#: includes/fields/class-number.php:21
|
2463 |
+
msgid "Numbers"
|
2464 |
+
msgstr "Числа"
|
2465 |
+
|
2466 |
+
#: includes/fields/class-radio.php:21
|
2467 |
+
msgid "Multiple Choice"
|
2468 |
+
msgstr "Радио-кнопки"
|
2469 |
+
|
2470 |
+
#: includes/fields/class-select.php:21
|
2471 |
+
msgid "Dropdown"
|
2472 |
+
msgstr "Список"
|
2473 |
+
|
2474 |
+
#: includes/fields/class-text.php:21
|
2475 |
+
msgid "Single Line Text"
|
2476 |
+
msgstr "Строка текста"
|
2477 |
+
|
2478 |
+
#: includes/fields/class-textarea.php:21
|
2479 |
+
msgid "Paragraph Text"
|
2480 |
+
msgstr "Текст"
|
2481 |
+
|
2482 |
+
#: includes/integrations.php:32
|
2483 |
+
msgid "Select a form to display"
|
2484 |
+
msgstr "Выберите форму для отображения"
|
2485 |
+
|
2486 |
+
#: includes/integrations.php:39
|
2487 |
+
msgid "No forms found"
|
2488 |
+
msgstr "Формы не найдены"
|
2489 |
+
|
2490 |
+
#: includes/integrations.php:48
|
2491 |
+
msgid "Content"
|
2492 |
+
msgstr "Содержание"
|
2493 |
+
|
2494 |
+
#: includes/integrations.php:49
|
2495 |
+
msgid "Add your form"
|
2496 |
+
msgstr "Добавить вашу форму"
|
2497 |
+
|
2498 |
+
#: includes/integrations.php:53
|
2499 |
+
msgid "Form"
|
2500 |
+
msgstr "Форма"
|
2501 |
+
|
2502 |
+
#: includes/integrations.php:57
|
2503 |
+
msgid "Select a form to add it to your post or page."
|
2504 |
+
msgstr "Выберите форму для добавления на вашу страницу или запись."
|
2505 |
+
|
2506 |
+
#: includes/integrations.php:62
|
2507 |
+
msgid "Display Form Name"
|
2508 |
+
msgstr "Отображать заголовок формы"
|
2509 |
+
|
2510 |
+
#: includes/integrations.php:65 includes/integrations.php:80
|
2511 |
+
msgid "No"
|
2512 |
+
msgstr "Нет"
|
2513 |
+
|
2514 |
+
#: includes/integrations.php:66 includes/integrations.php:81
|
2515 |
+
msgid "Yes"
|
2516 |
+
msgstr "Да"
|
2517 |
+
|
2518 |
+
#: includes/integrations.php:69
|
2519 |
+
msgid "Would you like to display the forms name?"
|
2520 |
+
msgstr "Хотите показывать название формы?"
|
2521 |
+
|
2522 |
+
#: includes/integrations.php:77
|
2523 |
+
msgid "Display Form Description"
|
2524 |
+
msgstr "Отображать описание формы"
|
2525 |
+
|
2526 |
+
#: includes/integrations.php:84
|
2527 |
+
msgid "Would you like to display the forms description?"
|
2528 |
+
msgstr "Хотите показывать описание формы?"
|
2529 |
+
|
2530 |
+
#: includes/providers/class-base.php:93
|
2531 |
+
msgid "Connection"
|
2532 |
+
msgstr "Подключение"
|
2533 |
+
|
2534 |
+
#: includes/providers/class-base.php:163 includes/providers/class-base.php:1116
|
2535 |
+
#: includes/providers/class-base.php:1164
|
2536 |
+
msgid "You do not have permission"
|
2537 |
+
msgstr "У вас нет доступа"
|
2538 |
+
|
2539 |
+
#: includes/providers/class-base.php:467
|
2540 |
+
msgctxt "Name field label"
|
2541 |
+
msgid "%s (Full)"
|
2542 |
+
msgstr "%s (ФИО)"
|
2543 |
+
|
2544 |
+
#: includes/providers/class-base.php:478
|
2545 |
+
msgctxt "Name field label"
|
2546 |
+
msgid "%s (First)"
|
2547 |
+
msgstr "%s (Имя)"
|
2548 |
+
|
2549 |
+
#: includes/providers/class-base.php:490
|
2550 |
+
msgctxt "Name field label"
|
2551 |
+
msgid "%s (Middle)"
|
2552 |
+
msgstr "%s (Отчество)"
|
2553 |
+
|
2554 |
+
#: includes/providers/class-base.php:502
|
2555 |
+
msgctxt "Name field label"
|
2556 |
+
msgid "%s (Last)"
|
2557 |
+
msgstr "%s (Фамилия)"
|
2558 |
+
|
2559 |
+
#: includes/providers/class-base.php:702
|
2560 |
+
msgid "Select Account"
|
2561 |
+
msgstr "Выберите учетную запись"
|
2562 |
+
|
2563 |
+
#: includes/providers/class-base.php:714
|
2564 |
+
#: includes/providers/class-constant-contact.php:492
|
2565 |
+
msgid "Add New Account"
|
2566 |
+
msgstr "Добавить новую учётную запись"
|
2567 |
+
|
2568 |
+
#: includes/providers/class-base.php:747
|
2569 |
+
msgid "Select List"
|
2570 |
+
msgstr "Выберите список"
|
2571 |
+
|
2572 |
+
#: includes/providers/class-base.php:793
|
2573 |
+
msgid "Select Groups"
|
2574 |
+
msgstr "Выберите группы"
|
2575 |
+
|
2576 |
+
#: includes/providers/class-base.php:795
|
2577 |
+
msgid ""
|
2578 |
+
"We also noticed that you have some segments in your list. You can select "
|
2579 |
+
"specific list segments below if needed. This is optional."
|
2580 |
+
msgstr ""
|
2581 |
+
"Мы заметили, что у вас есть несколько сегментов в вашем списке. При "
|
2582 |
+
"необходимости можно выбрать определенный список сегментов ниже. Это не "
|
2583 |
+
"обязательно."
|
2584 |
+
|
2585 |
+
#: includes/providers/class-base.php:855 includes/providers/class-base.php:860
|
2586 |
+
msgid "List Fields"
|
2587 |
+
msgstr "Список полей"
|
2588 |
+
|
2589 |
+
#: includes/providers/class-base.php:860
|
2590 |
+
msgid "Available Form Fields"
|
2591 |
+
msgstr "Доступные поля формы"
|
2592 |
+
|
2593 |
+
#: includes/providers/class-base.php:934
|
2594 |
+
msgid "Process"
|
2595 |
+
msgstr "Обработать"
|
2596 |
+
|
2597 |
+
#: includes/providers/class-base.php:935
|
2598 |
+
msgid "Don't process"
|
2599 |
+
msgstr "Не обрабатывать"
|
2600 |
+
|
2601 |
+
#: includes/providers/class-base.php:937
|
2602 |
+
msgid "this connection if"
|
2603 |
+
msgstr "это подключение если"
|
2604 |
+
|
2605 |
+
#: includes/providers/class-base.php:938
|
2606 |
+
msgid "Marketing provider connection"
|
2607 |
+
msgstr "Подключение поставщика услуг маркетинга"
|
2608 |
+
|
2609 |
+
#: includes/providers/class-base.php:1052
|
2610 |
+
msgctxt "Provider Type"
|
2611 |
+
msgid "Add New %s"
|
2612 |
+
msgstr "Добавить: %s"
|
2613 |
+
|
2614 |
+
#: includes/providers/class-base.php:1124
|
2615 |
+
#: includes/providers/class-base.php:1172
|
2616 |
+
msgid "Missing data"
|
2617 |
+
msgstr "Данные отсутствуют"
|
2618 |
+
|
2619 |
+
#: includes/providers/class-base.php:1140
|
2620 |
+
msgid "Connection missing"
|
2621 |
+
msgstr "Отсутствует соединение"
|
2622 |
+
|
2623 |
+
#: includes/providers/class-base.php:1184
|
2624 |
+
msgid "Could not connect to the provider."
|
2625 |
+
msgstr "Не удалось выполнить подключение к поставщику."
|
2626 |
+
|
2627 |
+
#: includes/providers/class-base.php:1193
|
2628 |
+
#: includes/providers/class-base.php:1266
|
2629 |
+
msgctxt "Connection date"
|
2630 |
+
msgid "Connected on: %s"
|
2631 |
+
msgstr "Подключено: %s"
|
2632 |
+
|
2633 |
+
#: includes/providers/class-base.php:1194
|
2634 |
+
#: includes/providers/class-base.php:1267
|
2635 |
+
msgid "Disconnect"
|
2636 |
+
msgstr "Отключить"
|
2637 |
+
|
2638 |
+
#. translators: %s - provider name.
|
2639 |
+
#: includes/providers/class-base.php:1222
|
2640 |
+
msgid "Connect to %s"
|
2641 |
+
msgstr "Подключить к %s"
|
2642 |
+
|
2643 |
+
#. translators: %s - provider name.
|
2644 |
+
#: includes/providers/class-base.php:1249
|
2645 |
+
msgid "Integrate %s with WPForms"
|
2646 |
+
msgstr "Интегрируйте %s с WPForms"
|
2647 |
+
|
2648 |
+
#: includes/providers/class-base.php:1252
|
2649 |
+
msgid "Connected"
|
2650 |
+
msgstr "Активно"
|
2651 |
+
|
2652 |
+
#: includes/providers/class-base.php:1277
|
2653 |
+
msgctxt "New Provider Account"
|
2654 |
+
msgid "Add New Account"
|
2655 |
+
msgstr "Добавить новую учётную запись"
|
2656 |
+
|
2657 |
+
#: includes/providers/class-base.php:1284
|
2658 |
+
msgid ""
|
2659 |
+
"Please fill out all of the fields below to add your new provider account."
|
2660 |
+
msgstr ""
|
2661 |
+
"Пожалуйста, заполните все поля ниже, чтобы добавить новую учетную запись "
|
2662 |
+
"провайдера."
|
2663 |
+
|
2664 |
+
#: includes/providers/class-constant-contact.php:116
|
2665 |
+
msgid "Constant Contact Subscription stopped by conditional logic"
|
2666 |
+
msgstr "Подписка Constant Contact остановлена условной логикой"
|
2667 |
+
|
2668 |
+
#: includes/providers/class-constant-contact.php:134
|
2669 |
+
#: includes/providers/class-constant-contact.php:307
|
2670 |
+
#: includes/providers/class-constant-contact.php:394
|
2671 |
+
msgid "Constant Contact API Error"
|
2672 |
+
msgstr "Ошибка API Constant Contact"
|
2673 |
+
|
2674 |
+
#: includes/providers/class-constant-contact.php:495
|
2675 |
+
msgid ""
|
2676 |
+
"Please fill out all of the fields below to register your new Constant "
|
2677 |
+
"Contact account."
|
2678 |
+
msgstr ""
|
2679 |
+
"Пожалуйста, заполните все поля ниже, чтобы зарегистрировать новую учетную "
|
2680 |
+
"запись Constant Contact."
|
2681 |
+
|
2682 |
+
#: includes/providers/class-constant-contact.php:497
|
2683 |
+
#: includes/providers/class-constant-contact.php:575
|
2684 |
+
msgid ""
|
2685 |
+
"Click here for documentation on connecting WPForms with Constant Contact."
|
2686 |
+
msgstr ""
|
2687 |
+
"Нажмите здесь для получения документации по подключению WPForms с Constant "
|
2688 |
+
"Contact."
|
2689 |
+
|
2690 |
+
#: includes/providers/class-constant-contact.php:502
|
2691 |
+
#: includes/providers/class-constant-contact.php:580
|
2692 |
+
msgid ""
|
2693 |
+
"Because Constant Contact requires external authentication, you will need to "
|
2694 |
+
"register WPForms with Constant Contact before you can proceed."
|
2695 |
+
msgstr ""
|
2696 |
+
"Поскольку для Constant Contact требуется внешняя аутентификация, вам "
|
2697 |
+
"необходимо будет зарегистрировать WPForms с Constant Contact, прежде чем вы "
|
2698 |
+
"сможете продолжить."
|
2699 |
+
|
2700 |
+
#: includes/providers/class-constant-contact.php:506
|
2701 |
+
#: includes/providers/class-constant-contact.php:584
|
2702 |
+
msgid "Click here to register with Constant Contact"
|
2703 |
+
msgstr "Нажмите здесь, чтобы зарегистрироваться в Constant Contact"
|
2704 |
+
|
2705 |
+
#: includes/providers/class-constant-contact.php:509
|
2706 |
+
#: includes/providers/class-constant-contact.php:587
|
2707 |
+
msgid "Authorization Code"
|
2708 |
+
msgstr "Код авторизации"
|
2709 |
+
|
2710 |
+
#: includes/providers/class-constant-contact.php:511
|
2711 |
+
#: includes/providers/class-constant-contact.php:589
|
2712 |
+
msgid "Account Nickname"
|
2713 |
+
msgstr "Псевдоним учетной записи"
|
2714 |
+
|
2715 |
+
#: includes/providers/class-constant-contact.php:513
|
2716 |
+
msgid "Connect"
|
2717 |
+
msgstr "Подключить"
|
2718 |
+
|
2719 |
+
#: includes/providers/class-constant-contact.php:550
|
2720 |
+
msgid ""
|
2721 |
+
"Get the most out of <strong>WPForms</strong> — use it with an active "
|
2722 |
+
"Constant Contact account."
|
2723 |
+
msgstr ""
|
2724 |
+
"Получите максимальную отдачу от <strong>WPForms</strong> - используйте его с "
|
2725 |
+
"активной учетной записью Constant Contact."
|
2726 |
+
|
2727 |
+
#: includes/providers/class-constant-contact.php:553
|
2728 |
+
#: includes/providers/class-constant-contact.php:639
|
2729 |
+
msgid "Try Constant Contact for Free"
|
2730 |
+
msgstr "Попробуйте Constant Contact бесплатно"
|
2731 |
+
|
2732 |
+
#: includes/providers/class-constant-contact.php:554
|
2733 |
+
msgid ""
|
2734 |
+
"Learn More about the <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
2735 |
+
"noreferrer\">power of email marketing</a>"
|
2736 |
+
msgstr ""
|
2737 |
+
"Узнайте больше о <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer"
|
2738 |
+
"\">возможностях электронного маркетинга</a>"
|
2739 |
+
|
2740 |
+
#: includes/providers/class-constant-contact.php:636
|
2741 |
+
msgid ""
|
2742 |
+
"Get the most out of the <strong>WPForms</strong> plugin — use it with "
|
2743 |
+
"an active Constant Contact account."
|
2744 |
+
msgstr ""
|
2745 |
+
"Получите максимальную отдачу от плагина <strong>WPForms</strong> - "
|
2746 |
+
"используйте его с активной учетной записью Constant Contact."
|
2747 |
+
|
2748 |
+
#: includes/providers/class-constant-contact.php:640
|
2749 |
+
msgid "Connect your existing account"
|
2750 |
+
msgstr "Подключить вашу существующую учетную запись"
|
2751 |
+
|
2752 |
+
#: includes/providers/class-constant-contact.php:641
|
2753 |
+
msgid "Learn More about the <a href=\"%s\">power of email marketing</a>"
|
2754 |
+
msgstr ""
|
2755 |
+
"Узнайте больше о <a href=\"%s\">возможностях электронного маркетинга</a>"
|
2756 |
+
|
2757 |
+
#: includes/providers/class-constant-contact.php:699
|
2758 |
+
msgid "Grow Your Website with WPForms + Email Marketing"
|
2759 |
+
msgstr "Развивайте свой сайт с помощью WPForms и email маркетинга"
|
2760 |
+
|
2761 |
+
#: includes/providers/class-constant-contact.php:700
|
2762 |
+
msgid "Wondering if email marketing is really worth your time?"
|
2763 |
+
msgstr ""
|
2764 |
+
"Хотите узнать, действительно ли маркетинг электронной почты стоит вашего "
|
2765 |
+
"времени?"
|
2766 |
+
|
2767 |
+
#: includes/providers/class-constant-contact.php:701
|
2768 |
+
msgid ""
|
2769 |
+
"Email is hands-down the most effective way to nurture leads and turn them "
|
2770 |
+
"into customers, with a return on investment (ROI) of <strong>$44 back for "
|
2771 |
+
"every $1 spent</strong> according to Direct Marketing Association."
|
2772 |
+
msgstr ""
|
2773 |
+
"Электронная почта - это самый эффективный способ подготавливать "
|
2774 |
+
"потенциальных клиентов и превратиь их в действующих клиентов с возвратом "
|
2775 |
+
"инвестиций (ROI) в <strong>размере 44 доллара США за каждый потраченный 1 "
|
2776 |
+
"доллар США</strong>, согласно Direct Marketing Association."
|
2777 |
+
|
2778 |
+
#: includes/providers/class-constant-contact.php:702
|
2779 |
+
msgid ""
|
2780 |
+
"Here are 3 big reasons why every smart business in the world has an email "
|
2781 |
+
"list:"
|
2782 |
+
msgstr ""
|
2783 |
+
"Вот 3 большие причины, по которым каждый умный бизнес в мире имеет список "
|
2784 |
+
"адресов электронной почты:"
|
2785 |
+
|
2786 |
+
#: includes/providers/class-constant-contact.php:706
|
2787 |
+
msgid ""
|
2788 |
+
"<strong>Email is still #1</strong> - At least 91% of consumers check their "
|
2789 |
+
"email on a daily basis. You get direct access to your subscribers, without "
|
2790 |
+
"having to play by social media's rules and algorithms."
|
2791 |
+
msgstr ""
|
2792 |
+
"<strong>Электронная почта по-прежнему № 1</strong> - По крайней мере 91% "
|
2793 |
+
"пользователей ежедневно проверяют электронную почту. Вы получаете прямой "
|
2794 |
+
"доступ к своим подписчикам, без необходимости играть по правилам и "
|
2795 |
+
"алгоритмам социальных сетей."
|
2796 |
+
|
2797 |
+
#: includes/providers/class-constant-contact.php:707
|
2798 |
+
msgid ""
|
2799 |
+
"<strong>You own your email list</strong> - Unlike with social media, your "
|
2800 |
+
"list is your property and no one can revoke your access to it."
|
2801 |
+
msgstr ""
|
2802 |
+
"<strong>Свой собственный список email</strong> - В отличие от социальных "
|
2803 |
+
"сетей, ваш список является вашей собственностью, и никто не может отменить "
|
2804 |
+
"ваш доступ к нему."
|
2805 |
+
|
2806 |
+
#: includes/providers/class-constant-contact.php:708
|
2807 |
+
msgid ""
|
2808 |
+
"<strong>Email converts</strong> - People who buy products marketed through "
|
2809 |
+
"email spend 138% more than those who don't receive email offers."
|
2810 |
+
msgstr ""
|
2811 |
+
"<strong>Email'ы конвертируются</strong> - Люди, которые покупают продукты, "
|
2812 |
+
"продаваемые по электронной почте, тратят на 138% больше, чем те, кто не "
|
2813 |
+
"получает такие предложения."
|
2814 |
+
|
2815 |
+
#: includes/providers/class-constant-contact.php:710
|
2816 |
+
msgid ""
|
2817 |
+
"That's why it's crucial to start collecting email addresses and "
|
2818 |
+
"building your list as soon as possible."
|
2819 |
+
msgstr ""
|
2820 |
+
"Вот почему очень важно начать собирать адреса электронной почты и создавать "
|
2821 |
+
"свой контактный список как можно скорее."
|
2822 |
+
|
2823 |
+
#: includes/providers/class-constant-contact.php:711
|
2824 |
+
msgid ""
|
2825 |
+
"For more details, see this guide on <a href=\"%s\" target=\"_blank\" rel="
|
2826 |
+
"\"noopener noreferrer\">why building your email list is so important</a>."
|
2827 |
+
msgstr ""
|
2828 |
+
"Для получения дополнительной информации прочтите руководство по тому, <a "
|
2829 |
+
"href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">почему создание "
|
2830 |
+
"списка адресов электронной почты так важно</a>."
|
2831 |
+
|
2832 |
+
#: includes/providers/class-constant-contact.php:713
|
2833 |
+
msgid "You've Already Started - Here's the Next Step (It's Easy)"
|
2834 |
+
msgstr "Вы уже начали - вот следующий шаг (это легко)"
|
2835 |
+
|
2836 |
+
#: includes/providers/class-constant-contact.php:714
|
2837 |
+
msgid "Here are the 3 things you need to build an email list:"
|
2838 |
+
msgstr ""
|
2839 |
+
"Вот 3 вещи, которые вам нужны для создания списка адресов электронной почты:"
|
2840 |
+
|
2841 |
+
#: includes/providers/class-constant-contact.php:716
|
2842 |
+
msgid "A Website or Blog"
|
2843 |
+
msgstr "Веб-сайт или блог"
|
2844 |
+
|
2845 |
+
#: includes/providers/class-constant-contact.php:717
|
2846 |
+
msgid "High-Converting Form Builder"
|
2847 |
+
msgstr "Конструктор форм для высокопроизводительных форм"
|
2848 |
+
|
2849 |
+
#: includes/providers/class-constant-contact.php:718
|
2850 |
+
msgid "The Best Email Marketing Service"
|
2851 |
+
msgstr "Лучшая служба электронного маркетинга"
|
2852 |
+
|
2853 |
+
#: includes/providers/class-constant-contact.php:720
|
2854 |
+
msgid ""
|
2855 |
+
"With a powerful email marketing service like Constant Contact, you can "
|
2856 |
+
"instantly send out mass notifications and beautifully designed newsletters "
|
2857 |
+
"to engage your subscribers."
|
2858 |
+
msgstr ""
|
2859 |
+
"Благодаря мощной службе маркетинга электронной почты, такой как Constant "
|
2860 |
+
"Contact, вы можете мгновенно отправлять массовые уведомления и красиво "
|
2861 |
+
"оформленные информационные бюллетени, чтобы привлечь ваших подписчиков."
|
2862 |
+
|
2863 |
+
#: includes/providers/class-constant-contact.php:722
|
2864 |
+
msgid "Get Started with Constant Contact for Free"
|
2865 |
+
msgstr "Начните работать с Constant Contact бесплатно"
|
2866 |
+
|
2867 |
+
#: includes/providers/class-constant-contact.php:723
|
2868 |
+
msgid ""
|
2869 |
+
"WPForms plugin makes it fast and easy to capture all kinds of visitor "
|
2870 |
+
"information right from your WordPress site - even if you don't have a "
|
2871 |
+
"Constant Contact account."
|
2872 |
+
msgstr ""
|
2873 |
+
"Плагин WPForms позволяет быстро и легко захватывать все виды информации о "
|
2874 |
+
"посетителях прямо с вашего WordPress сайта - даже если у вас нет учетной "
|
2875 |
+
"записи Constant Contact."
|
2876 |
+
|
2877 |
+
#: includes/providers/class-constant-contact.php:724
|
2878 |
+
msgid ""
|
2879 |
+
"But when you combine WPForms with Constant Contact, you can nurture your "
|
2880 |
+
"contacts and engage with them even after they leave your website. When you "
|
2881 |
+
"use Constant Contact + WPForms together, you can:"
|
2882 |
+
msgstr ""
|
2883 |
+
"Но когда вы объединяете WPForms с Constant Contact, вы можете развивать "
|
2884 |
+
"контакты и общаться с ними даже после того, как они покинут ваш сайт. Когда "
|
2885 |
+
"вы используете Constant Contact + WPForms вместе, вы можете:"
|
2886 |
+
|
2887 |
+
#: includes/providers/class-constant-contact.php:726
|
2888 |
+
msgid "Seamlessly add new contacts to your email list"
|
2889 |
+
msgstr "Лешко добавляйте новые контакты в список рассылки"
|
2890 |
+
|
2891 |
+
#: includes/providers/class-constant-contact.php:727
|
2892 |
+
msgid "Create and send professional email newsletters"
|
2893 |
+
msgstr ""
|
2894 |
+
"Создавайте и отправляйте профессиональные рассылки по электронной почте"
|
2895 |
+
|
2896 |
+
#: includes/providers/class-constant-contact.php:728
|
2897 |
+
msgid "Get expert marketing and support"
|
2898 |
+
msgstr "Получить экспертный маркетинг и поддержку"
|
2899 |
+
|
2900 |
+
#: includes/providers/class-constant-contact.php:731
|
2901 |
+
msgid "Try Constant Contact Today"
|
2902 |
+
msgstr "Попробуйте Constant Contact сегодня"
|
2903 |
+
|
2904 |
+
#: includes/providers/class-constant-contact.php:733
|
2905 |
+
msgid "WPForms Makes List Building Easy"
|
2906 |
+
msgstr "WPForms делает создание списков email простым"
|
2907 |
+
|
2908 |
+
#: includes/providers/class-constant-contact.php:734
|
2909 |
+
msgid ""
|
2910 |
+
"When creating WPForms, our goal was to make a WordPress forms plugin "
|
2911 |
+
"that's both EASY and POWERFUL."
|
2912 |
+
msgstr ""
|
2913 |
+
"При создании WPForms наша цель состояла в том, чтобы сделать плагин форм для "
|
2914 |
+
"WordPress, который является одновременно ЛЕГКИМ и МОЩНЫМ."
|
2915 |
+
|
2916 |
+
#: includes/providers/class-constant-contact.php:735
|
2917 |
+
msgid ""
|
2918 |
+
"We made the form creation process extremely intuitive, so you can create a "
|
2919 |
+
"form to start capturing emails within 5 minutes or less."
|
2920 |
+
msgstr ""
|
2921 |
+
"Мы сделали процесс создания формы чрезвычайно интуитивным, поэтому вы можете "
|
2922 |
+
"создать форму, чтобы начать получать электронные письма, в течение 5 минут "
|
2923 |
+
"или даже меньше."
|
2924 |
+
|
2925 |
+
#: includes/providers/class-constant-contact.php:736
|
2926 |
+
msgid "Here's how it works."
|
2927 |
+
msgstr "Вот как это работает."
|
2928 |
+
|
2929 |
+
#: includes/providers/class-constant-contact.php:740
|
2930 |
+
msgid "1. Select from our pre-built templates, or create a form from scratch."
|
2931 |
+
msgstr ""
|
2932 |
+
"1. Выберите из наших предварительно построенных шаблонов или создайте форму "
|
2933 |
+
"с нуля."
|
2934 |
+
|
2935 |
+
#: includes/providers/class-constant-contact.php:744
|
2936 |
+
msgid "2. Drag and drop any field you want onto your signup form."
|
2937 |
+
msgstr ""
|
2938 |
+
"2. Перетащите любое поле, которое вы хотите, в свою регистрационную форму."
|
2939 |
+
|
2940 |
+
#: includes/providers/class-constant-contact.php:748
|
2941 |
+
msgid "3. Connect your Constant Contact email list."
|
2942 |
+
msgstr "3. Подключите свой email список из Constant Contact."
|
2943 |
+
|
2944 |
+
#: includes/providers/class-constant-contact.php:752
|
2945 |
+
msgid "4. Add your new form to any post, page, or sidebar."
|
2946 |
+
msgstr ""
|
2947 |
+
"4. Добавьте свою новую форму в любую запись, страницу или боковую колонку "
|
2948 |
+
"сайта."
|
2949 |
+
|
2950 |
+
#: includes/providers/class-constant-contact.php:755
|
2951 |
+
msgid ""
|
2952 |
+
"It doesn't matter what kind of business you run, what kind of website "
|
2953 |
+
"you have, or what industry you are in - you need to start building your "
|
2954 |
+
"email list today."
|
2955 |
+
msgstr ""
|
2956 |
+
"Неважно, какой бизнес вы ведете, какой у вас сайт или в какой вы отрасли - "
|
2957 |
+
"вам нужно начать создавать свой список адресов электронной почты сегодня."
|
2958 |
+
|
2959 |
+
#: includes/providers/class-constant-contact.php:756
|
2960 |
+
msgid "With Constant Contact + WPForms, growing your list is easy."
|
2961 |
+
msgstr ""
|
2962 |
+
"Со связкой Constant Contact + WPForms увеличивать свой список подписчиков "
|
2963 |
+
"очень просто."
|
2964 |
+
|
2965 |
+
#: includes/templates/class-blank.php:21
|
2966 |
+
msgid "Blank Form"
|
2967 |
+
msgstr "Пустая форма"
|
2968 |
+
|
2969 |
+
#: includes/templates/class-blank.php:23
|
2970 |
+
msgid ""
|
2971 |
+
"The blank form allows you to create any type of form using our drag & drop "
|
2972 |
+
"builder."
|
2973 |
+
msgstr ""
|
2974 |
+
"Пустая форма позволяет вам создавать любой тип формы с помощью нашего drag & "
|
2975 |
+
"drop конструктора."
|
2976 |
+
|
2977 |
+
#: includes/templates/class-blank.php:34
|
2978 |
+
#: includes/templates/class-contact.php:65
|
2979 |
+
#: includes/templates/class-subscribe.php:52
|
2980 |
+
#: includes/templates/class-suggestion.php:90
|
2981 |
+
#: pro/includes/templates/class-donation.php:66
|
2982 |
+
#: pro/includes/templates/class-order.php:100
|
2983 |
+
#: pro/includes/templates/class-request-quote.php:70
|
2984 |
+
msgid "Sending..."
|
2985 |
+
msgstr "Отправка..."
|
2986 |
+
|
2987 |
+
#: includes/templates/class-contact.php:21
|
2988 |
+
msgid "Simple Contact Form"
|
2989 |
+
msgstr "Простая контактная форма"
|
2990 |
+
|
2991 |
+
#: includes/templates/class-contact.php:23
|
2992 |
+
msgid ""
|
2993 |
+
"Allow your users to contact you with this simple contact form. You can add "
|
2994 |
+
"and remove fields as needed."
|
2995 |
+
msgstr ""
|
2996 |
+
"Разрешите вашим пользователям связаться с вами через эту простую контактную "
|
2997 |
+
"форму. Можно добавлять и удалять поля по мере необходимости."
|
2998 |
+
|
2999 |
+
#: includes/templates/class-contact.php:48
|
3000 |
+
#: pro/includes/templates/class-donation.php:58
|
3001 |
+
#: pro/includes/templates/class-order.php:92
|
3002 |
+
msgid "Comment or Message"
|
3003 |
+
msgstr "Комментарий или сообщение"
|
3004 |
+
|
3005 |
+
#: includes/templates/class-subscribe.php:21
|
3006 |
+
msgid "Newsletter Signup Form"
|
3007 |
+
msgstr "Форма подписки на рассылку"
|
3008 |
+
|
3009 |
+
#: includes/templates/class-subscribe.php:23
|
3010 |
+
msgid ""
|
3011 |
+
"Add subscribers and grow your email list with this newsletter signup form. "
|
3012 |
+
"You can add and remove fields as needed."
|
3013 |
+
msgstr ""
|
3014 |
+
"Добавляйте подписчиков и увеличивайте ваш список электронных адресов с этой "
|
3015 |
+
"формой подписки. Можно добавлять и удалять поля по мере необходимости."
|
3016 |
+
|
3017 |
+
#: includes/templates/class-subscribe.php:28
|
3018 |
+
#: pro/includes/templates/class-donation.php:27
|
3019 |
+
#: pro/includes/templates/class-order.php:27
|
3020 |
+
msgid "Don't Forget"
|
3021 |
+
msgstr "Не забудьте"
|
3022 |
+
|
3023 |
+
#: includes/templates/class-subscribe.php:29
|
3024 |
+
msgid "Click the marketing tab to configure your newsletter service provider"
|
3025 |
+
msgstr ""
|
3026 |
+
"Щелкните вкладку маркетинга для настройки провайдера новостной рассылки"
|
3027 |
+
|
3028 |
+
#: includes/templates/class-suggestion.php:21
|
3029 |
+
msgid "Suggestion Form"
|
3030 |
+
msgstr "Форма предложений"
|
3031 |
+
|
3032 |
+
#: includes/templates/class-suggestion.php:23
|
3033 |
+
msgid ""
|
3034 |
+
"Ask your users for suggestions with this simple form template. You can add "
|
3035 |
+
"and remove fields as needed."
|
3036 |
+
msgstr ""
|
3037 |
+
"Попросите пользователей поделиться предложениями через простой шаблон формы. "
|
3038 |
+
"Можно добавлять и удалять поля по мере необходимости."
|
3039 |
+
|
3040 |
+
#: includes/templates/class-suggestion.php:42
|
3041 |
+
msgid "Please enter your email, so we can follow up with you."
|
3042 |
+
msgstr ""
|
3043 |
+
"Пожалуйста, введите адрес электронной почты, так что мы сможем с вами "
|
3044 |
+
"связаться."
|
3045 |
+
|
3046 |
+
#: includes/templates/class-suggestion.php:49
|
3047 |
+
msgid "Which department do you have a suggestion for?"
|
3048 |
+
msgstr "Для какого отдела у вас есть предложение?"
|
3049 |
+
|
3050 |
+
#: includes/templates/class-suggestion.php:52
|
3051 |
+
msgid "Sales"
|
3052 |
+
msgstr "Продажи"
|
3053 |
+
|
3054 |
+
#: includes/templates/class-suggestion.php:55
|
3055 |
+
msgid "Customer Support"
|
3056 |
+
msgstr "Поддержка клиента"
|
3057 |
+
|
3058 |
+
#: includes/templates/class-suggestion.php:58
|
3059 |
+
msgid "Product Development"
|
3060 |
+
msgstr "Разработка продукта"
|
3061 |
+
|
3062 |
+
#: includes/templates/class-suggestion.php:69
|
3063 |
+
msgid "Subject"
|
3064 |
+
msgstr "Тема"
|
3065 |
+
|
3066 |
+
#: lite/wpforms-lite.php:53
|
3067 |
+
msgid "New %s Entry"
|
3068 |
+
msgstr "Новая запись для %s"
|
3069 |
+
|
3070 |
+
#: lite/wpforms-lite.php:92 pro/wpforms-pro.php:445
|
3071 |
+
msgid "Send To Email Address"
|
3072 |
+
msgstr "Отправить на email адрес"
|
3073 |
+
|
3074 |
+
#: lite/wpforms-lite.php:95 pro/wpforms-pro.php:448
|
3075 |
+
msgid ""
|
3076 |
+
"Enter the email address to receive form entry notifications. For multiple "
|
3077 |
+
"notifications, separate email addresses with a comma."
|
3078 |
+
msgstr ""
|
3079 |
+
"Введите адрес электронной почты, чтобы получать на него уведомления о "
|
3080 |
+
"записях для формы. Для отправки нескольких уведомлений каждый адрес "
|
3081 |
+
"электронной почты должен быть отделен запятой."
|
3082 |
+
|
3083 |
+
#: lite/wpforms-lite.php:111 pro/wpforms-pro.php:464
|
3084 |
+
msgid "CC"
|
3085 |
+
msgstr "Копия"
|
3086 |
+
|
3087 |
+
#: lite/wpforms-lite.php:127 pro/wpforms-pro.php:480
|
3088 |
+
msgid "Email Subject"
|
3089 |
+
msgstr "Тема письма"
|
3090 |
+
|
3091 |
+
#: lite/wpforms-lite.php:129 pro/wpforms-pro.php:482
|
3092 |
+
msgctxt "Form name"
|
3093 |
+
msgid "New Entry: %s"
|
3094 |
+
msgstr "Новая запись: %s"
|
3095 |
+
|
3096 |
+
#: lite/wpforms-lite.php:142 pro/wpforms-pro.php:495
|
3097 |
+
msgid "From Name"
|
3098 |
+
msgstr "От имени"
|
3099 |
+
|
3100 |
+
#: lite/wpforms-lite.php:158 pro/wpforms-pro.php:511
|
3101 |
+
msgid "From Email"
|
3102 |
+
msgstr "С email адреса"
|
3103 |
+
|
3104 |
+
#: lite/wpforms-lite.php:174 pro/wpforms-pro.php:527
|
3105 |
+
msgid "Reply-To"
|
3106 |
+
msgstr "Отправлять ответы"
|
3107 |
+
|
3108 |
+
#: lite/wpforms-lite.php:199 pro/wpforms-pro.php:552
|
3109 |
+
msgid ""
|
3110 |
+
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
3111 |
+
msgstr ""
|
3112 |
+
"Для отображения всех полей формы, используйте смарт-тег <code>{all_fields}</"
|
3113 |
+
"code>."
|
3114 |
+
|
3115 |
+
#: lite/wpforms-lite.php:253 pro/includes/templates/class-request-quote.php:20
|
3116 |
+
msgid "Request A Quote Form"
|
3117 |
+
msgstr "Форма запроса предварительной оценки"
|
3118 |
+
|
3119 |
+
#: lite/wpforms-lite.php:255 pro/includes/templates/class-request-quote.php:22
|
3120 |
+
msgid ""
|
3121 |
+
"Start collecting leads with this pre-made Request a quote form. You can add "
|
3122 |
+
"and remove fields as needed."
|
3123 |
+
msgstr ""
|
3124 |
+
"Начните собирать лидов с этой готовой формой Запроса оценки. Вы можете "
|
3125 |
+
"добавлять и удалять поля по мере необходимости."
|
3126 |
+
|
3127 |
+
#: lite/wpforms-lite.php:258 pro/includes/templates/class-donation.php:20
|
3128 |
+
msgid "Donation Form"
|
3129 |
+
msgstr "Форма пожертвования"
|
3130 |
+
|
3131 |
+
#: lite/wpforms-lite.php:260 pro/includes/templates/class-donation.php:22
|
3132 |
+
msgid ""
|
3133 |
+
"Start collecting donation payments on your website with this ready-made "
|
3134 |
+
"Donation form. You can add and remove fields as needed."
|
3135 |
+
msgstr ""
|
3136 |
+
"Начните собирать пожертвования на своем сайте с помощью этой готовой формы "
|
3137 |
+
"для пожертвований. Вы можете добавлять и удалять поля по мере необходимости."
|
3138 |
+
|
3139 |
+
#: lite/wpforms-lite.php:263 pro/includes/templates/class-order.php:20
|
3140 |
+
msgid "Billing / Order Form"
|
3141 |
+
msgstr "Форма оплаты / заказа"
|
3142 |
+
|
3143 |
+
#: lite/wpforms-lite.php:265
|
3144 |
+
msgid ""
|
3145 |
+
"Collect payments for product and service orders with this ready-made form "
|
3146 |
+
"template. You can add and remove fields as needed."
|
3147 |
+
msgstr ""
|
3148 |
+
"Принимайте платежи за продукты и услуги с помощью готового шаблона формы. Вы "
|
3149 |
+
"можете добавлять и удалять поля по мере необходимости."
|
3150 |
+
|
3151 |
+
#: lite/wpforms-lite.php:270
|
3152 |
+
msgid "Unlock Pre-Made Form Templates"
|
3153 |
+
msgstr "Откройте уже готовые шаблоны форм"
|
3154 |
+
|
3155 |
+
#: lite/wpforms-lite.php:270
|
3156 |
+
msgid "Upgrade"
|
3157 |
+
msgstr "Обновить"
|
3158 |
+
|
3159 |
+
#: lite/wpforms-lite.php:273
|
3160 |
+
msgid ""
|
3161 |
+
"While WPForms Lite allows you to create any type of form, you can speed up "
|
3162 |
+
"the process by unlocking our other pre-built form templates among other "
|
3163 |
+
"features, so you never have to start from scratch again..."
|
3164 |
+
msgstr ""
|
3165 |
+
"В то время как WPForms Lite позволяет вам создать любой тип формы, вы можете "
|
3166 |
+
"ускорить процесс, используя наши шаблоны готовых форм среди других функций, "
|
3167 |
+
"так что вам никогда не придется начинать с нуля снова..."
|
3168 |
+
|
3169 |
+
#: lite/wpforms-lite.php:416
|
3170 |
+
#: pro/includes/admin/builder/panels/class-payments.php:21
|
3171 |
+
#: pro/wpforms-pro.php:152 pro/wpforms-pro.php:223
|
3172 |
+
msgid "Payments"
|
3173 |
+
msgstr "Платежи"
|
3174 |
+
|
3175 |
+
#: lite/wpforms-lite.php:440
|
3176 |
+
msgid "is a PRO Feature"
|
3177 |
+
msgstr "это функция PRO"
|
3178 |
+
|
3179 |
+
#: lite/wpforms-lite.php:441
|
3180 |
+
msgid ""
|
3181 |
+
"We're sorry, %name% is not available on your plan.<br><br>Please upgrade to "
|
3182 |
+
"the PRO plan to unlock all these awesome features."
|
3183 |
+
msgstr ""
|
3184 |
+
"Жаль, расширение %name% не доступно на вашем плане.<br><br>Выполните "
|
3185 |
+
"обновление до PRO плана, чтобы разблокировать все эти потрясающие "
|
3186 |
+
"возможности."
|
3187 |
+
|
3188 |
+
#: pro/includes/admin/ajax-actions.php:24
|
3189 |
+
msgid "Addon deactivated."
|
3190 |
+
msgstr "Расширение деактивировано."
|
3191 |
+
|
3192 |
+
#: pro/includes/admin/ajax-actions.php:26
|
3193 |
+
msgid "Could not deactivate addon. Please deacticate from the Plugins page."
|
3194 |
+
msgstr ""
|
3195 |
+
"Во время деактивации расширения произошла ошибка. Пожалуйста, деактивируйте "
|
3196 |
+
"его на странице плагинов."
|
3197 |
+
|
3198 |
+
#: pro/includes/admin/ajax-actions.php:47
|
3199 |
+
msgid "Addon activated."
|
3200 |
+
msgstr "Расширение активировано."
|
3201 |
+
|
3202 |
+
#: pro/includes/admin/ajax-actions.php:51
|
3203 |
+
msgid "Could not activate addon. Please activate from the Plugins page."
|
3204 |
+
msgstr ""
|
3205 |
+
"Не удалось активировать расширение. Пожалуйста, активируйте на странице "
|
3206 |
+
"плагинов."
|
3207 |
+
|
3208 |
+
#: pro/includes/admin/ajax-actions.php:67
|
3209 |
+
#: pro/includes/admin/ajax-actions.php:86
|
3210 |
+
#: pro/includes/admin/ajax-actions.php:89
|
3211 |
+
#: pro/includes/admin/ajax-actions.php:115
|
3212 |
+
msgid ""
|
3213 |
+
"Could not install addon. Please download from wpforms.com and install "
|
3214 |
+
"manually."
|
3215 |
+
msgstr ""
|
3216 |
+
"Не удалось установить расширение. Пожалуйста, скачайте с сайта wpforms.com и "
|
3217 |
+
"установите вручную."
|
3218 |
+
|
3219 |
+
#: pro/includes/admin/ajax-actions.php:109
|
3220 |
+
msgid "Addon installed."
|
3221 |
+
msgstr "Расширение установлено."
|
3222 |
+
|
3223 |
+
#: pro/includes/admin/ajax-actions.php:225
|
3224 |
+
#: pro/includes/admin/ajax-actions.php:270
|
3225 |
+
msgid "Please enter a license key."
|
3226 |
+
msgstr "Пожалуйста, введите лицензионный ключ."
|
3227 |
+
|
3228 |
+
#: pro/includes/admin/builder/panels/class-payments.php:71
|
3229 |
+
msgid "Install Your Payment Integration"
|
3230 |
+
msgstr "Установите вашу интеграцию с платежами"
|
3231 |
+
|
3232 |
+
#: pro/includes/admin/builder/panels/class-payments.php:72
|
3233 |
+
msgid ""
|
3234 |
+
"It seems you do not have any payment addons activated. You can head over to "
|
3235 |
+
"the <a href=\"%s\">Addons page</a> to install and activate the addon for "
|
3236 |
+
"your payment service."
|
3237 |
+
msgstr ""
|
3238 |
+
"Кажется, у вас нет никаких активированных расширений для платежей. Вы можете "
|
3239 |
+
"перейти на <a href=\"%s\">страницу расширений</a>, чтобы установить и "
|
3240 |
+
"активировать расширения для оплаты."
|
3241 |
+
|
3242 |
+
#: pro/includes/admin/builder/panels/class-payments.php:78
|
3243 |
+
msgid "Select Your Payment Integration"
|
3244 |
+
msgstr "Выберите интеграцию платежей"
|
3245 |
+
|
3246 |
+
#: pro/includes/admin/builder/panels/class-payments.php:79
|
3247 |
+
msgid ""
|
3248 |
+
"Select your payment provider from the options on the left. If you don't see "
|
3249 |
+
"your payment service listed, then let us know and we'll do our best to get "
|
3250 |
+
"it added as fast as possible."
|
3251 |
+
msgstr ""
|
3252 |
+
"Выберите платежного провайдера из вариантов слева. Если вы не видите вашего "
|
3253 |
+
"платежного оператора, то дайте нам знать и мы сделаем все возможное, чтобы "
|
3254 |
+
"добавить его как можно быстрее."
|
3255 |
+
|
3256 |
+
#: pro/includes/admin/class-addons.php:84
|
3257 |
+
msgid "Refresh Addons"
|
3258 |
+
msgstr "Обновить список расширений"
|
3259 |
+
|
3260 |
+
#: pro/includes/admin/class-addons.php:90
|
3261 |
+
msgid ""
|
3262 |
+
"There was an issue retrieving the addons for this site. Please click on the "
|
3263 |
+
"button above the refresh the addons data."
|
3264 |
+
msgstr ""
|
3265 |
+
"Во время получения расширений для этого сайта произошла ошибка. Пожалуйста, "
|
3266 |
+
"нажмите кнопку выше для обновления данных о расширениях."
|
3267 |
+
|
3268 |
+
#: pro/includes/admin/class-addons.php:96
|
3269 |
+
msgid ""
|
3270 |
+
"In order to get access to Addons, you need to resolve your license key "
|
3271 |
+
"errors."
|
3272 |
+
msgstr ""
|
3273 |
+
"Чтобы получить доступ к расширениям, вам необходимо решить проблемы с "
|
3274 |
+
"лицензионным ключом."
|
3275 |
+
|
3276 |
+
#: pro/includes/admin/class-addons.php:102
|
3277 |
+
msgid ""
|
3278 |
+
"In order to get access to Addons, you need to verify your license key for "
|
3279 |
+
"WPForms."
|
3280 |
+
msgstr ""
|
3281 |
+
"Чтобы получить доступ к расширениям, вам необходимо верифицировать "
|
3282 |
+
"лицензионный ключ для WPForms."
|
3283 |
+
|
3284 |
+
#: pro/includes/admin/class-addons.php:110
|
3285 |
+
msgid "Addons have successfully been refreshed."
|
3286 |
+
msgstr "Расширения успешно обновлены."
|
3287 |
+
|
3288 |
+
#: pro/includes/admin/class-addons.php:118
|
3289 |
+
msgid ""
|
3290 |
+
"Improve your forms with our premium addons. Missing an addon that you think "
|
3291 |
+
"you should be able to see? Click the <a href=\"%s\">Refresh Addons</a> "
|
3292 |
+
"button above."
|
3293 |
+
msgstr ""
|
3294 |
+
"Улучшите свои формы с помощью наших премиальных расширений. Отсутствует "
|
3295 |
+
"расширение, которое, по вашему мнению, вы должны увидеть? Нажмите кнопку <a "
|
3296 |
+
"href=\"%s\">Обновить список расширений</a> выше."
|
3297 |
+
|
3298 |
+
#: pro/includes/admin/class-addons.php:121
|
3299 |
+
msgid "Available Addons"
|
3300 |
+
msgstr "Доступные расширения"
|
3301 |
+
|
3302 |
+
#: pro/includes/admin/class-addons.php:166
|
3303 |
+
msgid "Unlock More Features..."
|
3304 |
+
msgstr "Открыть больше возможностей..."
|
3305 |
+
|
3306 |
+
#: pro/includes/admin/class-addons.php:167
|
3307 |
+
msgid ""
|
3308 |
+
"Want to get even more features? <a href=\"%s\" target=\"_blank\" rel="
|
3309 |
+
"\"noopener noreferrer\">Upgrade your WPForms account</a> and unlock the "
|
3310 |
+
"following extensions."
|
3311 |
+
msgstr ""
|
3312 |
+
"Хотите получить еще больше функций? <a href=\"%s\" target=\"_blank\" rel="
|
3313 |
+
"\"noopener noreferrer\">Обновите учетную запись WPForms</a> и разблокируйте "
|
3314 |
+
"следующие расширения."
|
3315 |
+
|
3316 |
+
#: pro/includes/admin/class-addons.php:201
|
3317 |
+
msgid "Not Installed"
|
3318 |
+
msgstr "Не установлено"
|
3319 |
+
|
3320 |
+
#: pro/includes/admin/class-addons.php:225
|
3321 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:162
|
3322 |
+
msgid "Status"
|
3323 |
+
msgstr "Статус"
|
3324 |
+
|
3325 |
+
#: pro/includes/admin/class-license.php:93
|
3326 |
+
#: pro/includes/admin/class-license.php:181
|
3327 |
+
#: pro/includes/admin/class-license.php:270
|
3328 |
+
msgid ""
|
3329 |
+
"There was an error connecting to the remote key API. Please try again later."
|
3330 |
+
msgstr "Ошибка подключения по ключу API. Пожалуйста, повторите попытку позже."
|
3331 |
+
|
3332 |
+
#: pro/includes/admin/class-license.php:112
|
3333 |
+
msgid "Congratulations! This site is now receiving automatic updates."
|
3334 |
+
msgstr "Поздравляем! Этот сайт теперь получает автоматические обновления."
|
3335 |
+
|
3336 |
+
#: pro/includes/admin/class-license.php:200
|
3337 |
+
#: pro/includes/admin/class-license.php:354
|
3338 |
+
msgid ""
|
3339 |
+
"Your license key for WPForms is invalid. The key no longer exists or the "
|
3340 |
+
"user associated with the key has been deleted. Please use a different key to "
|
3341 |
+
"continue receiving automatic updates."
|
3342 |
+
msgstr ""
|
3343 |
+
"Ваш лицензионный ключ для WPForms недействителен. Ключ больше не существует "
|
3344 |
+
"или был удален пользователем, связанным с ключом. Пожалуйста, используйте "
|
3345 |
+
"другой ключ, чтобы продолжить получать автоматические обновления."
|
3346 |
+
|
3347 |
+
#: pro/includes/admin/class-license.php:213
|
3348 |
+
msgid ""
|
3349 |
+
"Your license key for WPForms has expired. Please renew your license key on "
|
3350 |
+
"WPForms.com to continue receiving automatic updates."
|
3351 |
+
msgstr ""
|
3352 |
+
"Срок действия вашего лицензионного ключа для WPForms истек. Обновите "
|
3353 |
+
"лицензионный ключ на WPForms.com, чтобы продолжить получать автоматические "
|
3354 |
+
"обновления."
|
3355 |
+
|
3356 |
+
#: pro/includes/admin/class-license.php:226
|
3357 |
+
#: pro/includes/admin/class-license.php:345
|
3358 |
+
msgid ""
|
3359 |
+
"Your license key for WPForms has been disabled. Please use a different key "
|
3360 |
+
"to continue receiving automatic updates."
|
3361 |
+
msgstr ""
|
3362 |
+
"Ваш лицензионный ключ для WPForms был отключен. Пожалуйста, используйте "
|
3363 |
+
"другой ключ, чтобы продолжить получать автоматические обновления."
|
3364 |
+
|
3365 |
+
#: pro/includes/admin/class-license.php:241
|
3366 |
+
msgid "Your key has been refreshed successfully."
|
3367 |
+
msgstr "Ваш ключ был успешно обновлен."
|
3368 |
+
|
3369 |
+
#: pro/includes/admin/class-license.php:290
|
3370 |
+
msgid "You have deactivated the key from this site successfully."
|
3371 |
+
msgstr "Вы успешно отключили ключ этого сайта."
|
3372 |
+
|
3373 |
+
#: pro/includes/admin/class-license.php:327
|
3374 |
+
msgid ""
|
3375 |
+
"Please <a href=\"%s\">enter and activate</a> your license key for WPForms to "
|
3376 |
+
"enable automatic updates."
|
3377 |
+
msgstr ""
|
3378 |
+
"Пожалуйста, <a href=\"%s\">введите и активируйте</a> ваш лицензионный ключ "
|
3379 |
+
"WPForms для включения автоматического обновления."
|
3380 |
+
|
3381 |
+
#: pro/includes/admin/class-license.php:336
|
3382 |
+
msgid ""
|
3383 |
+
"Your license key for WPForms has expired. <a href=\"%s\" target=\"_blank\" "
|
3384 |
+
"rel=\"noopener\">Please click here to renew your license key and continue "
|
3385 |
+
"receiving automatic updates.</a>"
|
3386 |
+
msgstr ""
|
3387 |
+
"Истек срок действия лицензионного ключа для WPForms. <a href=\"%s\" target="
|
3388 |
+
"\"_blank\" rel=\"noopener\">Пожалуйста, нажмите здесь, чтобы обновить ваш "
|
3389 |
+
"лицензионный ключ и продолжить получать автоматические обновления.</a>"
|
3390 |
+
|
3391 |
+
#: pro/includes/admin/entries/class-entries-export.php:204
|
3392 |
+
msgid "Date GMT"
|
3393 |
+
msgstr "Дата GMT"
|
3394 |
+
|
3395 |
+
#: pro/includes/admin/entries/class-entries-export.php:205
|
3396 |
+
msgid "ID"
|
3397 |
+
msgstr "ID"
|
3398 |
+
|
3399 |
+
#: pro/includes/admin/entries/class-entries-export.php:339
|
3400 |
+
msgid "You do not have permission to export entries."
|
3401 |
+
msgstr "У вас недостаточно прав для экспорта записей."
|
3402 |
+
|
3403 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:129
|
3404 |
+
msgid "All"
|
3405 |
+
msgstr "Все"
|
3406 |
+
|
3407 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:130
|
3408 |
+
msgid "Unread"
|
3409 |
+
msgstr "Непрочитанные"
|
3410 |
+
|
3411 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:131
|
3412 |
+
msgid "Starred"
|
3413 |
+
msgstr "Отмечено"
|
3414 |
+
|
3415 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:156
|
3416 |
+
#: pro/includes/fields/class-payment-total.php:21
|
3417 |
+
msgid "Total"
|
3418 |
+
msgstr "Всего"
|
3419 |
+
|
3420 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:167
|
3421 |
+
#: pro/includes/admin/entries/class-entries-single.php:1019
|
3422 |
+
msgid "Actions"
|
3423 |
+
msgstr "Действия"
|
3424 |
+
|
3425 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:168
|
3426 |
+
msgid "Change columns to display"
|
3427 |
+
msgstr "Изменить колонки для отображения"
|
3428 |
+
|
3429 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:318
|
3430 |
+
#: pro/includes/admin/entries/class-entries-single.php:833
|
3431 |
+
msgid "Unknown"
|
3432 |
+
msgstr "Неизвестно"
|
3433 |
+
|
3434 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:325
|
3435 |
+
#: pro/includes/admin/entries/class-entries-single.php:776
|
3436 |
+
msgid "Completed"
|
3437 |
+
msgstr "Завершенный"
|
3438 |
+
|
3439 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:399
|
3440 |
+
msgid "View Form Entry"
|
3441 |
+
msgstr "Просмотреть запись формы"
|
3442 |
+
|
3443 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:400
|
3444 |
+
msgid "View"
|
3445 |
+
msgstr "Просмотр"
|
3446 |
+
|
3447 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:417
|
3448 |
+
msgid "Delete Form Entry"
|
3449 |
+
msgstr "Удалить запись формы"
|
3450 |
+
|
3451 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:434
|
3452 |
+
msgid "Mark Read"
|
3453 |
+
msgstr "Отметить прочитанным"
|
3454 |
+
|
3455 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:435
|
3456 |
+
#: pro/includes/admin/entries/class-entries-single.php:1003
|
3457 |
+
msgid "Mark Unread"
|
3458 |
+
msgstr "Отметить непрочитанным"
|
3459 |
+
|
3460 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:436
|
3461 |
+
#: pro/includes/admin/entries/class-entries-single.php:968
|
3462 |
+
msgid "Star"
|
3463 |
+
msgstr "Поставить отметку"
|
3464 |
+
|
3465 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:437
|
3466 |
+
#: pro/includes/admin/entries/class-entries-single.php:968
|
3467 |
+
msgid "Unstar"
|
3468 |
+
msgstr "Удалить отметку"
|
3469 |
+
|
3470 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:438
|
3471 |
+
msgid "----------"
|
3472 |
+
msgstr "----------"
|
3473 |
+
|
3474 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:496
|
3475 |
+
msgid "Entry was successfully marked as read."
|
3476 |
+
msgstr "Запись была успешно помечена как прочитанная."
|
3477 |
+
|
3478 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:498
|
3479 |
+
msgid "Entries were successfully marked as read."
|
3480 |
+
msgstr "Запись были успешно помечены как прочитанные."
|
3481 |
+
|
3482 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:522
|
3483 |
+
msgid "Entry was successfully marked as unread."
|
3484 |
+
msgstr "Запись была успешно помечена как непрочитанная."
|
3485 |
+
|
3486 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:524
|
3487 |
+
msgid "Entries were successfully marked as unread."
|
3488 |
+
msgstr "Записи были успешно помечены как непрочитанные."
|
3489 |
+
|
3490 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:548
|
3491 |
+
msgid "Entry was successfully starred."
|
3492 |
+
msgstr "Запись была успешно отмечена."
|
3493 |
+
|
3494 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:550
|
3495 |
+
msgid "Entries were successfully starred."
|
3496 |
+
msgstr "Запись были успешно отмечены."
|
3497 |
+
|
3498 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:574
|
3499 |
+
msgid "Entry was successfully unstarred."
|
3500 |
+
msgstr "Отметка к записи была успешно убрана."
|
3501 |
+
|
3502 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:576
|
3503 |
+
msgid "Entries were successfully unstarred."
|
3504 |
+
msgstr "С записей была успешно снята отметка."
|
3505 |
+
|
3506 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:595
|
3507 |
+
msgid "Entry was successfully deleted."
|
3508 |
+
msgstr "Запись была успешно удалена."
|
3509 |
+
|
3510 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:597
|
3511 |
+
msgid "Entries were successfully deleted."
|
3512 |
+
msgstr "Записи были успешно удалены."
|
3513 |
+
|
3514 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:613
|
3515 |
+
msgid "Whoops, it appears you do not have any form entries yet."
|
3516 |
+
msgstr "К сожалению, у вас нет никаких записей для формы."
|
3517 |
+
|
3518 |
+
#: pro/includes/admin/entries/class-entries-list.php:142
|
3519 |
+
msgid "Number of entries per page:"
|
3520 |
+
msgstr "Количество записей на странице:"
|
3521 |
+
|
3522 |
+
#: pro/includes/admin/entries/class-entries-list.php:226
|
3523 |
+
msgid "All entries marked as read."
|
3524 |
+
msgstr "Все записи помечены как прочитанные."
|
3525 |
+
|
3526 |
+
#: pro/includes/admin/entries/class-entries-list.php:283
|
3527 |
+
msgid "All entries for the currently selected form were successfully deleted."
|
3528 |
+
msgstr "Все записи для выбранной формы были успешно удалены."
|
3529 |
+
|
3530 |
+
#: pro/includes/admin/entries/class-entries-list.php:386
|
3531 |
+
msgid "Select the fields to show when viewing the entries list for this form."
|
3532 |
+
msgstr ""
|
3533 |
+
"Выберите поля, которые будут отображаться при просмотре списка записей для "
|
3534 |
+
"этой формы."
|
3535 |
+
|
3536 |
+
#: pro/includes/admin/entries/class-entries-list.php:388
|
3537 |
+
msgid ""
|
3538 |
+
"Currently columns have not been configured, so we're showing the first 3 "
|
3539 |
+
"fields."
|
3540 |
+
msgstr ""
|
3541 |
+
"В настоящее время столбцы не настроены, поэтому мы показываем первые 3 поля."
|
3542 |
+
|
3543 |
+
#: pro/includes/admin/entries/class-entries-list.php:492
|
3544 |
+
msgid "Select Form"
|
3545 |
+
msgstr "Выберите форму"
|
3546 |
+
|
3547 |
+
#: pro/includes/admin/entries/class-entries-list.php:498
|
3548 |
+
msgid "Open form selector"
|
3549 |
+
msgstr "Открыть переключатель форм"
|
3550 |
+
|
3551 |
+
#: pro/includes/admin/entries/class-entries-list.php:523
|
3552 |
+
msgid "Edit This Form"
|
3553 |
+
msgstr "Редактировать форму"
|
3554 |
+
|
3555 |
+
#: pro/includes/admin/entries/class-entries-list.php:533
|
3556 |
+
msgid "Download Export (CSV)"
|
3557 |
+
msgstr "Экспорт (CSV)"
|
3558 |
+
|
3559 |
+
#: pro/includes/admin/entries/class-entries-list.php:538
|
3560 |
+
msgid "Mark All Read"
|
3561 |
+
msgstr "Отметить все прочитанным"
|
3562 |
+
|
3563 |
+
#: pro/includes/admin/entries/class-entries-list.php:543
|
3564 |
+
msgid "Delete All"
|
3565 |
+
msgstr "Удалить все"
|
3566 |
+
|
3567 |
+
#: pro/includes/admin/entries/class-entries-single.php:164
|
3568 |
+
msgid "This entry has been starred."
|
3569 |
+
msgstr "Эта запись была отмечена."
|
3570 |
+
|
3571 |
+
#: pro/includes/admin/entries/class-entries-single.php:181
|
3572 |
+
msgid "This entry has been unstarred."
|
3573 |
+
msgstr "С этой записи была снята отметка."
|
3574 |
+
|
3575 |
+
#: pro/includes/admin/entries/class-entries-single.php:214
|
3576 |
+
msgid "This entry has been marked unread."
|
3577 |
+
msgstr "Эта запись была помечена непрочитанной."
|
3578 |
+
|
3579 |
+
#: pro/includes/admin/entries/class-entries-single.php:241
|
3580 |
+
msgid "Note deleted."
|
3581 |
+
msgstr "Заметка удалена."
|
3582 |
+
|
3583 |
+
#: pro/includes/admin/entries/class-entries-single.php:277
|
3584 |
+
msgid "Note added."
|
3585 |
+
msgstr "Заметка добавлена."
|
3586 |
+
|
3587 |
+
#: pro/includes/admin/entries/class-entries-single.php:311
|
3588 |
+
msgid "Notifications sent!"
|
3589 |
+
msgstr "Уведомления отправлены!"
|
3590 |
+
|
3591 |
+
#: pro/includes/admin/entries/class-entries-single.php:329
|
3592 |
+
msgid "Invalid entry ID."
|
3593 |
+
msgstr "Неверный ID записи."
|
3594 |
+
|
3595 |
+
#: pro/includes/admin/entries/class-entries-single.php:342
|
3596 |
+
msgid "Entry not found."
|
3597 |
+
msgstr "Запись не найдена."
|
3598 |
+
|
3599 |
+
#: pro/includes/admin/entries/class-entries-single.php:355
|
3600 |
+
msgid "Form not found."
|
3601 |
+
msgstr "Форма не найдена."
|
3602 |
+
|
3603 |
+
#: pro/includes/admin/entries/class-entries-single.php:439
|
3604 |
+
msgid "View Entry"
|
3605 |
+
msgstr "Просмотреть запись"
|
3606 |
+
|
3607 |
+
#: pro/includes/admin/entries/class-entries-single.php:441
|
3608 |
+
msgid "Back to All Entries"
|
3609 |
+
msgstr "Назад ко всем записям формы"
|
3610 |
+
|
3611 |
+
#: pro/includes/admin/entries/class-entries-single.php:445
|
3612 |
+
msgid "Entry %1$s of %2$s"
|
3613 |
+
msgstr "Запись %1$s из %2$s"
|
3614 |
+
|
3615 |
+
#: pro/includes/admin/entries/class-entries-single.php:448
|
3616 |
+
msgid "Previous form entry"
|
3617 |
+
msgstr "Предыдущая запись формы"
|
3618 |
+
|
3619 |
+
#: pro/includes/admin/entries/class-entries-single.php:452
|
3620 |
+
msgid "Current form entry"
|
3621 |
+
msgstr "Текущая запись формы"
|
3622 |
+
|
3623 |
+
#: pro/includes/admin/entries/class-entries-single.php:454
|
3624 |
+
msgid "Next form entry"
|
3625 |
+
msgstr "Следующая запись формы"
|
3626 |
+
|
3627 |
+
#: pro/includes/admin/entries/class-entries-single.php:585
|
3628 |
+
#: pro/includes/admin/entries/class-entries-single.php:600
|
3629 |
+
msgid "Add Note"
|
3630 |
+
msgstr "Добавить заметку"
|
3631 |
+
|
3632 |
+
#: pro/includes/admin/entries/class-entries-single.php:609
|
3633 |
+
msgid "No notes."
|
3634 |
+
msgstr "Нет заметок."
|
3635 |
+
|
3636 |
+
#. translators: %1$s - user link; %2$s - date; %3$s - separator; %4$s - link to
|
3637 |
+
#. delete a note
|
3638 |
+
#: pro/includes/admin/entries/class-entries-single.php:646
|
3639 |
+
msgid "Added by %1$s on %2$s %3$s %4$s"
|
3640 |
+
msgstr "Добавил(а) %1$s %2$s %3$s %4$s"
|
3641 |
+
|
3642 |
+
#: pro/includes/admin/entries/class-entries-single.php:650
|
3643 |
+
msgctxt "Entry: note"
|
3644 |
+
msgid "Delete"
|
3645 |
+
msgstr "Удалить"
|
3646 |
+
|
3647 |
+
#: pro/includes/admin/entries/class-entries-single.php:688
|
3648 |
+
msgid "Debug Information"
|
3649 |
+
msgstr "Отладочная информация"
|
3650 |
+
|
3651 |
+
#: pro/includes/admin/entries/class-entries-single.php:717
|
3652 |
+
msgid "Entry Details"
|
3653 |
+
msgstr "Детали записи"
|
3654 |
+
|
3655 |
+
#: pro/includes/admin/entries/class-entries-single.php:726
|
3656 |
+
msgid "Entry ID:"
|
3657 |
+
msgstr "ID записи:"
|
3658 |
+
|
3659 |
+
#: pro/includes/admin/entries/class-entries-single.php:732
|
3660 |
+
msgid "Submitted:"
|
3661 |
+
msgstr "Отправлено:"
|
3662 |
+
|
3663 |
+
#: pro/includes/admin/entries/class-entries-single.php:739
|
3664 |
+
msgid "Modified:"
|
3665 |
+
msgstr "Изменено:"
|
3666 |
+
|
3667 |
+
#: pro/includes/admin/entries/class-entries-single.php:740
|
3668 |
+
msgid "M j, Y @ H:i"
|
3669 |
+
msgstr "M j, Y @ H:i"
|
3670 |
+
|
3671 |
+
#: pro/includes/admin/entries/class-entries-single.php:748
|
3672 |
+
msgid "User:"
|
3673 |
+
msgstr "Пользователь:"
|
3674 |
+
|
3675 |
+
#: pro/includes/admin/entries/class-entries-single.php:767
|
3676 |
+
msgid "User IP:"
|
3677 |
+
msgstr "IP пользователя:"
|
3678 |
+
|
3679 |
+
#: pro/includes/admin/entries/class-entries-single.php:775
|
3680 |
+
msgid "Status:"
|
3681 |
+
msgstr "Статус:"
|
3682 |
+
|
3683 |
+
#: pro/includes/admin/entries/class-entries-single.php:801
|
3684 |
+
msgid "Delete Entry"
|
3685 |
+
msgstr "Удалить эту запись"
|
3686 |
+
|
3687 |
+
#: pro/includes/admin/entries/class-entries-single.php:849
|
3688 |
+
msgid "PayPal Standard"
|
3689 |
+
msgstr "PayPal Стандарт"
|
3690 |
+
|
3691 |
+
#: pro/includes/admin/entries/class-entries-single.php:862
|
3692 |
+
msgid "Payment Details"
|
3693 |
+
msgstr "Детали оплаты"
|
3694 |
+
|
3695 |
+
#: pro/includes/admin/entries/class-entries-single.php:870
|
3696 |
+
msgid "Status: %s"
|
3697 |
+
msgstr "Статус: %s"
|
3698 |
+
|
3699 |
+
#: pro/includes/admin/entries/class-entries-single.php:874
|
3700 |
+
msgid "Total: %s"
|
3701 |
+
msgstr "Итого: %s"
|
3702 |
+
|
3703 |
+
#: pro/includes/admin/entries/class-entries-single.php:879
|
3704 |
+
msgid "Gateway: %s"
|
3705 |
+
msgstr "Шлюз: %s"
|
3706 |
+
|
3707 |
+
#: pro/includes/admin/entries/class-entries-single.php:881
|
3708 |
+
msgctxt "Gateway mode"
|
3709 |
+
msgid "Test"
|
3710 |
+
msgstr "Тест"
|
3711 |
+
|
3712 |
+
#: pro/includes/admin/entries/class-entries-single.php:887
|
3713 |
+
msgid "Transaction ID:"
|
3714 |
+
msgstr "ID операции:"
|
3715 |
+
|
3716 |
+
#: pro/includes/admin/entries/class-entries-single.php:892
|
3717 |
+
msgid "Note:"
|
3718 |
+
msgstr "Заметка:"
|
3719 |
+
|
3720 |
+
#: pro/includes/admin/entries/class-entries-single.php:992
|
3721 |
+
msgid "Export (CSV)"
|
3722 |
+
msgstr "Экспорт (CSV)"
|
3723 |
+
|
3724 |
+
#: pro/includes/admin/entries/class-entries-single.php:997
|
3725 |
+
msgid "Resend Notifications"
|
3726 |
+
msgstr "Повторно отправить уведомления"
|
3727 |
+
|
3728 |
+
#: pro/includes/admin/entries/class-entries-single.php:1068
|
3729 |
+
msgid "Related Entries"
|
3730 |
+
msgstr "Связанные записи"
|
3731 |
+
|
3732 |
+
#: pro/includes/admin/entries/class-entries-single.php:1073
|
3733 |
+
msgid "The user who created this entry also submitted the entries below."
|
3734 |
+
msgstr "Пользователь, создавший эту запись, также отправил следующие."
|
3735 |
+
|
3736 |
+
#: pro/includes/admin/entries/class-entries-single.php:1088
|
3737 |
+
msgid "(Abandoned)"
|
3738 |
+
msgstr "(Заброшено)"
|
3739 |
+
|
3740 |
+
#: pro/includes/class-conditional-logic-fields.php:95
|
3741 |
+
msgid "Conditionals"
|
3742 |
+
msgstr "Условные операторы"
|
3743 |
+
|
3744 |
+
#: pro/includes/class-conditional-logic-fields.php:364
|
3745 |
+
msgid "Entry Notification stopped by conditional logic."
|
3746 |
+
msgstr "Уведомление о записи было отменено условной логикой."
|
3747 |
+
|
3748 |
+
#: pro/includes/fields/class-address.php:29
|
3749 |
+
#: pro/includes/templates/class-order.php:58
|
3750 |
+
msgid "Address"
|
3751 |
+
msgstr "Адрес"
|
3752 |
+
|
3753 |
+
#: pro/includes/fields/class-address.php:38
|
3754 |
+
#: pro/includes/fields/class-phone.php:90
|
3755 |
+
msgid "US"
|
3756 |
+
msgstr "США"
|
3757 |
+
|
3758 |
+
#: pro/includes/fields/class-address.php:39
|
3759 |
+
#: pro/includes/fields/class-address.php:48
|
3760 |
+
#: pro/includes/fields/class-address.php:321
|
3761 |
+
msgid "Address Line 1"
|
3762 |
+
msgstr "Адресная строка 1"
|
3763 |
+
|
3764 |
+
#: pro/includes/fields/class-address.php:40
|
3765 |
+
#: pro/includes/fields/class-address.php:49
|
3766 |
+
#: pro/includes/fields/class-address.php:340
|
3767 |
+
msgid "Address Line 2"
|
3768 |
+
msgstr "Адресная строка 2"
|
3769 |
+
|
3770 |
+
#: pro/includes/fields/class-address.php:41
|
3771 |
+
#: pro/includes/fields/class-address.php:50
|
3772 |
+
#: pro/includes/fields/class-address.php:361
|
3773 |
+
msgid "City"
|
3774 |
+
msgstr "Город"
|
3775 |
+
|
3776 |
+
#: pro/includes/fields/class-address.php:42
|
3777 |
+
msgid "Zip Code"
|
3778 |
+
msgstr "Почтовый индекс"
|
3779 |
+
|
3780 |
+
#: pro/includes/fields/class-address.php:43
|
3781 |
+
msgid "State"
|
3782 |
+
msgstr "Штат"
|
3783 |
+
|
3784 |
+
#: pro/includes/fields/class-address.php:47
|
3785 |
+
#: pro/includes/fields/class-phone.php:91
|
3786 |
+
msgid "International"
|
3787 |
+
msgstr "Международный"
|
3788 |
+
|
3789 |
+
#: pro/includes/fields/class-address.php:51
|
3790 |
+
msgid "Postal Code"
|
3791 |
+
msgstr "Почтовый индекс"
|
3792 |
+
|
3793 |
+
#: pro/includes/fields/class-address.php:52
|
3794 |
+
#: pro/includes/fields/class-address.php:379
|
3795 |
+
msgid "State / Province / Region"
|
3796 |
+
msgstr "Штат / Провинция / Регион"
|
3797 |
+
|
3798 |
+
#: pro/includes/fields/class-address.php:54
|
3799 |
+
#: pro/includes/fields/class-address.php:423
|
3800 |
+
msgid "Country"
|
3801 |
+
msgstr "Страна"
|
3802 |
+
|
3803 |
+
#: pro/includes/fields/class-address.php:272
|
3804 |
+
msgid "Select scheme format for the address field."
|
3805 |
+
msgstr "Выберите формат адреса для поля Адрес."
|
3806 |
+
|
3807 |
+
#: pro/includes/fields/class-address.php:279
|
3808 |
+
msgid "Scheme"
|
3809 |
+
msgstr "Формат"
|
3810 |
+
|
3811 |
+
#: pro/includes/fields/class-address.php:399
|
3812 |
+
msgid "ZIP / Postal"
|
3813 |
+
msgstr "Почтовый индекс"
|
3814 |
+
|
3815 |
+
#: pro/includes/fields/class-date-time.php:22
|
3816 |
+
msgid "Date / Time"
|
3817 |
+
msgstr "Дата / Время"
|
3818 |
+
|
3819 |
+
#: pro/includes/fields/class-date-time.php:61
|
3820 |
+
msgid "Select format for the date field."
|
3821 |
+
msgstr "Выберите формат для поля даты."
|
3822 |
+
|
3823 |
+
#: pro/includes/fields/class-date-time.php:72
|
3824 |
+
msgid "Date and Time"
|
3825 |
+
msgstr "Дата и время"
|
3826 |
+
|
3827 |
+
#: pro/includes/fields/class-date-time.php:74
|
3828 |
+
#: pro/includes/fields/class-date-time.php:174
|
3829 |
+
#: pro/includes/fields/class-date-time.php:284
|
3830 |
+
#: pro/includes/fields/class-date-time.php:394
|
3831 |
+
msgid "Time"
|
3832 |
+
msgstr "Время"
|
3833 |
+
|
3834 |
+
#: pro/includes/fields/class-date-time.php:131
|
3835 |
+
msgid "Advanced date options."
|
3836 |
+
msgstr "Расширенные параметры даты."
|
3837 |
+
|
3838 |
+
#: pro/includes/fields/class-date-time.php:151
|
3839 |
+
msgid "Date Picker"
|
3840 |
+
msgstr "Выбор даты"
|
3841 |
+
|
3842 |
+
#: pro/includes/fields/class-date-time.php:152
|
3843 |
+
msgid "Date Dropdown"
|
3844 |
+
msgstr "Выпадающий список даты"
|
3845 |
+
|
3846 |
+
#: pro/includes/fields/class-date-time.php:167
|
3847 |
+
msgid "15 minutes"
|
3848 |
+
msgstr "15 минут"
|
3849 |
+
|
3850 |
+
#: pro/includes/fields/class-date-time.php:168
|
3851 |
+
msgid "30 minute"
|
3852 |
+
msgstr "30 минут"
|
3853 |
+
|
3854 |
+
#: pro/includes/fields/class-date-time.php:169
|
3855 |
+
msgid "1 hour"
|
3856 |
+
msgstr "1 час"
|
3857 |
+
|
3858 |
+
#: pro/includes/fields/class-date-time.php:175
|
3859 |
+
msgid "Advanced time options"
|
3860 |
+
msgstr "Дополнительные опции времени"
|
3861 |
+
|
3862 |
+
#: pro/includes/fields/class-date-time.php:195
|
3863 |
+
msgid "Interval"
|
3864 |
+
msgstr "Интервал"
|
3865 |
+
|
3866 |
+
#: pro/includes/fields/class-divider.php:21
|
3867 |
+
msgid "Section Divider"
|
3868 |
+
msgstr "Разделитель секции"
|
3869 |
+
|
3870 |
+
#: pro/includes/fields/class-file-upload.php:29
|
3871 |
+
msgid "File Upload"
|
3872 |
+
msgstr "Загрузка файла"
|
3873 |
+
|
3874 |
+
#: pro/includes/fields/class-file-upload.php:152
|
3875 |
+
msgid "Allowed File Extensions"
|
3876 |
+
msgstr "Разрешенные расширения файлов"
|
3877 |
+
|
3878 |
+
#: pro/includes/fields/class-file-upload.php:153
|
3879 |
+
msgid "Enter the extensions you would like to allow, comma separated."
|
3880 |
+
msgstr "Введите расширения, которые вы хотите разрешить, разделенные запятой."
|
3881 |
+
|
3882 |
+
#: pro/includes/fields/class-file-upload.php:178
|
3883 |
+
msgid "Max File Size"
|
3884 |
+
msgstr "Максимальный размер файла"
|
3885 |
+
|
3886 |
+
#: pro/includes/fields/class-file-upload.php:179
|
3887 |
+
msgid ""
|
3888 |
+
"Enter the max file size, in megabytes, to allow. If left blank, the value "
|
3889 |
+
"defaults to the maximum size the server allows which is %s."
|
3890 |
+
msgstr ""
|
3891 |
+
"Введите максимально разрешенный размер файла, в мегабайтах. Если оставить "
|
3892 |
+
"поле пустым, по умолчанию значение для максимального размера будет %s."
|
3893 |
+
|
3894 |
+
#: pro/includes/fields/class-file-upload.php:227
|
3895 |
+
msgid "Store file in WordPress Media Library"
|
3896 |
+
msgstr "Хранить файл в WordPress медиа библиотеке"
|
3897 |
+
|
3898 |
+
#: pro/includes/fields/class-file-upload.php:228
|
3899 |
+
msgid ""
|
3900 |
+
"Check this option to store the final uploaded file in the WordPress Media "
|
3901 |
+
"Library"
|
3902 |
+
msgstr ""
|
3903 |
+
"Установите этот флажок для сохранения загруженного файла в библиотеке "
|
3904 |
+
"WordPress Media"
|
3905 |
+
|
3906 |
+
#: pro/includes/fields/class-file-upload.php:314
|
3907 |
+
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini."
|
3908 |
+
msgstr ""
|
3909 |
+
"Загруженный файл превышает директиву upload_max_filesize, заданную в php.ini."
|
3910 |
+
|
3911 |
+
#: pro/includes/fields/class-file-upload.php:315
|
3912 |
+
msgid ""
|
3913 |
+
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
|
3914 |
+
"the HTML form."
|
3915 |
+
msgstr ""
|
3916 |
+
"Загруженный файл превышает директиву MAX_FILE_SIZE, заданную в HTML форме."
|
3917 |
+
|
3918 |
+
#: pro/includes/fields/class-file-upload.php:316
|
3919 |
+
msgid "The uploaded file was only partially uploaded."
|
3920 |
+
msgstr "Загружаемый файл был загружен лишь частично."
|
3921 |
+
|
3922 |
+
#: pro/includes/fields/class-file-upload.php:317
|
3923 |
+
msgid "No file was uploaded."
|
3924 |
+
msgstr "Файл не был загружен."
|
3925 |
+
|
3926 |
+
#: pro/includes/fields/class-file-upload.php:319
|
3927 |
+
msgid "Missing a temporary folder."
|
3928 |
+
msgstr "Отсутствует временная папка."
|
3929 |
+
|
3930 |
+
#: pro/includes/fields/class-file-upload.php:320
|
3931 |
+
msgid "Failed to write file to disk."
|
3932 |
+
msgstr "Не удалось записать файл на диск."
|
3933 |
+
|
3934 |
+
#: pro/includes/fields/class-file-upload.php:321
|
3935 |
+
msgid "File upload stopped by extension."
|
3936 |
+
msgstr "Расширение файла остановило его загрузку."
|
3937 |
+
|
3938 |
+
#: pro/includes/fields/class-file-upload.php:323
|
3939 |
+
msgid "File upload error. %s"
|
3940 |
+
msgstr "Ошибка во время загрузки файла. %s"
|
3941 |
+
|
3942 |
+
#: pro/includes/fields/class-file-upload.php:342
|
3943 |
+
msgid "File exceeds max size allowed"
|
3944 |
+
msgstr "Размер файла превышает максимально разрешенный размер"
|
3945 |
+
|
3946 |
+
#: pro/includes/fields/class-file-upload.php:358
|
3947 |
+
msgid "File must have an extension."
|
3948 |
+
msgstr "Файл должен иметь расширение."
|
3949 |
+
|
3950 |
+
#: pro/includes/fields/class-hidden.php:21
|
3951 |
+
msgid "Hidden Field"
|
3952 |
+
msgstr "Скрытое поле"
|
3953 |
+
|
3954 |
+
#: pro/includes/fields/class-html.php:21
|
3955 |
+
msgid "HTML"
|
3956 |
+
msgstr "HTML"
|
3957 |
+
|
3958 |
+
#: pro/includes/fields/class-html.php:116
|
3959 |
+
msgid "HTML / Code Block"
|
3960 |
+
msgstr "Блок для HTML кода"
|
3961 |
+
|
3962 |
+
#: pro/includes/fields/class-html.php:117
|
3963 |
+
msgid "Contents of this field are not displayed in the admin area."
|
3964 |
+
msgstr "Содержимое этого поля не отображается в области администратора."
|
3965 |
+
|
3966 |
+
#: pro/includes/fields/class-page-break.php:25
|
3967 |
+
#: pro/includes/fields/class-page-break.php:528
|
3968 |
+
msgid "Page Break"
|
3969 |
+
msgstr "Разрыв страницы"
|
3970 |
+
|
3971 |
+
#. translators: %1$s - current step in multi-page form; %2$d - total number of
|
3972 |
+
#. pages.
|
3973 |
+
#: pro/includes/fields/class-page-break.php:145
|
3974 |
+
msgid "Step %1$s of %2$d"
|
3975 |
+
msgstr "Шаг %1$s из %2$d"
|
3976 |
+
|
3977 |
+
#: pro/includes/fields/class-page-break.php:284
|
3978 |
+
msgid "Progress Bar"
|
3979 |
+
msgstr "Индикатор Полоса"
|
3980 |
+
|
3981 |
+
#: pro/includes/fields/class-page-break.php:285
|
3982 |
+
msgid "Circles"
|
3983 |
+
msgstr "Круги"
|
3984 |
+
|
3985 |
+
#: pro/includes/fields/class-page-break.php:286
|
3986 |
+
msgid "Connector"
|
3987 |
+
msgstr "Коннектор"
|
3988 |
+
|
3989 |
+
#: pro/includes/fields/class-page-break.php:287
|
3990 |
+
msgid "None"
|
3991 |
+
msgstr "Отсутствует"
|
3992 |
+
|
3993 |
+
#: pro/includes/fields/class-page-break.php:294
|
3994 |
+
msgid "Progress Indicator"
|
3995 |
+
msgstr "Индикатор заполнения"
|
3996 |
+
|
3997 |
+
#: pro/includes/fields/class-page-break.php:295
|
3998 |
+
msgid ""
|
3999 |
+
"Select theme for Page Indicator which is displayed at the top of the form."
|
4000 |
+
msgstr ""
|
4001 |
+
"Выберите тему для индикатора страницы, который отображается в верхней части "
|
4002 |
+
"формы."
|
4003 |
+
|
4004 |
+
#: pro/includes/fields/class-page-break.php:320
|
4005 |
+
msgid "Page Indicator Color"
|
4006 |
+
msgstr "Цвет индикатора страницы"
|
4007 |
+
|
4008 |
+
#: pro/includes/fields/class-page-break.php:321
|
4009 |
+
msgid "Select the primary color for the Page Indicator theme."
|
4010 |
+
msgstr "Выберите основной цвет для индикатора страницы."
|
4011 |
+
|
4012 |
+
#: pro/includes/fields/class-page-break.php:349
|
4013 |
+
msgid "Page Title"
|
4014 |
+
msgstr "Заголовок страницы"
|
4015 |
+
|
4016 |
+
#: pro/includes/fields/class-page-break.php:350
|
4017 |
+
msgid "Enter text for the page title."
|
4018 |
+
msgstr "Введите текст заголовка страницы."
|
4019 |
+
|
4020 |
+
#: pro/includes/fields/class-page-break.php:376
|
4021 |
+
msgid "Next Label"
|
4022 |
+
msgstr "Следующий ярлык"
|
4023 |
+
|
4024 |
+
#: pro/includes/fields/class-page-break.php:377
|
4025 |
+
msgid "Enter text for Next page navigation button."
|
4026 |
+
msgstr "Введите текст для кнопки Следующая страница."
|
4027 |
+
|
4028 |
+
#: pro/includes/fields/class-page-break.php:386
|
4029 |
+
#: pro/includes/fields/class-page-break.php:523
|
4030 |
+
msgid "Next"
|
4031 |
+
msgstr "Следующий"
|
4032 |
+
|
4033 |
+
#: pro/includes/fields/class-page-break.php:405
|
4034 |
+
msgid "Display Previous"
|
4035 |
+
msgstr "Показать предыдущее"
|
4036 |
+
|
4037 |
+
#: pro/includes/fields/class-page-break.php:406
|
4038 |
+
msgid "Toggle displaying the Previous page navigation button."
|
4039 |
+
msgstr "Переключатель отображения кнопки навигации Предыдущая страница."
|
4040 |
+
|
4041 |
+
#: pro/includes/fields/class-page-break.php:430
|
4042 |
+
msgid "Previous Label"
|
4043 |
+
msgstr "Предыдущий ярлык"
|
4044 |
+
|
4045 |
+
#: pro/includes/fields/class-page-break.php:431
|
4046 |
+
msgid "Enter text for Previous page navigation button."
|
4047 |
+
msgstr "Введите текст для кнопки Предыдущая страница."
|
4048 |
+
|
4049 |
+
#: pro/includes/fields/class-page-break.php:476
|
4050 |
+
msgid "Page Navigation Alignment"
|
4051 |
+
msgstr "Выравнивание навигации страницы"
|
4052 |
+
|
4053 |
+
#: pro/includes/fields/class-page-break.php:477
|
4054 |
+
msgid "Select the alignment for the Next/Previous page navigation buttons"
|
4055 |
+
msgstr ""
|
4056 |
+
"Выберите выравнивание для кнопок навигации к следующей/предыдущей странице "
|
4057 |
+
"формы"
|
4058 |
+
|
4059 |
+
#: pro/includes/fields/class-page-break.php:487
|
4060 |
+
msgid "Left"
|
4061 |
+
msgstr "Слева"
|
4062 |
+
|
4063 |
+
#: pro/includes/fields/class-page-break.php:488
|
4064 |
+
msgid "Right"
|
4065 |
+
msgstr "Справа"
|
4066 |
+
|
4067 |
+
#: pro/includes/fields/class-page-break.php:489
|
4068 |
+
msgid "Center"
|
4069 |
+
msgstr "По центру"
|
4070 |
+
|
4071 |
+
#: pro/includes/fields/class-page-break.php:490
|
4072 |
+
msgid "Split"
|
4073 |
+
msgstr "Разделить"
|
4074 |
+
|
4075 |
+
#: pro/includes/fields/class-page-break.php:527
|
4076 |
+
msgid "First Page"
|
4077 |
+
msgstr "Первая страница"
|
4078 |
+
|
4079 |
+
#: pro/includes/fields/class-password.php:21
|
4080 |
+
#: pro/includes/fields/class-password.php:66
|
4081 |
+
#: pro/includes/fields/class-password.php:286
|
4082 |
+
msgid "Password"
|
4083 |
+
msgstr "Пароль"
|
4084 |
+
|
4085 |
+
#: pro/includes/fields/class-password.php:89
|
4086 |
+
#: pro/includes/fields/class-password.php:291
|
4087 |
+
msgid "Confirm Password"
|
4088 |
+
msgstr "Подтвердите пароль"
|
4089 |
+
|
4090 |
+
#: pro/includes/fields/class-password.php:188
|
4091 |
+
msgid "Enable Password Confirmation"
|
4092 |
+
msgstr "Включить подтверждение пароля"
|
4093 |
+
|
4094 |
+
#: pro/includes/fields/class-password.php:189
|
4095 |
+
msgid "Check this option to ask users to provide their password twice."
|
4096 |
+
msgstr ""
|
4097 |
+
"Установите этот флажок, чтобы попросить пользователя дважды ввести пароль."
|
4098 |
+
|
4099 |
+
#: pro/includes/fields/class-payment-credit-card.php:21 pro/wpforms-pro.php:215
|
4100 |
+
msgid "Credit Card"
|
4101 |
+
msgstr "Кредитная карта"
|
4102 |
+
|
4103 |
+
#: pro/includes/fields/class-payment-credit-card.php:73
|
4104 |
+
#: pro/includes/fields/class-payment-credit-card.php:300
|
4105 |
+
msgid "Card Number"
|
4106 |
+
msgstr "Номер карты"
|
4107 |
+
|
4108 |
+
#: pro/includes/fields/class-payment-credit-card.php:96
|
4109 |
+
#: pro/includes/fields/class-payment-credit-card.php:305
|
4110 |
+
msgid "Security Code"
|
4111 |
+
msgstr "Код безопасности"
|
4112 |
+
|
4113 |
+
#: pro/includes/fields/class-payment-credit-card.php:117
|
4114 |
+
#: pro/includes/fields/class-payment-credit-card.php:312
|
4115 |
+
msgid "Name on Card"
|
4116 |
+
msgstr "Имя на карте"
|
4117 |
+
|
4118 |
+
#: pro/includes/fields/class-payment-credit-card.php:131
|
4119 |
+
#: pro/includes/fields/class-payment-credit-card.php:317
|
4120 |
+
msgid "Expiration"
|
4121 |
+
msgstr "Срок действия"
|
4122 |
+
|
4123 |
+
#: pro/includes/fields/class-payment-credit-card.php:239
|
4124 |
+
msgid "Card Number Placeholder Text"
|
4125 |
+
msgstr "Вспомогательный текст для Номера карты"
|
4126 |
+
|
4127 |
+
#: pro/includes/fields/class-payment-credit-card.php:248
|
4128 |
+
msgid "Security Code Placeholder Text"
|
4129 |
+
msgstr "Замещающий текст для кода безопасности"
|
4130 |
+
|
4131 |
+
#: pro/includes/fields/class-payment-credit-card.php:257
|
4132 |
+
msgid "Name on Card Placeholder Text"
|
4133 |
+
msgstr "Замещающий текст для поля Имя на карте"
|
4134 |
+
|
4135 |
+
#: pro/includes/fields/class-payment-credit-card.php:355
|
4136 |
+
msgid ""
|
4137 |
+
"This page is insecure. Credit Card field should be used for testing purposes "
|
4138 |
+
"only."
|
4139 |
+
msgstr ""
|
4140 |
+
"Эта страница является небезопасной. Поле кредитной карты должно "
|
4141 |
+
"использоваться только в целях тестирования."
|
4142 |
+
|
4143 |
+
#: pro/includes/fields/class-payment-dropdown.php:21
|
4144 |
+
msgid "Dropdown Items"
|
4145 |
+
msgstr "Элементы списка"
|
4146 |
+
|
4147 |
+
#: pro/includes/fields/class-payment-dropdown.php:28
|
4148 |
+
#: pro/includes/fields/class-payment-multiple.php:28
|
4149 |
+
#: pro/includes/templates/class-order.php:71
|
4150 |
+
msgid "First Item"
|
4151 |
+
msgstr "Первый элемент"
|
4152 |
+
|
4153 |
+
#: pro/includes/fields/class-payment-dropdown.php:33
|
4154 |
+
#: pro/includes/fields/class-payment-multiple.php:33
|
4155 |
+
#: pro/includes/templates/class-order.php:75
|
4156 |
+
msgid "Second Item"
|
4157 |
+
msgstr "Второй элемент"
|
4158 |
+
|
4159 |
+
#: pro/includes/fields/class-payment-dropdown.php:38
|
4160 |
+
#: pro/includes/fields/class-payment-multiple.php:38
|
4161 |
+
#: pro/includes/templates/class-order.php:79
|
4162 |
+
msgid "Third Item"
|
4163 |
+
msgstr "Третий элемент"
|
4164 |
+
|
4165 |
+
#: pro/includes/fields/class-payment-dropdown.php:214
|
4166 |
+
#: pro/includes/fields/class-payment-multiple.php:180
|
4167 |
+
msgid "Invalid payment option"
|
4168 |
+
msgstr "Неверный способ оплаты"
|
4169 |
+
|
4170 |
+
#: pro/includes/fields/class-payment-multiple.php:21
|
4171 |
+
msgid "Multiple Items"
|
4172 |
+
msgstr "Много элементов"
|
4173 |
+
|
4174 |
+
#: pro/includes/fields/class-payment-single.php:21
|
4175 |
+
#: pro/includes/fields/class-payment-single.php:58
|
4176 |
+
msgid "Single Item"
|
4177 |
+
msgstr "Один элемент"
|
4178 |
+
|
4179 |
+
#: pro/includes/fields/class-payment-single.php:49
|
4180 |
+
msgid "Enter the price of the item, without a currency symbol."
|
4181 |
+
msgstr "Введите цену товара без символа валюты."
|
4182 |
+
|
4183 |
+
#: pro/includes/fields/class-payment-single.php:50
|
4184 |
+
msgid "Item Price"
|
4185 |
+
msgstr "Цена за элемент"
|
4186 |
+
|
4187 |
+
#: pro/includes/fields/class-payment-single.php:56
|
4188 |
+
msgid "Select the item type."
|
4189 |
+
msgstr "Выберите тип элемента."
|
4190 |
+
|
4191 |
+
#: pro/includes/fields/class-payment-single.php:59
|
4192 |
+
msgid "User Defined"
|
4193 |
+
msgstr "Заданная пользователем"
|
4194 |
+
|
4195 |
+
#: pro/includes/fields/class-payment-single.php:60
|
4196 |
+
msgid "Hidden"
|
4197 |
+
msgstr "Скрытый"
|
4198 |
+
|
4199 |
+
#: pro/includes/fields/class-payment-single.php:62
|
4200 |
+
msgid "Item Type"
|
4201 |
+
msgstr "Тип элемента"
|
4202 |
+
|
4203 |
+
#: pro/includes/fields/class-payment-single.php:98
|
4204 |
+
#: pro/includes/fields/class-payment-single.php:142
|
4205 |
+
msgid "Price"
|
4206 |
+
msgstr "Цена"
|
4207 |
+
|
4208 |
+
#: pro/includes/fields/class-payment-single.php:104
|
4209 |
+
msgid ""
|
4210 |
+
"Note: Item type is set to hidden and will not be visible when viewing the "
|
4211 |
+
"form."
|
4212 |
+
msgstr ""
|
4213 |
+
"Примечание: Тип элемента имеет значение скрытый и не будет виден при "
|
4214 |
+
"просмотре формы."
|
4215 |
+
|
4216 |
+
#: pro/includes/fields/class-payment-single.php:199
|
4217 |
+
msgid "Amount mismatch"
|
4218 |
+
msgstr "Суммы не совпадают"
|
4219 |
+
|
4220 |
+
#: pro/includes/fields/class-phone.php:21
|
4221 |
+
#: pro/includes/templates/class-order.php:50
|
4222 |
+
#: pro/includes/templates/class-request-quote.php:54
|
4223 |
+
msgid "Phone"
|
4224 |
+
msgstr "Телефон"
|
4225 |
+
|
4226 |
+
#: pro/includes/fields/class-phone.php:79
|
4227 |
+
msgid "Select format for the phone form field"
|
4228 |
+
msgstr "Выберите формат для поля номера телефона"
|
4229 |
+
|
4230 |
+
#: pro/includes/fields/class-url.php:22
|
4231 |
+
msgid "Website / URL"
|
4232 |
+
msgstr "Веб-сайт / URL"
|
4233 |
+
|
4234 |
+
#: pro/includes/payments/functions.php:22
|
4235 |
+
msgid "U.S. Dollar"
|
4236 |
+
msgstr "Доллар США"
|
4237 |
+
|
4238 |
+
#: pro/includes/payments/functions.php:30
|
4239 |
+
msgid "Pound Sterling"
|
4240 |
+
msgstr "Фунты стерлингов"
|
4241 |
+
|
4242 |
+
#: pro/includes/payments/functions.php:38
|
4243 |
+
msgid "Euro"
|
4244 |
+
msgstr "Евро"
|
4245 |
+
|
4246 |
+
#: pro/includes/payments/functions.php:46
|
4247 |
+
msgid "Australian Dollar"
|
4248 |
+
msgstr "Австралийский доллар"
|
4249 |
+
|
4250 |
+
#: pro/includes/payments/functions.php:54
|
4251 |
+
msgid "Brazilian Real"
|
4252 |
+
msgstr "Бразильский реал"
|
4253 |
+
|
4254 |
+
#: pro/includes/payments/functions.php:62
|
4255 |
+
msgid "Canadian Dollar"
|
4256 |
+
msgstr "Канадский доллар"
|
4257 |
+
|
4258 |
+
#: pro/includes/payments/functions.php:70
|
4259 |
+
msgid "Czech Koruna"
|
4260 |
+
msgstr "Чешская крона"
|
4261 |
+
|
4262 |
+
#: pro/includes/payments/functions.php:78
|
4263 |
+
msgid "Danish Krone"
|
4264 |
+
msgstr "Датская крона"
|
4265 |
+
|
4266 |
+
#: pro/includes/payments/functions.php:86
|
4267 |
+
msgid "Hong Kong Dollar"
|
4268 |
+
msgstr "Гонконгский доллар"
|
4269 |
+
|
4270 |
+
#: pro/includes/payments/functions.php:94
|
4271 |
+
msgid "Hungarian Forint"
|
4272 |
+
msgstr "Венгерский форинт"
|
4273 |
+
|
4274 |
+
#: pro/includes/payments/functions.php:102
|
4275 |
+
msgid "Israeli New Sheqel"
|
4276 |
+
msgstr "Израильский шекель"
|
4277 |
+
|
4278 |
+
#: pro/includes/payments/functions.php:110
|
4279 |
+
msgid "Malaysian Ringgit"
|
4280 |
+
msgstr "Малазийский ринггит"
|
4281 |
+
|
4282 |
+
#: pro/includes/payments/functions.php:118
|
4283 |
+
msgid "Mexican Peso"
|
4284 |
+
msgstr "Мексиканский песо"
|
4285 |
+
|
4286 |
+
#: pro/includes/payments/functions.php:126
|
4287 |
+
msgid "Norwegian Krone"
|
4288 |
+
msgstr "Норвежская крона"
|
4289 |
+
|
4290 |
+
#: pro/includes/payments/functions.php:134
|
4291 |
+
msgid "New Zealand Dollar"
|
4292 |
+
msgstr "Новозеландский доллар"
|
4293 |
+
|
4294 |
+
#: pro/includes/payments/functions.php:142
|
4295 |
+
msgid "Philippine Peso"
|
4296 |
+
msgstr "Филиппинский песо"
|
4297 |
+
|
4298 |
+
#: pro/includes/payments/functions.php:150
|
4299 |
+
msgid "Polish Zloty"
|
4300 |
+
msgstr "Польский злотый"
|
4301 |
+
|
4302 |
+
#: pro/includes/payments/functions.php:158
|
4303 |
+
msgid "Russian Ruble"
|
4304 |
+
msgstr "Российский Рубль"
|
4305 |
+
|
4306 |
+
#: pro/includes/payments/functions.php:166
|
4307 |
+
msgid "Singapore Dollar"
|
4308 |
+
msgstr "Сингапурский доллар"
|
4309 |
+
|
4310 |
+
#: pro/includes/payments/functions.php:174
|
4311 |
+
msgid "South African Rand"
|
4312 |
+
msgstr "Южноафриканский рэнд"
|
4313 |
+
|
4314 |
+
#: pro/includes/payments/functions.php:182
|
4315 |
+
msgid "Swedish Krona"
|
4316 |
+
msgstr "Шведская крона"
|
4317 |
+
|
4318 |
+
#: pro/includes/payments/functions.php:190
|
4319 |
+
msgid "Swiss Franc"
|
4320 |
+
msgstr "Швейцарский франк"
|
4321 |
+
|
4322 |
+
#: pro/includes/payments/functions.php:198
|
4323 |
+
msgid "Taiwan New Dollar"
|
4324 |
+
msgstr "Тайваньский доллар"
|
4325 |
+
|
4326 |
+
#: pro/includes/payments/functions.php:206
|
4327 |
+
msgid "Thai Baht"
|
4328 |
+
msgstr "Таиландский бат"
|
4329 |
+
|
4330 |
+
#: pro/includes/templates/class-donation.php:28
|
4331 |
+
#: pro/includes/templates/class-order.php:28
|
4332 |
+
msgid "Click the Payments tab to configure your payment provider"
|
4333 |
+
msgstr "Перейдите на вкладку Платежи, чтобы настроить поставщика платежей"
|
4334 |
+
|
4335 |
+
#: pro/includes/templates/class-donation.php:50
|
4336 |
+
msgid "Donation Amount"
|
4337 |
+
msgstr "Сумма пожертвования"
|
4338 |
+
|
4339 |
+
#: pro/includes/templates/class-order.php:22
|
4340 |
+
msgid ""
|
4341 |
+
"Collect Payments for product and service orders with this ready-made form "
|
4342 |
+
"template. You can add and remove fields as needed."
|
4343 |
+
msgstr ""
|
4344 |
+
"Принимайте платежи за продукты и услуги с помощью готового шаблона формы. Вы "
|
4345 |
+
"можете добавлять и удалять поля по мере необходимости."
|
4346 |
+
|
4347 |
+
#: pro/includes/templates/class-order.php:67
|
4348 |
+
msgid "Available Items"
|
4349 |
+
msgstr "Доступные элементы"
|
4350 |
+
|
4351 |
+
#: pro/includes/templates/class-order.php:87
|
4352 |
+
msgid "Total Amount"
|
4353 |
+
msgstr "Общая сумма"
|
4354 |
+
|
4355 |
+
#: pro/includes/templates/class-request-quote.php:40
|
4356 |
+
msgid "Business / Organization"
|
4357 |
+
msgstr "Бизнес / Организация"
|
4358 |
+
|
4359 |
+
#: pro/includes/templates/class-request-quote.php:62
|
4360 |
+
msgid "Request"
|
4361 |
+
msgstr "Запрос"
|
4362 |
+
|
4363 |
+
#: pro/wpforms-pro.php:185
|
4364 |
+
msgid "File Extension"
|
4365 |
+
msgstr "Расширение файла"
|
4366 |
+
|
4367 |
+
#: pro/wpforms-pro.php:191
|
4368 |
+
msgid "File Size"
|
4369 |
+
msgstr "Размер файла"
|
4370 |
+
|
4371 |
+
#: pro/wpforms-pro.php:197
|
4372 |
+
msgid "Time (12 hour)"
|
4373 |
+
msgstr "Время (12 часов)"
|
4374 |
+
|
4375 |
+
#: pro/wpforms-pro.php:203
|
4376 |
+
msgid "Time (24 hour)"
|
4377 |
+
msgstr "Время (24 часа)"
|
4378 |
+
|
4379 |
+
#: pro/wpforms-pro.php:209
|
4380 |
+
msgid "Payment Required"
|
4381 |
+
msgstr "Требуется оплата"
|
4382 |
+
|
4383 |
+
#: pro/wpforms-pro.php:230
|
4384 |
+
msgid "Currency"
|
4385 |
+
msgstr "Валюта"
|
4386 |
+
|
4387 |
+
#: pro/wpforms-pro.php:307
|
4388 |
+
msgid "Disable storing entry information in WordPress"
|
4389 |
+
msgstr "Отключить хранение записей формы в WordPress"
|
4390 |
+
|
4391 |
+
#: pro/wpforms-pro.php:388
|
4392 |
+
msgid "Add New Notification"
|
4393 |
+
msgstr "Добавить новое уведомление"
|
4394 |
+
|
4395 |
+
#: pro/wpforms-pro.php:565
|
4396 |
+
msgid "Send"
|
4397 |
+
msgstr "Отправить"
|
4398 |
+
|
4399 |
+
#: pro/wpforms-pro.php:566
|
4400 |
+
msgid "Don't send"
|
4401 |
+
msgstr "Не отправлять"
|
4402 |
+
|
4403 |
+
#: pro/wpforms-pro.php:568
|
4404 |
+
msgid "this notification if"
|
4405 |
+
msgstr "это уведомление если"
|
4406 |
+
|
4407 |
+
#: pro/wpforms-pro.php:569
|
4408 |
+
msgid "Email notifications"
|
4409 |
+
msgstr "Email уведомления"
|
4410 |
+
|
4411 |
+
#. translators: %s - Addons page URL in site admin area.
|
4412 |
+
#: pro/wpforms-pro.php:573
|
4413 |
+
msgid ""
|
4414 |
+
"Install the <a href=\"%s\">Conditional Logic addon</a> to enable conditional "
|
4415 |
+
"logic for Email Notifications."
|
4416 |
+
msgstr ""
|
4417 |
+
"Установите <a href=\"%s\">расширение Conditional Logic</a> для включения "
|
4418 |
+
"условной логики для уведомлений по электронной почте."
|
4419 |
+
|
4420 |
+
#. translators: %s - URL to an announcement page.
|
4421 |
+
#: pro/wpforms-pro.php:624
|
4422 |
+
msgid ""
|
4423 |
+
"Conditional logic functionality is now included in the core WPForms plugin! "
|
4424 |
+
"The WPForms Conditional Logic addon can be removed without affecting your "
|
4425 |
+
"forms. For more details <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
4426 |
+
"noreferrer\">read our announcement</a>."
|
4427 |
+
msgstr ""
|
4428 |
+
"Функциональность условной логики теперь включена в ядро плагина WPForms! "
|
4429 |
+
"Расширение WPForms Conditional Logic может быть удалено без ущерба для ваших "
|
4430 |
+
"форм. Для более подробной информации <a href=\"%s\" target=\"_blank\" rel="
|
4431 |
+
"\"noopener noreferrer\">прочитайте наше объявление</a>."
|
4432 |
+
|
4433 |
+
#: wpforms.php:58
|
4434 |
+
msgid "Please deactivate WPForms Lite before activating WPForms."
|
4435 |
+
msgstr "Пожалуйста, отключите WPForms Lite перед активацией WPForms."
|
4436 |
+
|
4437 |
+
#. Plugin URI of the plugin/theme
|
4438 |
+
#. Author URI of the plugin/theme
|
4439 |
+
msgid "https://wpforms.com"
|
4440 |
+
msgstr "https://wpforms.com"
|
4441 |
+
|
4442 |
+
#. Description of the plugin/theme
|
4443 |
+
msgid ""
|
4444 |
+
"Beginner friendly WordPress contact form plugin. Use our Drag & Drop form "
|
4445 |
+
"builder to create your WordPress forms."
|
4446 |
+
msgstr ""
|
4447 |
+
"Удобный для новичков WordPress плагин контактных форм! Используйте "
|
4448 |
+
"конструктор Drag & Drop для того, чтобы создавать формы WordPress."
|
4449 |
+
|
4450 |
+
#~ msgid "Show note"
|
4451 |
+
#~ msgstr "Показать заметки"
|
4452 |
+
|
4453 |
+
#~ msgid "Click the payments tab to configure your payment provider"
|
4454 |
+
#~ msgstr "Перейдите на вкладку Платежи, чтобы настроить поставщика платежей"
|
4455 |
+
|
4456 |
+
#~ msgctxt "Widget name."
|
4457 |
+
#~ msgid "WPForms"
|
4458 |
+
#~ msgstr "WPForms"
|
4459 |
+
|
4460 |
+
#~ msgctxt "Date connected"
|
4461 |
+
#~ msgid "Connected on: %s"
|
4462 |
+
#~ msgstr "Подключено: %s"
|
4463 |
+
|
4464 |
+
#~ msgctxt "Delete a note on a single entry page"
|
4465 |
+
#~ msgid "Delete"
|
4466 |
+
#~ msgstr "Удалить"
|
4467 |
+
|
4468 |
+
#~ msgid "This field is required"
|
4469 |
+
#~ msgstr "Это поле обязательное"
|
4470 |
+
|
4471 |
+
#, fuzzy
|
4472 |
+
#~ msgid "Please enter a valid URL"
|
4473 |
+
#~ msgstr "Пожалуйста, введите правильный адрес"
|
4474 |
+
|
4475 |
+
#, fuzzy
|
4476 |
+
#~ msgid "Sent from <a href=\"%s\" style=\"color:#bbbbbb;\">%s</a>"
|
4477 |
+
#~ msgstr "Отправлено <a href=\"%s\" style=\"color:#bbbbbb;\">%s</a>"
|
4478 |
+
|
4479 |
+
#~ msgid "DD"
|
4480 |
+
#~ msgstr "DD"
|
4481 |
+
|
4482 |
+
#~ msgid "MM"
|
4483 |
+
#~ msgstr "MM"
|
4484 |
+
|
4485 |
+
#, fuzzy
|
4486 |
+
#~ msgid "YYYY"
|
4487 |
+
#~ msgstr "ГГГГ"
|
4488 |
+
|
4489 |
+
#, fuzzy
|
4490 |
+
#~ msgid "YY"
|
4491 |
+
#~ msgstr "YY"
|
4492 |
+
|
4493 |
+
#, fuzzy
|
4494 |
+
#~ msgid "Form Title"
|
4495 |
+
#~ msgstr "Название формы"
|
4496 |
+
|
4497 |
+
#~ msgid " Status:"
|
4498 |
+
#~ msgstr "Статус:"
|
4499 |
+
|
4500 |
+
#, fuzzy
|
4501 |
+
#~| msgid "All entries marked as read."
|
4502 |
+
#~ msgid "Entry was marked as unread."
|
4503 |
+
#~ msgid_plural "Entries were marked as unread."
|
4504 |
+
#~ msgstr[0] "Все записи помечены как прочитанные."
|
4505 |
+
#~ msgstr[1] "Все записи помечены как прочитанные."
|
4506 |
+
#~ msgstr[2] "Все записи помечены как прочитанные."
|
4507 |
+
|
4508 |
+
#~ msgid "E-mail"
|
4509 |
+
#~ msgstr "Email"
|
4510 |
+
|
4511 |
+
#, fuzzy
|
4512 |
+
#~ msgid "Entry was starred."
|
4513 |
+
#~ msgid_plural "Entries were starred."
|
4514 |
+
#~ msgstr[0] "Эта запись была отмечена."
|
4515 |
+
#~ msgstr[1] "Эта запись была отмечена."
|
4516 |
+
#~ msgstr[2] "Эта запись была отмечена."
|
4517 |
+
|
4518 |
+
#, fuzzy
|
4519 |
+
#~ msgid "Entry was unstarred."
|
4520 |
+
#~ msgid_plural "Entries were unstarred."
|
4521 |
+
#~ msgstr[0] "Эта запись была неотмечена."
|
4522 |
+
#~ msgstr[1] "Эта запись была неотмечена."
|
4523 |
+
#~ msgstr[2] "Эта запись была неотмечена."
|
4524 |
+
|
4525 |
+
#, fuzzy
|
4526 |
+
#~| msgid "Connected on: "
|
4527 |
+
#~ msgid "Connected on:"
|
4528 |
+
#~ msgstr "Подключен:"
|
4529 |
+
|
4530 |
+
#~ msgid ""
|
4531 |
+
#~ "Choices are dynamically populated from the <span class=\"dynamic-name\">"
|
4532 |
+
#~ "%s</span> <span class=\"dynamic-type\">%s</span>"
|
4533 |
+
#~ msgstr "Варианты заполняются динамически из %s %s"
|
4534 |
+
|
4535 |
+
#~ msgid "Check this to manual set form field values."
|
4536 |
+
#~ msgstr "Установите этот флажок для ручного ввода данных формы."
|
4537 |
+
|
4538 |
+
#~ msgid ""
|
4539 |
+
#~ "\tYour license key for WPForms is invalid. The key no longer exists or "
|
4540 |
+
#~ "the user associated with the key has been deleted. Please use a different "
|
4541 |
+
#~ "key to continue receiving automatic updates."
|
4542 |
+
#~ msgstr ""
|
4543 |
+
#~ "Ваш лицензионный ключ для WPForms недействителен. Ключ больше не "
|
4544 |
+
#~ "существует или был удален пользователем, связанным с ключом. Пожалуйста, "
|
4545 |
+
#~ "используйте другой ключ, чтобы продолжить получать автоматические "
|
4546 |
+
#~ "обновления."
|
4547 |
+
|
4548 |
+
#~ msgid "All entries deleted."
|
4549 |
+
#~ msgstr "Все записи удалены."
|
4550 |
+
|
4551 |
+
#~ msgid "Added by"
|
4552 |
+
#~ msgstr "Добавлено"
|
4553 |
+
|
4554 |
+
#, fuzzy
|
4555 |
+
#~ msgid "on"
|
4556 |
+
#~ msgstr "вкл"
|
4557 |
+
|
4558 |
+
#, fuzzy
|
4559 |
+
#~ msgid "Step"
|
4560 |
+
#~ msgstr "Крок"
|
4561 |
+
|
4562 |
+
#, fuzzy
|
4563 |
+
#~ msgid "of"
|
4564 |
+
#~ msgstr "из"
|
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.4.
|
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,127 +12,126 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: includes/admin/admin.php:
|
16 |
msgid "Activate"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: includes/admin/admin.php:
|
20 |
msgid "Active"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: includes/admin/admin.php:
|
24 |
msgid "Deactivate"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: includes/admin/admin.php:
|
28 |
msgid "Inactive"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/admin/admin.php:
|
32 |
msgid "Install Addon"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/admin/admin.php:
|
36 |
-
#: includes/admin/class-editor.php:
|
37 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
38 |
msgid "Cancel"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/admin/admin.php:
|
42 |
-
#: includes/admin/class-editor.php:
|
43 |
msgid "Close"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: includes/admin/admin.php:
|
47 |
msgid "Are you sure you want to delete this entry?"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: includes/admin/admin.php:
|
51 |
msgid "Are you sure you want to delete ALL entries?"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: includes/admin/admin.php:
|
55 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
56 |
msgid "Hide Empty Fields"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: includes/admin/admin.php:
|
60 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
61 |
msgid "Show Empty Fields"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: includes/admin/admin.php:
|
65 |
msgid "Entries Field Columns"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: includes/admin/admin.php:
|
69 |
msgid "Are you sure you want to delete this note?"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: includes/admin/admin.php:
|
73 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
74 |
msgid "Unstar entry"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/admin/admin.php:
|
78 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
79 |
msgid "Star entry"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: includes/admin/admin.php:
|
83 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
84 |
msgid "Mark entry read"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: includes/admin/admin.php:
|
88 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
89 |
msgid "Mark entry unread"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: includes/admin/admin.php:
|
93 |
msgid "Select fields"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: includes/admin/admin.php:
|
97 |
msgid "Are you sure you want to delete this form?"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: includes/admin/admin.php:
|
101 |
msgid "Are you sure you want to duplicate this form?"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: includes/admin/admin.php:
|
105 |
msgid "Heads up!"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: includes/admin/admin.php:
|
109 |
msgid "OK"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: includes/admin/admin.php:
|
113 |
msgid "Are you sure you want to disconnect this account?"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: includes/admin/admin.php:
|
117 |
msgid "Could not authenticate with the provider."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: includes/admin/admin.php:
|
121 |
msgid "Save and Refresh"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: includes/admin/admin.php:
|
125 |
msgid "Upload or Choose Your Image"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: includes/admin/admin.php:
|
129 |
msgid "Use Image"
|
130 |
msgstr ""
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
"closing a link tag."
|
136 |
msgid ""
|
137 |
"Your site is running an outdated version of PHP that is no longer supported "
|
138 |
"and may cause issues with %1$s. %2$sRead more%3$s for additional information."
|
@@ -142,346 +141,338 @@ msgstr ""
|
|
142 |
msgid "You do not have permission."
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: includes/admin/ajax-actions.php:
|
146 |
msgid "No data provided"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: includes/admin/ajax-actions.php:
|
150 |
-
msgid "An error
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/admin/ajax-actions.php:
|
154 |
-
msgid "No form
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/admin/ajax-actions.php:
|
158 |
msgid "Error creating form"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: includes/admin/ajax-actions.php:
|
162 |
msgid "No form ID provided"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: includes/admin/ajax-actions.php:
|
166 |
msgid "Error updating form template"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/admin/ajax-actions.php:
|
170 |
msgid "post type"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: includes/admin/ajax-actions.php:
|
174 |
msgid "taxonomy"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: includes/admin/builder/class-builder.php:
|
178 |
-
#: includes/class-conditional-logic-core.php:
|
179 |
msgid "AND"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: includes/admin/builder/class-builder.php:
|
183 |
msgid "Add New Choices"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/admin/builder/class-builder.php:
|
187 |
-
#: includes/fields/class-base.php:
|
188 |
msgid "Bulk Add"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: includes/admin/builder/class-builder.php:
|
192 |
msgid "Hide Bulk Add"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: includes/admin/builder/class-builder.php:
|
196 |
msgid "Add Choices (one per line)"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: includes/admin/builder/class-builder.php:
|
200 |
msgid ""
|
201 |
"Blue\n"
|
202 |
"Red\n"
|
203 |
"Green"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/admin/builder/class-builder.php:
|
207 |
msgid "Show presets"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: includes/admin/builder/class-builder.php:
|
211 |
msgid "Hide presets"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: includes/admin/builder/class-builder.php:
|
215 |
-
#: pro/includes/fields/class-date-time.php:229
|
216 |
-
#: pro/includes/fields/class-date-time.php:231
|
217 |
-
#: pro/includes/fields/class-date-time.php:452
|
218 |
-
#: pro/includes/fields/class-date-time.php:471
|
219 |
-
msgid "DD"
|
220 |
-
msgstr ""
|
221 |
-
|
222 |
-
#: includes/admin/builder/class-builder.php:291
|
223 |
-
#: pro/includes/fields/class-date-time.php:228
|
224 |
-
#: pro/includes/fields/class-date-time.php:232
|
225 |
-
#: pro/includes/fields/class-date-time.php:433
|
226 |
-
#: pro/includes/fields/class-date-time.php:490
|
227 |
-
#: pro/includes/fields/class-payment-credit-card.php:319
|
228 |
-
#: pro/includes/fields/class-payment-credit-card.php:409
|
229 |
-
msgid "MM"
|
230 |
-
msgstr ""
|
231 |
-
|
232 |
-
#: includes/admin/builder/class-builder.php:293
|
233 |
msgid ""
|
234 |
"The {source} {type} contains over {limit} items ({total}). This may make the "
|
235 |
"field difficult for your vistors to use and/or cause the form to be slow."
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: includes/admin/builder/class-builder.php:
|
239 |
msgid ""
|
240 |
"Due to form changes, conditional logic rules have been removed or updated:"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: includes/admin/builder/class-builder.php:
|
244 |
msgid ""
|
245 |
"Are you sure you want to disable conditional logic? This will remove the "
|
246 |
"rules for this field or setting."
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: includes/admin/builder/class-builder.php:
|
250 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
251 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
252 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
253 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
254 |
msgid "Field"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: includes/admin/builder/class-builder.php:
|
258 |
msgid "Field Locked"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: includes/admin/builder/class-builder.php:
|
262 |
msgid "This field cannot be deleted or duplicated."
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: includes/admin/builder/class-builder.php:
|
266 |
msgid "Available Fields"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: includes/admin/builder/class-builder.php:
|
270 |
msgid "No fields available"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: includes/admin/builder/class-builder.php:
|
274 |
msgid "No email fields"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: includes/admin/builder/class-builder.php:
|
278 |
msgid "Are you sure you want to delete this notification?"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: includes/admin/builder/class-builder.php:
|
282 |
msgid "Enter a notification name"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: includes/admin/builder/class-builder.php:
|
286 |
msgid "Eg: User Confirmation"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: includes/admin/builder/class-builder.php:
|
290 |
msgid "You must provide a notification name"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: includes/admin/builder/class-builder.php:
|
294 |
msgid ""
|
295 |
"Form must contain one notification. To disable all notifications use the "
|
296 |
-
"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: includes/admin/builder/class-builder.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
msgid "Saving ..."
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: includes/admin/builder/class-builder.php:
|
304 |
msgid "Saved!"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: includes/admin/builder/class-builder.php:
|
308 |
msgid "Save and Exit"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: includes/admin/builder/class-builder.php:
|
312 |
-
#: includes/fields/class-base.php:
|
313 |
msgid "Show Layouts"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: includes/admin/builder/class-builder.php:
|
317 |
msgid "Hide Layouts"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: includes/admin/builder/class-builder.php:
|
321 |
msgid "Select your layout"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: includes/admin/builder/class-builder.php:
|
325 |
msgid "Select your column"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: includes/admin/builder/class-builder.php:
|
329 |
#: includes/admin/builder/class-builder.php:436
|
330 |
msgid "Loading"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: includes/admin/builder/class-builder.php:
|
334 |
msgid "Use Template"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/admin/builder/class-builder.php:
|
338 |
msgid ""
|
339 |
"Changing templates on an existing form will DELETE existing form fields. Are "
|
340 |
"you sure you want apply the new template?"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: includes/admin/builder/class-builder.php:
|
344 |
msgid ""
|
345 |
"You are almost done. To embed this form on your site, please paste the "
|
346 |
"following shortcode inside a post or page."
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: includes/admin/builder/class-builder.php:
|
350 |
msgid "Or you can follow the instructions in this video."
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: includes/admin/builder/class-builder.php:
|
354 |
#: includes/admin/builder/class-builder.php:486
|
355 |
msgid "Exit"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: includes/admin/builder/class-builder.php:
|
359 |
msgid "If you exit without saving, your changes will be lost."
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: includes/admin/builder/class-builder.php:
|
363 |
msgid "Are you sure you want to delete this field?"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: includes/admin/builder/class-builder.php:
|
367 |
msgid "Are you sure you want to duplicate this field?"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: includes/admin/builder/class-builder.php:
|
371 |
msgid "(copy)"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: includes/admin/builder/class-builder.php:
|
375 |
-
msgid "Please enter a form
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: includes/admin/builder/class-builder.php:
|
379 |
msgid "This item must contain at least one choice."
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: includes/admin/builder/class-builder.php:
|
383 |
-
#: includes/fields/class-base.php:
|
384 |
-
#: lite/wpforms-lite.php:76 pro/wpforms-pro.php:
|
385 |
msgid "Off"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: includes/admin/builder/class-builder.php:
|
389 |
-
#: includes/fields/class-base.php:
|
390 |
-
#: pro/wpforms-pro.php:
|
391 |
msgid "On"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: includes/admin/builder/class-builder.php:
|
395 |
msgid "or"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: includes/admin/builder/class-builder.php:
|
399 |
-
#: includes/templates/class-suggestion.php:
|
400 |
msgid "Other"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: includes/admin/builder/class-builder.php:
|
404 |
-
#: includes/class-conditional-logic-core.php:
|
405 |
msgid "is"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: includes/admin/builder/class-builder.php:
|
409 |
-
#: includes/class-conditional-logic-core.php:
|
410 |
msgid "is not"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/admin/builder/class-builder.php:
|
414 |
-
#: includes/class-conditional-logic-core.php:
|
415 |
msgid "empty"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: includes/admin/builder/class-builder.php:
|
419 |
-
#: includes/class-conditional-logic-core.php:
|
420 |
msgid "not empty"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: includes/admin/builder/class-builder.php:
|
424 |
-
#: includes/class-conditional-logic-core.php:
|
425 |
msgid "contains"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: includes/admin/builder/class-builder.php:
|
429 |
-
#: includes/class-conditional-logic-core.php:
|
430 |
msgid "does not contain"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: includes/admin/builder/class-builder.php:
|
434 |
-
#: includes/class-conditional-logic-core.php:
|
435 |
msgid "starts with"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: includes/admin/builder/class-builder.php:
|
439 |
-
#: includes/class-conditional-logic-core.php:
|
440 |
msgid "ends with"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: includes/admin/builder/class-builder.php:
|
444 |
msgid ""
|
445 |
"Form entries must be stored to accept payments. Please enable saving form "
|
446 |
"entries in the General settings first."
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: includes/admin/builder/class-builder.php:
|
450 |
-
#: pro/includes/fields/class-page-break.php:
|
451 |
-
#: pro/includes/fields/class-page-break.php:
|
452 |
msgid "Previous"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: includes/admin/builder/class-builder.php:
|
456 |
-
#: includes/class-conditional-logic-core.php:
|
457 |
msgid "Create new rule"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: includes/admin/builder/class-builder.php:
|
461 |
msgid "Add new group"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: includes/admin/builder/class-builder.php:
|
465 |
-
#: includes/class-conditional-logic-core.php:
|
466 |
msgid "Delete rule"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: includes/admin/builder/class-builder.php:
|
470 |
-
#: includes/admin/builder/functions.php:
|
471 |
msgid "Show Smart Tags"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: includes/admin/builder/class-builder.php:
|
475 |
msgid "Hide Smart Tags"
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: includes/admin/builder/class-builder.php:
|
479 |
-
#: includes/class-conditional-logic-core.php:
|
480 |
msgid "-- Select Field --"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: includes/admin/builder/class-builder.php:
|
484 |
-
#: includes/class-conditional-logic-core.php:
|
485 |
msgid "-- Select Choice --"
|
486 |
msgstr ""
|
487 |
|
@@ -514,12 +505,12 @@ msgid "Now editing"
|
|
514 |
msgstr ""
|
515 |
|
516 |
#: includes/admin/builder/class-builder.php:469
|
517 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
518 |
msgid "Preview Form"
|
519 |
msgstr ""
|
520 |
|
521 |
#: includes/admin/builder/class-builder.php:471
|
522 |
-
#: includes/admin/overview/class-overview-table.php:
|
523 |
msgid "Preview"
|
524 |
msgstr ""
|
525 |
|
@@ -535,11 +526,7 @@ msgstr ""
|
|
535 |
msgid "Save Form"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/admin/builder/
|
539 |
-
msgid "Save"
|
540 |
-
msgstr ""
|
541 |
-
|
542 |
-
#: includes/admin/builder/functions.php:189
|
543 |
msgid "Field #"
|
544 |
msgstr ""
|
545 |
|
@@ -562,7 +549,7 @@ msgid ""
|
|
562 |
msgstr ""
|
563 |
|
564 |
#: includes/admin/builder/panels/class-fields.php:123
|
565 |
-
#: includes/admin/builder/panels/class-settings.php:
|
566 |
msgid "Submit"
|
567 |
msgstr ""
|
568 |
|
@@ -587,17 +574,17 @@ msgid "You don't have any fields yet. Add some!"
|
|
587 |
msgstr ""
|
588 |
|
589 |
#: includes/admin/builder/panels/class-fields.php:252
|
590 |
-
#: includes/fields/class-base.php:
|
591 |
msgid "Duplicate Field"
|
592 |
msgstr ""
|
593 |
|
594 |
#: includes/admin/builder/panels/class-fields.php:254
|
595 |
-
#: includes/fields/class-base.php:
|
596 |
msgid "Delete Field"
|
597 |
msgstr ""
|
598 |
|
599 |
#: includes/admin/builder/panels/class-fields.php:256
|
600 |
-
#: includes/fields/class-base.php:
|
601 |
msgid "Click to edit. Drag to reorder."
|
602 |
msgstr ""
|
603 |
|
@@ -637,26 +624,26 @@ msgid ""
|
|
637 |
"\">setup your form</a> before you can manage these settings."
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: includes/admin/builder/panels/class-providers.php:
|
641 |
msgid "Install Your Marketing Integration"
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: includes/admin/builder/panels/class-providers.php:
|
645 |
msgid ""
|
646 |
-
"It seems you do not have any marketing
|
647 |
-
"to the <a href=\"%s\">
|
648 |
-
"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/admin/builder/panels/class-providers.php:
|
652 |
msgid "Select Your Marketing Integration"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: includes/admin/builder/panels/class-providers.php:
|
656 |
msgid ""
|
657 |
"Select your email marketing service provider or CRM from the options on the "
|
658 |
"left. If you don't see your email marketing service listed, then let us know "
|
659 |
-
"and we'll do our best to get it added as fast as possible"
|
660 |
msgstr ""
|
661 |
|
662 |
#: includes/admin/builder/panels/class-settings.php:21
|
@@ -671,12 +658,12 @@ msgid "General"
|
|
671 |
msgstr ""
|
672 |
|
673 |
#: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:61
|
674 |
-
#: lite/wpforms-lite.php:71 pro/wpforms-pro.php:
|
675 |
msgid "Notifications"
|
676 |
msgstr ""
|
677 |
|
678 |
#: includes/admin/builder/panels/class-settings.php:59
|
679 |
-
#: includes/admin/builder/panels/class-settings.php:
|
680 |
msgid "Confirmation"
|
681 |
msgstr ""
|
682 |
|
@@ -687,98 +674,100 @@ msgid ""
|
|
687 |
msgstr ""
|
688 |
|
689 |
#: includes/admin/builder/panels/class-settings.php:94
|
690 |
-
|
|
|
|
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: includes/admin/builder/panels/class-settings.php:
|
694 |
msgid "Form Description"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: includes/admin/builder/panels/class-settings.php:
|
698 |
-
msgid "Hide form
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: includes/admin/builder/panels/class-settings.php:
|
702 |
msgid "Form CSS Class"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/builder/panels/class-settings.php:
|
706 |
msgid ""
|
707 |
"Enter CSS class names for the form wrapper. Multiple class names should be "
|
708 |
"separated with spaces."
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: includes/admin/builder/panels/class-settings.php:
|
712 |
msgid "Submit Button Text"
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: includes/admin/builder/panels/class-settings.php:
|
716 |
msgid "Submit Button Processing Text"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: includes/admin/builder/panels/class-settings.php:
|
720 |
msgid ""
|
721 |
"Enter the submit button text you would like the button display while the "
|
722 |
"form submit is processing."
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: includes/admin/builder/panels/class-settings.php:
|
726 |
msgid "Submit Button CSS Class"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/admin/builder/panels/class-settings.php:
|
730 |
msgid ""
|
731 |
"Enter CSS class names for the form submit button. Multiple names should be "
|
732 |
"separated with spaces."
|
733 |
msgstr ""
|
734 |
|
735 |
-
#: includes/admin/builder/panels/class-settings.php:
|
736 |
msgid "Enable anti-spam honeypot"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: includes/admin/builder/panels/class-settings.php:
|
740 |
msgid "Enable Google invisible reCAPTCHA"
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: includes/admin/builder/panels/class-settings.php:
|
744 |
msgid "Enable Google reCAPTCHA (v2)"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: includes/admin/builder/panels/class-settings.php:
|
748 |
msgid "Confirmation Type"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: includes/admin/builder/panels/class-settings.php:
|
752 |
-
#: includes/templates/class-suggestion.php:
|
753 |
-
#: pro/wpforms-pro.php:
|
754 |
msgid "Message"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: includes/admin/builder/panels/class-settings.php:
|
758 |
msgid "Show Page"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/admin/builder/panels/class-settings.php:
|
762 |
msgid "Go to URL (Redirect)"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: includes/admin/builder/panels/class-settings.php:
|
766 |
msgid "Confirmation Message"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: includes/admin/builder/panels/class-settings.php:
|
770 |
msgid "Thanks for contacting us! We will be in touch with you shortly."
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: includes/admin/builder/panels/class-settings.php:
|
774 |
msgid "Automatically scroll to the confirmation message"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: includes/admin/builder/panels/class-settings.php:
|
778 |
msgid "Confirmation Page"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: includes/admin/builder/panels/class-settings.php:
|
782 |
msgid "Confirmation Redirect URL"
|
783 |
msgstr ""
|
784 |
|
@@ -786,11 +775,6 @@ msgstr ""
|
|
786 |
msgid "Setup"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: includes/admin/builder/panels/class-setup.php:55
|
790 |
-
#: includes/class-smart-tags.php:36
|
791 |
-
msgid "Form Name"
|
792 |
-
msgstr ""
|
793 |
-
|
794 |
#: includes/admin/builder/panels/class-setup.php:56
|
795 |
msgid "Enter your form name here…"
|
796 |
msgstr ""
|
@@ -810,76 +794,76 @@ msgstr ""
|
|
810 |
msgid "Additional Templates"
|
811 |
msgstr ""
|
812 |
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
"close tag"
|
817 |
msgid ""
|
818 |
"Have a suggestion for a new template? %1$sWe'd love to hear it%2$s. Also, "
|
819 |
"you can %3$screate your own templates%4$s!"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: includes/admin/builder/panels/class-setup.php:
|
823 |
msgid "Search additional templates..."
|
824 |
msgstr ""
|
825 |
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
"- close tag"
|
830 |
msgid ""
|
831 |
"More are available in the %1$sForm Templates Pack addon%2$s or by "
|
832 |
"%3$screating your own%4$s."
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: includes/admin/builder/panels/class-setup.php:
|
836 |
msgid "Selected"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: includes/admin/builder/panels/class-setup.php:
|
840 |
-
|
|
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: includes/admin/builder/panels/class-setup.php:
|
|
|
844 |
msgid "Create a %s"
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: includes/admin/class-editor.php:
|
848 |
-
#: includes/admin/class-editor.php:
|
849 |
msgid "Add Form"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: includes/admin/class-editor.php:
|
853 |
msgid "Insert Form"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: includes/admin/class-editor.php:
|
857 |
msgid "Select a form below to insert"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: includes/admin/class-editor.php:
|
861 |
-
msgid "Show form
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: includes/admin/class-editor.php:
|
865 |
msgid "Show form description"
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: includes/admin/class-editor.php:
|
869 |
-
#: includes/admin/overview/class-overview-table.php:
|
870 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
871 |
msgid ""
|
872 |
"Whoops, you haven't created a form yet. Want to <a href=\"%s\">give it a go</"
|
873 |
"a>?"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.4.
|
877 |
#. Plugin Name of the plugin/theme
|
878 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.4.
|
879 |
#. Author of the plugin/theme
|
880 |
#: includes/admin/class-menu.php:39 includes/admin/class-menu.php:40
|
881 |
#: includes/admin/class-menu.php:51 includes/admin/class-menu.php:103
|
882 |
-
#: includes/integrations.php:
|
883 |
msgid "WPForms"
|
884 |
msgstr ""
|
885 |
|
@@ -893,7 +877,6 @@ msgstr ""
|
|
893 |
|
894 |
#: includes/admin/class-menu.php:62
|
895 |
#: includes/admin/overview/class-overview.php:124
|
896 |
-
#: includes/providers/class-base.php:903
|
897 |
msgid "Add New"
|
898 |
msgstr ""
|
899 |
|
@@ -902,9 +885,9 @@ msgid "Form Entries"
|
|
902 |
msgstr ""
|
903 |
|
904 |
#: includes/admin/class-menu.php:72
|
905 |
-
#: includes/admin/overview/class-overview-table.php:
|
906 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
907 |
-
#: pro/wpforms-pro.php:
|
908 |
msgid "Entries"
|
909 |
msgstr ""
|
910 |
|
@@ -971,19 +954,21 @@ msgid ""
|
|
971 |
msgstr ""
|
972 |
|
973 |
#: includes/admin/class-settings.php:142
|
974 |
-
msgid "Settings saved."
|
975 |
msgstr ""
|
976 |
|
977 |
#: includes/admin/class-settings.php:168 includes/admin/class-settings.php:173
|
978 |
#: includes/admin/class-settings.php:178 includes/admin/class-settings.php:183
|
979 |
-
#: pro/wpforms-pro.php:
|
980 |
msgid "Save Settings"
|
981 |
msgstr ""
|
982 |
|
983 |
#: includes/admin/class-settings.php:171 includes/admin/class-settings.php:276
|
984 |
#: includes/admin/class-settings.php:365 includes/fields/class-email.php:21
|
985 |
#: includes/fields/class-email.php:68 includes/fields/class-email.php:306
|
986 |
-
#: includes/templates/class-
|
|
|
|
|
987 |
#: pro/includes/templates/class-donation.php:43
|
988 |
#: pro/includes/templates/class-order.php:43
|
989 |
#: pro/includes/templates/class-request-quote.php:47
|
@@ -1028,9 +1013,8 @@ msgstr ""
|
|
1028 |
|
1029 |
#: includes/admin/class-settings.php:228
|
1030 |
msgid ""
|
1031 |
-
"<a href=\"
|
1032 |
-
"
|
1033 |
-
"for step-by-step directions."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
#: includes/admin/class-settings.php:235
|
@@ -1038,7 +1022,7 @@ msgid "License"
|
|
1038 |
msgstr ""
|
1039 |
|
1040 |
#: includes/admin/class-settings.php:235
|
1041 |
-
msgid "Your license key provides access to updates and
|
1042 |
msgstr ""
|
1043 |
|
1044 |
#: includes/admin/class-settings.php:242
|
@@ -1122,7 +1106,7 @@ msgid ""
|
|
1122 |
msgstr ""
|
1123 |
|
1124 |
#: includes/admin/class-settings.php:323
|
1125 |
-
#: pro/includes/fields/class-date-time.php:
|
1126 |
msgid "Type"
|
1127 |
msgstr ""
|
1128 |
|
@@ -1152,11 +1136,21 @@ msgid ""
|
|
1152 |
"time."
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: includes/admin/class-settings.php:353 includes/fields/class-base.php:
|
1156 |
msgid "Required"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: includes/admin/class-settings.php:355 includes/class-frontend.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
msgid "This field is required."
|
1161 |
msgstr ""
|
1162 |
|
@@ -1164,11 +1158,12 @@ msgstr ""
|
|
1164 |
msgid "Website URL"
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#: includes/admin/class-settings.php:361 includes/class-frontend.php:
|
|
|
1168 |
msgid "Please enter a valid URL."
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: includes/admin/class-settings.php:367 includes/class-frontend.php:
|
1172 |
msgid "Please enter a valid email address."
|
1173 |
msgstr ""
|
1174 |
|
@@ -1176,7 +1171,7 @@ msgstr ""
|
|
1176 |
msgid "Number"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: includes/admin/class-settings.php:373 includes/class-frontend.php:
|
1180 |
#: includes/fields/class-number.php:157
|
1181 |
msgid "Please enter a valid number."
|
1182 |
msgstr ""
|
@@ -1185,7 +1180,7 @@ msgstr ""
|
|
1185 |
msgid "Confirm Value"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
-
#: includes/admin/class-settings.php:379 includes/class-frontend.php:
|
1189 |
#: pro/includes/fields/class-password.php:394
|
1190 |
msgid "Field values do not match."
|
1191 |
msgstr ""
|
@@ -1220,99 +1215,101 @@ msgstr ""
|
|
1220 |
msgid "System Info"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: includes/admin/class-tools.php:
|
1224 |
-
msgid "
|
|
|
|
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: includes/admin/class-tools.php:
|
1228 |
msgid "Form Import"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
-
#: includes/admin/class-tools.php:
|
1232 |
msgid "Select an export file."
|
1233 |
msgstr ""
|
1234 |
|
1235 |
-
#: includes/admin/class-tools.php:
|
1236 |
msgid "No file chosen"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: includes/admin/class-tools.php:
|
1240 |
msgid "Choose a file…"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: includes/admin/class-tools.php:
|
1244 |
msgid "Import"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: includes/admin/class-tools.php:
|
1248 |
msgid "Form Export"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
-
#: includes/admin/class-tools.php:
|
1252 |
msgid ""
|
1253 |
"Form exports files can be used to create a backup of your forms or to import "
|
1254 |
"forms into another site."
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: includes/admin/class-tools.php:
|
1258 |
msgid "Select form(s)"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
-
#: includes/admin/class-tools.php:
|
1262 |
msgid "You need to create a form before you can use form export."
|
1263 |
msgstr ""
|
1264 |
|
1265 |
-
#: includes/admin/class-tools.php:
|
1266 |
msgid "Export"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
-
#: includes/admin/class-tools.php:
|
1270 |
msgid "Form Template Export"
|
1271 |
msgstr ""
|
1272 |
|
1273 |
-
#: includes/admin/class-tools.php:
|
1274 |
msgid ""
|
1275 |
"The following code can be used to register your custom form template. Copy "
|
1276 |
"and paste the following code to your theme's functions.php file or include "
|
1277 |
"it within an external file."
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: includes/admin/class-tools.php:
|
1281 |
msgid ""
|
1282 |
"For more information <a href=\"%s\" target=\"blank\" rel=\"noopener "
|
1283 |
"noreferrer\">see our documentation</a>."
|
1284 |
msgstr ""
|
1285 |
|
1286 |
-
#: includes/admin/class-tools.php:
|
1287 |
msgid ""
|
1288 |
"Select a form to generate PHP code that can be used to register a custom "
|
1289 |
"form template."
|
1290 |
msgstr ""
|
1291 |
|
1292 |
-
#: includes/admin/class-tools.php:
|
1293 |
msgid "You need to create a form before you can generate a template."
|
1294 |
msgstr ""
|
1295 |
|
1296 |
-
#: includes/admin/class-tools.php:
|
1297 |
msgid "Export Template"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
-
#: includes/admin/class-tools.php:
|
1301 |
msgid "System Information"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
-
#: includes/admin/class-tools.php:
|
1305 |
msgid "Please upload a valid .json form export file."
|
1306 |
msgstr ""
|
1307 |
|
1308 |
-
#: includes/admin/class-tools.php:
|
1309 |
-
#: pro/includes/admin/entries/class-entries-export.php:
|
1310 |
msgid "Error"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
-
#: includes/admin/class-tools.php:
|
1314 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
1315 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
1316 |
msgid "M j, Y @ g:ia"
|
1317 |
msgstr ""
|
1318 |
|
@@ -1331,11 +1328,7 @@ msgid ""
|
|
1331 |
"form builder in the market."
|
1332 |
msgstr ""
|
1333 |
|
1334 |
-
#: includes/admin/class-welcome.php:121
|
1335 |
-
msgid "Watch how to create you first form"
|
1336 |
-
msgstr ""
|
1337 |
-
|
1338 |
-
#: includes/admin/class-welcome.php:122
|
1339 |
msgid "Watch how to create your first form"
|
1340 |
msgstr ""
|
1341 |
|
@@ -1455,7 +1448,7 @@ msgstr ""
|
|
1455 |
msgid "See All Features"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
-
#: includes/admin/class-welcome.php:226 lite/wpforms-lite.php:
|
1459 |
msgid "Upgrade to PRO"
|
1460 |
msgstr ""
|
1461 |
|
@@ -1468,7 +1461,7 @@ msgid "Post Submissions"
|
|
1468 |
msgstr ""
|
1469 |
|
1470 |
#: includes/admin/class-welcome.php:230
|
1471 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
1472 |
msgid "Stripe"
|
1473 |
msgstr ""
|
1474 |
|
@@ -1538,9 +1531,9 @@ msgstr ""
|
|
1538 |
|
1539 |
#: includes/admin/overview/class-overview-table.php:53
|
1540 |
#: includes/fields/class-name.php:21 includes/fields/class-name.php:276
|
1541 |
-
#: includes/templates/class-contact.php:
|
1542 |
-
#: includes/templates/class-subscribe.php:
|
1543 |
-
#: includes/templates/class-suggestion.php:
|
1544 |
#: pro/includes/templates/class-donation.php:36
|
1545 |
#: pro/includes/templates/class-order.php:36
|
1546 |
#: pro/includes/templates/class-request-quote.php:33
|
@@ -1555,59 +1548,62 @@ msgstr ""
|
|
1555 |
msgid "Created"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
-
#: includes/admin/overview/class-overview-table.php:
|
1559 |
-
#: includes/admin/overview/class-overview-table.php:
|
1560 |
msgid "Edit this form"
|
1561 |
msgstr ""
|
1562 |
|
1563 |
-
#: includes/admin/overview/class-overview-table.php:
|
1564 |
msgid "Edit"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
-
#: includes/admin/overview/class-overview-table.php:
|
1568 |
msgid "View entries"
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: includes/admin/overview/class-overview-table.php:
|
1572 |
msgid "View preview"
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: includes/admin/overview/class-overview-table.php:
|
1576 |
msgid "Duplicate this form"
|
1577 |
msgstr ""
|
1578 |
|
1579 |
-
#: includes/admin/overview/class-overview-table.php:
|
1580 |
msgid "Duplicate"
|
1581 |
msgstr ""
|
1582 |
|
1583 |
-
#: includes/admin/overview/class-overview-table.php:
|
1584 |
msgid "Delete this form"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
-
#: includes/admin/overview/class-overview-table.php:
|
1588 |
-
#: includes/admin/overview/class-overview-table.php:
|
1589 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
1590 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
1591 |
-
#: pro/includes/admin/entries/class-entries-single.php:596
|
1592 |
msgid "Delete"
|
1593 |
msgstr ""
|
1594 |
|
1595 |
-
#: includes/admin/overview/class-overview-table.php:
|
1596 |
-
msgid "Form successfully deleted."
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1600 |
|
1601 |
-
#: includes/admin/overview/class-overview-table.php:
|
1602 |
-
|
1603 |
-
msgid "Security check failed"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: includes/admin/overview/class-overview-table.php:
|
1607 |
-
msgid "
|
1608 |
-
|
1609 |
-
msgstr[0] ""
|
1610 |
-
msgstr[1] ""
|
1611 |
|
1612 |
#: includes/admin/overview/class-overview.php:76
|
1613 |
msgid "Number of forms per page:"
|
@@ -1653,62 +1649,67 @@ msgstr ""
|
|
1653 |
msgid "Upload Image"
|
1654 |
msgstr ""
|
1655 |
|
1656 |
-
#: includes/class-conditional-logic-core.php:
|
1657 |
msgid "this field if"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
-
#: includes/class-conditional-logic-core.php:
|
1661 |
msgid "Show"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
-
#: includes/class-conditional-logic-core.php:
|
1665 |
msgid "Hide"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
-
#: includes/class-conditional-logic-core.php:
|
1669 |
-
#: includes/class-conditional-logic-core.php:
|
1670 |
msgid "Enable conditional logic"
|
1671 |
msgstr ""
|
1672 |
|
1673 |
-
#: includes/class-conditional-logic-core.php:
|
1674 |
msgid "Check this option to enable conditional logic on this field."
|
1675 |
msgstr ""
|
1676 |
|
1677 |
-
#: includes/class-conditional-logic-core.php:
|
1678 |
msgid "Check this option to enable conditional logic."
|
1679 |
msgstr ""
|
1680 |
|
1681 |
-
#: includes/class-conditional-logic-core.php:
|
1682 |
msgid "Add rule group"
|
1683 |
msgstr ""
|
1684 |
|
1685 |
-
#: includes/class-frontend.php:
|
1686 |
#: pro/includes/fields/class-file-upload.php:367
|
1687 |
#: pro/includes/fields/class-file-upload.php:383
|
1688 |
-
#: pro/includes/fields/class-file-upload.php:400 pro/wpforms-pro.php:
|
1689 |
msgid "File type is not allowed."
|
1690 |
msgstr ""
|
1691 |
|
1692 |
-
#: includes/class-frontend.php:
|
1693 |
msgid "File exceeds max size allowed."
|
1694 |
msgstr ""
|
1695 |
|
1696 |
-
#: includes/class-frontend.php:
|
1697 |
msgid "Please enter time in 12-hour AM/PM format (eg 8:45 AM)."
|
1698 |
msgstr ""
|
1699 |
|
1700 |
-
#: includes/class-frontend.php:
|
1701 |
msgid "Please enter time in 24-hour format (eg 22:45)."
|
1702 |
msgstr ""
|
1703 |
|
1704 |
-
#: includes/class-frontend.php:
|
|
|
1705 |
msgid "Payment is required."
|
1706 |
msgstr ""
|
1707 |
|
1708 |
-
#: includes/class-frontend.php:
|
1709 |
msgid "Please enter a valid credit card number."
|
1710 |
msgstr ""
|
1711 |
|
|
|
|
|
|
|
|
|
1712 |
#: includes/class-logging.php:38
|
1713 |
msgid "WPForms Logs"
|
1714 |
msgstr ""
|
@@ -1717,459 +1718,449 @@ msgstr ""
|
|
1717 |
msgid "Logs"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
-
#: includes/class-preview.php:
|
1721 |
msgid "Hide empty fields"
|
1722 |
msgstr ""
|
1723 |
|
1724 |
-
#: includes/class-preview.php:
|
1725 |
msgid "Show empty fields"
|
1726 |
msgstr ""
|
1727 |
|
1728 |
-
#: includes/class-preview.php:
|
1729 |
msgid "Hide notes"
|
1730 |
msgstr ""
|
1731 |
|
1732 |
-
#: includes/class-preview.php:
|
1733 |
msgid "Show notes"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
-
#: includes/class-preview.php:
|
1737 |
msgid "Normal view"
|
1738 |
msgstr ""
|
1739 |
|
1740 |
-
#: includes/class-preview.php:
|
1741 |
msgid "Compact view"
|
1742 |
msgstr ""
|
1743 |
|
1744 |
-
#: includes/class-preview.php:
|
1745 |
msgid "Entry #%d"
|
1746 |
msgstr ""
|
1747 |
|
1748 |
-
#: includes/class-preview.php:
|
1749 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
1750 |
msgid "Print"
|
1751 |
msgstr ""
|
1752 |
|
1753 |
-
#: includes/class-preview.php:
|
1754 |
-
|
1755 |
-
msgstr ""
|
1756 |
-
|
1757 |
-
#: includes/class-preview.php:165
|
1758 |
-
#: pro/includes/admin/entries/class-entries-single.php:482
|
1759 |
msgid "This entry does not have any fields"
|
1760 |
msgstr ""
|
1761 |
|
1762 |
-
|
1763 |
-
#:
|
|
|
1764 |
msgid "Field ID #%d"
|
1765 |
msgstr ""
|
1766 |
|
1767 |
-
#: includes/class-preview.php:
|
1768 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
1769 |
msgid "Empty"
|
1770 |
msgstr ""
|
1771 |
|
1772 |
-
#: includes/class-preview.php:
|
1773 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
1774 |
msgid "Notes"
|
1775 |
msgstr ""
|
1776 |
|
1777 |
-
|
1778 |
-
|
|
|
1779 |
msgstr ""
|
1780 |
|
1781 |
-
#: includes/class-preview.php:
|
1782 |
msgid ""
|
1783 |
"This is the WPForms preview page. All your form previews will be handled on "
|
1784 |
"this page."
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: includes/class-preview.php:
|
1788 |
msgid ""
|
1789 |
"The page is set to private, so it is not publicly accessible. Please do not "
|
1790 |
"delete this page :) ."
|
1791 |
msgstr ""
|
1792 |
|
1793 |
-
#: includes/class-preview.php:
|
1794 |
msgid "WPForms Preview"
|
1795 |
msgstr ""
|
1796 |
|
1797 |
-
#: includes/class-preview.php:
|
1798 |
msgid "This is a preview of your form. This page is not publicly accessible."
|
1799 |
msgstr ""
|
1800 |
|
1801 |
-
#: includes/class-preview.php:
|
1802 |
msgid "Close this window"
|
1803 |
msgstr ""
|
1804 |
|
1805 |
-
#: includes/class-preview.php:
|
1806 |
-
|
|
|
1807 |
msgstr ""
|
1808 |
|
1809 |
-
#: includes/class-process.php:
|
1810 |
msgid "Invalid form."
|
1811 |
msgstr ""
|
1812 |
|
1813 |
-
#: includes/class-process.php:
|
1814 |
msgid "Incorrect reCAPTCHA, please try again."
|
1815 |
msgstr ""
|
1816 |
|
1817 |
-
#: includes/class-process.php:
|
1818 |
msgid "reCAPTCHA is required."
|
1819 |
msgstr ""
|
1820 |
|
1821 |
-
#: includes/class-process.php:
|
1822 |
msgid "Form has not been submitted, please see the errors below."
|
1823 |
msgstr ""
|
1824 |
|
1825 |
-
#: includes/class-process.php:
|
1826 |
msgid "WPForms honeypot field triggered."
|
1827 |
msgstr ""
|
1828 |
|
1829 |
-
#: includes/class-process.php:
|
1830 |
-
|
1831 |
msgid "New %s Entry"
|
1832 |
msgstr ""
|
1833 |
|
1834 |
-
#: includes/class-smart-tags.php:33
|
1835 |
-
msgid "Site Administer Email"
|
1836 |
-
msgstr ""
|
1837 |
-
|
1838 |
#: includes/class-smart-tags.php:34
|
1839 |
-
msgid "
|
1840 |
msgstr ""
|
1841 |
|
1842 |
#: includes/class-smart-tags.php:35
|
1843 |
-
msgid "
|
1844 |
msgstr ""
|
1845 |
|
1846 |
-
#: includes/class-smart-tags.php:
|
1847 |
-
msgid "
|
1848 |
msgstr ""
|
1849 |
|
1850 |
#: includes/class-smart-tags.php:38
|
1851 |
-
msgid "
|
1852 |
msgstr ""
|
1853 |
|
1854 |
#: includes/class-smart-tags.php:39
|
1855 |
-
msgid "Embedded Post
|
1856 |
msgstr ""
|
1857 |
|
1858 |
#: includes/class-smart-tags.php:40
|
1859 |
-
|
1860 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:136
|
1861 |
-
#: pro/includes/fields/class-date-time.php:69
|
1862 |
-
#: pro/includes/fields/class-date-time.php:117
|
1863 |
-
#: pro/includes/fields/class-date-time.php:244
|
1864 |
-
#: pro/includes/fields/class-date-time.php:252
|
1865 |
-
#: pro/includes/fields/class-date-time.php:338
|
1866 |
-
msgid "Date"
|
1867 |
msgstr ""
|
1868 |
|
1869 |
#: includes/class-smart-tags.php:41
|
1870 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1871 |
msgstr ""
|
1872 |
|
1873 |
#: includes/class-smart-tags.php:42
|
1874 |
-
msgid "
|
1875 |
msgstr ""
|
1876 |
|
1877 |
#: includes/class-smart-tags.php:43
|
1878 |
-
msgid "User
|
1879 |
msgstr ""
|
1880 |
|
1881 |
#: includes/class-smart-tags.php:44
|
1882 |
-
msgid "User
|
1883 |
msgstr ""
|
1884 |
|
1885 |
#: includes/class-smart-tags.php:45
|
1886 |
-
msgid "User
|
1887 |
msgstr ""
|
1888 |
|
1889 |
#: includes/class-smart-tags.php:46
|
1890 |
-
msgid "
|
1891 |
msgstr ""
|
1892 |
|
1893 |
#: includes/class-smart-tags.php:47
|
1894 |
-
msgid "Author
|
1895 |
msgstr ""
|
1896 |
|
1897 |
#: includes/class-smart-tags.php:48
|
1898 |
-
msgid "Author
|
1899 |
msgstr ""
|
1900 |
|
1901 |
#: includes/class-smart-tags.php:49
|
1902 |
-
msgid "
|
1903 |
msgstr ""
|
1904 |
|
1905 |
#: includes/class-smart-tags.php:50
|
1906 |
-
msgid "
|
1907 |
msgstr ""
|
1908 |
|
1909 |
#: includes/class-smart-tags.php:51
|
1910 |
-
msgid "
|
1911 |
msgstr ""
|
1912 |
|
1913 |
#: includes/class-smart-tags.php:52
|
1914 |
-
msgid "
|
1915 |
msgstr ""
|
1916 |
|
1917 |
#: includes/class-smart-tags.php:53
|
|
|
|
|
|
|
|
|
1918 |
msgid "Lost Password URL"
|
1919 |
msgstr ""
|
1920 |
|
1921 |
#: includes/class-widget.php:43
|
1922 |
-
msgctxt "Widget
|
1923 |
msgid "Display a form."
|
1924 |
msgstr ""
|
1925 |
|
1926 |
#: includes/class-widget.php:52
|
1927 |
-
msgctxt "Widget
|
1928 |
msgid "WPForms"
|
1929 |
msgstr ""
|
1930 |
|
1931 |
#: includes/class-widget.php:120
|
1932 |
-
msgctxt "Widget
|
1933 |
msgid "Title:"
|
1934 |
msgstr ""
|
1935 |
|
1936 |
#: includes/class-widget.php:129
|
1937 |
-
msgctxt "Widget
|
1938 |
msgid "Form:"
|
1939 |
msgstr ""
|
1940 |
|
1941 |
#: includes/class-widget.php:135
|
1942 |
-
msgctxt "Widget
|
1943 |
msgid "Select your form"
|
1944 |
msgstr ""
|
1945 |
|
1946 |
#: includes/class-widget.php:141
|
1947 |
-
msgctxt "Widget
|
1948 |
msgid "No forms"
|
1949 |
msgstr ""
|
1950 |
|
1951 |
#: includes/class-widget.php:149
|
1952 |
-
msgctxt "Widget
|
1953 |
-
msgid "Display form
|
1954 |
msgstr ""
|
1955 |
|
1956 |
#: includes/class-widget.php:153
|
1957 |
-
msgctxt "Widget
|
1958 |
msgid "Display form description"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
-
#: includes/emails/class-emails.php:
|
1962 |
msgid ""
|
1963 |
"You cannot send emails with WPForms_WP_Emails until init/admin_init has been "
|
1964 |
"reached"
|
1965 |
msgstr ""
|
1966 |
|
1967 |
-
#: includes/emails/class-emails.php:
|
1968 |
-
#: includes/fields/class-checkbox.php:
|
1969 |
-
#: includes/fields/class-select.php:
|
1970 |
msgid "(empty)"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
-
#: includes/emails/class-emails.php:
|
1974 |
msgid "Field ID #"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
-
#: includes/emails/
|
1978 |
-
msgid "
|
1979 |
msgstr ""
|
1980 |
|
1981 |
-
|
|
|
|
|
|
|
|
|
|
|
1982 |
msgid ""
|
1983 |
"Enter text for the form field label. Field labels are recommended and can be "
|
1984 |
"hidden in the Advanced Settings."
|
1985 |
msgstr ""
|
1986 |
|
1987 |
-
#: includes/fields/class-base.php:
|
1988 |
msgid "Label"
|
1989 |
msgstr ""
|
1990 |
|
1991 |
-
#: includes/fields/class-base.php:
|
1992 |
msgid "Enter text for the form field description."
|
1993 |
msgstr ""
|
1994 |
|
1995 |
-
#: includes/fields/class-base.php:
|
1996 |
msgid "Description"
|
1997 |
msgstr ""
|
1998 |
|
1999 |
-
#: includes/fields/class-base.php:
|
2000 |
msgid ""
|
2001 |
"Check this option to mark the field required. A form will not submit unless "
|
2002 |
"all required fields are provided."
|
2003 |
msgstr ""
|
2004 |
|
2005 |
-
#: includes/fields/class-base.php:
|
2006 |
msgid "Enter code for the form field."
|
2007 |
msgstr ""
|
2008 |
|
2009 |
-
#: includes/fields/class-base.php:
|
2010 |
msgid "Code"
|
2011 |
msgstr ""
|
2012 |
|
2013 |
-
#: includes/fields/class-base.php:
|
2014 |
msgid "Add choices for the form field."
|
2015 |
msgstr ""
|
2016 |
|
2017 |
-
#: includes/fields/class-base.php:
|
2018 |
msgid "Choices"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
-
|
2022 |
-
|
2023 |
-
"Choices are dynamically populated from the
|
2024 |
-
"span> <span class=\"dynamic-type\">%s</span>"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
-
#: includes/fields/class-base.php:
|
2028 |
msgid "Items"
|
2029 |
msgstr ""
|
2030 |
|
2031 |
-
#: includes/fields/class-base.php:
|
2032 |
msgid "Enter text for the default form field value."
|
2033 |
msgstr ""
|
2034 |
|
2035 |
-
#: includes/fields/class-base.php:
|
2036 |
#: includes/fields/class-name.php:298 includes/fields/class-name.php:313
|
2037 |
-
#: includes/fields/class-name.php:328 pro/includes/fields/class-address.php:
|
2038 |
-
#: pro/includes/fields/class-address.php:
|
2039 |
-
#: pro/includes/fields/class-address.php:
|
2040 |
-
#: pro/includes/fields/class-address.php:
|
2041 |
-
#: pro/includes/fields/class-address.php:
|
2042 |
-
#: pro/includes/fields/class-address.php:
|
2043 |
msgid "Default Value"
|
2044 |
msgstr ""
|
2045 |
|
2046 |
-
#: includes/fields/class-base.php:
|
2047 |
msgid "Select the default form field size."
|
2048 |
msgstr ""
|
2049 |
|
2050 |
-
#: includes/fields/class-base.php:
|
2051 |
msgid "Small"
|
2052 |
msgstr ""
|
2053 |
|
2054 |
-
#: includes/fields/class-base.php:
|
2055 |
msgid "Medium"
|
2056 |
msgstr ""
|
2057 |
|
2058 |
-
#: includes/fields/class-base.php:
|
2059 |
msgid "Large"
|
2060 |
msgstr ""
|
2061 |
|
2062 |
-
#: includes/fields/class-base.php:
|
2063 |
msgid "Field Size"
|
2064 |
msgstr ""
|
2065 |
|
2066 |
-
#: includes/fields/class-base.php:
|
2067 |
msgid "Advanced Options"
|
2068 |
msgstr ""
|
2069 |
|
2070 |
-
#: includes/fields/class-base.php:
|
2071 |
msgid "Enter text for the form field placeholder."
|
2072 |
msgstr ""
|
2073 |
|
2074 |
-
#: includes/fields/class-base.php:
|
2075 |
msgid "Placeholder Text"
|
2076 |
msgstr ""
|
2077 |
|
2078 |
-
#: includes/fields/class-base.php:
|
2079 |
msgid ""
|
2080 |
"Enter CSS class names for the form field container. Class names should be "
|
2081 |
"separated with spaces."
|
2082 |
msgstr ""
|
2083 |
|
2084 |
-
#: includes/fields/class-base.php:
|
2085 |
msgid "CSS Classes"
|
2086 |
msgstr ""
|
2087 |
|
2088 |
-
#: includes/fields/class-base.php:
|
2089 |
msgid "Check this option to hide the form field label."
|
2090 |
msgstr ""
|
2091 |
|
2092 |
-
#: includes/fields/class-base.php:
|
2093 |
msgid "Hide Label"
|
2094 |
msgstr ""
|
2095 |
|
2096 |
-
#: includes/fields/class-base.php:
|
2097 |
msgid "Check this option to hide the form field sub-label."
|
2098 |
msgstr ""
|
2099 |
|
2100 |
-
#: includes/fields/class-base.php:
|
2101 |
msgid "Hide Sub-Labels"
|
2102 |
msgstr ""
|
2103 |
|
2104 |
-
#: includes/fields/class-base.php:
|
2105 |
msgid "Select the layout for displaying field choices."
|
2106 |
msgstr ""
|
2107 |
|
2108 |
-
#: includes/fields/class-base.php:
|
2109 |
msgid "One Column"
|
2110 |
msgstr ""
|
2111 |
|
2112 |
-
#: includes/fields/class-base.php:
|
2113 |
msgid "Two Columns"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
-
#: includes/fields/class-base.php:
|
2117 |
msgid "Three Columns"
|
2118 |
msgstr ""
|
2119 |
|
2120 |
-
#: includes/fields/class-base.php:
|
2121 |
msgid "Choice Layout"
|
2122 |
msgstr ""
|
2123 |
|
2124 |
-
#: includes/fields/class-base.php:
|
2125 |
msgid "Select auto-populate method to use."
|
2126 |
msgstr ""
|
2127 |
|
2128 |
-
#: includes/fields/class-base.php:
|
2129 |
msgid "Post Type"
|
2130 |
msgstr ""
|
2131 |
|
2132 |
-
#: includes/fields/class-base.php:
|
2133 |
msgid "Taxonomy"
|
2134 |
msgstr ""
|
2135 |
|
2136 |
-
#: includes/fields/class-base.php:
|
2137 |
msgid "Dynamic Choices"
|
2138 |
msgstr ""
|
2139 |
|
2140 |
-
#: includes/fields/class-base.php:
|
2141 |
msgid "Select %s to use for auto-populating field choices."
|
2142 |
msgstr ""
|
2143 |
|
2144 |
-
#: includes/fields/class-base.php:
|
2145 |
msgid "Dynamic %s Source"
|
2146 |
msgstr ""
|
2147 |
|
2148 |
-
#: includes/fields/class-base.php:
|
2149 |
msgid "You do no have permission."
|
2150 |
msgstr ""
|
2151 |
|
2152 |
-
#: includes/fields/class-base.php:
|
2153 |
msgid "No form ID found"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
-
#: includes/fields/class-base.php:
|
2157 |
msgid "No field type found"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
-
#: includes/fields/class-base.php:864 includes/fields/class-name.php:485
|
2161 |
-
#: includes/fields/class-number.php:152
|
2162 |
-
#: pro/includes/fields/class-address.php:624
|
2163 |
-
#: pro/includes/fields/class-date-time.php:532
|
2164 |
-
#: pro/includes/fields/class-file-upload.php:332
|
2165 |
-
#: pro/includes/fields/class-password.php:371
|
2166 |
-
#: pro/includes/fields/class-payment-dropdown.php:208
|
2167 |
-
#: pro/includes/fields/class-payment-multiple.php:175
|
2168 |
-
#: pro/includes/fields/class-payment-single.php:189
|
2169 |
-
#: pro/includes/fields/class-url.php:148
|
2170 |
-
msgid "This field is required"
|
2171 |
-
msgstr ""
|
2172 |
-
|
2173 |
#: includes/fields/class-checkbox.php:21
|
2174 |
msgid "Checkboxes"
|
2175 |
msgstr ""
|
@@ -2189,16 +2180,17 @@ msgstr ""
|
|
2189 |
msgid "Third Choice"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
-
#: includes/fields/class-checkbox.php:
|
2193 |
-
|
|
|
2194 |
msgstr ""
|
2195 |
|
2196 |
-
#: includes/fields/class-checkbox.php:
|
2197 |
-
#: includes/fields/class-select.php:
|
2198 |
msgid "Show Values"
|
2199 |
msgstr ""
|
2200 |
|
2201 |
-
#: includes/fields/class-checkbox.php:
|
2202 |
msgid ""
|
2203 |
"Showing the first 20 choices.<br> All %d choices will be displayed when "
|
2204 |
"viewing the form."
|
@@ -2213,7 +2205,7 @@ msgid "Enable Email Confirmation"
|
|
2213 |
msgstr ""
|
2214 |
|
2215 |
#: includes/fields/class-email.php:208
|
2216 |
-
msgid "Check this option ask
|
2217 |
msgstr ""
|
2218 |
|
2219 |
#: includes/fields/class-email.php:246
|
@@ -2227,24 +2219,21 @@ msgid "Enter text for the confirmation field placeholder."
|
|
2227 |
msgstr ""
|
2228 |
|
2229 |
#: includes/fields/class-name.php:82 includes/fields/class-name.php:377
|
2230 |
-
#: includes/providers/class-base.php:369
|
2231 |
msgid "First"
|
2232 |
msgstr ""
|
2233 |
|
2234 |
#: includes/fields/class-name.php:103 includes/fields/class-name.php:382
|
2235 |
-
#: includes/providers/class-base.php:381
|
2236 |
msgid "Middle"
|
2237 |
msgstr ""
|
2238 |
|
2239 |
#: includes/fields/class-name.php:124 includes/fields/class-name.php:387
|
2240 |
-
#: includes/providers/class-base.php:393
|
2241 |
msgid "Last"
|
2242 |
msgstr ""
|
2243 |
|
2244 |
#: includes/fields/class-name.php:220
|
2245 |
-
#: pro/includes/fields/class-date-time.php:
|
2246 |
-
#: pro/includes/fields/class-date-time.php:
|
2247 |
-
#: pro/includes/fields/class-date-time.php:
|
2248 |
#: pro/includes/fields/class-phone.php:78
|
2249 |
msgid "Format"
|
2250 |
msgstr ""
|
@@ -2271,14 +2260,14 @@ msgstr ""
|
|
2271 |
|
2272 |
#: includes/fields/class-name.php:279 includes/fields/class-name.php:294
|
2273 |
#: includes/fields/class-name.php:309 includes/fields/class-name.php:324
|
2274 |
-
#: pro/includes/fields/class-address.php:
|
2275 |
-
#: pro/includes/fields/class-address.php:
|
2276 |
-
#: pro/includes/fields/class-address.php:
|
2277 |
-
#: pro/includes/fields/class-address.php:
|
2278 |
-
#: pro/includes/fields/class-address.php:
|
2279 |
-
#: pro/includes/fields/class-address.php:
|
2280 |
-
#: pro/includes/fields/class-date-time.php:
|
2281 |
-
#: pro/includes/fields/class-date-time.php:
|
2282 |
msgid "Placeholder"
|
2283 |
msgstr ""
|
2284 |
|
@@ -2314,10 +2303,6 @@ msgstr ""
|
|
2314 |
msgid "Multiple Choice"
|
2315 |
msgstr ""
|
2316 |
|
2317 |
-
#: includes/fields/class-radio.php:82
|
2318 |
-
msgid "Check this to manually set form field values."
|
2319 |
-
msgstr ""
|
2320 |
-
|
2321 |
#: includes/fields/class-select.php:21
|
2322 |
msgid "Dropdown"
|
2323 |
msgstr ""
|
@@ -2330,534 +2315,612 @@ msgstr ""
|
|
2330 |
msgid "Paragraph Text"
|
2331 |
msgstr ""
|
2332 |
|
2333 |
-
#: includes/integrations.php:
|
2334 |
msgid "Select a form to display"
|
2335 |
msgstr ""
|
2336 |
|
2337 |
-
#: includes/integrations.php:
|
2338 |
msgid "No forms found"
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
#: includes/integrations.php:
|
2342 |
msgid "Content"
|
2343 |
msgstr ""
|
2344 |
|
2345 |
-
#: includes/integrations.php:
|
2346 |
msgid "Add your form"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: includes/integrations.php:
|
2350 |
msgid "Form"
|
2351 |
msgstr ""
|
2352 |
|
2353 |
-
#: includes/integrations.php:
|
2354 |
msgid "Select a form to add it to your post or page."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: includes/integrations.php:
|
2358 |
-
msgid "Display Form
|
2359 |
msgstr ""
|
2360 |
|
2361 |
-
#: includes/integrations.php:
|
2362 |
msgid "No"
|
2363 |
msgstr ""
|
2364 |
|
2365 |
-
#: includes/integrations.php:
|
2366 |
msgid "Yes"
|
2367 |
msgstr ""
|
2368 |
|
2369 |
-
#: includes/integrations.php:
|
2370 |
-
msgid "Would you like to display the forms
|
2371 |
msgstr ""
|
2372 |
|
2373 |
-
#: includes/integrations.php:
|
2374 |
msgid "Display Form Description"
|
2375 |
msgstr ""
|
2376 |
|
2377 |
-
#: includes/integrations.php:
|
2378 |
msgid "Would you like to display the forms description?"
|
2379 |
msgstr ""
|
2380 |
|
2381 |
-
#: includes/providers/class-base.php:
|
2382 |
msgid "Connection"
|
2383 |
msgstr ""
|
2384 |
|
2385 |
-
#: includes/providers/class-base.php:
|
2386 |
-
#: includes/providers/class-base.php:
|
2387 |
msgid "You do not have permission"
|
2388 |
msgstr ""
|
2389 |
|
2390 |
-
#: includes/providers/class-base.php:
|
2391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2392 |
msgstr ""
|
2393 |
|
2394 |
-
#: includes/providers/class-base.php:
|
2395 |
msgid "Select Account"
|
2396 |
msgstr ""
|
2397 |
|
2398 |
-
#: includes/providers/class-base.php:
|
2399 |
-
#: includes/providers/class-constant-contact.php:
|
2400 |
msgid "Add New Account"
|
2401 |
msgstr ""
|
2402 |
|
2403 |
-
#: includes/providers/class-base.php:
|
2404 |
msgid "Select List"
|
2405 |
msgstr ""
|
2406 |
|
2407 |
-
#: includes/providers/class-base.php:
|
2408 |
msgid "Select Groups"
|
2409 |
msgstr ""
|
2410 |
|
2411 |
-
#: includes/providers/class-base.php:
|
2412 |
msgid ""
|
2413 |
"We also noticed that you have some segments in your list. You can select "
|
2414 |
"specific list segments below if needed. This is optional."
|
2415 |
msgstr ""
|
2416 |
|
2417 |
-
#: includes/providers/class-base.php:
|
2418 |
msgid "List Fields"
|
2419 |
msgstr ""
|
2420 |
|
2421 |
-
#: includes/providers/class-base.php:
|
2422 |
msgid "Available Form Fields"
|
2423 |
msgstr ""
|
2424 |
|
2425 |
-
#: includes/providers/class-base.php:
|
2426 |
msgid "Process"
|
2427 |
msgstr ""
|
2428 |
|
2429 |
-
#: includes/providers/class-base.php:
|
2430 |
msgid "Don't process"
|
2431 |
msgstr ""
|
2432 |
|
2433 |
-
#: includes/providers/class-base.php:
|
2434 |
msgid "this connection if"
|
2435 |
msgstr ""
|
2436 |
|
2437 |
-
#: includes/providers/class-base.php:
|
2438 |
msgid "Marketing provider connection"
|
2439 |
msgstr ""
|
2440 |
|
2441 |
-
#: includes/providers/class-base.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
2442 |
msgid "Missing data"
|
2443 |
msgstr ""
|
2444 |
|
2445 |
-
#: includes/providers/class-base.php:
|
2446 |
msgid "Connection missing"
|
2447 |
msgstr ""
|
2448 |
|
2449 |
-
#: includes/providers/class-base.php:
|
2450 |
-
|
2451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2452 |
msgstr ""
|
2453 |
|
2454 |
-
|
2455 |
-
#: includes/providers/class-base.php:
|
2456 |
-
msgid "
|
2457 |
msgstr ""
|
2458 |
|
2459 |
-
|
|
|
2460 |
msgid "Integrate %s with WPForms"
|
2461 |
msgstr ""
|
2462 |
|
2463 |
-
#: includes/providers/class-base.php:
|
2464 |
msgid "Connected"
|
2465 |
msgstr ""
|
2466 |
|
2467 |
-
#: includes/providers/class-base.php:
|
2468 |
-
|
2469 |
-
"
|
2470 |
msgstr ""
|
2471 |
|
2472 |
-
#: includes/providers/class-base.php:
|
2473 |
-
msgid "
|
|
|
2474 |
msgstr ""
|
2475 |
|
2476 |
-
#: includes/providers/class-constant-contact.php:
|
2477 |
msgid "Constant Contact Subscription stopped by conditional logic"
|
2478 |
msgstr ""
|
2479 |
|
2480 |
-
#: includes/providers/class-constant-contact.php:
|
2481 |
-
#: includes/providers/class-constant-contact.php:
|
|
|
2482 |
msgid "Constant Contact API Error"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
-
#: includes/providers/class-constant-contact.php:
|
2486 |
-
msgid "Constant Contact API error"
|
2487 |
-
msgstr ""
|
2488 |
-
|
2489 |
-
#: includes/providers/class-constant-contact.php:479
|
2490 |
msgid ""
|
2491 |
"Please fill out all of the fields below to register your new Constant "
|
2492 |
"Contact account."
|
2493 |
msgstr ""
|
2494 |
|
2495 |
-
#: includes/providers/class-constant-contact.php:
|
2496 |
-
#: includes/providers/class-constant-contact.php:
|
2497 |
msgid ""
|
2498 |
"Click here for documentation on connecting WPForms with Constant Contact."
|
2499 |
msgstr ""
|
2500 |
|
2501 |
-
#: includes/providers/class-constant-contact.php:
|
2502 |
-
#: includes/providers/class-constant-contact.php:
|
2503 |
msgid ""
|
2504 |
"Because Constant Contact requires external authentication, you will need to "
|
2505 |
"register WPForms with Constant Contact before you can proceed."
|
2506 |
msgstr ""
|
2507 |
|
2508 |
-
#: includes/providers/class-constant-contact.php:
|
2509 |
-
#: includes/providers/class-constant-contact.php:
|
2510 |
msgid "Click here to register with Constant Contact"
|
2511 |
msgstr ""
|
2512 |
|
2513 |
-
#: includes/providers/class-constant-contact.php:
|
2514 |
-
#: includes/providers/class-constant-contact.php:
|
2515 |
msgid "Authorization Code"
|
2516 |
msgstr ""
|
2517 |
|
2518 |
-
#: includes/providers/class-constant-contact.php:
|
2519 |
-
#: includes/providers/class-constant-contact.php:
|
2520 |
msgid "Account Nickname"
|
2521 |
msgstr ""
|
2522 |
|
2523 |
-
#: includes/providers/class-constant-contact.php:
|
2524 |
msgid "Connect"
|
2525 |
msgstr ""
|
2526 |
|
2527 |
-
#: includes/providers/class-constant-contact.php:
|
2528 |
msgid ""
|
2529 |
"Get the most out of <strong>WPForms</strong> — use it with an active "
|
2530 |
"Constant Contact account."
|
2531 |
msgstr ""
|
2532 |
|
2533 |
-
#: includes/providers/class-constant-contact.php:
|
2534 |
-
#: includes/providers/class-constant-contact.php:
|
2535 |
msgid "Try Constant Contact for Free"
|
2536 |
msgstr ""
|
2537 |
|
2538 |
-
#: includes/providers/class-constant-contact.php:
|
2539 |
msgid ""
|
2540 |
"Learn More about the <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
2541 |
"noreferrer\">power of email marketing</a>"
|
2542 |
msgstr ""
|
2543 |
|
2544 |
-
#: includes/providers/class-constant-contact.php:
|
2545 |
msgid ""
|
2546 |
"Get the most out of the <strong>WPForms</strong> plugin — use it with "
|
2547 |
"an active Constant Contact account."
|
2548 |
msgstr ""
|
2549 |
|
2550 |
-
#: includes/providers/class-constant-contact.php:
|
2551 |
msgid "Connect your existing account"
|
2552 |
msgstr ""
|
2553 |
|
2554 |
-
#: includes/providers/class-constant-contact.php:
|
2555 |
msgid "Learn More about the <a href=\"%s\">power of email marketing</a>"
|
2556 |
msgstr ""
|
2557 |
|
2558 |
-
#: includes/providers/class-constant-contact.php:
|
2559 |
msgid "Grow Your Website with WPForms + Email Marketing"
|
2560 |
msgstr ""
|
2561 |
|
2562 |
-
#: includes/providers/class-constant-contact.php:
|
2563 |
msgid "Wondering if email marketing is really worth your time?"
|
2564 |
msgstr ""
|
2565 |
|
2566 |
-
#: includes/providers/class-constant-contact.php:
|
2567 |
msgid ""
|
2568 |
"Email is hands-down the most effective way to nurture leads and turn them "
|
2569 |
"into customers, with a return on investment (ROI) of <strong>$44 back for "
|
2570 |
"every $1 spent</strong> according to Direct Marketing Association."
|
2571 |
msgstr ""
|
2572 |
|
2573 |
-
#: includes/providers/class-constant-contact.php:
|
2574 |
msgid ""
|
2575 |
"Here are 3 big reasons why every smart business in the world has an email "
|
2576 |
"list:"
|
2577 |
msgstr ""
|
2578 |
|
2579 |
-
#: includes/providers/class-constant-contact.php:
|
2580 |
msgid ""
|
2581 |
"<strong>Email is still #1</strong> - At least 91% of consumers check their "
|
2582 |
"email on a daily basis. You get direct access to your subscribers, without "
|
2583 |
"having to play by social media's rules and algorithms."
|
2584 |
msgstr ""
|
2585 |
|
2586 |
-
#: includes/providers/class-constant-contact.php:
|
2587 |
msgid ""
|
2588 |
"<strong>You own your email list</strong> - Unlike with social media, your "
|
2589 |
"list is your property and no one can revoke your access to it."
|
2590 |
msgstr ""
|
2591 |
|
2592 |
-
#: includes/providers/class-constant-contact.php:
|
2593 |
msgid ""
|
2594 |
"<strong>Email converts</strong> - People who buy products marketed through "
|
2595 |
"email spend 138% more than those who don't receive email offers."
|
2596 |
msgstr ""
|
2597 |
|
2598 |
-
#: includes/providers/class-constant-contact.php:
|
2599 |
msgid ""
|
2600 |
"That's why it's crucial to start collecting email addresses and "
|
2601 |
"building your list as soon as possible."
|
2602 |
msgstr ""
|
2603 |
|
2604 |
-
#: includes/providers/class-constant-contact.php:
|
2605 |
msgid ""
|
2606 |
"For more details, see this guide on <a href=\"%s\" target=\"_blank\" rel="
|
2607 |
-
"\"noopener noreferrer\">why building your email list is so important
|
2608 |
msgstr ""
|
2609 |
|
2610 |
-
#: includes/providers/class-constant-contact.php:
|
2611 |
msgid "You've Already Started - Here's the Next Step (It's Easy)"
|
2612 |
msgstr ""
|
2613 |
|
2614 |
-
#: includes/providers/class-constant-contact.php:
|
2615 |
msgid "Here are the 3 things you need to build an email list:"
|
2616 |
msgstr ""
|
2617 |
|
2618 |
-
#: includes/providers/class-constant-contact.php:
|
2619 |
msgid "A Website or Blog"
|
2620 |
msgstr ""
|
2621 |
|
2622 |
-
#: includes/providers/class-constant-contact.php:
|
2623 |
msgid "High-Converting Form Builder"
|
2624 |
msgstr ""
|
2625 |
|
2626 |
-
#: includes/providers/class-constant-contact.php:
|
2627 |
msgid "The Best Email Marketing Service"
|
2628 |
msgstr ""
|
2629 |
|
2630 |
-
#: includes/providers/class-constant-contact.php:
|
2631 |
msgid ""
|
2632 |
"With a powerful email marketing service like Constant Contact, you can "
|
2633 |
"instantly send out mass notifications and beautifully designed newsletters "
|
2634 |
"to engage your subscribers."
|
2635 |
msgstr ""
|
2636 |
|
2637 |
-
#: includes/providers/class-constant-contact.php:
|
2638 |
msgid "Get Started with Constant Contact for Free"
|
2639 |
msgstr ""
|
2640 |
|
2641 |
-
#: includes/providers/class-constant-contact.php:
|
2642 |
msgid ""
|
2643 |
"WPForms plugin makes it fast and easy to capture all kinds of visitor "
|
2644 |
"information right from your WordPress site - even if you don't have a "
|
2645 |
"Constant Contact account."
|
2646 |
msgstr ""
|
2647 |
|
2648 |
-
#: includes/providers/class-constant-contact.php:
|
2649 |
msgid ""
|
2650 |
"But when you combine WPForms with Constant Contact, you can nurture your "
|
2651 |
"contacts and engage with them even after they leave your website. When you "
|
2652 |
"use Constant Contact + WPForms together, you can:"
|
2653 |
msgstr ""
|
2654 |
|
2655 |
-
#: includes/providers/class-constant-contact.php:
|
2656 |
msgid "Seamlessly add new contacts to your email list"
|
2657 |
msgstr ""
|
2658 |
|
2659 |
-
#: includes/providers/class-constant-contact.php:
|
2660 |
msgid "Create and send professional email newsletters"
|
2661 |
msgstr ""
|
2662 |
|
2663 |
-
#: includes/providers/class-constant-contact.php:
|
2664 |
msgid "Get expert marketing and support"
|
2665 |
msgstr ""
|
2666 |
|
2667 |
-
#: includes/providers/class-constant-contact.php:
|
2668 |
msgid "Try Constant Contact Today"
|
2669 |
msgstr ""
|
2670 |
|
2671 |
-
#: includes/providers/class-constant-contact.php:
|
2672 |
msgid "WPForms Makes List Building Easy"
|
2673 |
msgstr ""
|
2674 |
|
2675 |
-
#: includes/providers/class-constant-contact.php:
|
2676 |
msgid ""
|
2677 |
"When creating WPForms, our goal was to make a WordPress forms plugin "
|
2678 |
"that's both EASY and POWERFUL."
|
2679 |
msgstr ""
|
2680 |
|
2681 |
-
#: includes/providers/class-constant-contact.php:
|
2682 |
msgid ""
|
2683 |
"We made the form creation process extremely intuitive, so you can create a "
|
2684 |
"form to start capturing emails within 5 minutes or less."
|
2685 |
msgstr ""
|
2686 |
|
2687 |
-
#: includes/providers/class-constant-contact.php:
|
2688 |
msgid "Here's how it works."
|
2689 |
msgstr ""
|
2690 |
|
2691 |
-
#: includes/providers/class-constant-contact.php:
|
2692 |
msgid "1. Select from our pre-built templates, or create a form from scratch."
|
2693 |
msgstr ""
|
2694 |
|
2695 |
-
#: includes/providers/class-constant-contact.php:
|
2696 |
msgid "2. Drag and drop any field you want onto your signup form."
|
2697 |
msgstr ""
|
2698 |
|
2699 |
-
#: includes/providers/class-constant-contact.php:
|
2700 |
msgid "3. Connect your Constant Contact email list."
|
2701 |
msgstr ""
|
2702 |
|
2703 |
-
#: includes/providers/class-constant-contact.php:
|
2704 |
msgid "4. Add your new form to any post, page, or sidebar."
|
2705 |
msgstr ""
|
2706 |
|
2707 |
-
#: includes/providers/class-constant-contact.php:
|
2708 |
msgid ""
|
2709 |
"It doesn't matter what kind of business you run, what kind of website "
|
2710 |
"you have, or what industry you are in - you need to start building your "
|
2711 |
"email list today."
|
2712 |
msgstr ""
|
2713 |
|
2714 |
-
#: includes/providers/class-constant-contact.php:
|
2715 |
msgid "With Constant Contact + WPForms, growing your list is easy."
|
2716 |
msgstr ""
|
2717 |
|
2718 |
-
#: includes/templates/class-blank.php:
|
2719 |
msgid "Blank Form"
|
2720 |
msgstr ""
|
2721 |
|
2722 |
-
#: includes/templates/class-blank.php:
|
2723 |
msgid ""
|
2724 |
"The blank form allows you to create any type of form using our drag & drop "
|
2725 |
"builder."
|
2726 |
msgstr ""
|
2727 |
|
2728 |
-
#: includes/templates/class-blank.php:
|
2729 |
-
#: includes/templates/class-contact.php:
|
2730 |
-
#: includes/templates/class-subscribe.php:
|
2731 |
-
#: includes/templates/class-suggestion.php:
|
2732 |
#: pro/includes/templates/class-donation.php:66
|
2733 |
#: pro/includes/templates/class-order.php:100
|
2734 |
#: pro/includes/templates/class-request-quote.php:70
|
2735 |
msgid "Sending..."
|
2736 |
msgstr ""
|
2737 |
|
2738 |
-
#: includes/templates/class-contact.php:
|
2739 |
msgid "Simple Contact Form"
|
2740 |
msgstr ""
|
2741 |
|
2742 |
-
#: includes/templates/class-contact.php:
|
2743 |
msgid ""
|
2744 |
"Allow your users to contact you with this simple contact form. You can add "
|
2745 |
"and remove fields as needed."
|
2746 |
msgstr ""
|
2747 |
|
2748 |
-
#: includes/templates/class-contact.php:
|
2749 |
-
#: includes/templates/class-suggestion.php:40
|
2750 |
-
msgid "E-mail"
|
2751 |
-
msgstr ""
|
2752 |
-
|
2753 |
-
#: includes/templates/class-contact.php:47
|
2754 |
#: pro/includes/templates/class-donation.php:58
|
2755 |
#: pro/includes/templates/class-order.php:92
|
2756 |
msgid "Comment or Message"
|
2757 |
msgstr ""
|
2758 |
|
2759 |
-
#: includes/templates/class-subscribe.php:
|
2760 |
msgid "Newsletter Signup Form"
|
2761 |
msgstr ""
|
2762 |
|
2763 |
-
#: includes/templates/class-subscribe.php:
|
2764 |
msgid ""
|
2765 |
"Add subscribers and grow your email list with this newsletter signup form. "
|
2766 |
"You can add and remove fields as needed."
|
2767 |
msgstr ""
|
2768 |
|
2769 |
-
#: includes/templates/class-subscribe.php:
|
2770 |
#: pro/includes/templates/class-donation.php:27
|
2771 |
#: pro/includes/templates/class-order.php:27
|
2772 |
msgid "Don't Forget"
|
2773 |
msgstr ""
|
2774 |
|
2775 |
-
#: includes/templates/class-subscribe.php:
|
2776 |
msgid "Click the marketing tab to configure your newsletter service provider"
|
2777 |
msgstr ""
|
2778 |
|
2779 |
-
#: includes/templates/class-suggestion.php:
|
2780 |
msgid "Suggestion Form"
|
2781 |
msgstr ""
|
2782 |
|
2783 |
-
#: includes/templates/class-suggestion.php:
|
2784 |
msgid ""
|
2785 |
"Ask your users for suggestions with this simple form template. You can add "
|
2786 |
"and remove fields as needed."
|
2787 |
msgstr ""
|
2788 |
|
2789 |
-
#: includes/templates/class-suggestion.php:
|
2790 |
msgid "Please enter your email, so we can follow up with you."
|
2791 |
msgstr ""
|
2792 |
|
2793 |
-
#: includes/templates/class-suggestion.php:
|
2794 |
msgid "Which department do you have a suggestion for?"
|
2795 |
msgstr ""
|
2796 |
|
2797 |
-
#: includes/templates/class-suggestion.php:
|
2798 |
msgid "Sales"
|
2799 |
msgstr ""
|
2800 |
|
2801 |
-
#: includes/templates/class-suggestion.php:
|
2802 |
msgid "Customer Support"
|
2803 |
msgstr ""
|
2804 |
|
2805 |
-
#: includes/templates/class-suggestion.php:
|
2806 |
msgid "Product Development"
|
2807 |
msgstr ""
|
2808 |
|
2809 |
-
#: includes/templates/class-suggestion.php:
|
2810 |
msgid "Subject"
|
2811 |
msgstr ""
|
2812 |
|
2813 |
-
#: lite/wpforms-lite.php:
|
2814 |
-
msgid "
|
2815 |
msgstr ""
|
2816 |
|
2817 |
-
#: lite/wpforms-lite.php:92 pro/wpforms-pro.php:
|
2818 |
msgid "Send To Email Address"
|
2819 |
msgstr ""
|
2820 |
|
2821 |
-
#: lite/wpforms-lite.php:95 pro/wpforms-pro.php:
|
2822 |
msgid ""
|
2823 |
"Enter the email address to receive form entry notifications. For multiple "
|
2824 |
"notifications, separate email addresses with a comma."
|
2825 |
msgstr ""
|
2826 |
|
2827 |
-
#: lite/wpforms-lite.php:111 pro/wpforms-pro.php:
|
2828 |
msgid "CC"
|
2829 |
msgstr ""
|
2830 |
|
2831 |
-
#: lite/wpforms-lite.php:127 pro/wpforms-pro.php:
|
2832 |
msgid "Email Subject"
|
2833 |
msgstr ""
|
2834 |
|
2835 |
-
#: lite/wpforms-lite.php:129 pro/wpforms-pro.php:
|
2836 |
-
|
|
|
2837 |
msgstr ""
|
2838 |
|
2839 |
-
#: lite/wpforms-lite.php:142 pro/wpforms-pro.php:
|
2840 |
msgid "From Name"
|
2841 |
msgstr ""
|
2842 |
|
2843 |
-
#: lite/wpforms-lite.php:158 pro/wpforms-pro.php:
|
2844 |
msgid "From Email"
|
2845 |
msgstr ""
|
2846 |
|
2847 |
-
#: lite/wpforms-lite.php:174 pro/wpforms-pro.php:
|
2848 |
msgid "Reply-To"
|
2849 |
msgstr ""
|
2850 |
|
2851 |
-
#: lite/wpforms-lite.php:199 pro/wpforms-pro.php:
|
2852 |
msgid ""
|
2853 |
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
2854 |
msgstr ""
|
2855 |
|
2856 |
-
#: lite/wpforms-lite.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2857 |
msgid "is a PRO Feature"
|
2858 |
msgstr ""
|
2859 |
|
2860 |
-
#: lite/wpforms-lite.php:
|
2861 |
msgid ""
|
2862 |
"We're sorry, %name% is not available on your plan.<br><br>Please upgrade to "
|
2863 |
"the PRO plan to unlock all these awesome features."
|
@@ -2871,57 +2934,52 @@ msgstr ""
|
|
2871 |
msgid "Could not deactivate addon. Please deacticate from the Plugins page."
|
2872 |
msgstr ""
|
2873 |
|
2874 |
-
#: pro/includes/admin/ajax-actions.php:
|
2875 |
msgid "Addon activated."
|
2876 |
msgstr ""
|
2877 |
|
2878 |
-
#: pro/includes/admin/ajax-actions.php:
|
2879 |
msgid "Could not activate addon. Please activate from the Plugins page."
|
2880 |
msgstr ""
|
2881 |
|
2882 |
-
#: pro/includes/admin/ajax-actions.php:
|
2883 |
-
#: pro/includes/admin/ajax-actions.php:
|
2884 |
-
#: pro/includes/admin/ajax-actions.php:
|
2885 |
-
#: pro/includes/admin/ajax-actions.php:
|
2886 |
msgid ""
|
2887 |
"Could not install addon. Please download from wpforms.com and install "
|
2888 |
"manually."
|
2889 |
msgstr ""
|
2890 |
|
2891 |
-
#: pro/includes/admin/ajax-actions.php:
|
2892 |
msgid "Addon installed."
|
2893 |
msgstr ""
|
2894 |
|
2895 |
-
#: pro/includes/admin/ajax-actions.php:
|
2896 |
-
#: pro/includes/admin/ajax-actions.php:
|
2897 |
msgid "Please enter a license key."
|
2898 |
msgstr ""
|
2899 |
|
2900 |
-
#: pro/includes/admin/builder/panels/class-payments.php:
|
2901 |
-
#: pro/wpforms-pro.php:149 pro/wpforms-pro.php:216
|
2902 |
-
msgid "Payments"
|
2903 |
-
msgstr ""
|
2904 |
-
|
2905 |
-
#: pro/includes/admin/builder/panels/class-payments.php:69
|
2906 |
msgid "Install Your Payment Integration"
|
2907 |
msgstr ""
|
2908 |
|
2909 |
-
#: pro/includes/admin/builder/panels/class-payments.php:
|
2910 |
msgid ""
|
2911 |
-
"It seems you do not have any payment
|
2912 |
-
"the <a href=\"%s\">
|
2913 |
"your payment service."
|
2914 |
msgstr ""
|
2915 |
|
2916 |
-
#: pro/includes/admin/builder/panels/class-payments.php:
|
2917 |
msgid "Select Your Payment Integration"
|
2918 |
msgstr ""
|
2919 |
|
2920 |
-
#: pro/includes/admin/builder/panels/class-payments.php:
|
2921 |
msgid ""
|
2922 |
-
"Select your
|
2923 |
-
"
|
2924 |
-
"
|
2925 |
msgstr ""
|
2926 |
|
2927 |
#: pro/includes/admin/class-addons.php:84
|
@@ -2977,7 +3035,7 @@ msgid "Not Installed"
|
|
2977 |
msgstr ""
|
2978 |
|
2979 |
#: pro/includes/admin/class-addons.php:225
|
2980 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
2981 |
msgid "Status"
|
2982 |
msgstr ""
|
2983 |
|
@@ -2993,8 +3051,9 @@ msgid "Congratulations! This site is now receiving automatic updates."
|
|
2993 |
msgstr ""
|
2994 |
|
2995 |
#: pro/includes/admin/class-license.php:200
|
|
|
2996 |
msgid ""
|
2997 |
-
"
|
2998 |
"user associated with the key has been deleted. Please use a different key to "
|
2999 |
"continue receiving automatic updates."
|
3000 |
msgstr ""
|
@@ -3033,338 +3092,349 @@ msgid ""
|
|
3033 |
"receiving automatic updates.</a>"
|
3034 |
msgstr ""
|
3035 |
|
3036 |
-
#: pro/includes/admin/class-
|
3037 |
-
msgid ""
|
3038 |
-
"Your license key for WPForms is invalid. The key no longer exists or the "
|
3039 |
-
"user associated with the key has been deleted. Please use a different key to "
|
3040 |
-
"continue receiving automatic updates."
|
3041 |
-
msgstr ""
|
3042 |
-
|
3043 |
-
#: pro/includes/admin/entries/class-entries-export.php:193
|
3044 |
msgid "Date GMT"
|
3045 |
msgstr ""
|
3046 |
|
3047 |
-
#: pro/includes/admin/entries/class-entries-export.php:
|
3048 |
msgid "ID"
|
3049 |
msgstr ""
|
3050 |
|
3051 |
-
#: pro/includes/admin/entries/class-entries-export.php:
|
3052 |
msgid "You do not have permission to export entries."
|
3053 |
msgstr ""
|
3054 |
|
3055 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3056 |
msgid "All"
|
3057 |
msgstr ""
|
3058 |
|
3059 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3060 |
msgid "Unread"
|
3061 |
msgstr ""
|
3062 |
|
3063 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3064 |
msgid "Starred"
|
3065 |
msgstr ""
|
3066 |
|
3067 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3068 |
#: pro/includes/fields/class-payment-total.php:21
|
3069 |
msgid "Total"
|
3070 |
msgstr ""
|
3071 |
|
3072 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3073 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3074 |
msgid "Actions"
|
3075 |
msgstr ""
|
3076 |
|
3077 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3078 |
msgid "Change columns to display"
|
3079 |
msgstr ""
|
3080 |
|
3081 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3082 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3083 |
msgid "Unknown"
|
3084 |
msgstr ""
|
3085 |
|
3086 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3087 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3088 |
msgid "Completed"
|
3089 |
msgstr ""
|
3090 |
|
3091 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3092 |
msgid "View Form Entry"
|
3093 |
msgstr ""
|
3094 |
|
3095 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3096 |
msgid "View"
|
3097 |
msgstr ""
|
3098 |
|
3099 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3100 |
msgid "Delete Form Entry"
|
3101 |
msgstr ""
|
3102 |
|
3103 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3104 |
msgid "Mark Read"
|
3105 |
msgstr ""
|
3106 |
|
3107 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3108 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3109 |
msgid "Mark Unread"
|
3110 |
msgstr ""
|
3111 |
|
3112 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3113 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3114 |
msgid "Star"
|
3115 |
msgstr ""
|
3116 |
|
3117 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3118 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3119 |
msgid "Unstar"
|
3120 |
msgstr ""
|
3121 |
|
3122 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3123 |
msgid "----------"
|
3124 |
msgstr ""
|
3125 |
|
3126 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3127 |
-
msgid "Entry marked as read."
|
3128 |
-
|
3129 |
-
msgstr[0] ""
|
3130 |
-
msgstr[1] ""
|
3131 |
|
3132 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3133 |
-
msgid "
|
3134 |
-
|
3135 |
-
msgstr[0] ""
|
3136 |
-
msgstr[1] ""
|
3137 |
|
3138 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3139 |
-
msgid "Entry
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
msgstr
|
3149 |
-
|
3150 |
-
#: pro/includes/admin/entries/class-entries-list-table.php:
|
3151 |
-
msgid "
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3157 |
msgid "Whoops, it appears you do not have any form entries yet."
|
3158 |
msgstr ""
|
3159 |
|
3160 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3161 |
msgid "Number of entries per page:"
|
3162 |
msgstr ""
|
3163 |
|
3164 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3165 |
msgid "All entries marked as read."
|
3166 |
msgstr ""
|
3167 |
|
3168 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3169 |
-
msgid "All entries deleted."
|
3170 |
msgstr ""
|
3171 |
|
3172 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3173 |
-
msgid "Select the fields to show when viewing the entries list for this form.
|
3174 |
msgstr ""
|
3175 |
|
3176 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3177 |
msgid ""
|
3178 |
"Currently columns have not been configured, so we're showing the first 3 "
|
3179 |
"fields."
|
3180 |
msgstr ""
|
3181 |
|
3182 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3183 |
msgid "Select Form"
|
3184 |
msgstr ""
|
3185 |
|
3186 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3187 |
msgid "Open form selector"
|
3188 |
msgstr ""
|
3189 |
|
3190 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3191 |
msgid "Edit This Form"
|
3192 |
msgstr ""
|
3193 |
|
3194 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3195 |
msgid "Download Export (CSV)"
|
3196 |
msgstr ""
|
3197 |
|
3198 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3199 |
msgid "Mark All Read"
|
3200 |
msgstr ""
|
3201 |
|
3202 |
-
#: pro/includes/admin/entries/class-entries-list.php:
|
3203 |
msgid "Delete All"
|
3204 |
msgstr ""
|
3205 |
|
3206 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3207 |
msgid "This entry has been starred."
|
3208 |
msgstr ""
|
3209 |
|
3210 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3211 |
msgid "This entry has been unstarred."
|
3212 |
msgstr ""
|
3213 |
|
3214 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3215 |
msgid "This entry has been marked unread."
|
3216 |
msgstr ""
|
3217 |
|
3218 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3219 |
msgid "Note deleted."
|
3220 |
msgstr ""
|
3221 |
|
3222 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3223 |
msgid "Note added."
|
3224 |
msgstr ""
|
3225 |
|
3226 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3227 |
msgid "Notifications sent!"
|
3228 |
msgstr ""
|
3229 |
|
3230 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3231 |
msgid "Invalid entry ID."
|
3232 |
msgstr ""
|
3233 |
|
3234 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3235 |
msgid "Entry not found."
|
3236 |
msgstr ""
|
3237 |
|
3238 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3239 |
msgid "Form not found."
|
3240 |
msgstr ""
|
3241 |
|
3242 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3243 |
msgid "View Entry"
|
3244 |
msgstr ""
|
3245 |
|
3246 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3247 |
msgid "Back to All Entries"
|
3248 |
msgstr ""
|
3249 |
|
3250 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3251 |
-
msgid "Entry %s of %s"
|
3252 |
msgstr ""
|
3253 |
|
3254 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3255 |
msgid "Previous form entry"
|
3256 |
msgstr ""
|
3257 |
|
3258 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3259 |
msgid "Current form entry"
|
3260 |
msgstr ""
|
3261 |
|
3262 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3263 |
msgid "Next form entry"
|
3264 |
msgstr ""
|
3265 |
|
3266 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3267 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3268 |
msgid "Add Note"
|
3269 |
msgstr ""
|
3270 |
|
3271 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3272 |
msgid "No notes."
|
3273 |
msgstr ""
|
3274 |
|
3275 |
-
|
3276 |
-
|
|
|
|
|
3277 |
msgstr ""
|
3278 |
|
3279 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3280 |
-
|
|
|
3281 |
msgstr ""
|
3282 |
|
3283 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3284 |
msgid "Debug Information"
|
3285 |
msgstr ""
|
3286 |
|
3287 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3288 |
msgid "Entry Details"
|
3289 |
msgstr ""
|
3290 |
|
3291 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3292 |
msgid "Entry ID:"
|
3293 |
msgstr ""
|
3294 |
|
3295 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3296 |
msgid "Submitted:"
|
3297 |
msgstr ""
|
3298 |
|
3299 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3300 |
-
msgid "Modified
|
3301 |
msgstr ""
|
3302 |
|
3303 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3304 |
msgid "M j, Y @ H:i"
|
3305 |
msgstr ""
|
3306 |
|
3307 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3308 |
msgid "User:"
|
3309 |
msgstr ""
|
3310 |
|
3311 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3312 |
msgid "User IP:"
|
3313 |
msgstr ""
|
3314 |
|
3315 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3316 |
msgid "Status:"
|
3317 |
msgstr ""
|
3318 |
|
3319 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
|
|
|
|
|
|
|
|
3320 |
msgid "PayPal Standard"
|
3321 |
msgstr ""
|
3322 |
|
3323 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3324 |
msgid "Payment Details"
|
3325 |
msgstr ""
|
3326 |
|
3327 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3328 |
-
msgid "
|
3329 |
msgstr ""
|
3330 |
|
3331 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3332 |
-
msgid "
|
3333 |
msgstr ""
|
3334 |
|
3335 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3336 |
-
msgid "
|
3337 |
msgstr ""
|
3338 |
|
3339 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
|
|
3340 |
msgid "Test"
|
3341 |
msgstr ""
|
3342 |
|
3343 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3344 |
msgid "Transaction ID:"
|
3345 |
msgstr ""
|
3346 |
|
3347 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3348 |
msgid "Note:"
|
3349 |
msgstr ""
|
3350 |
|
3351 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3352 |
msgid "Export (CSV)"
|
3353 |
msgstr ""
|
3354 |
|
3355 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3356 |
msgid "Resend Notifications"
|
3357 |
msgstr ""
|
3358 |
|
3359 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3360 |
msgid "Related Entries"
|
3361 |
msgstr ""
|
3362 |
|
3363 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3364 |
msgid "The user who created this entry also submitted the entries below."
|
3365 |
msgstr ""
|
3366 |
|
3367 |
-
#: pro/includes/admin/entries/class-entries-single.php:
|
3368 |
msgid "(Abandoned)"
|
3369 |
msgstr ""
|
3370 |
|
@@ -3373,133 +3443,127 @@ msgid "Conditionals"
|
|
3373 |
msgstr ""
|
3374 |
|
3375 |
#: pro/includes/class-conditional-logic-fields.php:364
|
3376 |
-
msgid "Entry Notification stopped by conditional logic"
|
3377 |
msgstr ""
|
3378 |
|
3379 |
-
#: pro/includes/fields/class-address.php:
|
3380 |
#: pro/includes/templates/class-order.php:58
|
3381 |
msgid "Address"
|
3382 |
msgstr ""
|
3383 |
|
3384 |
-
#: pro/includes/fields/class-address.php:
|
3385 |
#: pro/includes/fields/class-phone.php:90
|
3386 |
msgid "US"
|
3387 |
msgstr ""
|
3388 |
|
3389 |
-
#: pro/includes/fields/class-address.php:29
|
3390 |
#: pro/includes/fields/class-address.php:39
|
3391 |
-
#: pro/includes/fields/class-address.php:
|
|
|
3392 |
msgid "Address Line 1"
|
3393 |
msgstr ""
|
3394 |
|
3395 |
-
#: pro/includes/fields/class-address.php:30
|
3396 |
#: pro/includes/fields/class-address.php:40
|
3397 |
-
#: pro/includes/fields/class-address.php:
|
|
|
3398 |
msgid "Address Line 2"
|
3399 |
msgstr ""
|
3400 |
|
3401 |
-
#: pro/includes/fields/class-address.php:31
|
3402 |
#: pro/includes/fields/class-address.php:41
|
3403 |
-
#: pro/includes/fields/class-address.php:
|
|
|
3404 |
msgid "City"
|
3405 |
msgstr ""
|
3406 |
|
3407 |
-
#: pro/includes/fields/class-address.php:32
|
3408 |
-
#: pro/includes/fields/class-address.php:34
|
3409 |
#: pro/includes/fields/class-address.php:42
|
3410 |
-
msgid "
|
3411 |
msgstr ""
|
3412 |
|
3413 |
-
#: pro/includes/fields/class-address.php:
|
3414 |
-
msgid "
|
3415 |
msgstr ""
|
3416 |
|
3417 |
-
#: pro/includes/fields/class-address.php:
|
3418 |
#: pro/includes/fields/class-phone.php:91
|
3419 |
msgid "International"
|
3420 |
msgstr ""
|
3421 |
|
3422 |
-
#: pro/includes/fields/class-address.php:
|
3423 |
msgid "Postal Code"
|
3424 |
msgstr ""
|
3425 |
|
3426 |
-
#: pro/includes/fields/class-address.php:
|
3427 |
-
#: pro/includes/fields/class-address.php:
|
3428 |
msgid "State / Province / Region"
|
3429 |
msgstr ""
|
3430 |
|
3431 |
-
#: pro/includes/fields/class-address.php:
|
3432 |
-
#: pro/includes/fields/class-address.php:
|
3433 |
msgid "Country"
|
3434 |
msgstr ""
|
3435 |
|
3436 |
-
#: pro/includes/fields/class-address.php:
|
3437 |
msgid "Select scheme format for the address field."
|
3438 |
msgstr ""
|
3439 |
|
3440 |
-
#: pro/includes/fields/class-address.php:
|
3441 |
msgid "Scheme"
|
3442 |
msgstr ""
|
3443 |
|
3444 |
-
#: pro/includes/fields/class-address.php:
|
3445 |
msgid "ZIP / Postal"
|
3446 |
msgstr ""
|
3447 |
|
3448 |
-
#: pro/includes/fields/class-date-time.php:
|
3449 |
msgid "Date / Time"
|
3450 |
msgstr ""
|
3451 |
|
3452 |
-
#: pro/includes/fields/class-date-time.php:
|
3453 |
msgid "Select format for the date field."
|
3454 |
msgstr ""
|
3455 |
|
3456 |
-
#: pro/includes/fields/class-date-time.php:
|
3457 |
msgid "Date and Time"
|
3458 |
msgstr ""
|
3459 |
|
3460 |
-
#: pro/includes/fields/class-date-time.php:
|
3461 |
-
#: pro/includes/fields/class-date-time.php:
|
3462 |
-
#: pro/includes/fields/class-date-time.php:
|
3463 |
-
#: pro/includes/fields/class-date-time.php:
|
3464 |
msgid "Time"
|
3465 |
msgstr ""
|
3466 |
|
3467 |
-
#: pro/includes/fields/class-date-time.php:
|
3468 |
msgid "Advanced date options."
|
3469 |
msgstr ""
|
3470 |
|
3471 |
-
#: pro/includes/fields/class-date-time.php:
|
3472 |
msgid "Date Picker"
|
3473 |
msgstr ""
|
3474 |
|
3475 |
-
#: pro/includes/fields/class-date-time.php:
|
3476 |
msgid "Date Dropdown"
|
3477 |
msgstr ""
|
3478 |
|
3479 |
-
#: pro/includes/fields/class-date-time.php:
|
3480 |
msgid "15 minutes"
|
3481 |
msgstr ""
|
3482 |
|
3483 |
-
#: pro/includes/fields/class-date-time.php:
|
3484 |
msgid "30 minute"
|
3485 |
msgstr ""
|
3486 |
|
3487 |
-
#: pro/includes/fields/class-date-time.php:
|
3488 |
msgid "1 hour"
|
3489 |
msgstr ""
|
3490 |
|
3491 |
-
#: pro/includes/fields/class-date-time.php:
|
3492 |
msgid "Advanced time options"
|
3493 |
msgstr ""
|
3494 |
|
3495 |
-
#: pro/includes/fields/class-date-time.php:
|
3496 |
msgid "Interval"
|
3497 |
msgstr ""
|
3498 |
|
3499 |
-
#: pro/includes/fields/class-date-time.php:510
|
3500 |
-
msgid "YYYY"
|
3501 |
-
msgstr ""
|
3502 |
-
|
3503 |
#: pro/includes/fields/class-divider.php:21
|
3504 |
msgid "Section Divider"
|
3505 |
msgstr ""
|
@@ -3522,8 +3586,8 @@ msgstr ""
|
|
3522 |
|
3523 |
#: pro/includes/fields/class-file-upload.php:179
|
3524 |
msgid ""
|
3525 |
-
"Enter the max file size, in
|
3526 |
-
"defaults to the maximum size the server allows which is "
|
3527 |
msgstr ""
|
3528 |
|
3529 |
#: pro/includes/fields/class-file-upload.php:227
|
@@ -3567,7 +3631,7 @@ msgid "File upload stopped by extension."
|
|
3567 |
msgstr ""
|
3568 |
|
3569 |
#: pro/includes/fields/class-file-upload.php:323
|
3570 |
-
msgid "File upload error. "
|
3571 |
msgstr ""
|
3572 |
|
3573 |
#: pro/includes/fields/class-file-upload.php:342
|
@@ -3594,114 +3658,112 @@ msgstr ""
|
|
3594 |
msgid "Contents of this field are not displayed in the admin area."
|
3595 |
msgstr ""
|
3596 |
|
3597 |
-
#: pro/includes/fields/class-page-break.php:
|
3598 |
-
#: pro/includes/fields/class-page-break.php:
|
3599 |
msgid "Page Break"
|
3600 |
msgstr ""
|
3601 |
|
3602 |
-
|
3603 |
-
|
|
|
|
|
3604 |
msgstr ""
|
3605 |
|
3606 |
-
#: pro/includes/fields/class-page-break.php:
|
3607 |
-
msgid "of"
|
3608 |
-
msgstr ""
|
3609 |
-
|
3610 |
-
#: pro/includes/fields/class-page-break.php:271
|
3611 |
msgid "Progress Bar"
|
3612 |
msgstr ""
|
3613 |
|
3614 |
-
#: pro/includes/fields/class-page-break.php:
|
3615 |
msgid "Circles"
|
3616 |
msgstr ""
|
3617 |
|
3618 |
-
#: pro/includes/fields/class-page-break.php:
|
3619 |
msgid "Connector"
|
3620 |
msgstr ""
|
3621 |
|
3622 |
-
#: pro/includes/fields/class-page-break.php:
|
3623 |
msgid "None"
|
3624 |
msgstr ""
|
3625 |
|
3626 |
-
#: pro/includes/fields/class-page-break.php:
|
3627 |
msgid "Progress Indicator"
|
3628 |
msgstr ""
|
3629 |
|
3630 |
-
#: pro/includes/fields/class-page-break.php:
|
3631 |
msgid ""
|
3632 |
"Select theme for Page Indicator which is displayed at the top of the form."
|
3633 |
msgstr ""
|
3634 |
|
3635 |
-
#: pro/includes/fields/class-page-break.php:
|
3636 |
msgid "Page Indicator Color"
|
3637 |
msgstr ""
|
3638 |
|
3639 |
-
#: pro/includes/fields/class-page-break.php:
|
3640 |
msgid "Select the primary color for the Page Indicator theme."
|
3641 |
msgstr ""
|
3642 |
|
3643 |
-
#: pro/includes/fields/class-page-break.php:
|
3644 |
msgid "Page Title"
|
3645 |
msgstr ""
|
3646 |
|
3647 |
-
#: pro/includes/fields/class-page-break.php:
|
3648 |
msgid "Enter text for the page title."
|
3649 |
msgstr ""
|
3650 |
|
3651 |
-
#: pro/includes/fields/class-page-break.php:
|
3652 |
msgid "Next Label"
|
3653 |
msgstr ""
|
3654 |
|
3655 |
-
#: pro/includes/fields/class-page-break.php:
|
3656 |
msgid "Enter text for Next page navigation button."
|
3657 |
msgstr ""
|
3658 |
|
3659 |
-
#: pro/includes/fields/class-page-break.php:
|
3660 |
-
#: pro/includes/fields/class-page-break.php:
|
3661 |
msgid "Next"
|
3662 |
msgstr ""
|
3663 |
|
3664 |
-
#: pro/includes/fields/class-page-break.php:
|
3665 |
msgid "Display Previous"
|
3666 |
msgstr ""
|
3667 |
|
3668 |
-
#: pro/includes/fields/class-page-break.php:
|
3669 |
msgid "Toggle displaying the Previous page navigation button."
|
3670 |
msgstr ""
|
3671 |
|
3672 |
-
#: pro/includes/fields/class-page-break.php:
|
3673 |
msgid "Previous Label"
|
3674 |
msgstr ""
|
3675 |
|
3676 |
-
#: pro/includes/fields/class-page-break.php:
|
3677 |
msgid "Enter text for Previous page navigation button."
|
3678 |
msgstr ""
|
3679 |
|
3680 |
-
#: pro/includes/fields/class-page-break.php:
|
3681 |
msgid "Page Navigation Alignment"
|
3682 |
msgstr ""
|
3683 |
|
3684 |
-
#: pro/includes/fields/class-page-break.php:
|
3685 |
msgid "Select the alignment for the Next/Previous page navigation buttons"
|
3686 |
msgstr ""
|
3687 |
|
3688 |
-
#: pro/includes/fields/class-page-break.php:
|
3689 |
msgid "Left"
|
3690 |
msgstr ""
|
3691 |
|
3692 |
-
#: pro/includes/fields/class-page-break.php:
|
3693 |
msgid "Right"
|
3694 |
msgstr ""
|
3695 |
|
3696 |
-
#: pro/includes/fields/class-page-break.php:
|
3697 |
msgid "Center"
|
3698 |
msgstr ""
|
3699 |
|
3700 |
-
#: pro/includes/fields/class-page-break.php:
|
3701 |
msgid "Split"
|
3702 |
msgstr ""
|
3703 |
|
3704 |
-
#: pro/includes/fields/class-page-break.php:
|
3705 |
msgid "First Page"
|
3706 |
msgstr ""
|
3707 |
|
@@ -3721,10 +3783,10 @@ msgid "Enable Password Confirmation"
|
|
3721 |
msgstr ""
|
3722 |
|
3723 |
#: pro/includes/fields/class-password.php:189
|
3724 |
-
msgid "Check this option ask
|
3725 |
msgstr ""
|
3726 |
|
3727 |
-
#: pro/includes/fields/class-payment-credit-card.php:21 pro/wpforms-pro.php:
|
3728 |
msgid "Credit Card"
|
3729 |
msgstr ""
|
3730 |
|
@@ -3760,11 +3822,6 @@ msgstr ""
|
|
3760 |
msgid "Name on Card Placeholder Text"
|
3761 |
msgstr ""
|
3762 |
|
3763 |
-
#: pro/includes/fields/class-payment-credit-card.php:323
|
3764 |
-
#: pro/includes/fields/class-payment-credit-card.php:426
|
3765 |
-
msgid "YY"
|
3766 |
-
msgstr ""
|
3767 |
-
|
3768 |
#: pro/includes/fields/class-payment-credit-card.php:355
|
3769 |
msgid ""
|
3770 |
"This page is insecure. Credit Card field should be used for testing purposes "
|
@@ -3846,10 +3903,6 @@ msgstr ""
|
|
3846 |
msgid "Amount mismatch"
|
3847 |
msgstr ""
|
3848 |
|
3849 |
-
#: pro/includes/fields/class-payment-total.php:199
|
3850 |
-
msgid "Payment is required"
|
3851 |
-
msgstr ""
|
3852 |
-
|
3853 |
#: pro/includes/fields/class-phone.php:21
|
3854 |
#: pro/includes/templates/class-order.php:50
|
3855 |
#: pro/includes/templates/class-request-quote.php:54
|
@@ -3860,121 +3913,108 @@ msgstr ""
|
|
3860 |
msgid "Select format for the phone form field"
|
3861 |
msgstr ""
|
3862 |
|
3863 |
-
#: pro/includes/fields/class-url.php:
|
3864 |
msgid "Website / URL"
|
3865 |
msgstr ""
|
3866 |
|
3867 |
-
#: pro/includes/
|
3868 |
-
msgid "Please enter a valid URL"
|
3869 |
-
msgstr ""
|
3870 |
-
|
3871 |
-
#: pro/includes/payments/functions.php:21
|
3872 |
msgid "U.S. Dollar"
|
3873 |
msgstr ""
|
3874 |
|
3875 |
-
#: pro/includes/payments/functions.php:
|
3876 |
msgid "Pound Sterling"
|
3877 |
msgstr ""
|
3878 |
|
3879 |
-
#: pro/includes/payments/functions.php:
|
3880 |
msgid "Euro"
|
3881 |
msgstr ""
|
3882 |
|
3883 |
-
#: pro/includes/payments/functions.php:
|
3884 |
msgid "Australian Dollar"
|
3885 |
msgstr ""
|
3886 |
|
3887 |
-
#: pro/includes/payments/functions.php:
|
3888 |
msgid "Brazilian Real"
|
3889 |
msgstr ""
|
3890 |
|
3891 |
-
#: pro/includes/payments/functions.php:
|
3892 |
msgid "Canadian Dollar"
|
3893 |
msgstr ""
|
3894 |
|
3895 |
-
#: pro/includes/payments/functions.php:
|
3896 |
msgid "Czech Koruna"
|
3897 |
msgstr ""
|
3898 |
|
3899 |
-
#: pro/includes/payments/functions.php:
|
3900 |
msgid "Danish Krone"
|
3901 |
msgstr ""
|
3902 |
|
3903 |
-
#: pro/includes/payments/functions.php:
|
3904 |
msgid "Hong Kong Dollar"
|
3905 |
msgstr ""
|
3906 |
|
3907 |
-
#: pro/includes/payments/functions.php:
|
3908 |
msgid "Hungarian Forint"
|
3909 |
msgstr ""
|
3910 |
|
3911 |
-
#: pro/includes/payments/functions.php:
|
3912 |
msgid "Israeli New Sheqel"
|
3913 |
msgstr ""
|
3914 |
|
3915 |
-
#: pro/includes/payments/functions.php:
|
3916 |
msgid "Malaysian Ringgit"
|
3917 |
msgstr ""
|
3918 |
|
3919 |
-
#: pro/includes/payments/functions.php:
|
3920 |
msgid "Mexican Peso"
|
3921 |
msgstr ""
|
3922 |
|
3923 |
-
#: pro/includes/payments/functions.php:
|
3924 |
msgid "Norwegian Krone"
|
3925 |
msgstr ""
|
3926 |
|
3927 |
-
#: pro/includes/payments/functions.php:
|
3928 |
msgid "New Zealand Dollar"
|
3929 |
msgstr ""
|
3930 |
|
3931 |
-
#: pro/includes/payments/functions.php:
|
3932 |
msgid "Philippine Peso"
|
3933 |
msgstr ""
|
3934 |
|
3935 |
-
#: pro/includes/payments/functions.php:
|
3936 |
msgid "Polish Zloty"
|
3937 |
msgstr ""
|
3938 |
|
3939 |
-
#: pro/includes/payments/functions.php:
|
3940 |
msgid "Russian Ruble"
|
3941 |
msgstr ""
|
3942 |
|
3943 |
-
#: pro/includes/payments/functions.php:
|
3944 |
msgid "Singapore Dollar"
|
3945 |
msgstr ""
|
3946 |
|
3947 |
-
#: pro/includes/payments/functions.php:
|
3948 |
msgid "South African Rand"
|
3949 |
msgstr ""
|
3950 |
|
3951 |
-
#: pro/includes/payments/functions.php:
|
3952 |
msgid "Swedish Krona"
|
3953 |
msgstr ""
|
3954 |
|
3955 |
-
#: pro/includes/payments/functions.php:
|
3956 |
msgid "Swiss Franc"
|
3957 |
msgstr ""
|
3958 |
|
3959 |
-
#: pro/includes/payments/functions.php:
|
3960 |
msgid "Taiwan New Dollar"
|
3961 |
msgstr ""
|
3962 |
|
3963 |
-
#: pro/includes/payments/functions.php:
|
3964 |
msgid "Thai Baht"
|
3965 |
msgstr ""
|
3966 |
|
3967 |
-
#: pro/includes/templates/class-donation.php:20
|
3968 |
-
msgid "Donation Form"
|
3969 |
-
msgstr ""
|
3970 |
-
|
3971 |
-
#: pro/includes/templates/class-donation.php:22
|
3972 |
-
msgid ""
|
3973 |
-
"Start collecting donation payments on your website with this ready-made "
|
3974 |
-
"Donation form. You can add and remove fields as needed."
|
3975 |
-
msgstr ""
|
3976 |
-
|
3977 |
#: pro/includes/templates/class-donation.php:28
|
|
|
3978 |
msgid "Click the Payments tab to configure your payment provider"
|
3979 |
msgstr ""
|
3980 |
|
@@ -3982,20 +4022,12 @@ msgstr ""
|
|
3982 |
msgid "Donation Amount"
|
3983 |
msgstr ""
|
3984 |
|
3985 |
-
#: pro/includes/templates/class-order.php:20
|
3986 |
-
msgid "Billing / Order Form"
|
3987 |
-
msgstr ""
|
3988 |
-
|
3989 |
#: pro/includes/templates/class-order.php:22
|
3990 |
msgid ""
|
3991 |
"Collect Payments for product and service orders with this ready-made form "
|
3992 |
"template. You can add and remove fields as needed."
|
3993 |
msgstr ""
|
3994 |
|
3995 |
-
#: pro/includes/templates/class-order.php:28
|
3996 |
-
msgid "Click the payments tab to configure your payment provider"
|
3997 |
-
msgstr ""
|
3998 |
-
|
3999 |
#: pro/includes/templates/class-order.php:67
|
4000 |
msgid "Available Items"
|
4001 |
msgstr ""
|
@@ -4004,16 +4036,6 @@ msgstr ""
|
|
4004 |
msgid "Total Amount"
|
4005 |
msgstr ""
|
4006 |
|
4007 |
-
#: pro/includes/templates/class-request-quote.php:20
|
4008 |
-
msgid "Request A Quote Form"
|
4009 |
-
msgstr ""
|
4010 |
-
|
4011 |
-
#: pro/includes/templates/class-request-quote.php:22
|
4012 |
-
msgid ""
|
4013 |
-
"Start collecting leads with this pre-made Request a quote form. You can add "
|
4014 |
-
"and remove fields as needed."
|
4015 |
-
msgstr ""
|
4016 |
-
|
4017 |
#: pro/includes/templates/class-request-quote.php:40
|
4018 |
msgid "Business / Organization"
|
4019 |
msgstr ""
|
@@ -4022,75 +4044,77 @@ msgstr ""
|
|
4022 |
msgid "Request"
|
4023 |
msgstr ""
|
4024 |
|
4025 |
-
#: pro/wpforms-pro.php:
|
4026 |
msgid "File Extension"
|
4027 |
msgstr ""
|
4028 |
|
4029 |
-
#: pro/wpforms-pro.php:
|
4030 |
msgid "File Size"
|
4031 |
msgstr ""
|
4032 |
|
4033 |
-
#: pro/wpforms-pro.php:
|
4034 |
msgid "Time (12 hour)"
|
4035 |
msgstr ""
|
4036 |
|
4037 |
-
#: pro/wpforms-pro.php:
|
4038 |
msgid "Time (24 hour)"
|
4039 |
msgstr ""
|
4040 |
|
4041 |
-
#: pro/wpforms-pro.php:
|
4042 |
msgid "Payment Required"
|
4043 |
msgstr ""
|
4044 |
|
4045 |
-
#: pro/wpforms-pro.php:
|
4046 |
msgid "Currency"
|
4047 |
msgstr ""
|
4048 |
|
4049 |
-
#: pro/wpforms-pro.php:
|
4050 |
msgid "Disable storing entry information in WordPress"
|
4051 |
msgstr ""
|
4052 |
|
4053 |
-
#: pro/wpforms-pro.php:
|
4054 |
msgid "Add New Notification"
|
4055 |
msgstr ""
|
4056 |
|
4057 |
-
#: pro/wpforms-pro.php:
|
4058 |
msgid "Send"
|
4059 |
msgstr ""
|
4060 |
|
4061 |
-
#: pro/wpforms-pro.php:
|
4062 |
msgid "Don't send"
|
4063 |
msgstr ""
|
4064 |
|
4065 |
-
#: pro/wpforms-pro.php:
|
4066 |
msgid "this notification if"
|
4067 |
msgstr ""
|
4068 |
|
4069 |
-
#: pro/wpforms-pro.php:
|
4070 |
msgid "Email notifications"
|
4071 |
msgstr ""
|
4072 |
|
4073 |
-
|
|
|
4074 |
msgid ""
|
4075 |
-
"Install the <a href=\"%s\">Conditional Logic
|
4076 |
-
"
|
4077 |
msgstr ""
|
4078 |
|
4079 |
-
|
|
|
4080 |
msgid ""
|
4081 |
"Conditional logic functionality is now included in the core WPForms plugin! "
|
4082 |
"The WPForms Conditional Logic addon can be removed without affecting your "
|
4083 |
"forms. For more details <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
4084 |
-
"noreferrer\">read our
|
4085 |
msgstr ""
|
4086 |
|
4087 |
#: wpforms.php:58
|
4088 |
-
msgid "Please deactivate WPForms Lite before activating WPForms"
|
4089 |
msgstr ""
|
4090 |
|
4091 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.4.
|
4092 |
#. Plugin URI of the plugin/theme
|
4093 |
-
#. #-#-#-#-# wpforms.pot (WPForms 1.4.
|
4094 |
#. Author URI of the plugin/theme
|
4095 |
msgid "https://wpforms.com"
|
4096 |
msgstr ""
|
2 |
# This file is distributed under the same license as the WPForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPForms 1.4.1.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wpforms\n"
|
7 |
+
"POT-Creation-Date: 2017-10-03 15:15:00+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/admin.php:128 pro/includes/admin/class-addons.php:241
|
16 |
msgid "Activate"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: includes/admin/admin.php:129 pro/includes/admin/class-addons.php:198
|
20 |
msgid "Active"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: includes/admin/admin.php:130 pro/includes/admin/class-addons.php:236
|
24 |
msgid "Deactivate"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: includes/admin/admin.php:131 pro/includes/admin/class-addons.php:204
|
28 |
msgid "Inactive"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: includes/admin/admin.php:132 pro/includes/admin/class-addons.php:246
|
32 |
msgid "Install Addon"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/admin/admin.php:134 includes/admin/builder/class-builder.php:287
|
36 |
+
#: includes/admin/class-editor.php:97
|
37 |
+
#: pro/includes/admin/entries/class-entries-single.php:601
|
38 |
msgid "Cancel"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: includes/admin/admin.php:135 includes/admin/builder/class-builder.php:289
|
42 |
+
#: includes/admin/class-editor.php:71 includes/class-preview.php:160
|
43 |
msgid "Close"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: includes/admin/admin.php:136
|
47 |
msgid "Are you sure you want to delete this entry?"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: includes/admin/admin.php:137
|
51 |
msgid "Are you sure you want to delete ALL entries?"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: includes/admin/admin.php:138
|
55 |
+
#: pro/includes/admin/entries/class-entries-single.php:508
|
56 |
msgid "Hide Empty Fields"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: includes/admin/admin.php:139
|
60 |
+
#: pro/includes/admin/entries/class-entries-single.php:508
|
61 |
msgid "Show Empty Fields"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: includes/admin/admin.php:140
|
65 |
msgid "Entries Field Columns"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: includes/admin/admin.php:141
|
69 |
msgid "Are you sure you want to delete this note?"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: includes/admin/admin.php:142
|
73 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:364
|
74 |
msgid "Unstar entry"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/admin/admin.php:143
|
78 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:364
|
79 |
msgid "Star entry"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: includes/admin/admin.php:144
|
83 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:369
|
84 |
msgid "Mark entry read"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/admin/admin.php:145
|
88 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:369
|
89 |
msgid "Mark entry unread"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: includes/admin/admin.php:146
|
93 |
msgid "Select fields"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/admin/admin.php:147
|
97 |
msgid "Are you sure you want to delete this form?"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: includes/admin/admin.php:148
|
101 |
msgid "Are you sure you want to duplicate this form?"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: includes/admin/admin.php:149 includes/admin/builder/class-builder.php:297
|
105 |
msgid "Heads up!"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: includes/admin/admin.php:151 includes/admin/builder/class-builder.php:288
|
109 |
msgid "OK"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: includes/admin/admin.php:152
|
113 |
msgid "Are you sure you want to disconnect this account?"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: includes/admin/admin.php:153
|
117 |
msgid "Could not authenticate with the provider."
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: includes/admin/admin.php:154
|
121 |
msgid "Save and Refresh"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: includes/admin/admin.php:155
|
125 |
msgid "Upload or Choose Your Image"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: includes/admin/admin.php:156
|
129 |
msgid "Use Image"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#. translators: %1$s - WPForms plugin name; %2$s - opening a link tag; %3$s -
|
133 |
+
#. closing a link tag.
|
134 |
+
#: includes/admin/admin.php:351
|
|
|
135 |
msgid ""
|
136 |
"Your site is running an outdated version of PHP that is no longer supported "
|
137 |
"and may cause issues with %1$s. %2$sRead more%3$s for additional information."
|
141 |
msgid "You do not have permission."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/admin/ajax-actions.php:29
|
145 |
msgid "No data provided"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/admin/ajax-actions.php:69
|
149 |
+
msgid "An error occurred and the form could not be saved"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/admin/ajax-actions.php:95
|
153 |
+
msgid "No form name provided"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/admin/ajax-actions.php:132
|
157 |
msgid "Error creating form"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/admin/ajax-actions.php:150
|
161 |
msgid "No form ID provided"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: includes/admin/ajax-actions.php:173
|
165 |
msgid "Error updating form template"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: includes/admin/ajax-actions.php:281 includes/fields/class-base.php:405
|
169 |
msgid "post type"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: includes/admin/ajax-actions.php:309 includes/fields/class-base.php:412
|
173 |
msgid "taxonomy"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/admin/builder/class-builder.php:274
|
177 |
+
#: includes/class-conditional-logic-core.php:445
|
178 |
msgid "AND"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: includes/admin/builder/class-builder.php:276
|
182 |
msgid "Add New Choices"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: includes/admin/builder/class-builder.php:277
|
186 |
+
#: includes/fields/class-base.php:363
|
187 |
msgid "Bulk Add"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/admin/builder/class-builder.php:278
|
191 |
msgid "Hide Bulk Add"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/admin/builder/class-builder.php:279
|
195 |
msgid "Add Choices (one per line)"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/admin/builder/class-builder.php:280
|
199 |
msgid ""
|
200 |
"Blue\n"
|
201 |
"Red\n"
|
202 |
"Green"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: includes/admin/builder/class-builder.php:281
|
206 |
msgid "Show presets"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: includes/admin/builder/class-builder.php:282
|
210 |
msgid "Hide presets"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: includes/admin/builder/class-builder.php:286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
msgid ""
|
215 |
"The {source} {type} contains over {limit} items ({total}). This may make the "
|
216 |
"field difficult for your vistors to use and/or cause the form to be slow."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: includes/admin/builder/class-builder.php:290
|
220 |
msgid ""
|
221 |
"Due to form changes, conditional logic rules have been removed or updated:"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/admin/builder/class-builder.php:291
|
225 |
msgid ""
|
226 |
"Are you sure you want to disable conditional logic? This will remove the "
|
227 |
"rules for this field or setting."
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/admin/builder/class-builder.php:292
|
231 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:212
|
232 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:223
|
233 |
+
#: pro/includes/admin/entries/class-entries-list.php:399
|
234 |
+
#: pro/includes/admin/entries/class-entries-list.php:413
|
235 |
msgid "Field"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: includes/admin/builder/class-builder.php:293
|
239 |
msgid "Field Locked"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: includes/admin/builder/class-builder.php:294
|
243 |
msgid "This field cannot be deleted or duplicated."
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: includes/admin/builder/class-builder.php:295
|
247 |
msgid "Available Fields"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: includes/admin/builder/class-builder.php:296
|
251 |
msgid "No fields available"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/admin/builder/class-builder.php:299
|
255 |
msgid "No email fields"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/admin/builder/class-builder.php:300
|
259 |
msgid "Are you sure you want to delete this notification?"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/admin/builder/class-builder.php:301
|
263 |
msgid "Enter a notification name"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: includes/admin/builder/class-builder.php:302
|
267 |
msgid "Eg: User Confirmation"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/admin/builder/class-builder.php:303
|
271 |
msgid "You must provide a notification name"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: includes/admin/builder/class-builder.php:304
|
275 |
msgid ""
|
276 |
"Form must contain one notification. To disable all notifications use the "
|
277 |
+
"Notifications dropdown setting."
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: includes/admin/builder/class-builder.php:305 lite/wpforms-lite.php:84
|
281 |
+
#: pro/wpforms-pro.php:408
|
282 |
+
msgid "Default Notification"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: includes/admin/builder/class-builder.php:306
|
286 |
+
#: includes/admin/builder/class-builder.php:481
|
287 |
+
msgid "Save"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: includes/admin/builder/class-builder.php:307
|
291 |
msgid "Saving ..."
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: includes/admin/builder/class-builder.php:308
|
295 |
msgid "Saved!"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: includes/admin/builder/class-builder.php:309
|
299 |
msgid "Save and Exit"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: includes/admin/builder/class-builder.php:311
|
303 |
+
#: includes/fields/class-base.php:550
|
304 |
msgid "Show Layouts"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: includes/admin/builder/class-builder.php:312
|
308 |
msgid "Hide Layouts"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: includes/admin/builder/class-builder.php:313
|
312 |
msgid "Select your layout"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: includes/admin/builder/class-builder.php:314
|
316 |
msgid "Select your column"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: includes/admin/builder/class-builder.php:315
|
320 |
#: includes/admin/builder/class-builder.php:436
|
321 |
msgid "Loading"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: includes/admin/builder/class-builder.php:321
|
325 |
msgid "Use Template"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: includes/admin/builder/class-builder.php:322
|
329 |
msgid ""
|
330 |
"Changing templates on an existing form will DELETE existing form fields. Are "
|
331 |
"you sure you want apply the new template?"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: includes/admin/builder/class-builder.php:323
|
335 |
msgid ""
|
336 |
"You are almost done. To embed this form on your site, please paste the "
|
337 |
"following shortcode inside a post or page."
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: includes/admin/builder/class-builder.php:324
|
341 |
msgid "Or you can follow the instructions in this video."
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/admin/builder/class-builder.php:325
|
345 |
#: includes/admin/builder/class-builder.php:486
|
346 |
msgid "Exit"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: includes/admin/builder/class-builder.php:327
|
350 |
msgid "If you exit without saving, your changes will be lost."
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: includes/admin/builder/class-builder.php:328
|
354 |
msgid "Are you sure you want to delete this field?"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: includes/admin/builder/class-builder.php:329
|
358 |
msgid "Are you sure you want to duplicate this field?"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: includes/admin/builder/class-builder.php:330
|
362 |
msgid "(copy)"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: includes/admin/builder/class-builder.php:331
|
366 |
+
msgid "Please enter a form name."
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: includes/admin/builder/class-builder.php:332
|
370 |
msgid "This item must contain at least one choice."
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: includes/admin/builder/class-builder.php:333
|
374 |
+
#: includes/fields/class-base.php:253 includes/fields/class-base.php:599
|
375 |
+
#: lite/wpforms-lite.php:76 pro/wpforms-pro.php:401
|
376 |
msgid "Off"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: includes/admin/builder/class-builder.php:334
|
380 |
+
#: includes/fields/class-base.php:253 lite/wpforms-lite.php:75
|
381 |
+
#: pro/wpforms-pro.php:400
|
382 |
msgid "On"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: includes/admin/builder/class-builder.php:335
|
386 |
msgid "or"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: includes/admin/builder/class-builder.php:336
|
390 |
+
#: includes/templates/class-suggestion.php:61
|
391 |
msgid "Other"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: includes/admin/builder/class-builder.php:337
|
395 |
+
#: includes/class-conditional-logic-core.php:371
|
396 |
msgid "is"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: includes/admin/builder/class-builder.php:338
|
400 |
+
#: includes/class-conditional-logic-core.php:372
|
401 |
msgid "is not"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/admin/builder/class-builder.php:339
|
405 |
+
#: includes/class-conditional-logic-core.php:373
|
406 |
msgid "empty"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: includes/admin/builder/class-builder.php:340
|
410 |
+
#: includes/class-conditional-logic-core.php:374
|
411 |
msgid "not empty"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: includes/admin/builder/class-builder.php:341
|
415 |
+
#: includes/class-conditional-logic-core.php:379
|
416 |
msgid "contains"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: includes/admin/builder/class-builder.php:342
|
420 |
+
#: includes/class-conditional-logic-core.php:380
|
421 |
msgid "does not contain"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: includes/admin/builder/class-builder.php:343
|
425 |
+
#: includes/class-conditional-logic-core.php:381
|
426 |
msgid "starts with"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: includes/admin/builder/class-builder.php:344
|
430 |
+
#: includes/class-conditional-logic-core.php:382
|
431 |
msgid "ends with"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: includes/admin/builder/class-builder.php:345
|
435 |
msgid ""
|
436 |
"Form entries must be stored to accept payments. Please enable saving form "
|
437 |
"entries in the General settings first."
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/admin/builder/class-builder.php:346
|
441 |
+
#: pro/includes/fields/class-page-break.php:199
|
442 |
+
#: pro/includes/fields/class-page-break.php:521
|
443 |
msgid "Previous"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: includes/admin/builder/class-builder.php:347
|
447 |
+
#: includes/class-conditional-logic-core.php:445
|
448 |
msgid "Create new rule"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: includes/admin/builder/class-builder.php:348
|
452 |
msgid "Add new group"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: includes/admin/builder/class-builder.php:349
|
456 |
+
#: includes/class-conditional-logic-core.php:446
|
457 |
msgid "Delete rule"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: includes/admin/builder/class-builder.php:351
|
461 |
+
#: includes/admin/builder/functions.php:255 includes/fields/class-base.php:496
|
462 |
msgid "Show Smart Tags"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/admin/builder/class-builder.php:352
|
466 |
msgid "Hide Smart Tags"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: includes/admin/builder/class-builder.php:353
|
470 |
+
#: includes/class-conditional-logic-core.php:330
|
471 |
msgid "-- Select Field --"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: includes/admin/builder/class-builder.php:354
|
475 |
+
#: includes/class-conditional-logic-core.php:425
|
476 |
msgid "-- Select Choice --"
|
477 |
msgstr ""
|
478 |
|
505 |
msgstr ""
|
506 |
|
507 |
#: includes/admin/builder/class-builder.php:469
|
508 |
+
#: pro/includes/admin/entries/class-entries-list.php:528
|
509 |
msgid "Preview Form"
|
510 |
msgstr ""
|
511 |
|
512 |
#: includes/admin/builder/class-builder.php:471
|
513 |
+
#: includes/admin/overview/class-overview-table.php:182
|
514 |
msgid "Preview"
|
515 |
msgstr ""
|
516 |
|
526 |
msgid "Save Form"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: includes/admin/builder/functions.php:194
|
|
|
|
|
|
|
|
|
530 |
msgid "Field #"
|
531 |
msgstr ""
|
532 |
|
549 |
msgstr ""
|
550 |
|
551 |
#: includes/admin/builder/panels/class-fields.php:123
|
552 |
+
#: includes/admin/builder/panels/class-settings.php:130
|
553 |
msgid "Submit"
|
554 |
msgstr ""
|
555 |
|
574 |
msgstr ""
|
575 |
|
576 |
#: includes/admin/builder/panels/class-fields.php:252
|
577 |
+
#: includes/fields/class-base.php:796
|
578 |
msgid "Duplicate Field"
|
579 |
msgstr ""
|
580 |
|
581 |
#: includes/admin/builder/panels/class-fields.php:254
|
582 |
+
#: includes/fields/class-base.php:797
|
583 |
msgid "Delete Field"
|
584 |
msgstr ""
|
585 |
|
586 |
#: includes/admin/builder/panels/class-fields.php:256
|
587 |
+
#: includes/fields/class-base.php:798
|
588 |
msgid "Click to edit. Drag to reorder."
|
589 |
msgstr ""
|
590 |
|
624 |
"\">setup your form</a> before you can manage these settings."
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: includes/admin/builder/panels/class-providers.php:108
|
628 |
msgid "Install Your Marketing Integration"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: includes/admin/builder/panels/class-providers.php:109
|
632 |
msgid ""
|
633 |
+
"It seems you do not have any marketing addons activated. You can head over "
|
634 |
+
"to the <a href=\"%s\">Addons page</a> to install and activate the addon for "
|
635 |
+
"your provider."
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: includes/admin/builder/panels/class-providers.php:115
|
639 |
msgid "Select Your Marketing Integration"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: includes/admin/builder/panels/class-providers.php:116
|
643 |
msgid ""
|
644 |
"Select your email marketing service provider or CRM from the options on the "
|
645 |
"left. If you don't see your email marketing service listed, then let us know "
|
646 |
+
"and we'll do our best to get it added as fast as possible."
|
647 |
msgstr ""
|
648 |
|
649 |
#: includes/admin/builder/panels/class-settings.php:21
|
658 |
msgstr ""
|
659 |
|
660 |
#: includes/admin/builder/panels/class-settings.php:58 lite/wpforms-lite.php:61
|
661 |
+
#: lite/wpforms-lite.php:71 pro/wpforms-pro.php:387 pro/wpforms-pro.php:396
|
662 |
msgid "Notifications"
|
663 |
msgstr ""
|
664 |
|
665 |
#: includes/admin/builder/panels/class-settings.php:59
|
666 |
+
#: includes/admin/builder/panels/class-settings.php:187
|
667 |
msgid "Confirmation"
|
668 |
msgstr ""
|
669 |
|
674 |
msgstr ""
|
675 |
|
676 |
#: includes/admin/builder/panels/class-settings.php:94
|
677 |
+
#: includes/admin/builder/panels/class-setup.php:55
|
678 |
+
#: includes/class-smart-tags.php:37
|
679 |
+
msgid "Form Name"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: includes/admin/builder/panels/class-settings.php:104
|
683 |
msgid "Form Description"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/admin/builder/panels/class-settings.php:111
|
687 |
+
msgid "Hide form name and description area"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: includes/admin/builder/panels/class-settings.php:118
|
691 |
msgid "Form CSS Class"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: includes/admin/builder/panels/class-settings.php:120
|
695 |
msgid ""
|
696 |
"Enter CSS class names for the form wrapper. Multiple class names should be "
|
697 |
"separated with spaces."
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: includes/admin/builder/panels/class-settings.php:128
|
701 |
msgid "Submit Button Text"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: includes/admin/builder/panels/class-settings.php:138
|
705 |
msgid "Submit Button Processing Text"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: includes/admin/builder/panels/class-settings.php:140
|
709 |
msgid ""
|
710 |
"Enter the submit button text you would like the button display while the "
|
711 |
"form submit is processing."
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: includes/admin/builder/panels/class-settings.php:148
|
715 |
msgid "Submit Button CSS Class"
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: includes/admin/builder/panels/class-settings.php:150
|
719 |
msgid ""
|
720 |
"Enter CSS class names for the form submit button. Multiple names should be "
|
721 |
"separated with spaces."
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: includes/admin/builder/panels/class-settings.php:158
|
725 |
msgid "Enable anti-spam honeypot"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: includes/admin/builder/panels/class-settings.php:169
|
729 |
msgid "Enable Google invisible reCAPTCHA"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: includes/admin/builder/panels/class-settings.php:169
|
733 |
msgid "Enable Google reCAPTCHA (v2)"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: includes/admin/builder/panels/class-settings.php:194
|
737 |
msgid "Confirmation Type"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: includes/admin/builder/panels/class-settings.php:198
|
741 |
+
#: includes/templates/class-suggestion.php:76 lite/wpforms-lite.php:189
|
742 |
+
#: pro/wpforms-pro.php:542
|
743 |
msgid "Message"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: includes/admin/builder/panels/class-settings.php:199
|
747 |
msgid "Show Page"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: includes/admin/builder/panels/class-settings.php:200
|
751 |
msgid "Go to URL (Redirect)"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: includes/admin/builder/panels/class-settings.php:209
|
755 |
msgid "Confirmation Message"
|
756 |
msgstr ""
|
757 |
|
758 |
+
#: includes/admin/builder/panels/class-settings.php:211
|
759 |
msgid "Thanks for contacting us! We will be in touch with you shortly."
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: includes/admin/builder/panels/class-settings.php:222
|
763 |
msgid "Automatically scroll to the confirmation message"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: includes/admin/builder/panels/class-settings.php:235
|
767 |
msgid "Confirmation Page"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: includes/admin/builder/panels/class-settings.php:245
|
771 |
msgid "Confirmation Redirect URL"
|
772 |
msgstr ""
|
773 |
|
775 |
msgid "Setup"
|
776 |
msgstr ""
|
777 |
|
|
|
|
|
|
|
|
|
|
|
778 |
#: includes/admin/builder/panels/class-setup.php:56
|
779 |
msgid "Enter your form name here…"
|
780 |
msgstr ""
|
794 |
msgid "Additional Templates"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#. translators: %1$s - opening tag, %2$s - closing tag, %3$s - opening tag,
|
798 |
+
#. %4$s - closing tag.
|
799 |
+
#: includes/admin/builder/panels/class-setup.php:80
|
|
|
800 |
msgid ""
|
801 |
"Have a suggestion for a new template? %1$sWe'd love to hear it%2$s. Also, "
|
802 |
"you can %3$screate your own templates%4$s!"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: includes/admin/builder/panels/class-setup.php:93
|
806 |
msgid "Search additional templates..."
|
807 |
msgstr ""
|
808 |
|
809 |
+
#. translators:%1$s - opening a tag, %2$s - close tag, %3$s - opening tag, %4$s
|
810 |
+
#. - close tag.
|
811 |
+
#: includes/admin/builder/panels/class-setup.php:104
|
|
|
812 |
msgid ""
|
813 |
"More are available in the %1$sForm Templates Pack addon%2$s or by "
|
814 |
"%3$screating your own%4$s."
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: includes/admin/builder/panels/class-setup.php:147
|
818 |
msgid "Selected"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: includes/admin/builder/panels/class-setup.php:157
|
822 |
+
msgctxt "Template name"
|
823 |
+
msgid "%s template"
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: includes/admin/builder/panels/class-setup.php:157
|
827 |
+
msgctxt "Template name"
|
828 |
msgid "Create a %s"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: includes/admin/class-editor.php:44 includes/admin/class-editor.php:46
|
832 |
+
#: includes/admin/class-editor.php:101
|
833 |
msgid "Add Form"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: includes/admin/class-editor.php:70
|
837 |
msgid "Insert Form"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: includes/admin/class-editor.php:79
|
841 |
msgid "Select a form below to insert"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: includes/admin/class-editor.php:85
|
845 |
+
msgid "Show form name"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: includes/admin/class-editor.php:86
|
849 |
msgid "Show form description"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: includes/admin/class-editor.php:89
|
853 |
+
#: includes/admin/overview/class-overview-table.php:333
|
854 |
+
#: pro/includes/admin/entries/class-entries-list.php:311
|
855 |
msgid ""
|
856 |
"Whoops, you haven't created a form yet. Want to <a href=\"%s\">give it a go</"
|
857 |
"a>?"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.4.1.2) #-#-#-#-#
|
861 |
#. Plugin Name of the plugin/theme
|
862 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.4.1.2) #-#-#-#-#
|
863 |
#. Author of the plugin/theme
|
864 |
#: includes/admin/class-menu.php:39 includes/admin/class-menu.php:40
|
865 |
#: includes/admin/class-menu.php:51 includes/admin/class-menu.php:103
|
866 |
+
#: includes/integrations.php:45
|
867 |
msgid "WPForms"
|
868 |
msgstr ""
|
869 |
|
877 |
|
878 |
#: includes/admin/class-menu.php:62
|
879 |
#: includes/admin/overview/class-overview.php:124
|
|
|
880 |
msgid "Add New"
|
881 |
msgstr ""
|
882 |
|
885 |
msgstr ""
|
886 |
|
887 |
#: includes/admin/class-menu.php:72
|
888 |
+
#: includes/admin/overview/class-overview-table.php:174
|
889 |
+
#: pro/includes/admin/entries/class-entries-list.php:332
|
890 |
+
#: pro/wpforms-pro.php:322
|
891 |
msgid "Entries"
|
892 |
msgstr ""
|
893 |
|
954 |
msgstr ""
|
955 |
|
956 |
#: includes/admin/class-settings.php:142
|
957 |
+
msgid "Settings were successfully saved."
|
958 |
msgstr ""
|
959 |
|
960 |
#: includes/admin/class-settings.php:168 includes/admin/class-settings.php:173
|
961 |
#: includes/admin/class-settings.php:178 includes/admin/class-settings.php:183
|
962 |
+
#: pro/wpforms-pro.php:154
|
963 |
msgid "Save Settings"
|
964 |
msgstr ""
|
965 |
|
966 |
#: includes/admin/class-settings.php:171 includes/admin/class-settings.php:276
|
967 |
#: includes/admin/class-settings.php:365 includes/fields/class-email.php:21
|
968 |
#: includes/fields/class-email.php:68 includes/fields/class-email.php:306
|
969 |
+
#: includes/templates/class-contact.php:41
|
970 |
+
#: includes/templates/class-subscribe.php:44
|
971 |
+
#: includes/templates/class-suggestion.php:41
|
972 |
#: pro/includes/templates/class-donation.php:43
|
973 |
#: pro/includes/templates/class-order.php:43
|
974 |
#: pro/includes/templates/class-request-quote.php:47
|
1013 |
|
1014 |
#: includes/admin/class-settings.php:228
|
1015 |
msgid ""
|
1016 |
+
"<a href=\"%s\" rel=\"noopener noreferrer\" target=\"_blank\">Read our walk "
|
1017 |
+
"through</a> to learn more and for step-by-step directions."
|
|
|
1018 |
msgstr ""
|
1019 |
|
1020 |
#: includes/admin/class-settings.php:235
|
1022 |
msgstr ""
|
1023 |
|
1024 |
#: includes/admin/class-settings.php:235
|
1025 |
+
msgid "Your license key provides access to updates and addons."
|
1026 |
msgstr ""
|
1027 |
|
1028 |
#: includes/admin/class-settings.php:242
|
1106 |
msgstr ""
|
1107 |
|
1108 |
#: includes/admin/class-settings.php:323
|
1109 |
+
#: pro/includes/fields/class-date-time.php:154
|
1110 |
msgid "Type"
|
1111 |
msgstr ""
|
1112 |
|
1136 |
"time."
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: includes/admin/class-settings.php:353 includes/fields/class-base.php:337
|
1140 |
msgid "Required"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: includes/admin/class-settings.php:355 includes/class-frontend.php:1005
|
1144 |
+
#: includes/fields/class-base.php:901 includes/fields/class-name.php:485
|
1145 |
+
#: includes/fields/class-number.php:152
|
1146 |
+
#: pro/includes/fields/class-address.php:767
|
1147 |
+
#: pro/includes/fields/class-date-time.php:563
|
1148 |
+
#: pro/includes/fields/class-file-upload.php:332
|
1149 |
+
#: pro/includes/fields/class-password.php:371
|
1150 |
+
#: pro/includes/fields/class-payment-dropdown.php:208
|
1151 |
+
#: pro/includes/fields/class-payment-multiple.php:175
|
1152 |
+
#: pro/includes/fields/class-payment-single.php:189
|
1153 |
+
#: pro/includes/fields/class-url.php:154
|
1154 |
msgid "This field is required."
|
1155 |
msgstr ""
|
1156 |
|
1158 |
msgid "Website URL"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
+
#: includes/admin/class-settings.php:361 includes/class-frontend.php:1006
|
1162 |
+
#: pro/includes/fields/class-url.php:159
|
1163 |
msgid "Please enter a valid URL."
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: includes/admin/class-settings.php:367 includes/class-frontend.php:1007
|
1167 |
msgid "Please enter a valid email address."
|
1168 |
msgstr ""
|
1169 |
|
1171 |
msgid "Number"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
+
#: includes/admin/class-settings.php:373 includes/class-frontend.php:1008
|
1175 |
#: includes/fields/class-number.php:157
|
1176 |
msgid "Please enter a valid number."
|
1177 |
msgstr ""
|
1180 |
msgid "Confirm Value"
|
1181 |
msgstr ""
|
1182 |
|
1183 |
+
#: includes/admin/class-settings.php:379 includes/class-frontend.php:1009
|
1184 |
#: pro/includes/fields/class-password.php:394
|
1185 |
msgid "Field values do not match."
|
1186 |
msgstr ""
|
1215 |
msgid "System Info"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
+
#: includes/admin/class-tools.php:99
|
1219 |
+
msgid ""
|
1220 |
+
"Import was successfully finished. You can go and <a href=\"%s\">check your "
|
1221 |
+
"forms</a>."
|
1222 |
msgstr ""
|
1223 |
|
1224 |
+
#: includes/admin/class-tools.php:130
|
1225 |
msgid "Form Import"
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: includes/admin/class-tools.php:131
|
1229 |
msgid "Select an export file."
|
1230 |
msgstr ""
|
1231 |
|
1232 |
+
#: includes/admin/class-tools.php:136
|
1233 |
msgid "No file chosen"
|
1234 |
msgstr ""
|
1235 |
|
1236 |
+
#: includes/admin/class-tools.php:138
|
1237 |
msgid "Choose a file…"
|
1238 |
msgstr ""
|
1239 |
|
1240 |
+
#: includes/admin/class-tools.php:144
|
1241 |
msgid "Import"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: includes/admin/class-tools.php:150
|
1245 |
msgid "Form Export"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: includes/admin/class-tools.php:151
|
1249 |
msgid ""
|
1250 |
"Form exports files can be used to create a backup of your forms or to import "
|
1251 |
"forms into another site."
|
1252 |
msgstr ""
|
1253 |
|
1254 |
+
#: includes/admin/class-tools.php:156
|
1255 |
msgid "Select form(s)"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
+
#: includes/admin/class-tools.php:163
|
1259 |
msgid "You need to create a form before you can use form export."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: includes/admin/class-tools.php:169
|
1263 |
msgid "Export"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: includes/admin/class-tools.php:174
|
1267 |
msgid "Form Template Export"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
+
#: includes/admin/class-tools.php:177
|
1271 |
msgid ""
|
1272 |
"The following code can be used to register your custom form template. Copy "
|
1273 |
"and paste the following code to your theme's functions.php file or include "
|
1274 |
"it within an external file."
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: includes/admin/class-tools.php:178
|
1278 |
msgid ""
|
1279 |
"For more information <a href=\"%s\" target=\"blank\" rel=\"noopener "
|
1280 |
"noreferrer\">see our documentation</a>."
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: includes/admin/class-tools.php:182
|
1284 |
msgid ""
|
1285 |
"Select a form to generate PHP code that can be used to register a custom "
|
1286 |
"form template."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: includes/admin/class-tools.php:194
|
1290 |
msgid "You need to create a form before you can generate a template."
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: includes/admin/class-tools.php:200
|
1294 |
msgid "Export Template"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
+
#: includes/admin/class-tools.php:215
|
1298 |
msgid "System Information"
|
1299 |
msgstr ""
|
1300 |
|
1301 |
+
#: includes/admin/class-tools.php:277
|
1302 |
msgid "Please upload a valid .json form export file."
|
1303 |
msgstr ""
|
1304 |
|
1305 |
+
#: includes/admin/class-tools.php:278
|
1306 |
+
#: pro/includes/admin/entries/class-entries-export.php:342
|
1307 |
msgid "Error"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
+
#: includes/admin/class-tools.php:402 includes/admin/class-tools.php:406
|
1311 |
+
#: pro/includes/admin/entries/class-entries-single.php:733
|
1312 |
+
#: pro/includes/admin/entries/class-entries-single.php:1087
|
1313 |
msgid "M j, Y @ g:ia"
|
1314 |
msgstr ""
|
1315 |
|
1328 |
"form builder in the market."
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: includes/admin/class-welcome.php:121 includes/admin/class-welcome.php:122
|
|
|
|
|
|
|
|
|
1332 |
msgid "Watch how to create your first form"
|
1333 |
msgstr ""
|
1334 |
|
1448 |
msgid "See All Features"
|
1449 |
msgstr ""
|
1450 |
|
1451 |
+
#: includes/admin/class-welcome.php:226 lite/wpforms-lite.php:442
|
1452 |
msgid "Upgrade to PRO"
|
1453 |
msgstr ""
|
1454 |
|
1461 |
msgstr ""
|
1462 |
|
1463 |
#: includes/admin/class-welcome.php:230
|
1464 |
+
#: pro/includes/admin/entries/class-entries-single.php:843
|
1465 |
msgid "Stripe"
|
1466 |
msgstr ""
|
1467 |
|
1531 |
|
1532 |
#: includes/admin/overview/class-overview-table.php:53
|
1533 |
#: includes/fields/class-name.php:21 includes/fields/class-name.php:276
|
1534 |
+
#: includes/templates/class-contact.php:34
|
1535 |
+
#: includes/templates/class-subscribe.php:37
|
1536 |
+
#: includes/templates/class-suggestion.php:34
|
1537 |
#: pro/includes/templates/class-donation.php:36
|
1538 |
#: pro/includes/templates/class-order.php:36
|
1539 |
#: pro/includes/templates/class-request-quote.php:33
|
1548 |
msgid "Created"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
+
#: includes/admin/overview/class-overview-table.php:142
|
1552 |
+
#: includes/admin/overview/class-overview-table.php:159
|
1553 |
msgid "Edit this form"
|
1554 |
msgstr ""
|
1555 |
|
1556 |
+
#: includes/admin/overview/class-overview-table.php:160
|
1557 |
msgid "Edit"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
+
#: includes/admin/overview/class-overview-table.php:173
|
1561 |
msgid "View entries"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
+
#: includes/admin/overview/class-overview-table.php:181
|
1565 |
msgid "View preview"
|
1566 |
msgstr ""
|
1567 |
|
1568 |
+
#: includes/admin/overview/class-overview-table.php:198
|
1569 |
msgid "Duplicate this form"
|
1570 |
msgstr ""
|
1571 |
|
1572 |
+
#: includes/admin/overview/class-overview-table.php:199
|
1573 |
msgid "Duplicate"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
+
#: includes/admin/overview/class-overview-table.php:215
|
1577 |
msgid "Delete this form"
|
1578 |
msgstr ""
|
1579 |
|
1580 |
+
#: includes/admin/overview/class-overview-table.php:216
|
1581 |
+
#: includes/admin/overview/class-overview-table.php:235
|
1582 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:418
|
1583 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:439
|
|
|
1584 |
msgid "Delete"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
+
#: includes/admin/overview/class-overview-table.php:275
|
1588 |
+
msgid "Form was successfully deleted."
|
1589 |
+
msgstr ""
|
1590 |
+
|
1591 |
+
#: includes/admin/overview/class-overview-table.php:277
|
1592 |
+
msgid "Forms were successfully deleted."
|
1593 |
+
msgstr ""
|
1594 |
+
|
1595 |
+
#: includes/admin/overview/class-overview-table.php:287
|
1596 |
+
#: includes/admin/overview/class-overview-table.php:318
|
1597 |
+
msgid "Security check failed. Please try again."
|
1598 |
+
msgstr ""
|
1599 |
|
1600 |
+
#: includes/admin/overview/class-overview-table.php:306
|
1601 |
+
msgid "Form was successfully duplicated."
|
|
|
1602 |
msgstr ""
|
1603 |
|
1604 |
+
#: includes/admin/overview/class-overview-table.php:308
|
1605 |
+
msgid "Forms were successfully duplicated."
|
1606 |
+
msgstr ""
|
|
|
|
|
1607 |
|
1608 |
#: includes/admin/overview/class-overview.php:76
|
1609 |
msgid "Number of forms per page:"
|
1649 |
msgid "Upload Image"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
+
#: includes/class-conditional-logic-core.php:162
|
1653 |
msgid "this field if"
|
1654 |
msgstr ""
|
1655 |
|
1656 |
+
#: includes/class-conditional-logic-core.php:169
|
1657 |
msgid "Show"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
+
#: includes/class-conditional-logic-core.php:170
|
1661 |
msgid "Hide"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: includes/class-conditional-logic-core.php:205
|
1665 |
+
#: includes/class-conditional-logic-core.php:262
|
1666 |
msgid "Enable conditional logic"
|
1667 |
msgstr ""
|
1668 |
|
1669 |
+
#: includes/class-conditional-logic-core.php:206
|
1670 |
msgid "Check this option to enable conditional logic on this field."
|
1671 |
msgstr ""
|
1672 |
|
1673 |
+
#: includes/class-conditional-logic-core.php:264
|
1674 |
msgid "Check this option to enable conditional logic."
|
1675 |
msgstr ""
|
1676 |
|
1677 |
+
#: includes/class-conditional-logic-core.php:461
|
1678 |
msgid "Add rule group"
|
1679 |
msgstr ""
|
1680 |
|
1681 |
+
#: includes/class-frontend.php:1010
|
1682 |
#: pro/includes/fields/class-file-upload.php:367
|
1683 |
#: pro/includes/fields/class-file-upload.php:383
|
1684 |
+
#: pro/includes/fields/class-file-upload.php:400 pro/wpforms-pro.php:187
|
1685 |
msgid "File type is not allowed."
|
1686 |
msgstr ""
|
1687 |
|
1688 |
+
#: includes/class-frontend.php:1011 pro/wpforms-pro.php:193
|
1689 |
msgid "File exceeds max size allowed."
|
1690 |
msgstr ""
|
1691 |
|
1692 |
+
#: includes/class-frontend.php:1012 pro/wpforms-pro.php:199
|
1693 |
msgid "Please enter time in 12-hour AM/PM format (eg 8:45 AM)."
|
1694 |
msgstr ""
|
1695 |
|
1696 |
+
#: includes/class-frontend.php:1013 pro/wpforms-pro.php:205
|
1697 |
msgid "Please enter time in 24-hour format (eg 22:45)."
|
1698 |
msgstr ""
|
1699 |
|
1700 |
+
#: includes/class-frontend.php:1014
|
1701 |
+
#: pro/includes/fields/class-payment-total.php:199 pro/wpforms-pro.php:211
|
1702 |
msgid "Payment is required."
|
1703 |
msgstr ""
|
1704 |
|
1705 |
+
#: includes/class-frontend.php:1015 pro/wpforms-pro.php:217
|
1706 |
msgid "Please enter a valid credit card number."
|
1707 |
msgstr ""
|
1708 |
|
1709 |
+
#: includes/class-frontend.php:1078
|
1710 |
+
msgid "<a href=\"%s\">Go to the full page</a> to view and submit the form."
|
1711 |
+
msgstr ""
|
1712 |
+
|
1713 |
#: includes/class-logging.php:38
|
1714 |
msgid "WPForms Logs"
|
1715 |
msgstr ""
|
1718 |
msgid "Logs"
|
1719 |
msgstr ""
|
1720 |
|
1721 |
+
#: includes/class-preview.php:123
|
1722 |
msgid "Hide empty fields"
|
1723 |
msgstr ""
|
1724 |
|
1725 |
+
#: includes/class-preview.php:125 includes/class-preview.php:165
|
1726 |
msgid "Show empty fields"
|
1727 |
msgstr ""
|
1728 |
|
1729 |
+
#: includes/class-preview.php:134
|
1730 |
msgid "Hide notes"
|
1731 |
msgstr ""
|
1732 |
|
1733 |
+
#: includes/class-preview.php:136 includes/class-preview.php:166
|
1734 |
msgid "Show notes"
|
1735 |
msgstr ""
|
1736 |
|
1737 |
+
#: includes/class-preview.php:145
|
1738 |
msgid "Normal view"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
+
#: includes/class-preview.php:147 includes/class-preview.php:167
|
1742 |
msgid "Compact view"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
+
#: includes/class-preview.php:158
|
1746 |
msgid "Entry #%d"
|
1747 |
msgstr ""
|
1748 |
|
1749 |
+
#: includes/class-preview.php:161
|
1750 |
+
#: pro/includes/admin/entries/class-entries-single.php:987
|
1751 |
msgid "Print"
|
1752 |
msgstr ""
|
1753 |
|
1754 |
+
#: includes/class-preview.php:175
|
1755 |
+
#: pro/includes/admin/entries/class-entries-single.php:520
|
|
|
|
|
|
|
|
|
1756 |
msgid "This entry does not have any fields"
|
1757 |
msgstr ""
|
1758 |
|
1759 |
+
#. translators: %d - field ID
|
1760 |
+
#: includes/class-preview.php:192
|
1761 |
+
#: pro/includes/admin/entries/class-entries-single.php:536
|
1762 |
msgid "Field ID #%d"
|
1763 |
msgstr ""
|
1764 |
|
1765 |
+
#: includes/class-preview.php:196
|
1766 |
+
#: pro/includes/admin/entries/class-entries-single.php:541
|
1767 |
msgid "Empty"
|
1768 |
msgstr ""
|
1769 |
|
1770 |
+
#: includes/class-preview.php:207
|
1771 |
+
#: pro/includes/admin/entries/class-entries-single.php:578
|
1772 |
msgid "Notes"
|
1773 |
msgstr ""
|
1774 |
|
1775 |
+
#. translators: %1$s - user name; %2$s - date
|
1776 |
+
#: includes/class-preview.php:221
|
1777 |
+
msgid "Added by %1$s on %2$s"
|
1778 |
msgstr ""
|
1779 |
|
1780 |
+
#: includes/class-preview.php:266
|
1781 |
msgid ""
|
1782 |
"This is the WPForms preview page. All your form previews will be handled on "
|
1783 |
"this page."
|
1784 |
msgstr ""
|
1785 |
|
1786 |
+
#: includes/class-preview.php:267
|
1787 |
msgid ""
|
1788 |
"The page is set to private, so it is not publicly accessible. Please do not "
|
1789 |
"delete this page :) ."
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: includes/class-preview.php:272
|
1793 |
msgid "WPForms Preview"
|
1794 |
msgstr ""
|
1795 |
|
1796 |
+
#: includes/class-preview.php:375
|
1797 |
msgid "This is a preview of your form. This page is not publicly accessible."
|
1798 |
msgstr ""
|
1799 |
|
1800 |
+
#: includes/class-preview.php:377
|
1801 |
msgid "Close this window"
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: includes/class-preview.php:379
|
1805 |
+
msgctxt "Form name"
|
1806 |
+
msgid "%s Preview"
|
1807 |
msgstr ""
|
1808 |
|
1809 |
+
#: includes/class-process.php:80
|
1810 |
msgid "Invalid form."
|
1811 |
msgstr ""
|
1812 |
|
1813 |
+
#: includes/class-process.php:117
|
1814 |
msgid "Incorrect reCAPTCHA, please try again."
|
1815 |
msgstr ""
|
1816 |
|
1817 |
+
#: includes/class-process.php:120
|
1818 |
msgid "reCAPTCHA is required."
|
1819 |
msgstr ""
|
1820 |
|
1821 |
+
#: includes/class-process.php:132 includes/class-process.php:182
|
1822 |
msgid "Form has not been submitted, please see the errors below."
|
1823 |
msgstr ""
|
1824 |
|
1825 |
+
#: includes/class-process.php:144
|
1826 |
msgid "WPForms honeypot field triggered."
|
1827 |
msgstr ""
|
1828 |
|
1829 |
+
#: includes/class-process.php:370 pro/wpforms-pro.php:380
|
1830 |
+
msgctxt "Form name"
|
1831 |
msgid "New %s Entry"
|
1832 |
msgstr ""
|
1833 |
|
|
|
|
|
|
|
|
|
1834 |
#: includes/class-smart-tags.php:34
|
1835 |
+
msgid "Site Administrator Email"
|
1836 |
msgstr ""
|
1837 |
|
1838 |
#: includes/class-smart-tags.php:35
|
1839 |
+
msgid "Entry ID"
|
1840 |
msgstr ""
|
1841 |
|
1842 |
+
#: includes/class-smart-tags.php:36
|
1843 |
+
msgid "Form ID"
|
1844 |
msgstr ""
|
1845 |
|
1846 |
#: includes/class-smart-tags.php:38
|
1847 |
+
msgid "Embedded Post/Page Title"
|
1848 |
msgstr ""
|
1849 |
|
1850 |
#: includes/class-smart-tags.php:39
|
1851 |
+
msgid "Embedded Post Page URL"
|
1852 |
msgstr ""
|
1853 |
|
1854 |
#: includes/class-smart-tags.php:40
|
1855 |
+
msgid "Embedded Post/Page ID"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1856 |
msgstr ""
|
1857 |
|
1858 |
#: includes/class-smart-tags.php:41
|
1859 |
+
#: pro/includes/admin/entries/class-entries-export.php:203
|
1860 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:165
|
1861 |
+
#: pro/includes/fields/class-date-time.php:73
|
1862 |
+
#: pro/includes/fields/class-date-time.php:130
|
1863 |
+
#: pro/includes/fields/class-date-time.php:269
|
1864 |
+
#: pro/includes/fields/class-date-time.php:277
|
1865 |
+
#: pro/includes/fields/class-date-time.php:368
|
1866 |
+
msgid "Date"
|
1867 |
msgstr ""
|
1868 |
|
1869 |
#: includes/class-smart-tags.php:42
|
1870 |
+
msgid "Query String Variable"
|
1871 |
msgstr ""
|
1872 |
|
1873 |
#: includes/class-smart-tags.php:43
|
1874 |
+
msgid "User IP Address"
|
1875 |
msgstr ""
|
1876 |
|
1877 |
#: includes/class-smart-tags.php:44
|
1878 |
+
msgid "User ID"
|
1879 |
msgstr ""
|
1880 |
|
1881 |
#: includes/class-smart-tags.php:45
|
1882 |
+
msgid "User Name"
|
1883 |
msgstr ""
|
1884 |
|
1885 |
#: includes/class-smart-tags.php:46
|
1886 |
+
msgid "User Email"
|
1887 |
msgstr ""
|
1888 |
|
1889 |
#: includes/class-smart-tags.php:47
|
1890 |
+
msgid "Author ID"
|
1891 |
msgstr ""
|
1892 |
|
1893 |
#: includes/class-smart-tags.php:48
|
1894 |
+
msgid "Author Name"
|
1895 |
msgstr ""
|
1896 |
|
1897 |
#: includes/class-smart-tags.php:49
|
1898 |
+
msgid "Author Email"
|
1899 |
msgstr ""
|
1900 |
|
1901 |
#: includes/class-smart-tags.php:50
|
1902 |
+
msgid "Referrer URL"
|
1903 |
msgstr ""
|
1904 |
|
1905 |
#: includes/class-smart-tags.php:51
|
1906 |
+
msgid "Login URL"
|
1907 |
msgstr ""
|
1908 |
|
1909 |
#: includes/class-smart-tags.php:52
|
1910 |
+
msgid "Logout URL"
|
1911 |
msgstr ""
|
1912 |
|
1913 |
#: includes/class-smart-tags.php:53
|
1914 |
+
msgid "Register URL"
|
1915 |
+
msgstr ""
|
1916 |
+
|
1917 |
+
#: includes/class-smart-tags.php:54
|
1918 |
msgid "Lost Password URL"
|
1919 |
msgstr ""
|
1920 |
|
1921 |
#: includes/class-widget.php:43
|
1922 |
+
msgctxt "Widget"
|
1923 |
msgid "Display a form."
|
1924 |
msgstr ""
|
1925 |
|
1926 |
#: includes/class-widget.php:52
|
1927 |
+
msgctxt "Widget"
|
1928 |
msgid "WPForms"
|
1929 |
msgstr ""
|
1930 |
|
1931 |
#: includes/class-widget.php:120
|
1932 |
+
msgctxt "Widget"
|
1933 |
msgid "Title:"
|
1934 |
msgstr ""
|
1935 |
|
1936 |
#: includes/class-widget.php:129
|
1937 |
+
msgctxt "Widget"
|
1938 |
msgid "Form:"
|
1939 |
msgstr ""
|
1940 |
|
1941 |
#: includes/class-widget.php:135
|
1942 |
+
msgctxt "Widget"
|
1943 |
msgid "Select your form"
|
1944 |
msgstr ""
|
1945 |
|
1946 |
#: includes/class-widget.php:141
|
1947 |
+
msgctxt "Widget"
|
1948 |
msgid "No forms"
|
1949 |
msgstr ""
|
1950 |
|
1951 |
#: includes/class-widget.php:149
|
1952 |
+
msgctxt "Widget"
|
1953 |
+
msgid "Display form name"
|
1954 |
msgstr ""
|
1955 |
|
1956 |
#: includes/class-widget.php:153
|
1957 |
+
msgctxt "Widget"
|
1958 |
msgid "Display form description"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
+
#: includes/emails/class-emails.php:331
|
1962 |
msgid ""
|
1963 |
"You cannot send emails with WPForms_WP_Emails until init/admin_init has been "
|
1964 |
"reached"
|
1965 |
msgstr ""
|
1966 |
|
1967 |
+
#: includes/emails/class-emails.php:472 includes/emails/class-emails.php:495
|
1968 |
+
#: includes/fields/class-checkbox.php:193 includes/fields/class-radio.php:193
|
1969 |
+
#: includes/fields/class-select.php:199
|
1970 |
msgid "(empty)"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
+
#: includes/emails/class-emails.php:473 includes/emails/class-emails.php:496
|
1974 |
msgid "Field ID #"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: includes/emails/class-emails.php:505
|
1978 |
+
msgid "An empty form was submitted."
|
1979 |
msgstr ""
|
1980 |
|
1981 |
+
#. translators: %s - link to a site.
|
1982 |
+
#: includes/emails/templates/footer-default.php:41
|
1983 |
+
msgid "Sent from %s"
|
1984 |
+
msgstr ""
|
1985 |
+
|
1986 |
+
#: includes/fields/class-base.php:315
|
1987 |
msgid ""
|
1988 |
"Enter text for the form field label. Field labels are recommended and can be "
|
1989 |
"hidden in the Advanced Settings."
|
1990 |
msgstr ""
|
1991 |
|
1992 |
+
#: includes/fields/class-base.php:316
|
1993 |
msgid "Label"
|
1994 |
msgstr ""
|
1995 |
|
1996 |
+
#: includes/fields/class-base.php:325
|
1997 |
msgid "Enter text for the form field description."
|
1998 |
msgstr ""
|
1999 |
|
2000 |
+
#: includes/fields/class-base.php:326
|
2001 |
msgid "Description"
|
2002 |
msgstr ""
|
2003 |
|
2004 |
+
#: includes/fields/class-base.php:336
|
2005 |
msgid ""
|
2006 |
"Check this option to mark the field required. A form will not submit unless "
|
2007 |
"all required fields are provided."
|
2008 |
msgstr ""
|
2009 |
|
2010 |
+
#: includes/fields/class-base.php:353
|
2011 |
msgid "Enter code for the form field."
|
2012 |
msgstr ""
|
2013 |
|
2014 |
+
#: includes/fields/class-base.php:354
|
2015 |
msgid "Code"
|
2016 |
msgstr ""
|
2017 |
|
2018 |
+
#: includes/fields/class-base.php:362 includes/fields/class-base.php:444
|
2019 |
msgid "Add choices for the form field."
|
2020 |
msgstr ""
|
2021 |
|
2022 |
+
#: includes/fields/class-base.php:375
|
2023 |
msgid "Choices"
|
2024 |
msgstr ""
|
2025 |
|
2026 |
+
#. translators: %1$s - source name; %2$s - type name.
|
2027 |
+
#: includes/fields/class-base.php:421
|
2028 |
+
msgid "Choices are dynamically populated from the %1$s %2$s"
|
|
|
2029 |
msgstr ""
|
2030 |
|
2031 |
+
#: includes/fields/class-base.php:453
|
2032 |
msgid "Items"
|
2033 |
msgstr ""
|
2034 |
|
2035 |
+
#: includes/fields/class-base.php:495
|
2036 |
msgid "Enter text for the default form field value."
|
2037 |
msgstr ""
|
2038 |
|
2039 |
+
#: includes/fields/class-base.php:497 includes/fields/class-name.php:283
|
2040 |
#: includes/fields/class-name.php:298 includes/fields/class-name.php:313
|
2041 |
+
#: includes/fields/class-name.php:328 pro/includes/fields/class-address.php:329
|
2042 |
+
#: pro/includes/fields/class-address.php:348
|
2043 |
+
#: pro/includes/fields/class-address.php:369
|
2044 |
+
#: pro/includes/fields/class-address.php:387
|
2045 |
+
#: pro/includes/fields/class-address.php:407
|
2046 |
+
#: pro/includes/fields/class-address.php:431
|
2047 |
msgid "Default Value"
|
2048 |
msgstr ""
|
2049 |
|
2050 |
+
#: includes/fields/class-base.php:507
|
2051 |
msgid "Select the default form field size."
|
2052 |
msgstr ""
|
2053 |
|
2054 |
+
#: includes/fields/class-base.php:509
|
2055 |
msgid "Small"
|
2056 |
msgstr ""
|
2057 |
|
2058 |
+
#: includes/fields/class-base.php:510
|
2059 |
msgid "Medium"
|
2060 |
msgstr ""
|
2061 |
|
2062 |
+
#: includes/fields/class-base.php:511
|
2063 |
msgid "Large"
|
2064 |
msgstr ""
|
2065 |
|
2066 |
+
#: includes/fields/class-base.php:513
|
2067 |
msgid "Field Size"
|
2068 |
msgstr ""
|
2069 |
|
2070 |
+
#: includes/fields/class-base.php:526
|
2071 |
msgid "Advanced Options"
|
2072 |
msgstr ""
|
2073 |
|
2074 |
+
#: includes/fields/class-base.php:537
|
2075 |
msgid "Enter text for the form field placeholder."
|
2076 |
msgstr ""
|
2077 |
|
2078 |
+
#: includes/fields/class-base.php:538
|
2079 |
msgid "Placeholder Text"
|
2080 |
msgstr ""
|
2081 |
|
2082 |
+
#: includes/fields/class-base.php:548
|
2083 |
msgid ""
|
2084 |
"Enter CSS class names for the form field container. Class names should be "
|
2085 |
"separated with spaces."
|
2086 |
msgstr ""
|
2087 |
|
2088 |
+
#: includes/fields/class-base.php:553
|
2089 |
msgid "CSS Classes"
|
2090 |
msgstr ""
|
2091 |
|
2092 |
+
#: includes/fields/class-base.php:562
|
2093 |
msgid "Check this option to hide the form field label."
|
2094 |
msgstr ""
|
2095 |
|
2096 |
+
#: includes/fields/class-base.php:564
|
2097 |
msgid "Hide Label"
|
2098 |
msgstr ""
|
2099 |
|
2100 |
+
#: includes/fields/class-base.php:572
|
2101 |
msgid "Check this option to hide the form field sub-label."
|
2102 |
msgstr ""
|
2103 |
|
2104 |
+
#: includes/fields/class-base.php:574
|
2105 |
msgid "Hide Sub-Labels"
|
2106 |
msgstr ""
|
2107 |
|
2108 |
+
#: includes/fields/class-base.php:582
|
2109 |
msgid "Select the layout for displaying field choices."
|
2110 |
msgstr ""
|
2111 |
|
2112 |
+
#: includes/fields/class-base.php:584
|
2113 |
msgid "One Column"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
+
#: includes/fields/class-base.php:585
|
2117 |
msgid "Two Columns"
|
2118 |
msgstr ""
|
2119 |
|
2120 |
+
#: includes/fields/class-base.php:586
|
2121 |
msgid "Three Columns"
|
2122 |
msgstr ""
|
2123 |
|
2124 |
+
#: includes/fields/class-base.php:588
|
2125 |
msgid "Choice Layout"
|
2126 |
msgstr ""
|
2127 |
|
2128 |
+
#: includes/fields/class-base.php:597
|
2129 |
msgid "Select auto-populate method to use."
|
2130 |
msgstr ""
|
2131 |
|
2132 |
+
#: includes/fields/class-base.php:600 includes/fields/class-base.php:621
|
2133 |
msgid "Post Type"
|
2134 |
msgstr ""
|
2135 |
|
2136 |
+
#: includes/fields/class-base.php:601 includes/fields/class-base.php:632
|
2137 |
msgid "Taxonomy"
|
2138 |
msgstr ""
|
2139 |
|
2140 |
+
#: includes/fields/class-base.php:603
|
2141 |
msgid "Dynamic Choices"
|
2142 |
msgstr ""
|
2143 |
|
2144 |
+
#: includes/fields/class-base.php:642
|
2145 |
msgid "Select %s to use for auto-populating field choices."
|
2146 |
msgstr ""
|
2147 |
|
2148 |
+
#: includes/fields/class-base.php:643
|
2149 |
msgid "Dynamic %s Source"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
+
#: includes/fields/class-base.php:757
|
2153 |
msgid "You do no have permission."
|
2154 |
msgstr ""
|
2155 |
|
2156 |
+
#: includes/fields/class-base.php:762
|
2157 |
msgid "No form ID found"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
+
#: includes/fields/class-base.php:767
|
2161 |
msgid "No field type found"
|
2162 |
msgstr ""
|
2163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2164 |
#: includes/fields/class-checkbox.php:21
|
2165 |
msgid "Checkboxes"
|
2166 |
msgstr ""
|
2180 |
msgid "Third Choice"
|
2181 |
msgstr ""
|
2182 |
|
2183 |
+
#: includes/fields/class-checkbox.php:89 includes/fields/class-radio.php:89
|
2184 |
+
#: includes/fields/class-select.php:89
|
2185 |
+
msgid "Check this to manually set form field values."
|
2186 |
msgstr ""
|
2187 |
|
2188 |
+
#: includes/fields/class-checkbox.php:97 includes/fields/class-radio.php:97
|
2189 |
+
#: includes/fields/class-select.php:97
|
2190 |
msgid "Show Values"
|
2191 |
msgstr ""
|
2192 |
|
2193 |
+
#: includes/fields/class-checkbox.php:211 includes/fields/class-radio.php:211
|
2194 |
msgid ""
|
2195 |
"Showing the first 20 choices.<br> All %d choices will be displayed when "
|
2196 |
"viewing the form."
|
2205 |
msgstr ""
|
2206 |
|
2207 |
#: includes/fields/class-email.php:208
|
2208 |
+
msgid "Check this option to ask users to provide an email address twice."
|
2209 |
msgstr ""
|
2210 |
|
2211 |
#: includes/fields/class-email.php:246
|
2219 |
msgstr ""
|
2220 |
|
2221 |
#: includes/fields/class-name.php:82 includes/fields/class-name.php:377
|
|
|
2222 |
msgid "First"
|
2223 |
msgstr ""
|
2224 |
|
2225 |
#: includes/fields/class-name.php:103 includes/fields/class-name.php:382
|
|
|
2226 |
msgid "Middle"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
#: includes/fields/class-name.php:124 includes/fields/class-name.php:387
|
|
|
2230 |
msgid "Last"
|
2231 |
msgstr ""
|
2232 |
|
2233 |
#: includes/fields/class-name.php:220
|
2234 |
+
#: pro/includes/fields/class-date-time.php:60
|
2235 |
+
#: pro/includes/fields/class-date-time.php:147
|
2236 |
+
#: pro/includes/fields/class-date-time.php:187
|
2237 |
#: pro/includes/fields/class-phone.php:78
|
2238 |
msgid "Format"
|
2239 |
msgstr ""
|
2260 |
|
2261 |
#: includes/fields/class-name.php:279 includes/fields/class-name.php:294
|
2262 |
#: includes/fields/class-name.php:309 includes/fields/class-name.php:324
|
2263 |
+
#: pro/includes/fields/class-address.php:325
|
2264 |
+
#: pro/includes/fields/class-address.php:344
|
2265 |
+
#: pro/includes/fields/class-address.php:365
|
2266 |
+
#: pro/includes/fields/class-address.php:383
|
2267 |
+
#: pro/includes/fields/class-address.php:403
|
2268 |
+
#: pro/includes/fields/class-address.php:427
|
2269 |
+
#: pro/includes/fields/class-date-time.php:135
|
2270 |
+
#: pro/includes/fields/class-date-time.php:179
|
2271 |
msgid "Placeholder"
|
2272 |
msgstr ""
|
2273 |
|
2303 |
msgid "Multiple Choice"
|
2304 |
msgstr ""
|
2305 |
|
|
|
|
|
|
|
|
|
2306 |
#: includes/fields/class-select.php:21
|
2307 |
msgid "Dropdown"
|
2308 |
msgstr ""
|
2315 |
msgid "Paragraph Text"
|
2316 |
msgstr ""
|
2317 |
|
2318 |
+
#: includes/integrations.php:32
|
2319 |
msgid "Select a form to display"
|
2320 |
msgstr ""
|
2321 |
|
2322 |
+
#: includes/integrations.php:39
|
2323 |
msgid "No forms found"
|
2324 |
msgstr ""
|
2325 |
|
2326 |
+
#: includes/integrations.php:48
|
2327 |
msgid "Content"
|
2328 |
msgstr ""
|
2329 |
|
2330 |
+
#: includes/integrations.php:49
|
2331 |
msgid "Add your form"
|
2332 |
msgstr ""
|
2333 |
|
2334 |
+
#: includes/integrations.php:53
|
2335 |
msgid "Form"
|
2336 |
msgstr ""
|
2337 |
|
2338 |
+
#: includes/integrations.php:57
|
2339 |
msgid "Select a form to add it to your post or page."
|
2340 |
msgstr ""
|
2341 |
|
2342 |
+
#: includes/integrations.php:62
|
2343 |
+
msgid "Display Form Name"
|
2344 |
msgstr ""
|
2345 |
|
2346 |
+
#: includes/integrations.php:65 includes/integrations.php:80
|
2347 |
msgid "No"
|
2348 |
msgstr ""
|
2349 |
|
2350 |
+
#: includes/integrations.php:66 includes/integrations.php:81
|
2351 |
msgid "Yes"
|
2352 |
msgstr ""
|
2353 |
|
2354 |
+
#: includes/integrations.php:69
|
2355 |
+
msgid "Would you like to display the forms name?"
|
2356 |
msgstr ""
|
2357 |
|
2358 |
+
#: includes/integrations.php:77
|
2359 |
msgid "Display Form Description"
|
2360 |
msgstr ""
|
2361 |
|
2362 |
+
#: includes/integrations.php:84
|
2363 |
msgid "Would you like to display the forms description?"
|
2364 |
msgstr ""
|
2365 |
|
2366 |
+
#: includes/providers/class-base.php:93
|
2367 |
msgid "Connection"
|
2368 |
msgstr ""
|
2369 |
|
2370 |
+
#: includes/providers/class-base.php:163 includes/providers/class-base.php:1116
|
2371 |
+
#: includes/providers/class-base.php:1164
|
2372 |
msgid "You do not have permission"
|
2373 |
msgstr ""
|
2374 |
|
2375 |
+
#: includes/providers/class-base.php:467
|
2376 |
+
msgctxt "Name field label"
|
2377 |
+
msgid "%s (Full)"
|
2378 |
+
msgstr ""
|
2379 |
+
|
2380 |
+
#: includes/providers/class-base.php:478
|
2381 |
+
msgctxt "Name field label"
|
2382 |
+
msgid "%s (First)"
|
2383 |
+
msgstr ""
|
2384 |
+
|
2385 |
+
#: includes/providers/class-base.php:490
|
2386 |
+
msgctxt "Name field label"
|
2387 |
+
msgid "%s (Middle)"
|
2388 |
+
msgstr ""
|
2389 |
+
|
2390 |
+
#: includes/providers/class-base.php:502
|
2391 |
+
msgctxt "Name field label"
|
2392 |
+
msgid "%s (Last)"
|
2393 |
msgstr ""
|
2394 |
|
2395 |
+
#: includes/providers/class-base.php:702
|
2396 |
msgid "Select Account"
|
2397 |
msgstr ""
|
2398 |
|
2399 |
+
#: includes/providers/class-base.php:714
|
2400 |
+
#: includes/providers/class-constant-contact.php:490
|
2401 |
msgid "Add New Account"
|
2402 |
msgstr ""
|
2403 |
|
2404 |
+
#: includes/providers/class-base.php:747
|
2405 |
msgid "Select List"
|
2406 |
msgstr ""
|
2407 |
|
2408 |
+
#: includes/providers/class-base.php:793
|
2409 |
msgid "Select Groups"
|
2410 |
msgstr ""
|
2411 |
|
2412 |
+
#: includes/providers/class-base.php:795
|
2413 |
msgid ""
|
2414 |
"We also noticed that you have some segments in your list. You can select "
|
2415 |
"specific list segments below if needed. This is optional."
|
2416 |
msgstr ""
|
2417 |
|
2418 |
+
#: includes/providers/class-base.php:855 includes/providers/class-base.php:860
|
2419 |
msgid "List Fields"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
+
#: includes/providers/class-base.php:860
|
2423 |
msgid "Available Form Fields"
|
2424 |
msgstr ""
|
2425 |
|
2426 |
+
#: includes/providers/class-base.php:934
|
2427 |
msgid "Process"
|
2428 |
msgstr ""
|
2429 |
|
2430 |
+
#: includes/providers/class-base.php:935
|
2431 |
msgid "Don't process"
|
2432 |
msgstr ""
|
2433 |
|
2434 |
+
#: includes/providers/class-base.php:937
|
2435 |
msgid "this connection if"
|
2436 |
msgstr ""
|
2437 |
|
2438 |
+
#: includes/providers/class-base.php:938
|
2439 |
msgid "Marketing provider connection"
|
2440 |
msgstr ""
|
2441 |
|
2442 |
+
#: includes/providers/class-base.php:1052
|
2443 |
+
msgctxt "Provider Type"
|
2444 |
+
msgid "Add New %s"
|
2445 |
+
msgstr ""
|
2446 |
+
|
2447 |
+
#: includes/providers/class-base.php:1124
|
2448 |
+
#: includes/providers/class-base.php:1172
|
2449 |
msgid "Missing data"
|
2450 |
msgstr ""
|
2451 |
|
2452 |
+
#: includes/providers/class-base.php:1140
|
2453 |
msgid "Connection missing"
|
2454 |
msgstr ""
|
2455 |
|
2456 |
+
#: includes/providers/class-base.php:1184
|
2457 |
+
msgid "Could not connect to the provider."
|
2458 |
+
msgstr ""
|
2459 |
+
|
2460 |
+
#: includes/providers/class-base.php:1193
|
2461 |
+
#: includes/providers/class-base.php:1266
|
2462 |
+
msgctxt "Connection date"
|
2463 |
+
msgid "Connected on: %s"
|
2464 |
+
msgstr ""
|
2465 |
+
|
2466 |
+
#: includes/providers/class-base.php:1194
|
2467 |
+
#: includes/providers/class-base.php:1267
|
2468 |
+
msgid "Disconnect"
|
2469 |
msgstr ""
|
2470 |
|
2471 |
+
#. translators: %s - provider name.
|
2472 |
+
#: includes/providers/class-base.php:1222
|
2473 |
+
msgid "Connect to %s"
|
2474 |
msgstr ""
|
2475 |
|
2476 |
+
#. translators: %s - provider name.
|
2477 |
+
#: includes/providers/class-base.php:1249
|
2478 |
msgid "Integrate %s with WPForms"
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: includes/providers/class-base.php:1252
|
2482 |
msgid "Connected"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
+
#: includes/providers/class-base.php:1277
|
2486 |
+
msgctxt "New Provider Account"
|
2487 |
+
msgid "Add New Account"
|
2488 |
msgstr ""
|
2489 |
|
2490 |
+
#: includes/providers/class-base.php:1284
|
2491 |
+
msgid ""
|
2492 |
+
"Please fill out all of the fields below to add your new provider account."
|
2493 |
msgstr ""
|
2494 |
|
2495 |
+
#: includes/providers/class-constant-contact.php:116
|
2496 |
msgid "Constant Contact Subscription stopped by conditional logic"
|
2497 |
msgstr ""
|
2498 |
|
2499 |
+
#: includes/providers/class-constant-contact.php:134
|
2500 |
+
#: includes/providers/class-constant-contact.php:305
|
2501 |
+
#: includes/providers/class-constant-contact.php:392
|
2502 |
msgid "Constant Contact API Error"
|
2503 |
msgstr ""
|
2504 |
|
2505 |
+
#: includes/providers/class-constant-contact.php:493
|
|
|
|
|
|
|
|
|
2506 |
msgid ""
|
2507 |
"Please fill out all of the fields below to register your new Constant "
|
2508 |
"Contact account."
|
2509 |
msgstr ""
|
2510 |
|
2511 |
+
#: includes/providers/class-constant-contact.php:495
|
2512 |
+
#: includes/providers/class-constant-contact.php:573
|
2513 |
msgid ""
|
2514 |
"Click here for documentation on connecting WPForms with Constant Contact."
|
2515 |
msgstr ""
|
2516 |
|
2517 |
+
#: includes/providers/class-constant-contact.php:500
|
2518 |
+
#: includes/providers/class-constant-contact.php:578
|
2519 |
msgid ""
|
2520 |
"Because Constant Contact requires external authentication, you will need to "
|
2521 |
"register WPForms with Constant Contact before you can proceed."
|
2522 |
msgstr ""
|
2523 |
|
2524 |
+
#: includes/providers/class-constant-contact.php:504
|
2525 |
+
#: includes/providers/class-constant-contact.php:582
|
2526 |
msgid "Click here to register with Constant Contact"
|
2527 |
msgstr ""
|
2528 |
|
2529 |
+
#: includes/providers/class-constant-contact.php:507
|
2530 |
+
#: includes/providers/class-constant-contact.php:585
|
2531 |
msgid "Authorization Code"
|
2532 |
msgstr ""
|
2533 |
|
2534 |
+
#: includes/providers/class-constant-contact.php:509
|
2535 |
+
#: includes/providers/class-constant-contact.php:587
|
2536 |
msgid "Account Nickname"
|
2537 |
msgstr ""
|
2538 |
|
2539 |
+
#: includes/providers/class-constant-contact.php:511
|
2540 |
msgid "Connect"
|
2541 |
msgstr ""
|
2542 |
|
2543 |
+
#: includes/providers/class-constant-contact.php:548
|
2544 |
msgid ""
|
2545 |
"Get the most out of <strong>WPForms</strong> — use it with an active "
|
2546 |
"Constant Contact account."
|
2547 |
msgstr ""
|
2548 |
|
2549 |
+
#: includes/providers/class-constant-contact.php:551
|
2550 |
+
#: includes/providers/class-constant-contact.php:637
|
2551 |
msgid "Try Constant Contact for Free"
|
2552 |
msgstr ""
|
2553 |
|
2554 |
+
#: includes/providers/class-constant-contact.php:552
|
2555 |
msgid ""
|
2556 |
"Learn More about the <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
2557 |
"noreferrer\">power of email marketing</a>"
|
2558 |
msgstr ""
|
2559 |
|
2560 |
+
#: includes/providers/class-constant-contact.php:634
|
2561 |
msgid ""
|
2562 |
"Get the most out of the <strong>WPForms</strong> plugin — use it with "
|
2563 |
"an active Constant Contact account."
|
2564 |
msgstr ""
|
2565 |
|
2566 |
+
#: includes/providers/class-constant-contact.php:638
|
2567 |
msgid "Connect your existing account"
|
2568 |
msgstr ""
|
2569 |
|
2570 |
+
#: includes/providers/class-constant-contact.php:639
|
2571 |
msgid "Learn More about the <a href=\"%s\">power of email marketing</a>"
|
2572 |
msgstr ""
|
2573 |
|
2574 |
+
#: includes/providers/class-constant-contact.php:697
|
2575 |
msgid "Grow Your Website with WPForms + Email Marketing"
|
2576 |
msgstr ""
|
2577 |
|
2578 |
+
#: includes/providers/class-constant-contact.php:698
|
2579 |
msgid "Wondering if email marketing is really worth your time?"
|
2580 |
msgstr ""
|
2581 |
|
2582 |
+
#: includes/providers/class-constant-contact.php:699
|
2583 |
msgid ""
|
2584 |
"Email is hands-down the most effective way to nurture leads and turn them "
|
2585 |
"into customers, with a return on investment (ROI) of <strong>$44 back for "
|
2586 |
"every $1 spent</strong> according to Direct Marketing Association."
|
2587 |
msgstr ""
|
2588 |
|
2589 |
+
#: includes/providers/class-constant-contact.php:700
|
2590 |
msgid ""
|
2591 |
"Here are 3 big reasons why every smart business in the world has an email "
|
2592 |
"list:"
|
2593 |
msgstr ""
|
2594 |
|
2595 |
+
#: includes/providers/class-constant-contact.php:704
|
2596 |
msgid ""
|
2597 |
"<strong>Email is still #1</strong> - At least 91% of consumers check their "
|
2598 |
"email on a daily basis. You get direct access to your subscribers, without "
|
2599 |
"having to play by social media's rules and algorithms."
|
2600 |
msgstr ""
|
2601 |
|
2602 |
+
#: includes/providers/class-constant-contact.php:705
|
2603 |
msgid ""
|
2604 |
"<strong>You own your email list</strong> - Unlike with social media, your "
|
2605 |
"list is your property and no one can revoke your access to it."
|
2606 |
msgstr ""
|
2607 |
|
2608 |
+
#: includes/providers/class-constant-contact.php:706
|
2609 |
msgid ""
|
2610 |
"<strong>Email converts</strong> - People who buy products marketed through "
|
2611 |
"email spend 138% more than those who don't receive email offers."
|
2612 |
msgstr ""
|
2613 |
|
2614 |
+
#: includes/providers/class-constant-contact.php:708
|
2615 |
msgid ""
|
2616 |
"That's why it's crucial to start collecting email addresses and "
|
2617 |
"building your list as soon as possible."
|
2618 |
msgstr ""
|
2619 |
|
2620 |
+
#: includes/providers/class-constant-contact.php:709
|
2621 |
msgid ""
|
2622 |
"For more details, see this guide on <a href=\"%s\" target=\"_blank\" rel="
|
2623 |
+
"\"noopener noreferrer\">why building your email list is so important</a>."
|
2624 |
msgstr ""
|
2625 |
|
2626 |
+
#: includes/providers/class-constant-contact.php:711
|
2627 |
msgid "You've Already Started - Here's the Next Step (It's Easy)"
|
2628 |
msgstr ""
|
2629 |
|
2630 |
+
#: includes/providers/class-constant-contact.php:712
|
2631 |
msgid "Here are the 3 things you need to build an email list:"
|
2632 |
msgstr ""
|
2633 |
|
2634 |
+
#: includes/providers/class-constant-contact.php:714
|
2635 |
msgid "A Website or Blog"
|
2636 |
msgstr ""
|
2637 |
|
2638 |
+
#: includes/providers/class-constant-contact.php:715
|
2639 |
msgid "High-Converting Form Builder"
|
2640 |
msgstr ""
|
2641 |
|
2642 |
+
#: includes/providers/class-constant-contact.php:716
|
2643 |
msgid "The Best Email Marketing Service"
|
2644 |
msgstr ""
|
2645 |
|
2646 |
+
#: includes/providers/class-constant-contact.php:718
|
2647 |
msgid ""
|
2648 |
"With a powerful email marketing service like Constant Contact, you can "
|
2649 |
"instantly send out mass notifications and beautifully designed newsletters "
|
2650 |
"to engage your subscribers."
|
2651 |
msgstr ""
|
2652 |
|
2653 |
+
#: includes/providers/class-constant-contact.php:720
|
2654 |
msgid "Get Started with Constant Contact for Free"
|
2655 |
msgstr ""
|
2656 |
|
2657 |
+
#: includes/providers/class-constant-contact.php:721
|
2658 |
msgid ""
|
2659 |
"WPForms plugin makes it fast and easy to capture all kinds of visitor "
|
2660 |
"information right from your WordPress site - even if you don't have a "
|
2661 |
"Constant Contact account."
|
2662 |
msgstr ""
|
2663 |
|
2664 |
+
#: includes/providers/class-constant-contact.php:722
|
2665 |
msgid ""
|
2666 |
"But when you combine WPForms with Constant Contact, you can nurture your "
|
2667 |
"contacts and engage with them even after they leave your website. When you "
|
2668 |
"use Constant Contact + WPForms together, you can:"
|
2669 |
msgstr ""
|
2670 |
|
2671 |
+
#: includes/providers/class-constant-contact.php:724
|
2672 |
msgid "Seamlessly add new contacts to your email list"
|
2673 |
msgstr ""
|
2674 |
|
2675 |
+
#: includes/providers/class-constant-contact.php:725
|
2676 |
msgid "Create and send professional email newsletters"
|
2677 |
msgstr ""
|
2678 |
|
2679 |
+
#: includes/providers/class-constant-contact.php:726
|
2680 |
msgid "Get expert marketing and support"
|
2681 |
msgstr ""
|
2682 |
|
2683 |
+
#: includes/providers/class-constant-contact.php:729
|
2684 |
msgid "Try Constant Contact Today"
|
2685 |
msgstr ""
|
2686 |
|
2687 |
+
#: includes/providers/class-constant-contact.php:731
|
2688 |
msgid "WPForms Makes List Building Easy"
|
2689 |
msgstr ""
|
2690 |
|
2691 |
+
#: includes/providers/class-constant-contact.php:732
|
2692 |
msgid ""
|
2693 |
"When creating WPForms, our goal was to make a WordPress forms plugin "
|
2694 |
"that's both EASY and POWERFUL."
|
2695 |
msgstr ""
|
2696 |
|
2697 |
+
#: includes/providers/class-constant-contact.php:733
|
2698 |
msgid ""
|
2699 |
"We made the form creation process extremely intuitive, so you can create a "
|
2700 |
"form to start capturing emails within 5 minutes or less."
|
2701 |
msgstr ""
|
2702 |
|
2703 |
+
#: includes/providers/class-constant-contact.php:734
|
2704 |
msgid "Here's how it works."
|
2705 |
msgstr ""
|
2706 |
|
2707 |
+
#: includes/providers/class-constant-contact.php:738
|
2708 |
msgid "1. Select from our pre-built templates, or create a form from scratch."
|
2709 |
msgstr ""
|
2710 |
|
2711 |
+
#: includes/providers/class-constant-contact.php:742
|
2712 |
msgid "2. Drag and drop any field you want onto your signup form."
|
2713 |
msgstr ""
|
2714 |
|
2715 |
+
#: includes/providers/class-constant-contact.php:746
|
2716 |
msgid "3. Connect your Constant Contact email list."
|
2717 |
msgstr ""
|
2718 |
|
2719 |
+
#: includes/providers/class-constant-contact.php:750
|
2720 |
msgid "4. Add your new form to any post, page, or sidebar."
|
2721 |
msgstr ""
|
2722 |
|
2723 |
+
#: includes/providers/class-constant-contact.php:753
|
2724 |
msgid ""
|
2725 |
"It doesn't matter what kind of business you run, what kind of website "
|
2726 |
"you have, or what industry you are in - you need to start building your "
|
2727 |
"email list today."
|
2728 |
msgstr ""
|
2729 |
|
2730 |
+
#: includes/providers/class-constant-contact.php:754
|
2731 |
msgid "With Constant Contact + WPForms, growing your list is easy."
|
2732 |
msgstr ""
|
2733 |
|
2734 |
+
#: includes/templates/class-blank.php:21
|
2735 |
msgid "Blank Form"
|
2736 |
msgstr ""
|
2737 |
|
2738 |
+
#: includes/templates/class-blank.php:23
|
2739 |
msgid ""
|
2740 |
"The blank form allows you to create any type of form using our drag & drop "
|
2741 |
"builder."
|
2742 |
msgstr ""
|
2743 |
|
2744 |
+
#: includes/templates/class-blank.php:34
|
2745 |
+
#: includes/templates/class-contact.php:65
|
2746 |
+
#: includes/templates/class-subscribe.php:52
|
2747 |
+
#: includes/templates/class-suggestion.php:90
|
2748 |
#: pro/includes/templates/class-donation.php:66
|
2749 |
#: pro/includes/templates/class-order.php:100
|
2750 |
#: pro/includes/templates/class-request-quote.php:70
|
2751 |
msgid "Sending..."
|
2752 |
msgstr ""
|
2753 |
|
2754 |
+
#: includes/templates/class-contact.php:21
|
2755 |
msgid "Simple Contact Form"
|
2756 |
msgstr ""
|
2757 |
|
2758 |
+
#: includes/templates/class-contact.php:23
|
2759 |
msgid ""
|
2760 |
"Allow your users to contact you with this simple contact form. You can add "
|
2761 |
"and remove fields as needed."
|
2762 |
msgstr ""
|
2763 |
|
2764 |
+
#: includes/templates/class-contact.php:48
|
|
|
|
|
|
|
|
|
|
|
2765 |
#: pro/includes/templates/class-donation.php:58
|
2766 |
#: pro/includes/templates/class-order.php:92
|
2767 |
msgid "Comment or Message"
|
2768 |
msgstr ""
|
2769 |
|
2770 |
+
#: includes/templates/class-subscribe.php:21
|
2771 |
msgid "Newsletter Signup Form"
|
2772 |
msgstr ""
|
2773 |
|
2774 |
+
#: includes/templates/class-subscribe.php:23
|
2775 |
msgid ""
|
2776 |
"Add subscribers and grow your email list with this newsletter signup form. "
|
2777 |
"You can add and remove fields as needed."
|
2778 |
msgstr ""
|
2779 |
|
2780 |
+
#: includes/templates/class-subscribe.php:28
|
2781 |
#: pro/includes/templates/class-donation.php:27
|
2782 |
#: pro/includes/templates/class-order.php:27
|
2783 |
msgid "Don't Forget"
|
2784 |
msgstr ""
|
2785 |
|
2786 |
+
#: includes/templates/class-subscribe.php:29
|
2787 |
msgid "Click the marketing tab to configure your newsletter service provider"
|
2788 |
msgstr ""
|
2789 |
|
2790 |
+
#: includes/templates/class-suggestion.php:21
|
2791 |
msgid "Suggestion Form"
|
2792 |
msgstr ""
|
2793 |
|
2794 |
+
#: includes/templates/class-suggestion.php:23
|
2795 |
msgid ""
|
2796 |
"Ask your users for suggestions with this simple form template. You can add "
|
2797 |
"and remove fields as needed."
|
2798 |
msgstr ""
|
2799 |
|
2800 |
+
#: includes/templates/class-suggestion.php:42
|
2801 |
msgid "Please enter your email, so we can follow up with you."
|
2802 |
msgstr ""
|
2803 |
|
2804 |
+
#: includes/templates/class-suggestion.php:49
|
2805 |
msgid "Which department do you have a suggestion for?"
|
2806 |
msgstr ""
|
2807 |
|
2808 |
+
#: includes/templates/class-suggestion.php:52
|
2809 |
msgid "Sales"
|
2810 |
msgstr ""
|
2811 |
|
2812 |
+
#: includes/templates/class-suggestion.php:55
|
2813 |
msgid "Customer Support"
|
2814 |
msgstr ""
|
2815 |
|
2816 |
+
#: includes/templates/class-suggestion.php:58
|
2817 |
msgid "Product Development"
|
2818 |
msgstr ""
|
2819 |
|
2820 |
+
#: includes/templates/class-suggestion.php:69
|
2821 |
msgid "Subject"
|
2822 |
msgstr ""
|
2823 |
|
2824 |
+
#: lite/wpforms-lite.php:53
|
2825 |
+
msgid "New %s Entry"
|
2826 |
msgstr ""
|
2827 |
|
2828 |
+
#: lite/wpforms-lite.php:92 pro/wpforms-pro.php:445
|
2829 |
msgid "Send To Email Address"
|
2830 |
msgstr ""
|
2831 |
|
2832 |
+
#: lite/wpforms-lite.php:95 pro/wpforms-pro.php:448
|
2833 |
msgid ""
|
2834 |
"Enter the email address to receive form entry notifications. For multiple "
|
2835 |
"notifications, separate email addresses with a comma."
|
2836 |
msgstr ""
|
2837 |
|
2838 |
+
#: lite/wpforms-lite.php:111 pro/wpforms-pro.php:464
|
2839 |
msgid "CC"
|
2840 |
msgstr ""
|
2841 |
|
2842 |
+
#: lite/wpforms-lite.php:127 pro/wpforms-pro.php:480
|
2843 |
msgid "Email Subject"
|
2844 |
msgstr ""
|
2845 |
|
2846 |
+
#: lite/wpforms-lite.php:129 pro/wpforms-pro.php:482
|
2847 |
+
msgctxt "Form name"
|
2848 |
+
msgid "New Entry: %s"
|
2849 |
msgstr ""
|
2850 |
|
2851 |
+
#: lite/wpforms-lite.php:142 pro/wpforms-pro.php:495
|
2852 |
msgid "From Name"
|
2853 |
msgstr ""
|
2854 |
|
2855 |
+
#: lite/wpforms-lite.php:158 pro/wpforms-pro.php:511
|
2856 |
msgid "From Email"
|
2857 |
msgstr ""
|
2858 |
|
2859 |
+
#: lite/wpforms-lite.php:174 pro/wpforms-pro.php:527
|
2860 |
msgid "Reply-To"
|
2861 |
msgstr ""
|
2862 |
|
2863 |
+
#: lite/wpforms-lite.php:199 pro/wpforms-pro.php:552
|
2864 |
msgid ""
|
2865 |
"To display all form fields, use the <code>{all_fields}</code> Smart Tag."
|
2866 |
msgstr ""
|
2867 |
|
2868 |
+
#: lite/wpforms-lite.php:253 pro/includes/templates/class-request-quote.php:20
|
2869 |
+
msgid "Request A Quote Form"
|
2870 |
+
msgstr ""
|
2871 |
+
|
2872 |
+
#: lite/wpforms-lite.php:255 pro/includes/templates/class-request-quote.php:22
|
2873 |
+
msgid ""
|
2874 |
+
"Start collecting leads with this pre-made Request a quote form. You can add "
|
2875 |
+
"and remove fields as needed."
|
2876 |
+
msgstr ""
|
2877 |
+
|
2878 |
+
#: lite/wpforms-lite.php:258 pro/includes/templates/class-donation.php:20
|
2879 |
+
msgid "Donation Form"
|
2880 |
+
msgstr ""
|
2881 |
+
|
2882 |
+
#: lite/wpforms-lite.php:260 pro/includes/templates/class-donation.php:22
|
2883 |
+
msgid ""
|
2884 |
+
"Start collecting donation payments on your website with this ready-made "
|
2885 |
+
"Donation form. You can add and remove fields as needed."
|
2886 |
+
msgstr ""
|
2887 |
+
|
2888 |
+
#: lite/wpforms-lite.php:263 pro/includes/templates/class-order.php:20
|
2889 |
+
msgid "Billing / Order Form"
|
2890 |
+
msgstr ""
|
2891 |
+
|
2892 |
+
#: lite/wpforms-lite.php:265
|
2893 |
+
msgid ""
|
2894 |
+
"Collect payments for product and service orders with this ready-made form "
|
2895 |
+
"template. You can add and remove fields as needed."
|
2896 |
+
msgstr ""
|
2897 |
+
|
2898 |
+
#: lite/wpforms-lite.php:270
|
2899 |
+
msgid "Unlock Pre-Made Form Templates"
|
2900 |
+
msgstr ""
|
2901 |
+
|
2902 |
+
#: lite/wpforms-lite.php:270
|
2903 |
+
msgid "Upgrade"
|
2904 |
+
msgstr ""
|
2905 |
+
|
2906 |
+
#: lite/wpforms-lite.php:273
|
2907 |
+
msgid ""
|
2908 |
+
"While WPForms Lite allows you to create any type of form, you can speed up "
|
2909 |
+
"the process by unlocking our other pre-built form templates among other "
|
2910 |
+
"features, so you never have to start from scratch again..."
|
2911 |
+
msgstr ""
|
2912 |
+
|
2913 |
+
#: lite/wpforms-lite.php:416
|
2914 |
+
#: pro/includes/admin/builder/panels/class-payments.php:21
|
2915 |
+
#: pro/wpforms-pro.php:152 pro/wpforms-pro.php:223
|
2916 |
+
msgid "Payments"
|
2917 |
+
msgstr ""
|
2918 |
+
|
2919 |
+
#: lite/wpforms-lite.php:440
|
2920 |
msgid "is a PRO Feature"
|
2921 |
msgstr ""
|
2922 |
|
2923 |
+
#: lite/wpforms-lite.php:441
|
2924 |
msgid ""
|
2925 |
"We're sorry, %name% is not available on your plan.<br><br>Please upgrade to "
|
2926 |
"the PRO plan to unlock all these awesome features."
|
2934 |
msgid "Could not deactivate addon. Please deacticate from the Plugins page."
|
2935 |
msgstr ""
|
2936 |
|
2937 |
+
#: pro/includes/admin/ajax-actions.php:47
|
2938 |
msgid "Addon activated."
|
2939 |
msgstr ""
|
2940 |
|
2941 |
+
#: pro/includes/admin/ajax-actions.php:51
|
2942 |
msgid "Could not activate addon. Please activate from the Plugins page."
|
2943 |
msgstr ""
|
2944 |
|
2945 |
+
#: pro/includes/admin/ajax-actions.php:67
|
2946 |
+
#: pro/includes/admin/ajax-actions.php:86
|
2947 |
+
#: pro/includes/admin/ajax-actions.php:89
|
2948 |
+
#: pro/includes/admin/ajax-actions.php:115
|
2949 |
msgid ""
|
2950 |
"Could not install addon. Please download from wpforms.com and install "
|
2951 |
"manually."
|
2952 |
msgstr ""
|
2953 |
|
2954 |
+
#: pro/includes/admin/ajax-actions.php:109
|
2955 |
msgid "Addon installed."
|
2956 |
msgstr ""
|
2957 |
|
2958 |
+
#: pro/includes/admin/ajax-actions.php:225
|
2959 |
+
#: pro/includes/admin/ajax-actions.php:270
|
2960 |
msgid "Please enter a license key."
|
2961 |
msgstr ""
|
2962 |
|
2963 |
+
#: pro/includes/admin/builder/panels/class-payments.php:71
|
|
|
|
|
|
|
|
|
|
|
2964 |
msgid "Install Your Payment Integration"
|
2965 |
msgstr ""
|
2966 |
|
2967 |
+
#: pro/includes/admin/builder/panels/class-payments.php:72
|
2968 |
msgid ""
|
2969 |
+
"It seems you do not have any payment addons activated. You can head over to "
|
2970 |
+
"the <a href=\"%s\">Addons page</a> to install and activate the addon for "
|
2971 |
"your payment service."
|
2972 |
msgstr ""
|
2973 |
|
2974 |
+
#: pro/includes/admin/builder/panels/class-payments.php:78
|
2975 |
msgid "Select Your Payment Integration"
|
2976 |
msgstr ""
|
2977 |
|
2978 |
+
#: pro/includes/admin/builder/panels/class-payments.php:79
|
2979 |
msgid ""
|
2980 |
+
"Select your payment provider from the options on the left. If you don't see "
|
2981 |
+
"your payment service listed, then let us know and we'll do our best to get "
|
2982 |
+
"it added as fast as possible."
|
2983 |
msgstr ""
|
2984 |
|
2985 |
#: pro/includes/admin/class-addons.php:84
|
3035 |
msgstr ""
|
3036 |
|
3037 |
#: pro/includes/admin/class-addons.php:225
|
3038 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:162
|
3039 |
msgid "Status"
|
3040 |
msgstr ""
|
3041 |
|
3051 |
msgstr ""
|
3052 |
|
3053 |
#: pro/includes/admin/class-license.php:200
|
3054 |
+
#: pro/includes/admin/class-license.php:354
|
3055 |
msgid ""
|
3056 |
+
"Your license key for WPForms is invalid. The key no longer exists or the "
|
3057 |
"user associated with the key has been deleted. Please use a different key to "
|
3058 |
"continue receiving automatic updates."
|
3059 |
msgstr ""
|
3092 |
"receiving automatic updates.</a>"
|
3093 |
msgstr ""
|
3094 |
|
3095 |
+
#: pro/includes/admin/entries/class-entries-export.php:204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3096 |
msgid "Date GMT"
|
3097 |
msgstr ""
|
3098 |
|
3099 |
+
#: pro/includes/admin/entries/class-entries-export.php:205
|
3100 |
msgid "ID"
|
3101 |
msgstr ""
|
3102 |
|
3103 |
+
#: pro/includes/admin/entries/class-entries-export.php:341
|
3104 |
msgid "You do not have permission to export entries."
|
3105 |
msgstr ""
|
3106 |
|
3107 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:129
|
3108 |
msgid "All"
|
3109 |
msgstr ""
|
3110 |
|
3111 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:130
|
3112 |
msgid "Unread"
|
3113 |
msgstr ""
|
3114 |
|
3115 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:131
|
3116 |
msgid "Starred"
|
3117 |
msgstr ""
|
3118 |
|
3119 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:156
|
3120 |
#: pro/includes/fields/class-payment-total.php:21
|
3121 |
msgid "Total"
|
3122 |
msgstr ""
|
3123 |
|
3124 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:167
|
3125 |
+
#: pro/includes/admin/entries/class-entries-single.php:1019
|
3126 |
msgid "Actions"
|
3127 |
msgstr ""
|
3128 |
|
3129 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:168
|
3130 |
msgid "Change columns to display"
|
3131 |
msgstr ""
|
3132 |
|
3133 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:318
|
3134 |
+
#: pro/includes/admin/entries/class-entries-single.php:833
|
3135 |
msgid "Unknown"
|
3136 |
msgstr ""
|
3137 |
|
3138 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:325
|
3139 |
+
#: pro/includes/admin/entries/class-entries-single.php:776
|
3140 |
msgid "Completed"
|
3141 |
msgstr ""
|
3142 |
|
3143 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:399
|
3144 |
msgid "View Form Entry"
|
3145 |
msgstr ""
|
3146 |
|
3147 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:400
|
3148 |
msgid "View"
|
3149 |
msgstr ""
|
3150 |
|
3151 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:417
|
3152 |
msgid "Delete Form Entry"
|
3153 |
msgstr ""
|
3154 |
|
3155 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:434
|
3156 |
msgid "Mark Read"
|
3157 |
msgstr ""
|
3158 |
|
3159 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:435
|
3160 |
+
#: pro/includes/admin/entries/class-entries-single.php:1003
|
3161 |
msgid "Mark Unread"
|
3162 |
msgstr ""
|
3163 |
|
3164 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:436
|
3165 |
+
#: pro/includes/admin/entries/class-entries-single.php:968
|
3166 |
msgid "Star"
|
3167 |
msgstr ""
|
3168 |
|
3169 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:437
|
3170 |
+
#: pro/includes/admin/entries/class-entries-single.php:968
|
3171 |
msgid "Unstar"
|
3172 |
msgstr ""
|
3173 |
|
3174 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:438
|
3175 |
msgid "----------"
|
3176 |
msgstr ""
|
3177 |
|
3178 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:496
|
3179 |
+
msgid "Entry was successfully marked as read."
|
3180 |
+
msgstr ""
|
|
|
|
|
3181 |
|
3182 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:498
|
3183 |
+
msgid "Entries were successfully marked as read."
|
3184 |
+
msgstr ""
|
|
|
|
|
3185 |
|
3186 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:522
|
3187 |
+
msgid "Entry was successfully marked as unread."
|
3188 |
+
msgstr ""
|
3189 |
+
|
3190 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:524
|
3191 |
+
msgid "Entries were successfully marked as unread."
|
3192 |
+
msgstr ""
|
3193 |
+
|
3194 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:548
|
3195 |
+
msgid "Entry was successfully starred."
|
3196 |
+
msgstr ""
|
3197 |
+
|
3198 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:550
|
3199 |
+
msgid "Entries were successfully starred."
|
3200 |
+
msgstr ""
|
3201 |
+
|
3202 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:574
|
3203 |
+
msgid "Entry was successfully unstarred."
|
3204 |
+
msgstr ""
|
3205 |
+
|
3206 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:576
|
3207 |
+
msgid "Entries were successfully unstarred."
|
3208 |
+
msgstr ""
|
3209 |
+
|
3210 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:595
|
3211 |
+
msgid "Entry was successfully deleted."
|
3212 |
+
msgstr ""
|
3213 |
+
|
3214 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:597
|
3215 |
+
msgid "Entries were successfully deleted."
|
3216 |
+
msgstr ""
|
3217 |
+
|
3218 |
+
#: pro/includes/admin/entries/class-entries-list-table.php:613
|
3219 |
msgid "Whoops, it appears you do not have any form entries yet."
|
3220 |
msgstr ""
|
3221 |
|
3222 |
+
#: pro/includes/admin/entries/class-entries-list.php:142
|
3223 |
msgid "Number of entries per page:"
|
3224 |
msgstr ""
|
3225 |
|
3226 |
+
#: pro/includes/admin/entries/class-entries-list.php:226
|
3227 |
msgid "All entries marked as read."
|
3228 |
msgstr ""
|
3229 |
|
3230 |
+
#: pro/includes/admin/entries/class-entries-list.php:283
|
3231 |
+
msgid "All entries for the currently selected form were successfully deleted."
|
3232 |
msgstr ""
|
3233 |
|
3234 |
+
#: pro/includes/admin/entries/class-entries-list.php:386
|
3235 |
+
msgid "Select the fields to show when viewing the entries list for this form."
|
3236 |
msgstr ""
|
3237 |
|
3238 |
+
#: pro/includes/admin/entries/class-entries-list.php:388
|
3239 |
msgid ""
|
3240 |
"Currently columns have not been configured, so we're showing the first 3 "
|
3241 |
"fields."
|
3242 |
msgstr ""
|
3243 |
|
3244 |
+
#: pro/includes/admin/entries/class-entries-list.php:492
|
3245 |
msgid "Select Form"
|
3246 |
msgstr ""
|
3247 |
|
3248 |
+
#: pro/includes/admin/entries/class-entries-list.php:498
|
3249 |
msgid "Open form selector"
|
3250 |
msgstr ""
|
3251 |
|
3252 |
+
#: pro/includes/admin/entries/class-entries-list.php:523
|
3253 |
msgid "Edit This Form"
|
3254 |
msgstr ""
|
3255 |
|
3256 |
+
#: pro/includes/admin/entries/class-entries-list.php:533
|
3257 |
msgid "Download Export (CSV)"
|
3258 |
msgstr ""
|
3259 |
|
3260 |
+
#: pro/includes/admin/entries/class-entries-list.php:538
|
3261 |
msgid "Mark All Read"
|
3262 |
msgstr ""
|
3263 |
|
3264 |
+
#: pro/includes/admin/entries/class-entries-list.php:543
|
3265 |
msgid "Delete All"
|
3266 |
msgstr ""
|
3267 |
|
3268 |
+
#: pro/includes/admin/entries/class-entries-single.php:164
|
3269 |
msgid "This entry has been starred."
|
3270 |
msgstr ""
|
3271 |
|
3272 |
+
#: pro/includes/admin/entries/class-entries-single.php:181
|
3273 |
msgid "This entry has been unstarred."
|
3274 |
msgstr ""
|
3275 |
|
3276 |
+
#: pro/includes/admin/entries/class-entries-single.php:214
|
3277 |
msgid "This entry has been marked unread."
|
3278 |
msgstr ""
|
3279 |
|
3280 |
+
#: pro/includes/admin/entries/class-entries-single.php:241
|
3281 |
msgid "Note deleted."
|
3282 |
msgstr ""
|
3283 |
|
3284 |
+
#: pro/includes/admin/entries/class-entries-single.php:277
|
3285 |
msgid "Note added."
|
3286 |
msgstr ""
|
3287 |
|
3288 |
+
#: pro/includes/admin/entries/class-entries-single.php:311
|
3289 |
msgid "Notifications sent!"
|
3290 |
msgstr ""
|
3291 |
|
3292 |
+
#: pro/includes/admin/entries/class-entries-single.php:329
|
3293 |
msgid "Invalid entry ID."
|
3294 |
msgstr ""
|
3295 |
|
3296 |
+
#: pro/includes/admin/entries/class-entries-single.php:342
|
3297 |
msgid "Entry not found."
|
3298 |
msgstr ""
|
3299 |
|
3300 |
+
#: pro/includes/admin/entries/class-entries-single.php:355
|
3301 |
msgid "Form not found."
|
3302 |
msgstr ""
|
3303 |
|
3304 |
+
#: pro/includes/admin/entries/class-entries-single.php:439
|
3305 |
msgid "View Entry"
|
3306 |
msgstr ""
|
3307 |
|
3308 |
+
#: pro/includes/admin/entries/class-entries-single.php:441
|
3309 |
msgid "Back to All Entries"
|
3310 |
msgstr ""
|
3311 |
|
3312 |
+
#: pro/includes/admin/entries/class-entries-single.php:445
|
3313 |
+
msgid "Entry %1$s of %2$s"
|
3314 |
msgstr ""
|
3315 |
|
3316 |
+
#: pro/includes/admin/entries/class-entries-single.php:448
|
3317 |
msgid "Previous form entry"
|
3318 |
msgstr ""
|
3319 |
|
3320 |
+
#: pro/includes/admin/entries/class-entries-single.php:452
|
3321 |
msgid "Current form entry"
|
3322 |
msgstr ""
|
3323 |
|
3324 |
+
#: pro/includes/admin/entries/class-entries-single.php:454
|
3325 |
msgid "Next form entry"
|
3326 |
msgstr ""
|
3327 |
|
3328 |
+
#: pro/includes/admin/entries/class-entries-single.php:585
|
3329 |
+
#: pro/includes/admin/entries/class-entries-single.php:600
|
3330 |
msgid "Add Note"
|
3331 |
msgstr ""
|
3332 |
|
3333 |
+
#: pro/includes/admin/entries/class-entries-single.php:609
|
3334 |
msgid "No notes."
|
3335 |
msgstr ""
|
3336 |
|
3337 |
+
#. translators: %1$s - user link; %2$s - date; %3$s - separator; %4$s - link to
|
3338 |
+
#. delete a note
|
3339 |
+
#: pro/includes/admin/entries/class-entries-single.php:646
|
3340 |
+
msgid "Added by %1$s on %2$s %3$s %4$s"
|
3341 |
msgstr ""
|
3342 |
|
3343 |
+
#: pro/includes/admin/entries/class-entries-single.php:650
|
3344 |
+
msgctxt "Entry: note"
|
3345 |
+
msgid "Delete"
|
3346 |
msgstr ""
|
3347 |
|
3348 |
+
#: pro/includes/admin/entries/class-entries-single.php:688
|
3349 |
msgid "Debug Information"
|
3350 |
msgstr ""
|
3351 |
|
3352 |
+
#: pro/includes/admin/entries/class-entries-single.php:717
|
3353 |
msgid "Entry Details"
|
3354 |
msgstr ""
|
3355 |
|
3356 |
+
#: pro/includes/admin/entries/class-entries-single.php:726
|
3357 |
msgid "Entry ID:"
|
3358 |
msgstr ""
|
3359 |
|
3360 |
+
#: pro/includes/admin/entries/class-entries-single.php:732
|
3361 |
msgid "Submitted:"
|
3362 |
msgstr ""
|
3363 |
|
3364 |
+
#: pro/includes/admin/entries/class-entries-single.php:739
|
3365 |
+
msgid "Modified:"
|
3366 |
msgstr ""
|
3367 |
|
3368 |
+
#: pro/includes/admin/entries/class-entries-single.php:740
|
3369 |
msgid "M j, Y @ H:i"
|
3370 |
msgstr ""
|
3371 |
|
3372 |
+
#: pro/includes/admin/entries/class-entries-single.php:748
|
3373 |
msgid "User:"
|
3374 |
msgstr ""
|
3375 |
|
3376 |
+
#: pro/includes/admin/entries/class-entries-single.php:767
|
3377 |
msgid "User IP:"
|
3378 |
msgstr ""
|
3379 |
|
3380 |
+
#: pro/includes/admin/entries/class-entries-single.php:775
|
3381 |
msgid "Status:"
|
3382 |
msgstr ""
|
3383 |
|
3384 |
+
#: pro/includes/admin/entries/class-entries-single.php:801
|
3385 |
+
msgid "Delete Entry"
|
3386 |
+
msgstr ""
|
3387 |
+
|
3388 |
+
#: pro/includes/admin/entries/class-entries-single.php:849
|
3389 |
msgid "PayPal Standard"
|
3390 |
msgstr ""
|
3391 |
|
3392 |
+
#: pro/includes/admin/entries/class-entries-single.php:862
|
3393 |
msgid "Payment Details"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
+
#: pro/includes/admin/entries/class-entries-single.php:870
|
3397 |
+
msgid "Status: %s"
|
3398 |
msgstr ""
|
3399 |
|
3400 |
+
#: pro/includes/admin/entries/class-entries-single.php:874
|
3401 |
+
msgid "Total: %s"
|
3402 |
msgstr ""
|
3403 |
|
3404 |
+
#: pro/includes/admin/entries/class-entries-single.php:879
|
3405 |
+
msgid "Gateway: %s"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
+
#: pro/includes/admin/entries/class-entries-single.php:881
|
3409 |
+
msgctxt "Gateway mode"
|
3410 |
msgid "Test"
|
3411 |
msgstr ""
|
3412 |
|
3413 |
+
#: pro/includes/admin/entries/class-entries-single.php:887
|
3414 |
msgid "Transaction ID:"
|
3415 |
msgstr ""
|
3416 |
|
3417 |
+
#: pro/includes/admin/entries/class-entries-single.php:892
|
3418 |
msgid "Note:"
|
3419 |
msgstr ""
|
3420 |
|
3421 |
+
#: pro/includes/admin/entries/class-entries-single.php:992
|
3422 |
msgid "Export (CSV)"
|
3423 |
msgstr ""
|
3424 |
|
3425 |
+
#: pro/includes/admin/entries/class-entries-single.php:997
|
3426 |
msgid "Resend Notifications"
|
3427 |
msgstr ""
|
3428 |
|
3429 |
+
#: pro/includes/admin/entries/class-entries-single.php:1068
|
3430 |
msgid "Related Entries"
|
3431 |
msgstr ""
|
3432 |
|
3433 |
+
#: pro/includes/admin/entries/class-entries-single.php:1073
|
3434 |
msgid "The user who created this entry also submitted the entries below."
|
3435 |
msgstr ""
|
3436 |
|
3437 |
+
#: pro/includes/admin/entries/class-entries-single.php:1088
|
3438 |
msgid "(Abandoned)"
|
3439 |
msgstr ""
|
3440 |
|
3443 |
msgstr ""
|
3444 |
|
3445 |
#: pro/includes/class-conditional-logic-fields.php:364
|
3446 |
+
msgid "Entry Notification stopped by conditional logic."
|
3447 |
msgstr ""
|
3448 |
|
3449 |
+
#: pro/includes/fields/class-address.php:29
|
3450 |
#: pro/includes/templates/class-order.php:58
|
3451 |
msgid "Address"
|
3452 |
msgstr ""
|
3453 |
|
3454 |
+
#: pro/includes/fields/class-address.php:38
|
3455 |
#: pro/includes/fields/class-phone.php:90
|
3456 |
msgid "US"
|
3457 |
msgstr ""
|
3458 |
|
|
|
3459 |
#: pro/includes/fields/class-address.php:39
|
3460 |
+
#: pro/includes/fields/class-address.php:48
|
3461 |
+
#: pro/includes/fields/class-address.php:321
|
3462 |
msgid "Address Line 1"
|
3463 |
msgstr ""
|
3464 |
|
|
|
3465 |
#: pro/includes/fields/class-address.php:40
|
3466 |
+
#: pro/includes/fields/class-address.php:49
|
3467 |
+
#: pro/includes/fields/class-address.php:340
|
3468 |
msgid "Address Line 2"
|
3469 |
msgstr ""
|
3470 |
|
|
|
3471 |
#: pro/includes/fields/class-address.php:41
|
3472 |
+
#: pro/includes/fields/class-address.php:50
|
3473 |
+
#: pro/includes/fields/class-address.php:361
|
3474 |
msgid "City"
|
3475 |
msgstr ""
|
3476 |
|
|
|
|
|
3477 |
#: pro/includes/fields/class-address.php:42
|
3478 |
+
msgid "Zip Code"
|
3479 |
msgstr ""
|
3480 |
|
3481 |
+
#: pro/includes/fields/class-address.php:43
|
3482 |
+
msgid "State"
|
3483 |
msgstr ""
|
3484 |
|
3485 |
+
#: pro/includes/fields/class-address.php:47
|
3486 |
#: pro/includes/fields/class-phone.php:91
|
3487 |
msgid "International"
|
3488 |
msgstr ""
|
3489 |
|
3490 |
+
#: pro/includes/fields/class-address.php:51
|
3491 |
msgid "Postal Code"
|
3492 |
msgstr ""
|
3493 |
|
3494 |
+
#: pro/includes/fields/class-address.php:52
|
3495 |
+
#: pro/includes/fields/class-address.php:379
|
3496 |
msgid "State / Province / Region"
|
3497 |
msgstr ""
|
3498 |
|
3499 |
+
#: pro/includes/fields/class-address.php:54
|
3500 |
+
#: pro/includes/fields/class-address.php:423
|
3501 |
msgid "Country"
|
3502 |
msgstr ""
|
3503 |
|
3504 |
+
#: pro/includes/fields/class-address.php:272
|
3505 |
msgid "Select scheme format for the address field."
|
3506 |
msgstr ""
|
3507 |
|
3508 |
+
#: pro/includes/fields/class-address.php:279
|
3509 |
msgid "Scheme"
|
3510 |
msgstr ""
|
3511 |
|
3512 |
+
#: pro/includes/fields/class-address.php:399
|
3513 |
msgid "ZIP / Postal"
|
3514 |
msgstr ""
|
3515 |
|
3516 |
+
#: pro/includes/fields/class-date-time.php:22
|
3517 |
msgid "Date / Time"
|
3518 |
msgstr ""
|
3519 |
|
3520 |
+
#: pro/includes/fields/class-date-time.php:61
|
3521 |
msgid "Select format for the date field."
|
3522 |
msgstr ""
|
3523 |
|
3524 |
+
#: pro/includes/fields/class-date-time.php:72
|
3525 |
msgid "Date and Time"
|
3526 |
msgstr ""
|
3527 |
|
3528 |
+
#: pro/includes/fields/class-date-time.php:74
|
3529 |
+
#: pro/includes/fields/class-date-time.php:174
|
3530 |
+
#: pro/includes/fields/class-date-time.php:284
|
3531 |
+
#: pro/includes/fields/class-date-time.php:394
|
3532 |
msgid "Time"
|
3533 |
msgstr ""
|
3534 |
|
3535 |
+
#: pro/includes/fields/class-date-time.php:131
|
3536 |
msgid "Advanced date options."
|
3537 |
msgstr ""
|
3538 |
|
3539 |
+
#: pro/includes/fields/class-date-time.php:151
|
3540 |
msgid "Date Picker"
|
3541 |
msgstr ""
|
3542 |
|
3543 |
+
#: pro/includes/fields/class-date-time.php:152
|
3544 |
msgid "Date Dropdown"
|
3545 |
msgstr ""
|
3546 |
|
3547 |
+
#: pro/includes/fields/class-date-time.php:167
|
3548 |
msgid "15 minutes"
|
3549 |
msgstr ""
|
3550 |
|
3551 |
+
#: pro/includes/fields/class-date-time.php:168
|
3552 |
msgid "30 minute"
|
3553 |
msgstr ""
|
3554 |
|
3555 |
+
#: pro/includes/fields/class-date-time.php:169
|
3556 |
msgid "1 hour"
|
3557 |
msgstr ""
|
3558 |
|
3559 |
+
#: pro/includes/fields/class-date-time.php:175
|
3560 |
msgid "Advanced time options"
|
3561 |
msgstr ""
|
3562 |
|
3563 |
+
#: pro/includes/fields/class-date-time.php:195
|
3564 |
msgid "Interval"
|
3565 |
msgstr ""
|
3566 |
|
|
|
|
|
|
|
|
|
3567 |
#: pro/includes/fields/class-divider.php:21
|
3568 |
msgid "Section Divider"
|
3569 |
msgstr ""
|
3586 |
|
3587 |
#: pro/includes/fields/class-file-upload.php:179
|
3588 |
msgid ""
|
3589 |
+
"Enter the max file size, in megabytes, to allow. If left blank, the value "
|
3590 |
+
"defaults to the maximum size the server allows which is %s."
|
3591 |
msgstr ""
|
3592 |
|
3593 |
#: pro/includes/fields/class-file-upload.php:227
|
3631 |
msgstr ""
|
3632 |
|
3633 |
#: pro/includes/fields/class-file-upload.php:323
|
3634 |
+
msgid "File upload error. %s"
|
3635 |
msgstr ""
|
3636 |
|
3637 |
#: pro/includes/fields/class-file-upload.php:342
|
3658 |
msgid "Contents of this field are not displayed in the admin area."
|
3659 |
msgstr ""
|
3660 |
|
3661 |
+
#: pro/includes/fields/class-page-break.php:25
|
3662 |
+
#: pro/includes/fields/class-page-break.php:528
|
3663 |
msgid "Page Break"
|
3664 |
msgstr ""
|
3665 |
|
3666 |
+
#. translators: %1$s - current step in multi-page form; %2$d - total number of
|
3667 |
+
#. pages.
|
3668 |
+
#: pro/includes/fields/class-page-break.php:145
|
3669 |
+
msgid "Step %1$s of %2$d"
|
3670 |
msgstr ""
|
3671 |
|
3672 |
+
#: pro/includes/fields/class-page-break.php:284
|
|
|
|
|
|
|
|
|
3673 |
msgid "Progress Bar"
|
3674 |
msgstr ""
|
3675 |
|
3676 |
+
#: pro/includes/fields/class-page-break.php:285
|
3677 |
msgid "Circles"
|
3678 |
msgstr ""
|
3679 |
|
3680 |
+
#: pro/includes/fields/class-page-break.php:286
|
3681 |
msgid "Connector"
|
3682 |
msgstr ""
|
3683 |
|
3684 |
+
#: pro/includes/fields/class-page-break.php:287
|
3685 |
msgid "None"
|
3686 |
msgstr ""
|
3687 |
|
3688 |
+
#: pro/includes/fields/class-page-break.php:294
|
3689 |
msgid "Progress Indicator"
|
3690 |
msgstr ""
|
3691 |
|
3692 |
+
#: pro/includes/fields/class-page-break.php:295
|
3693 |
msgid ""
|
3694 |
"Select theme for Page Indicator which is displayed at the top of the form."
|
3695 |
msgstr ""
|
3696 |
|
3697 |
+
#: pro/includes/fields/class-page-break.php:320
|
3698 |
msgid "Page Indicator Color"
|
3699 |
msgstr ""
|
3700 |
|
3701 |
+
#: pro/includes/fields/class-page-break.php:321
|
3702 |
msgid "Select the primary color for the Page Indicator theme."
|
3703 |
msgstr ""
|
3704 |
|
3705 |
+
#: pro/includes/fields/class-page-break.php:349
|
3706 |
msgid "Page Title"
|
3707 |
msgstr ""
|
3708 |
|
3709 |
+
#: pro/includes/fields/class-page-break.php:350
|
3710 |
msgid "Enter text for the page title."
|
3711 |
msgstr ""
|
3712 |
|
3713 |
+
#: pro/includes/fields/class-page-break.php:376
|
3714 |
msgid "Next Label"
|
3715 |
msgstr ""
|
3716 |
|
3717 |
+
#: pro/includes/fields/class-page-break.php:377
|
3718 |
msgid "Enter text for Next page navigation button."
|
3719 |
msgstr ""
|
3720 |
|
3721 |
+
#: pro/includes/fields/class-page-break.php:386
|
3722 |
+
#: pro/includes/fields/class-page-break.php:523
|
3723 |
msgid "Next"
|
3724 |
msgstr ""
|
3725 |
|
3726 |
+
#: pro/includes/fields/class-page-break.php:405
|
3727 |
msgid "Display Previous"
|
3728 |
msgstr ""
|
3729 |
|
3730 |
+
#: pro/includes/fields/class-page-break.php:406
|
3731 |
msgid "Toggle displaying the Previous page navigation button."
|
3732 |
msgstr ""
|
3733 |
|
3734 |
+
#: pro/includes/fields/class-page-break.php:430
|
3735 |
msgid "Previous Label"
|
3736 |
msgstr ""
|
3737 |
|
3738 |
+
#: pro/includes/fields/class-page-break.php:431
|
3739 |
msgid "Enter text for Previous page navigation button."
|
3740 |
msgstr ""
|
3741 |
|
3742 |
+
#: pro/includes/fields/class-page-break.php:476
|
3743 |
msgid "Page Navigation Alignment"
|
3744 |
msgstr ""
|
3745 |
|
3746 |
+
#: pro/includes/fields/class-page-break.php:477
|
3747 |
msgid "Select the alignment for the Next/Previous page navigation buttons"
|
3748 |
msgstr ""
|
3749 |
|
3750 |
+
#: pro/includes/fields/class-page-break.php:487
|
3751 |
msgid "Left"
|
3752 |
msgstr ""
|
3753 |
|
3754 |
+
#: pro/includes/fields/class-page-break.php:488
|
3755 |
msgid "Right"
|
3756 |
msgstr ""
|
3757 |
|
3758 |
+
#: pro/includes/fields/class-page-break.php:489
|
3759 |
msgid "Center"
|
3760 |
msgstr ""
|
3761 |
|
3762 |
+
#: pro/includes/fields/class-page-break.php:490
|
3763 |
msgid "Split"
|
3764 |
msgstr ""
|
3765 |
|
3766 |
+
#: pro/includes/fields/class-page-break.php:527
|
3767 |
msgid "First Page"
|
3768 |
msgstr ""
|
3769 |
|
3783 |
msgstr ""
|
3784 |
|
3785 |
#: pro/includes/fields/class-password.php:189
|
3786 |
+
msgid "Check this option to ask users to provide their password twice."
|
3787 |
msgstr ""
|
3788 |
|
3789 |
+
#: pro/includes/fields/class-payment-credit-card.php:21 pro/wpforms-pro.php:215
|
3790 |
msgid "Credit Card"
|
3791 |
msgstr ""
|
3792 |
|
3822 |
msgid "Name on Card Placeholder Text"
|
3823 |
msgstr ""
|
3824 |
|
|
|
|
|
|
|
|
|
|
|
3825 |
#: pro/includes/fields/class-payment-credit-card.php:355
|
3826 |
msgid ""
|
3827 |
"This page is insecure. Credit Card field should be used for testing purposes "
|
3903 |
msgid "Amount mismatch"
|
3904 |
msgstr ""
|
3905 |
|
|
|
|
|
|
|
|
|
3906 |
#: pro/includes/fields/class-phone.php:21
|
3907 |
#: pro/includes/templates/class-order.php:50
|
3908 |
#: pro/includes/templates/class-request-quote.php:54
|
3913 |
msgid "Select format for the phone form field"
|
3914 |
msgstr ""
|
3915 |
|
3916 |
+
#: pro/includes/fields/class-url.php:22
|
3917 |
msgid "Website / URL"
|
3918 |
msgstr ""
|
3919 |
|
3920 |
+
#: pro/includes/payments/functions.php:22
|
|
|
|
|
|
|
|
|
3921 |
msgid "U.S. Dollar"
|
3922 |
msgstr ""
|
3923 |
|
3924 |
+
#: pro/includes/payments/functions.php:30
|
3925 |
msgid "Pound Sterling"
|
3926 |
msgstr ""
|
3927 |
|
3928 |
+
#: pro/includes/payments/functions.php:38
|
3929 |
msgid "Euro"
|
3930 |
msgstr ""
|
3931 |
|
3932 |
+
#: pro/includes/payments/functions.php:46
|
3933 |
msgid "Australian Dollar"
|
3934 |
msgstr ""
|
3935 |
|
3936 |
+
#: pro/includes/payments/functions.php:54
|
3937 |
msgid "Brazilian Real"
|
3938 |
msgstr ""
|
3939 |
|
3940 |
+
#: pro/includes/payments/functions.php:62
|
3941 |
msgid "Canadian Dollar"
|
3942 |
msgstr ""
|
3943 |
|
3944 |
+
#: pro/includes/payments/functions.php:70
|
3945 |
msgid "Czech Koruna"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
+
#: pro/includes/payments/functions.php:78
|
3949 |
msgid "Danish Krone"
|
3950 |
msgstr ""
|
3951 |
|
3952 |
+
#: pro/includes/payments/functions.php:86
|
3953 |
msgid "Hong Kong Dollar"
|
3954 |
msgstr ""
|
3955 |
|
3956 |
+
#: pro/includes/payments/functions.php:94
|
3957 |
msgid "Hungarian Forint"
|
3958 |
msgstr ""
|
3959 |
|
3960 |
+
#: pro/includes/payments/functions.php:102
|
3961 |
msgid "Israeli New Sheqel"
|
3962 |
msgstr ""
|
3963 |
|
3964 |
+
#: pro/includes/payments/functions.php:110
|
3965 |
msgid "Malaysian Ringgit"
|
3966 |
msgstr ""
|
3967 |
|
3968 |
+
#: pro/includes/payments/functions.php:118
|
3969 |
msgid "Mexican Peso"
|
3970 |
msgstr ""
|
3971 |
|
3972 |
+
#: pro/includes/payments/functions.php:126
|
3973 |
msgid "Norwegian Krone"
|
3974 |
msgstr ""
|
3975 |
|
3976 |
+
#: pro/includes/payments/functions.php:134
|
3977 |
msgid "New Zealand Dollar"
|
3978 |
msgstr ""
|
3979 |
|
3980 |
+
#: pro/includes/payments/functions.php:142
|
3981 |
msgid "Philippine Peso"
|
3982 |
msgstr ""
|
3983 |
|
3984 |
+
#: pro/includes/payments/functions.php:150
|
3985 |
msgid "Polish Zloty"
|
3986 |
msgstr ""
|
3987 |
|
3988 |
+
#: pro/includes/payments/functions.php:158
|
3989 |
msgid "Russian Ruble"
|
3990 |
msgstr ""
|
3991 |
|
3992 |
+
#: pro/includes/payments/functions.php:166
|
3993 |
msgid "Singapore Dollar"
|
3994 |
msgstr ""
|
3995 |
|
3996 |
+
#: pro/includes/payments/functions.php:174
|
3997 |
msgid "South African Rand"
|
3998 |
msgstr ""
|
3999 |
|
4000 |
+
#: pro/includes/payments/functions.php:182
|
4001 |
msgid "Swedish Krona"
|
4002 |
msgstr ""
|
4003 |
|
4004 |
+
#: pro/includes/payments/functions.php:190
|
4005 |
msgid "Swiss Franc"
|
4006 |
msgstr ""
|
4007 |
|
4008 |
+
#: pro/includes/payments/functions.php:198
|
4009 |
msgid "Taiwan New Dollar"
|
4010 |
msgstr ""
|
4011 |
|
4012 |
+
#: pro/includes/payments/functions.php:206
|
4013 |
msgid "Thai Baht"
|
4014 |
msgstr ""
|
4015 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4016 |
#: pro/includes/templates/class-donation.php:28
|
4017 |
+
#: pro/includes/templates/class-order.php:28
|
4018 |
msgid "Click the Payments tab to configure your payment provider"
|
4019 |
msgstr ""
|
4020 |
|
4022 |
msgid "Donation Amount"
|
4023 |
msgstr ""
|
4024 |
|
|
|
|
|
|
|
|
|
4025 |
#: pro/includes/templates/class-order.php:22
|
4026 |
msgid ""
|
4027 |
"Collect Payments for product and service orders with this ready-made form "
|
4028 |
"template. You can add and remove fields as needed."
|
4029 |
msgstr ""
|
4030 |
|
|
|
|
|
|
|
|
|
4031 |
#: pro/includes/templates/class-order.php:67
|
4032 |
msgid "Available Items"
|
4033 |
msgstr ""
|
4036 |
msgid "Total Amount"
|
4037 |
msgstr ""
|
4038 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4039 |
#: pro/includes/templates/class-request-quote.php:40
|
4040 |
msgid "Business / Organization"
|
4041 |
msgstr ""
|
4044 |
msgid "Request"
|
4045 |
msgstr ""
|
4046 |
|
4047 |
+
#: pro/wpforms-pro.php:185
|
4048 |
msgid "File Extension"
|
4049 |
msgstr ""
|
4050 |
|
4051 |
+
#: pro/wpforms-pro.php:191
|
4052 |
msgid "File Size"
|
4053 |
msgstr ""
|
4054 |
|
4055 |
+
#: pro/wpforms-pro.php:197
|
4056 |
msgid "Time (12 hour)"
|
4057 |
msgstr ""
|
4058 |
|
4059 |
+
#: pro/wpforms-pro.php:203
|
4060 |
msgid "Time (24 hour)"
|
4061 |
msgstr ""
|
4062 |
|
4063 |
+
#: pro/wpforms-pro.php:209
|
4064 |
msgid "Payment Required"
|
4065 |
msgstr ""
|
4066 |
|
4067 |
+
#: pro/wpforms-pro.php:230
|
4068 |
msgid "Currency"
|
4069 |
msgstr ""
|
4070 |
|
4071 |
+
#: pro/wpforms-pro.php:307
|
4072 |
msgid "Disable storing entry information in WordPress"
|
4073 |
msgstr ""
|
4074 |
|
4075 |
+
#: pro/wpforms-pro.php:388
|
4076 |
msgid "Add New Notification"
|
4077 |
msgstr ""
|
4078 |
|
4079 |
+
#: pro/wpforms-pro.php:565
|
4080 |
msgid "Send"
|
4081 |
msgstr ""
|
4082 |
|
4083 |
+
#: pro/wpforms-pro.php:566
|
4084 |
msgid "Don't send"
|
4085 |
msgstr ""
|
4086 |
|
4087 |
+
#: pro/wpforms-pro.php:568
|
4088 |
msgid "this notification if"
|
4089 |
msgstr ""
|
4090 |
|
4091 |
+
#: pro/wpforms-pro.php:569
|
4092 |
msgid "Email notifications"
|
4093 |
msgstr ""
|
4094 |
|
4095 |
+
#. translators: %s - Addons page URL in site admin area.
|
4096 |
+
#: pro/wpforms-pro.php:573
|
4097 |
msgid ""
|
4098 |
+
"Install the <a href=\"%s\">Conditional Logic addon</a> to enable conditional "
|
4099 |
+
"logic for Email Notifications."
|
4100 |
msgstr ""
|
4101 |
|
4102 |
+
#. translators: %s - URL to an announcement page.
|
4103 |
+
#: pro/wpforms-pro.php:624
|
4104 |
msgid ""
|
4105 |
"Conditional logic functionality is now included in the core WPForms plugin! "
|
4106 |
"The WPForms Conditional Logic addon can be removed without affecting your "
|
4107 |
"forms. For more details <a href=\"%s\" target=\"_blank\" rel=\"noopener "
|
4108 |
+
"noreferrer\">read our announcement</a>."
|
4109 |
msgstr ""
|
4110 |
|
4111 |
#: wpforms.php:58
|
4112 |
+
msgid "Please deactivate WPForms Lite before activating WPForms."
|
4113 |
msgstr ""
|
4114 |
|
4115 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.4.1.2) #-#-#-#-#
|
4116 |
#. Plugin URI of the plugin/theme
|
4117 |
+
#. #-#-#-#-# wpforms.pot (WPForms 1.4.1.2) #-#-#-#-#
|
4118 |
#. Author URI of the plugin/theme
|
4119 |
msgid "https://wpforms.com"
|
4120 |
msgstr ""
|
lite/wpforms-lite.php
CHANGED
@@ -115,7 +115,7 @@ class WPForms_Lite {
|
|
115 |
'fields' => 'email',
|
116 |
),
|
117 |
'parent' => 'settings',
|
118 |
-
'subsection' => $id
|
119 |
)
|
120 |
);
|
121 |
endif;
|
@@ -126,12 +126,12 @@ class WPForms_Lite {
|
|
126 |
$settings->form_data,
|
127 |
__( 'Email Subject', 'wpforms' ),
|
128 |
array(
|
129 |
-
'default' =>
|
130 |
'smarttags' => array(
|
131 |
-
'type' => 'all'
|
132 |
),
|
133 |
'parent' => 'settings',
|
134 |
-
'subsection' => $id
|
135 |
)
|
136 |
);
|
137 |
wpforms_panel_field(
|
@@ -147,7 +147,7 @@ class WPForms_Lite {
|
|
147 |
'fields' => 'name,text',
|
148 |
),
|
149 |
'parent' => 'settings',
|
150 |
-
'subsection' => $id
|
151 |
)
|
152 |
);
|
153 |
wpforms_panel_field(
|
@@ -163,7 +163,7 @@ class WPForms_Lite {
|
|
163 |
'fields' => 'email',
|
164 |
),
|
165 |
'parent' => 'settings',
|
166 |
-
'subsection' => $id
|
167 |
)
|
168 |
);
|
169 |
wpforms_panel_field(
|
@@ -178,7 +178,7 @@ class WPForms_Lite {
|
|
178 |
'fields' => 'email',
|
179 |
),
|
180 |
'parent' => 'settings',
|
181 |
-
'subsection' => $id
|
182 |
)
|
183 |
);
|
184 |
wpforms_panel_field(
|
@@ -191,12 +191,12 @@ class WPForms_Lite {
|
|
191 |
'rows' => 6,
|
192 |
'default' => '{all_fields}',
|
193 |
'smarttags' => array(
|
194 |
-
'type' => 'all'
|
195 |
),
|
196 |
'parent' => 'settings',
|
197 |
'subsection' => $id,
|
198 |
'class' => 'email-msg',
|
199 |
-
'after' => '<p class="note">' . __( 'To display all form fields, use the <code>{all_fields}</code> Smart Tag.', 'wpforms' ) . '</p>'
|
200 |
)
|
201 |
);
|
202 |
|
@@ -250,29 +250,33 @@ class WPForms_Lite {
|
|
250 |
|
251 |
$templates = array(
|
252 |
array(
|
253 |
-
'name' => 'Request A Quote Form',
|
254 |
'slug' => 'request-quote',
|
255 |
-
'description' => 'Start collecting leads with this pre-made Request a quote form. You can add and remove fields as needed.',
|
256 |
),
|
257 |
array(
|
258 |
-
'name' => 'Donation Form',
|
259 |
'slug' => 'donation',
|
260 |
-
'description' => 'Start collecting donation payments on your website with this ready-made Donation form. You can add and remove fields as needed.',
|
261 |
),
|
262 |
array(
|
263 |
-
'name' => 'Billing / Order Form',
|
264 |
'slug' => 'order',
|
265 |
-
'description' => 'Collect payments for product and service orders with this ready-made form template. You can add and remove fields as needed.',
|
266 |
-
)
|
267 |
);
|
268 |
?>
|
269 |
-
<div class="wpforms-setup-title">
|
270 |
-
|
|
|
|
|
|
|
|
|
271 |
<div class="wpforms-setup-templates wpforms-clear" style="opacity:0.5;">
|
272 |
<?php
|
273 |
$x = 0;
|
274 |
foreach ( $templates as $template ) {
|
275 |
-
$class =
|
276 |
?>
|
277 |
<div class="wpforms-template upgrade-modal <?php echo $class; ?>" id="wpforms-template-<?php echo sanitize_html_class( $template['slug'] ); ?>">
|
278 |
<div class="wpforms-template-name wpforms-clear">
|
@@ -409,7 +413,7 @@ class WPForms_Lite {
|
|
409 |
|
410 |
?>
|
411 |
<button class="wpforms-panel-payments-button upgrade-modal" data-panel="payments">
|
412 |
-
<i class="fa fa-usd"></i><span
|
413 |
</button>
|
414 |
<?php
|
415 |
}
|
@@ -436,7 +440,7 @@ class WPForms_Lite {
|
|
436 |
'upgrade_title' => __( 'is a PRO Feature', 'wpforms' ),
|
437 |
'upgrade_message' => __( 'We\'re sorry, %name% is not available on your plan.<br><br>Please upgrade to the PRO plan to unlock all these awesome features.', 'wpforms' ),
|
438 |
'upgrade_button' => __( 'Upgrade to PRO', 'wpforms' ),
|
439 |
-
'upgrade_url' => wpforms_admin_upgrade_link()
|
440 |
)
|
441 |
);
|
442 |
}
|
@@ -493,7 +497,7 @@ class WPForms_Lite {
|
|
493 |
*/
|
494 |
public function entries_page() {
|
495 |
|
496 |
-
if ( ! isset( $_GET['page'] ) || 'wpforms-entries' !== $_GET['page']
|
497 |
return;
|
498 |
}
|
499 |
?>
|
@@ -668,7 +672,7 @@ class WPForms_Lite {
|
|
668 |
<td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1">Select All</label><input id="cb-select-all-1" type="checkbox"></td>
|
669 |
<th scope="col" id="indicators" class="manage-column column-indicators column-primary"></th>
|
670 |
<th scope="col" id="wpforms_field_0" class="manage-column column-wpforms_field_0">Name</th>
|
671 |
-
<th scope="col" id="wpforms_field_1" class="manage-column column-wpforms_field_1">
|
672 |
<th scope="col" id="wpforms_field_2" class="manage-column column-wpforms_field_2">Comment or Message</th>
|
673 |
<th scope="col" id="date" class="manage-column column-date sortable desc"><a href="#"><span>Date</span><span class="sorting-indicator"></span></a></th>
|
674 |
<th scope="col" id="actions" class="manage-column column-actions">Actions</th>
|
@@ -682,7 +686,7 @@ class WPForms_Lite {
|
|
682 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
683 |
</td>
|
684 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">David Wells</td>
|
685 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
686 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Vivamus sit amet dolor arcu. Praesent fermentum semper justo, nec scelerisq…</td>
|
687 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
688 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -694,7 +698,7 @@ class WPForms_Lite {
|
|
694 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
695 |
</td>
|
696 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Jennifer Selzer</td>
|
697 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
698 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Maecenas sollicitudin felis et justo elementum, et lobortis justo vulputate…</td>
|
699 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
700 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -706,7 +710,7 @@ class WPForms_Lite {
|
|
706 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
707 |
</td>
|
708 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Philip Norton</td>
|
709 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
710 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Etiam cursus orci tellus, ut vehicula odio mattis sit amet. Curabitur eros …</td>
|
711 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
712 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -718,7 +722,7 @@ class WPForms_Lite {
|
|
718 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
719 |
</td>
|
720 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Kevin Gregory</td>
|
721 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
722 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Cras vel orci congue, tincidunt eros vitae, consectetur risus. Proin enim m…</td>
|
723 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
724 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -730,7 +734,7 @@ class WPForms_Lite {
|
|
730 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
731 |
</td>
|
732 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">John Heiden</td>
|
733 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
734 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Fusce consequat dui ut orci tempus cursus. Vivamus ut neque id ipsum tempor…</td>
|
735 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
736 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -742,7 +746,7 @@ class WPForms_Lite {
|
|
742 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
743 |
</td>
|
744 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Laura Shuler</td>
|
745 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
746 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">In ac finibus erat. Curabitur sit amet ante nec tellus commodo commodo non …</td>
|
747 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
748 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -754,7 +758,7 @@ class WPForms_Lite {
|
|
754 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
755 |
</td>
|
756 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Walter Sullivan</td>
|
757 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
758 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Phasellus semper magna leo, ut porta nibh pretium sed. Interdum et malesuad…</td>
|
759 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
760 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -766,7 +770,7 @@ class WPForms_Lite {
|
|
766 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
767 |
</td>
|
768 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Gary Austin</td>
|
769 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
770 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet ero…</td>
|
771 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
772 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -778,7 +782,7 @@ class WPForms_Lite {
|
|
778 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
779 |
</td>
|
780 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Mark Frahm</td>
|
781 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
782 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Proin euismod tellus quis tortor bibendum, a pulvinar libero fringilla. Cur…</td>
|
783 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
784 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -790,7 +794,7 @@ class WPForms_Lite {
|
|
790 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
791 |
</td>
|
792 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Linda Reynolds</td>
|
793 |
-
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="
|
794 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Cras sodales sagittis maximus. Nunc vestibulum orci quis orci pulvinar vulp…</td>
|
795 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
796 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
@@ -801,7 +805,7 @@ class WPForms_Lite {
|
|
801 |
<td class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-2">Select All</label><input id="cb-select-all-2" type="checkbox"></td>
|
802 |
<th scope="col" class="manage-column column-indicators column-primary"></th>
|
803 |
<th scope="col" class="manage-column column-wpforms_field_0">Name</th>
|
804 |
-
<th scope="col" class="manage-column column-wpforms_field_1">
|
805 |
<th scope="col" class="manage-column column-wpforms_field_2">Comment or Message</th>
|
806 |
<th scope="col" class="manage-column column-date sortable desc"><a href="#"><span>Date</span><span class="sorting-indicator"></span></a></th>
|
807 |
<th scope="col" class="manage-column column-actions">Actions</th>
|
@@ -844,7 +848,7 @@ class WPForms_Lite {
|
|
844 |
*/
|
845 |
public function addons_page() {
|
846 |
|
847 |
-
if ( ! isset( $_GET['page'] ) || 'wpforms-addons' !== $_GET['page']
|
848 |
return;
|
849 |
}
|
850 |
|
@@ -853,67 +857,67 @@ class WPForms_Lite {
|
|
853 |
array(
|
854 |
'name' => 'Aweber',
|
855 |
'desc' => 'WPForms AWeber addon allows you to create AWeber newsletter signup forms in WordPress, so you can grow your email list.',
|
856 |
-
'icon' => 'addon-icon-aweber.png'
|
857 |
),
|
858 |
array(
|
859 |
'name' => 'Campaign Monitor',
|
860 |
'desc' => 'WPForms Campaign Monitor addon allows you to create Campaign Monitor newsletter signup forms in WordPress, so you can grow your email list.',
|
861 |
-
'icon' => 'addon-icon-campaign-monitor.png'
|
862 |
),
|
863 |
array(
|
864 |
'name' => 'Conditional Logic',
|
865 |
'desc' => 'WPForms\' smart conditional logic addon allows you to show or hide fields, sections, and subscribe to newsletters based on user selections, so you can collect the most relevant information.',
|
866 |
-
'icon' => 'addon-icon-conditional-logic.png'
|
867 |
),
|
868 |
array(
|
869 |
'name' => 'Custom Captcha',
|
870 |
'desc' => 'WPForms custom captcha addon allows you to define custom questions or use random math questions as captcha to combat spam form submissions.',
|
871 |
-
'icon' => 'addon-icon-captcha.png'
|
872 |
),
|
873 |
array(
|
874 |
'name' => 'Form Abandonment',
|
875 |
'desc' => 'Unlock more leads by capturing partial entries from your forms. Easily follow up with interested leads and turn them into loyal customers.',
|
876 |
-
'icon' => 'addon-icon-form-abandonment.png'
|
877 |
),
|
878 |
array(
|
879 |
'name' => 'Geolocation',
|
880 |
'desc' => 'WPForms geolocation addon allows you to collect and store your website visitors geolocation data along with their form submission.',
|
881 |
-
'icon' => 'addon-icon-geolocation.png'
|
882 |
),
|
883 |
array(
|
884 |
'name' => 'GetResponse',
|
885 |
'desc' => 'WPForms GetResponse addon allows you to create GetResponse newsletter signup forms in WordPress, so you can grow your email list.',
|
886 |
-
'icon' => 'addon-icon-getresponse.png'
|
887 |
),
|
888 |
array(
|
889 |
'name' => 'MailChimp',
|
890 |
'desc' => 'WPForms MailChimp addon allows you to create MailChimp newsletter signup forms in WordPress, so you can grow your email list.',
|
891 |
-
'icon' => 'addon-icon-mailchimp.png'
|
892 |
),
|
893 |
array(
|
894 |
'name' => 'PayPal Standard',
|
895 |
'desc' => 'WPForms\' PayPal addon allows you to connect your WordPress site with PayPal to easily collect payments, donations, and online orders.',
|
896 |
-
'icon' => 'addon-icon-paypal.png'
|
897 |
),
|
898 |
array(
|
899 |
'name' => 'Post Submissions',
|
900 |
'desc' => 'WPForms Post Submissions addon makes it easy to have user-submitted content in WordPress. This front-end post submission form allow your users to submit blog posts without logging into the admin area.',
|
901 |
-
'icon' => 'addon-icon-post-submissions.png'
|
902 |
),
|
903 |
array(
|
904 |
'name' => 'Stripe',
|
905 |
'desc' => 'WPForms\' Stripe addon allows you to connect your WordPress site with Stripe to easily collect payments, donations, and online orders.',
|
906 |
-
'icon' => 'addon-icon-stripe.png'
|
907 |
),
|
908 |
array(
|
909 |
'name' => 'User Registration',
|
910 |
'desc' => 'WPForms\' Stripe addon allows you to connect your WordPress site with Stripe to easily collect payments, donations, and online orders.',
|
911 |
-
'icon' => 'addon-icon-user-registration.png'
|
912 |
),
|
913 |
array(
|
914 |
'name' => 'Zapier',
|
915 |
'desc' => 'WPForms\' Zapier addon allows you to connect your WordPress forms with over 500+ web apps. The integration possibilities here are just endless..',
|
916 |
-
'icon' => 'addon-icon-zapier.png'
|
917 |
),
|
918 |
)
|
919 |
?>
|
@@ -926,7 +930,7 @@ class WPForms_Lite {
|
|
926 |
</div>
|
927 |
<div class="wpforms-admin-content">
|
928 |
<div class="addons-container">
|
929 |
-
<?php foreach( $addons as $addon ) : ?>
|
930 |
<div class="addon-container">
|
931 |
<div class="addon-item">
|
932 |
<div class="details wpforms-clear" style=""><img src="https://wpforms.com/images/<?php echo $addon['icon']; ?>">
|
@@ -946,4 +950,5 @@ class WPForms_Lite {
|
|
946 |
<?php
|
947 |
}
|
948 |
}
|
|
|
949 |
new WPForms_Lite;
|
115 |
'fields' => 'email',
|
116 |
),
|
117 |
'parent' => 'settings',
|
118 |
+
'subsection' => $id,
|
119 |
)
|
120 |
);
|
121 |
endif;
|
126 |
$settings->form_data,
|
127 |
__( 'Email Subject', 'wpforms' ),
|
128 |
array(
|
129 |
+
'default' => sprintf( _x( 'New Entry: %s', 'Form name', 'wpforms' ), $settings->form->post_title ),
|
130 |
'smarttags' => array(
|
131 |
+
'type' => 'all',
|
132 |
),
|
133 |
'parent' => 'settings',
|
134 |
+
'subsection' => $id,
|
135 |
)
|
136 |
);
|
137 |
wpforms_panel_field(
|
147 |
'fields' => 'name,text',
|
148 |
),
|
149 |
'parent' => 'settings',
|
150 |
+
'subsection' => $id,
|
151 |
)
|
152 |
);
|
153 |
wpforms_panel_field(
|
163 |
'fields' => 'email',
|
164 |
),
|
165 |
'parent' => 'settings',
|
166 |
+
'subsection' => $id,
|
167 |
)
|
168 |
);
|
169 |
wpforms_panel_field(
|
178 |
'fields' => 'email',
|
179 |
),
|
180 |
'parent' => 'settings',
|
181 |
+
'subsection' => $id,
|
182 |
)
|
183 |
);
|
184 |
wpforms_panel_field(
|
191 |
'rows' => 6,
|
192 |
'default' => '{all_fields}',
|
193 |
'smarttags' => array(
|
194 |
+
'type' => 'all',
|
195 |
),
|
196 |
'parent' => 'settings',
|
197 |
'subsection' => $id,
|
198 |
'class' => 'email-msg',
|
199 |
+
'after' => '<p class="note">' . __( 'To display all form fields, use the <code>{all_fields}</code> Smart Tag.', 'wpforms' ) . '</p>',
|
200 |
)
|
201 |
);
|
202 |
|
250 |
|
251 |
$templates = array(
|
252 |
array(
|
253 |
+
'name' => __( 'Request A Quote Form', 'wpforms' ),
|
254 |
'slug' => 'request-quote',
|
255 |
+
'description' => __( 'Start collecting leads with this pre-made Request a quote form. You can add and remove fields as needed.', 'wpforms' ),
|
256 |
),
|
257 |
array(
|
258 |
+
'name' => __( 'Donation Form', 'wpforms' ),
|
259 |
'slug' => 'donation',
|
260 |
+
'description' => __( 'Start collecting donation payments on your website with this ready-made Donation form. You can add and remove fields as needed.', 'wpforms' ),
|
261 |
),
|
262 |
array(
|
263 |
+
'name' => __( 'Billing / Order Form', 'wpforms' ),
|
264 |
'slug' => 'order',
|
265 |
+
'description' => __( 'Collect payments for product and service orders with this ready-made form template. You can add and remove fields as needed.', 'wpforms' ),
|
266 |
+
),
|
267 |
);
|
268 |
?>
|
269 |
+
<div class="wpforms-setup-title">
|
270 |
+
<?php _e( 'Unlock Pre-Made Form Templates', 'wpforms' ); ?> <a href="<?php echo wpforms_admin_upgrade_link(); ?>" target="_blank" rel="noopener" class="btn-green wpforms-upgrade-link" style="text-transform: uppercase;font-size: 13px;font-weight: 700;padding: 5px 10px;vertical-align: text-bottom;"><?php _e( 'Upgrade', 'wpforms' ); ?></a>
|
271 |
+
</div>
|
272 |
+
<p class="wpforms-setup-desc">
|
273 |
+
<?php _e( 'While WPForms Lite allows you to create any type of form, you can speed up the process by unlocking our other pre-built form templates among other features, so you never have to start from scratch again...', 'wpforms' ); ?>
|
274 |
+
</p>
|
275 |
<div class="wpforms-setup-templates wpforms-clear" style="opacity:0.5;">
|
276 |
<?php
|
277 |
$x = 0;
|
278 |
foreach ( $templates as $template ) {
|
279 |
+
$class = 0 == $x % 3 ? 'first ' : '';
|
280 |
?>
|
281 |
<div class="wpforms-template upgrade-modal <?php echo $class; ?>" id="wpforms-template-<?php echo sanitize_html_class( $template['slug'] ); ?>">
|
282 |
<div class="wpforms-template-name wpforms-clear">
|
413 |
|
414 |
?>
|
415 |
<button class="wpforms-panel-payments-button upgrade-modal" data-panel="payments">
|
416 |
+
<i class="fa fa-usd"></i><span><?php _e( 'Payments', 'wpforms' ); ?></span>
|
417 |
</button>
|
418 |
<?php
|
419 |
}
|
440 |
'upgrade_title' => __( 'is a PRO Feature', 'wpforms' ),
|
441 |
'upgrade_message' => __( 'We\'re sorry, %name% is not available on your plan.<br><br>Please upgrade to the PRO plan to unlock all these awesome features.', 'wpforms' ),
|
442 |
'upgrade_button' => __( 'Upgrade to PRO', 'wpforms' ),
|
443 |
+
'upgrade_url' => wpforms_admin_upgrade_link(),
|
444 |
)
|
445 |
);
|
446 |
}
|
497 |
*/
|
498 |
public function entries_page() {
|
499 |
|
500 |
+
if ( ! isset( $_GET['page'] ) || 'wpforms-entries' !== $_GET['page'] ) {
|
501 |
return;
|
502 |
}
|
503 |
?>
|
672 |
<td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1">Select All</label><input id="cb-select-all-1" type="checkbox"></td>
|
673 |
<th scope="col" id="indicators" class="manage-column column-indicators column-primary"></th>
|
674 |
<th scope="col" id="wpforms_field_0" class="manage-column column-wpforms_field_0">Name</th>
|
675 |
+
<th scope="col" id="wpforms_field_1" class="manage-column column-wpforms_field_1">Email</th>
|
676 |
<th scope="col" id="wpforms_field_2" class="manage-column column-wpforms_field_2">Comment or Message</th>
|
677 |
<th scope="col" id="date" class="manage-column column-date sortable desc"><a href="#"><span>Date</span><span class="sorting-indicator"></span></a></th>
|
678 |
<th scope="col" id="actions" class="manage-column column-actions">Actions</th>
|
686 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
687 |
</td>
|
688 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">David Wells</td>
|
689 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">DavidMWells@example.com</td>
|
690 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Vivamus sit amet dolor arcu. Praesent fermentum semper justo, nec scelerisq…</td>
|
691 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
692 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
698 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
699 |
</td>
|
700 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Jennifer Selzer</td>
|
701 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">JenniferLSelzer@example.com</td>
|
702 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Maecenas sollicitudin felis et justo elementum, et lobortis justo vulputate…</td>
|
703 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
704 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
710 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
711 |
</td>
|
712 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Philip Norton</td>
|
713 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">PhilipTNorton@example.com</td>
|
714 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Etiam cursus orci tellus, ut vehicula odio mattis sit amet. Curabitur eros …</td>
|
715 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
716 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
722 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
723 |
</td>
|
724 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Kevin Gregory</td>
|
725 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">KevinJGregory@example.com</td>
|
726 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Cras vel orci congue, tincidunt eros vitae, consectetur risus. Proin enim m…</td>
|
727 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
728 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
734 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
735 |
</td>
|
736 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">John Heiden</td>
|
737 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">JohnCHeiden@example.com</td>
|
738 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Fusce consequat dui ut orci tempus cursus. Vivamus ut neque id ipsum tempor…</td>
|
739 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
740 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
746 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
747 |
</td>
|
748 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Laura Shuler</td>
|
749 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">LauraDShuler@example.com</td>
|
750 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">In ac finibus erat. Curabitur sit amet ante nec tellus commodo commodo non …</td>
|
751 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
752 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
758 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
759 |
</td>
|
760 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Walter Sullivan</td>
|
761 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">WalterPSullivan@example.com</td>
|
762 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Phasellus semper magna leo, ut porta nibh pretium sed. Interdum et malesuad…</td>
|
763 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
764 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
770 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
771 |
</td>
|
772 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Gary Austin</td>
|
773 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">GaryJAustin@example.com</td>
|
774 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet ero…</td>
|
775 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
776 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
782 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
783 |
</td>
|
784 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Mark Frahm</td>
|
785 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">MarkTFrahm@example.com</td>
|
786 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Proin euismod tellus quis tortor bibendum, a pulvinar libero fringilla. Cur…</td>
|
787 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
788 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
794 |
type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>
|
795 |
</td>
|
796 |
<td class="wpforms_field_0 column-wpforms_field_0" data-colname="Name">Linda Reynolds</td>
|
797 |
+
<td class="wpforms_field_1 column-wpforms_field_1" data-colname="Email">LindaJReynolds@example.com</td>
|
798 |
<td class="wpforms_field_2 column-wpforms_field_2" data-colname="Comment or Message">Cras sodales sagittis maximus. Nunc vestibulum orci quis orci pulvinar vulp…</td>
|
799 |
<td class="date column-date" data-colname="Date">July 27, 2017</td>
|
800 |
<td class="actions column-actions" data-colname="Actions"><a href="#" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <a href="#" title="Delete Form Entry" class="delete">Delete</a></td>
|
805 |
<td class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-2">Select All</label><input id="cb-select-all-2" type="checkbox"></td>
|
806 |
<th scope="col" class="manage-column column-indicators column-primary"></th>
|
807 |
<th scope="col" class="manage-column column-wpforms_field_0">Name</th>
|
808 |
+
<th scope="col" class="manage-column column-wpforms_field_1">Email</th>
|
809 |
<th scope="col" class="manage-column column-wpforms_field_2">Comment or Message</th>
|
810 |
<th scope="col" class="manage-column column-date sortable desc"><a href="#"><span>Date</span><span class="sorting-indicator"></span></a></th>
|
811 |
<th scope="col" class="manage-column column-actions">Actions</th>
|
848 |
*/
|
849 |
public function addons_page() {
|
850 |
|
851 |
+
if ( ! isset( $_GET['page'] ) || 'wpforms-addons' !== $_GET['page'] ) {
|
852 |
return;
|
853 |
}
|
854 |
|
857 |
array(
|
858 |
'name' => 'Aweber',
|
859 |
'desc' => 'WPForms AWeber addon allows you to create AWeber newsletter signup forms in WordPress, so you can grow your email list.',
|
860 |
+
'icon' => 'addon-icon-aweber.png',
|
861 |
),
|
862 |
array(
|
863 |
'name' => 'Campaign Monitor',
|
864 |
'desc' => 'WPForms Campaign Monitor addon allows you to create Campaign Monitor newsletter signup forms in WordPress, so you can grow your email list.',
|
865 |
+
'icon' => 'addon-icon-campaign-monitor.png',
|
866 |
),
|
867 |
array(
|
868 |
'name' => 'Conditional Logic',
|
869 |
'desc' => 'WPForms\' smart conditional logic addon allows you to show or hide fields, sections, and subscribe to newsletters based on user selections, so you can collect the most relevant information.',
|
870 |
+
'icon' => 'addon-icon-conditional-logic.png',
|
871 |
),
|
872 |
array(
|
873 |
'name' => 'Custom Captcha',
|
874 |
'desc' => 'WPForms custom captcha addon allows you to define custom questions or use random math questions as captcha to combat spam form submissions.',
|
875 |
+
'icon' => 'addon-icon-captcha.png',
|
876 |
),
|
877 |
array(
|
878 |
'name' => 'Form Abandonment',
|
879 |
'desc' => 'Unlock more leads by capturing partial entries from your forms. Easily follow up with interested leads and turn them into loyal customers.',
|
880 |
+
'icon' => 'addon-icon-form-abandonment.png',
|
881 |
),
|
882 |
array(
|
883 |
'name' => 'Geolocation',
|
884 |
'desc' => 'WPForms geolocation addon allows you to collect and store your website visitors geolocation data along with their form submission.',
|
885 |
+
'icon' => 'addon-icon-geolocation.png',
|
886 |
),
|
887 |
array(
|
888 |
'name' => 'GetResponse',
|
889 |
'desc' => 'WPForms GetResponse addon allows you to create GetResponse newsletter signup forms in WordPress, so you can grow your email list.',
|
890 |
+
'icon' => 'addon-icon-getresponse.png',
|
891 |
),
|
892 |
array(
|
893 |
'name' => 'MailChimp',
|
894 |
'desc' => 'WPForms MailChimp addon allows you to create MailChimp newsletter signup forms in WordPress, so you can grow your email list.',
|
895 |
+
'icon' => 'addon-icon-mailchimp.png',
|
896 |
),
|
897 |
array(
|
898 |
'name' => 'PayPal Standard',
|
899 |
'desc' => 'WPForms\' PayPal addon allows you to connect your WordPress site with PayPal to easily collect payments, donations, and online orders.',
|
900 |
+
'icon' => 'addon-icon-paypal.png',
|
901 |
),
|
902 |
array(
|
903 |
'name' => 'Post Submissions',
|
904 |
'desc' => 'WPForms Post Submissions addon makes it easy to have user-submitted content in WordPress. This front-end post submission form allow your users to submit blog posts without logging into the admin area.',
|
905 |
+
'icon' => 'addon-icon-post-submissions.png',
|
906 |
),
|
907 |
array(
|
908 |
'name' => 'Stripe',
|
909 |
'desc' => 'WPForms\' Stripe addon allows you to connect your WordPress site with Stripe to easily collect payments, donations, and online orders.',
|
910 |
+
'icon' => 'addon-icon-stripe.png',
|
911 |
),
|
912 |
array(
|
913 |
'name' => 'User Registration',
|
914 |
'desc' => 'WPForms\' Stripe addon allows you to connect your WordPress site with Stripe to easily collect payments, donations, and online orders.',
|
915 |
+
'icon' => 'addon-icon-user-registration.png',
|
916 |
),
|
917 |
array(
|
918 |
'name' => 'Zapier',
|
919 |
'desc' => 'WPForms\' Zapier addon allows you to connect your WordPress forms with over 500+ web apps. The integration possibilities here are just endless..',
|
920 |
+
'icon' => 'addon-icon-zapier.png',
|
921 |
),
|
922 |
)
|
923 |
?>
|
930 |
</div>
|
931 |
<div class="wpforms-admin-content">
|
932 |
<div class="addons-container">
|
933 |
+
<?php foreach ( $addons as $addon ) : ?>
|
934 |
<div class="addon-container">
|
935 |
<div class="addon-item">
|
936 |
<div class="details wpforms-clear" style=""><img src="https://wpforms.com/images/<?php echo $addon['icon']; ?>">
|
950 |
<?php
|
951 |
}
|
952 |
}
|
953 |
+
|
954 |
new WPForms_Lite;
|
readme.txt
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
=== Contact Form by WPForms - Drag & Drop Form Builder for WordPress ===
|
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 |
-
Tested up to: 4.8.
|
6 |
Stable tag: trunk
|
|
|
7 |
License: GNU General Public License v2.0 or later
|
8 |
|
9 |
The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks.
|
@@ -209,6 +210,29 @@ Syed Balkhi
|
|
209 |
|
210 |
== Changelog ==
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
= 1.4.0.1 =
|
213 |
- Added: Non-dismissible Dashboard page admin only notice about PHP 5.2.
|
214 |
- Changed: Updated FontAwesome library
|
1 |
=== Contact Form by WPForms - Drag & Drop Form Builder for WordPress ===
|
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.6
|
5 |
+
Tested up to: 4.8.2
|
6 |
Stable tag: trunk
|
7 |
+
Requires PHP: 5.2.4
|
8 |
License: GNU General Public License v2.0 or later
|
9 |
|
10 |
The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks.
|
210 |
|
211 |
== Changelog ==
|
212 |
|
213 |
+
= 1.4.1.1 =
|
214 |
+
- Changed: Improved the loading order of javascript files for forms builder
|
215 |
+
- Changed: Update some strings for Russian translation
|
216 |
+
|
217 |
+
= 1.4.1=
|
218 |
+
- Added: Ability to rename Form>Settings>Notifications>Single notification panels
|
219 |
+
- Added: Define a minimum PHP version support in plugin readme.txt file
|
220 |
+
- Added: Display a friendly link to a full page version, when form is previewed on AMP pages
|
221 |
+
- Added: Ability to collapse Form>Settings>Notifications>Single notification panels
|
222 |
+
- Added: Russian translation
|
223 |
+
- Added: Allow more than 1 default selection for checkboxes fields
|
224 |
+
- Changed: Bump minimum WordPress version to 4.6
|
225 |
+
- Changed: Improved localization support of the plugin
|
226 |
+
- Changed: Improved texts in various places
|
227 |
+
- Changed: Code style improvements throughout the plugin
|
228 |
+
- Changed: Combine WPFORMS_DEBUG and WPFORMS_DEVELOPMENT into one, use `wpforms_debug()` to check
|
229 |
+
- Changed: All HTTP requests now validate target sites SSL certificates with WP bundled certificates (since 3.7)
|
230 |
+
- Fixed: Notification email is empty if submitted form has no user values (displaying user friendly message instead)
|
231 |
+
- Fixed: Pressing enter in "Enter a notification name" popup does nothing
|
232 |
+
- Fixed: Fancy Fields can be dragged into form, but then get stuck
|
233 |
+
- Fixed: Deprecate a misspelled `wpforms_csv_export_seperator` filter, introduced a proper name for it
|
234 |
+
- Fixed: Conditional logic comparison issues if rule contained special characters
|
235 |
+
|
236 |
= 1.4.0.1 =
|
237 |
- Added: Non-dismissible Dashboard page admin only notice about PHP 5.2.
|
238 |
- Changed: Updated FontAwesome library
|
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.4.
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -55,7 +55,7 @@ if ( class_exists( 'WPForms' ) ) {
|
|
55 |
*/
|
56 |
function wpforms_lite_notice() {
|
57 |
|
58 |
-
echo '<div class="notice notice-warning"><p>' . __( 'Please deactivate WPForms Lite before activating WPForms', 'wpforms' ) . '</p></div>';
|
59 |
|
60 |
if ( isset( $_GET['activate'] ) ) {
|
61 |
unset( $_GET['activate'] );
|
@@ -69,6 +69,7 @@ if ( class_exists( 'WPForms' ) ) {
|
|
69 |
* Main WPForms class.
|
70 |
*
|
71 |
* @since 1.0.0
|
|
|
72 |
* @package WPForms
|
73 |
*/
|
74 |
final class WPForms {
|
@@ -77,6 +78,7 @@ if ( class_exists( 'WPForms' ) ) {
|
|
77 |
* One is the loneliest number that you'll ever do.
|
78 |
*
|
79 |
* @since 1.0.0
|
|
|
80 |
* @var object
|
81 |
*/
|
82 |
private static $instance;
|
@@ -85,87 +87,98 @@ if ( class_exists( 'WPForms' ) ) {
|
|
85 |
* Plugin version for enqueueing, etc.
|
86 |
*
|
87 |
* @since 1.0.0
|
88 |
-
*
|
|
|
89 |
*/
|
90 |
-
public $version = '1.4.
|
91 |
|
92 |
/**
|
93 |
* The form data handler instance.
|
94 |
*
|
95 |
-
* @var object WPForms_Form_Handler
|
96 |
* @since 1.0.0
|
|
|
|
|
97 |
*/
|
98 |
public $form;
|
99 |
|
100 |
/**
|
101 |
* The entry data handler instance (Pro).
|
102 |
*
|
103 |
-
* @var object WPForms_Entry_Handler
|
104 |
* @since 1.0.0
|
|
|
|
|
105 |
*/
|
106 |
public $entry;
|
107 |
|
108 |
/**
|
109 |
* The entry meta data handler instance (Pro).
|
110 |
*
|
111 |
-
* @var object WPForms_Entry_Meta_Handler
|
112 |
* @since 1.1.6
|
|
|
|
|
113 |
*/
|
114 |
public $entry_meta;
|
115 |
|
116 |
/**
|
117 |
* The front-end instance.
|
118 |
*
|
119 |
-
* @var object WPForms_Frontend
|
120 |
* @since 1.0.0
|
|
|
|
|
121 |
*/
|
122 |
public $frontend;
|
123 |
|
124 |
/**
|
125 |
* The process instance.
|
126 |
*
|
127 |
-
* @var object WPForms_Process
|
128 |
* @since 1.0.0
|
|
|
|
|
129 |
*/
|
130 |
public $process;
|
131 |
|
132 |
/**
|
133 |
* The smart tags instance.
|
134 |
*
|
135 |
-
* @var object WPForms_Smart_Tags
|
136 |
* @since 1.0.0
|
|
|
|
|
137 |
*/
|
138 |
public $smart_tags;
|
139 |
|
140 |
/**
|
141 |
* The Logging instance.
|
142 |
*
|
143 |
-
* @var object WPForms_Logging
|
144 |
* @since 1.0.0
|
|
|
|
|
145 |
*/
|
146 |
public $logs;
|
147 |
|
148 |
/**
|
149 |
* The Preview instance.
|
150 |
*
|
151 |
-
* @var object WPForms_Preview
|
152 |
* @since 1.1.9
|
|
|
|
|
153 |
*/
|
154 |
public $preview;
|
155 |
|
156 |
/**
|
157 |
* The License class instance (Pro).
|
158 |
*
|
159 |
-
* @var object WPForms_License
|
160 |
* @since 1.0.0
|
|
|
|
|
161 |
*/
|
162 |
public $license;
|
163 |
|
164 |
/**
|
165 |
* Paid returns true, free (Lite) returns false.
|
166 |
*
|
167 |
-
* @var boolean
|
168 |
* @since 1.3.9
|
|
|
|
|
169 |
*/
|
170 |
public $pro = false;
|
171 |
|
@@ -176,6 +189,7 @@ if ( class_exists( 'WPForms' ) ) {
|
|
176 |
* time. Also prevents needing to define globals all over the place.
|
177 |
*
|
178 |
* @since 1.0.0
|
|
|
179 |
* @return WPForms
|
180 |
*/
|
181 |
public static function instance() {
|
@@ -330,7 +344,10 @@ if ( class_exists( 'WPForms' ) ) {
|
|
330 |
|
331 |
if ( is_admin() ) {
|
332 |
new AM_Notification( WPFORMS_PLUGIN_SLUG, $this->version );
|
333 |
-
|
|
|
|
|
|
|
334 |
}
|
335 |
|
336 |
// Hook now that all of the WPForms stuff is loaded.
|
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.4.1.1
|
9 |
* Text Domain: wpforms
|
10 |
* Domain Path: languages
|
11 |
*
|
55 |
*/
|
56 |
function wpforms_lite_notice() {
|
57 |
|
58 |
+
echo '<div class="notice notice-warning"><p>' . __( 'Please deactivate WPForms Lite before activating WPForms.', 'wpforms' ) . '</p></div>';
|
59 |
|
60 |
if ( isset( $_GET['activate'] ) ) {
|
61 |
unset( $_GET['activate'] );
|
69 |
* Main WPForms class.
|
70 |
*
|
71 |
* @since 1.0.0
|
72 |
+
*
|
73 |
* @package WPForms
|
74 |
*/
|
75 |
final class WPForms {
|
78 |
* One is the loneliest number that you'll ever do.
|
79 |
*
|
80 |
* @since 1.0.0
|
81 |
+
*
|
82 |
* @var object
|
83 |
*/
|
84 |
private static $instance;
|
87 |
* Plugin version for enqueueing, etc.
|
88 |
*
|
89 |
* @since 1.0.0
|
90 |
+
*
|
91 |
+
* @var string
|
92 |
*/
|
93 |
+
public $version = '1.4.1.1';
|
94 |
|
95 |
/**
|
96 |
* The form data handler instance.
|
97 |
*
|
|
|
98 |
* @since 1.0.0
|
99 |
+
*
|
100 |
+
* @var object WPForms_Form_Handler
|
101 |
*/
|
102 |
public $form;
|
103 |
|
104 |
/**
|
105 |
* The entry data handler instance (Pro).
|
106 |
*
|
|
|
107 |
* @since 1.0.0
|
108 |
+
*
|
109 |
+
* @var object WPForms_Entry_Handler
|
110 |
*/
|
111 |
public $entry;
|
112 |
|
113 |
/**
|
114 |
* The entry meta data handler instance (Pro).
|
115 |
*
|
|
|
116 |
* @since 1.1.6
|
117 |
+
*
|
118 |
+
* @var object WPForms_Entry_Meta_Handler
|
119 |
*/
|
120 |
public $entry_meta;
|
121 |
|
122 |
/**
|
123 |
* The front-end instance.
|
124 |
*
|
|
|
125 |
* @since 1.0.0
|
126 |
+
*
|
127 |
+
* @var object WPForms_Frontend
|
128 |
*/
|
129 |
public $frontend;
|
130 |
|
131 |
/**
|
132 |
* The process instance.
|
133 |
*
|
|
|
134 |
* @since 1.0.0
|
135 |
+
*
|
136 |
+
* @var object WPForms_Process
|
137 |
*/
|
138 |
public $process;
|
139 |
|
140 |
/**
|
141 |
* The smart tags instance.
|
142 |
*
|
|
|
143 |
* @since 1.0.0
|
144 |
+
*
|
145 |
+
* @var object WPForms_Smart_Tags
|
146 |
*/
|
147 |
public $smart_tags;
|
148 |
|
149 |
/**
|
150 |
* The Logging instance.
|
151 |
*
|
|
|
152 |
* @since 1.0.0
|
153 |
+
*
|
154 |
+
* @var object WPForms_Logging
|
155 |
*/
|
156 |
public $logs;
|
157 |
|
158 |
/**
|
159 |
* The Preview instance.
|
160 |
*
|
|
|
161 |
* @since 1.1.9
|
162 |
+
*
|
163 |
+
* @var object WPForms_Preview
|
164 |
*/
|
165 |
public $preview;
|
166 |
|
167 |
/**
|
168 |
* The License class instance (Pro).
|
169 |
*
|
|
|
170 |
* @since 1.0.0
|
171 |
+
*
|
172 |
+
* @var object WPForms_License
|
173 |
*/
|
174 |
public $license;
|
175 |
|
176 |
/**
|
177 |
* Paid returns true, free (Lite) returns false.
|
178 |
*
|
|
|
179 |
* @since 1.3.9
|
180 |
+
*
|
181 |
+
* @var boolean
|
182 |
*/
|
183 |
public $pro = false;
|
184 |
|
189 |
* time. Also prevents needing to define globals all over the place.
|
190 |
*
|
191 |
* @since 1.0.0
|
192 |
+
*
|
193 |
* @return WPForms
|
194 |
*/
|
195 |
public static function instance() {
|
344 |
|
345 |
if ( is_admin() ) {
|
346 |
new AM_Notification( WPFORMS_PLUGIN_SLUG, $this->version );
|
347 |
+
|
348 |
+
if ( $this->pro || ( ! $this->pro && ! file_exists( WP_PLUGIN_DIR . '/wpforms/wpforms.php' ) ) ) {
|
349 |
+
new AM_Deactivation_Survey( 'WPForms', basename( dirname( __FILE__ ) ) );
|
350 |
+
}
|
351 |
}
|
352 |
|
353 |
// Hook now that all of the WPForms stuff is loaded.
|