Contact Form 7 Redirection - Version 2.3.3

Version Description

  • Fixed undefined $_SERVER['HTTP_HOST'] on CLI calls
Download this release

Release Info

Developer yuvalsabar
Plugin Icon 128x128 Contact Form 7 Redirection
Version 2.3.3
Comparing to
See all releases

Code changes from version 2.3.1 to 2.3.3

Files changed (96) hide show
  1. build/css/index.php +0 -0
  2. build/css/wpcf7-redirect-backend.css +3155 -3155
  3. build/images/index.php +0 -0
  4. build/images/stripe.png +0 -0
  5. build/index.php +0 -0
  6. build/js/index.php +0 -0
  7. build/js/wpcf7-redirect-backend-script.js +238 -238
  8. classes/actions/class-wpcf7r-action-firescript.php +83 -83
  9. classes/actions/class-wpcf7r-action-honeypot.php +163 -163
  10. classes/actions/class-wpcf7r-action-redirect.php +280 -280
  11. classes/actions/class-wpcf7r-action-save-lead.php +168 -168
  12. classes/actions/class-wpcf7r-action-send-to-api.php +409 -409
  13. classes/actions/class-wpcf7r-action-sendmail.php +180 -180
  14. classes/actions/html/html-action-redirect.php +13 -13
  15. classes/actions/html/html-action-send-to-email.php +13 -13
  16. classes/actions/html/html-page-settings.php +19 -19
  17. classes/actions/html/index.php +5 -5
  18. classes/actions/html/rule-title.php +23 -23
  19. classes/aff/class-ext-accessibe.php +627 -627
  20. classes/aff/index.php +0 -0
  21. classes/aff/templates/accesibie-content.php +165 -165
  22. classes/aff/templates/index.php +0 -0
  23. classes/class-qs-api.php +2 -2
  24. classes/class-wpcf7r-action.php +16 -3
  25. classes/class-wpcf7r-actions-list.php +102 -102
  26. classes/class-wpcf7r-base.php +1 -20
  27. classes/class-wpcf7r-extension.php +1 -1
  28. classes/class-wpcf7r-form-helper.php +1 -1
  29. classes/class-wpcf7r-form.php +651 -651
  30. classes/class-wpcf7r-lead.php +197 -197
  31. classes/class-wpcf7r-leads-manager.php +422 -422
  32. classes/class-wpcf7r-list-table.php +133 -133
  33. classes/class-wpcf7r-module.php +77 -77
  34. classes/class-wpcf7r-post-types.php +221 -221
  35. classes/class-wpcf7r-settings.php +303 -303
  36. classes/class-wpcf7r-submission.php +1 -1
  37. classes/class-wpcf7r-updates.php +146 -146
  38. classes/class-wpcf7r-user.php +117 -117
  39. classes/class-wpcf7r-utils.php +1040 -1080
  40. modules/cf7-shortcode-password-field.php +224 -224
  41. modules/cf7r-shortcode-get-param-field.php +29 -29
  42. modules/index.php +0 -0
  43. readme.txt +11 -2
  44. templates/banner.php +16 -16
  45. templates/blank-popup-template.php +33 -0
  46. templates/block-html.php +8 -8
  47. templates/block-title.php +16 -16
  48. templates/default-settings.php +69 -69
  49. templates/extensions.php +26 -26
  50. templates/extensions/extension-promo-box.php +81 -81
  51. templates/extensions/extensions-table.php +21 -21
  52. templates/extensions/index.php +0 -0
  53. templates/fields/field-button.php +18 -18
  54. templates/fields/field-checkbox.php +23 -23
  55. templates/fields/field-download.php +29 -29
  56. templates/fields/field-editor.php +37 -37
  57. templates/fields/field-json-editor.php +22 -22
  58. templates/fields/field-leads-mapping.php +73 -73
  59. templates/fields/field-media.php +30 -30
  60. templates/fields/field-notice.php +17 -17
  61. templates/fields/field-number.php +25 -25
  62. templates/fields/field-page-select.php +35 -35
  63. templates/fields/field-password.php +28 -28
  64. templates/fields/field-post-author-select.php +25 -25
  65. templates/fields/field-post-type-select.php +28 -28
  66. templates/fields/field-preview.php +11 -11
  67. templates/fields/field-repeater.php +90 -90
  68. templates/fields/field-rule-blocks.php +38 -38
  69. templates/fields/field-select.php +31 -31
  70. templates/fields/field-tags-map.php +76 -76
  71. templates/fields/field-taxonomy.php +26 -26
  72. templates/fields/field-text.php +41 -41
  73. templates/fields/field-textarea.php +33 -33
  74. templates/fields/field-url.php +23 -23
  75. templates/fields/index.php +2 -2
  76. templates/fields/section.php +32 -32
  77. templates/index.php +2 -2
  78. templates/popup-api-test.php +74 -74
  79. templates/popups/template-1.css +1 -0
  80. templates/popups/template-1.php +27 -0
  81. templates/popups/template-1.scss +148 -0
  82. templates/popups/template-2.css +1 -0
  83. templates/popups/template-2.php +33 -0
  84. templates/popups/template-2.scss +125 -0
  85. templates/popups/template-3.css +1 -0
  86. templates/popups/template-3.php +28 -0
  87. templates/popups/template-3.scss +115 -0
  88. templates/popups/template-4.css +289 -0
  89. templates/popups/template-4.php +26 -0
  90. templates/popups/template-4.scss +301 -0
  91. templates/popups/wpcfr-popup-wrap-default.php +13 -0
  92. templates/save-form.php +21 -21
  93. templates/settings.php +28 -28
  94. vendor/index.php +0 -0
  95. wpcf7-redirect.php +7 -7
  96. wpcf7r-functions.php +1 -1
build/css/index.php DELETED
File without changes
build/css/wpcf7-redirect-backend.css CHANGED
@@ -1,3158 +1,3158 @@
1
  .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
2
 
3
- .settings_page_wpc7_redirect .padbox form > div {
4
- display: none !important;
5
- }
6
-
7
- .settings_page_wpc7_redirect .padbox form > div#setting-error-not-valid-serial {
8
- display: block !important;
9
- }
10
-
11
- #debug-info {
12
- margin-bottom: 10px;
13
- }
14
-
15
- .extensions-list-wrap {
16
- background: #fff;
17
- }
18
-
19
- .extensions-list-wrap .padbox {
20
- padding: 2rem;
21
- }
22
-
23
- .wpcf7r_loader {
24
- -webkit-transition: all 250ms ease;
25
- -o-transition: all 250ms ease;
26
- transition: all 250ms ease;
27
- position: absolute;
28
- top: 0;
29
- right: 0;
30
- width: 100%;
31
- height: 100%;
32
- visibility: hidden;
33
- background: url("../../build/images/loader.gif") 50% 50% rgba(255, 255, 255, 0.8) no-repeat;
34
- background-size: 50px;
35
- opacity: 0;
36
- }
37
-
38
- .wpcf7r_loader.active {
39
- visibility: visible;
40
- opacity: 1;
41
- }
42
-
43
- .new-action-selector {
44
- display: block;
45
- float: left;
46
- margin-right: 10px;
47
- }
48
-
49
- .mail-tags-wrapper {
50
- margin-top: 5px;
51
- }
52
-
53
- .settings_page_wpc7_redirect .padbox {
54
- padding: 20px;
55
- }
56
-
57
- div#wpcf7r_leads .field-wrap {
58
- display: -webkit-box;
59
- display: -moz-flex;
60
- display: -ms-flexbox;
61
- display: flex;
62
- margin-bottom: 10px;
63
- }
64
-
65
- div#wpcf7r_leads .field-wrap label {
66
- display: -webkit-box;
67
- display: -moz-flex;
68
- display: -ms-flexbox;
69
- display: flex;
70
- align-items: center;
71
- -webkit-align-items: center;
72
- -moz-align-items: center;
73
- -webkit-box-align: center;
74
- -ms-flex-align: center;
75
- width: 40%;
76
- }
77
-
78
- .wpcfr-popup-wrap {
79
- position: fixed;
80
- top: 0;
81
- right: 0;
82
- width: 100%;
83
- height: 100%;
84
- z-index: 999999;
85
- display: -webkit-box;
86
- display: -moz-flex;
87
- display: -ms-flexbox;
88
- display: flex;
89
- /* width */
90
- /* Track */
91
- /* Handle */
92
- }
93
-
94
- .wpcfr-popup-wrap.top-right {
95
- justify-content: flex-end;
96
- -webkit-justify-content: flex-end;
97
- -moz-justify-content: flex-end;
98
- -webkit-box-pack: end;
99
- -ms-flex-pack: end;
100
- }
101
-
102
- .wpcfr-popup-wrap.top-center {
103
- justify-content: center;
104
- -webkit-justify-content: center;
105
- -moz-justify-content: center;
106
- -webkit-box-pack: center;
107
- -ms-flex-pack: center;
108
- }
109
-
110
- .wpcfr-popup-wrap.top-left {
111
- justify-content: flex-start;
112
- -webkit-justify-content: flex-start;
113
- -moz-justify-content: flex-start;
114
- -webkit-box-pack: start;
115
- -ms-flex-pack: start;
116
- }
117
-
118
- .wpcfr-popup-wrap.middle-right {
119
- justify-content: flex-end;
120
- -webkit-justify-content: flex-end;
121
- -moz-justify-content: flex-end;
122
- -webkit-box-pack: end;
123
- -ms-flex-pack: end;
124
- align-items: center;
125
- -webkit-align-items: center;
126
- -moz-align-items: center;
127
- -webkit-box-align: center;
128
- -ms-flex-align: center;
129
- }
130
-
131
- .wpcfr-popup-wrap.middle-center {
132
- justify-content: center;
133
- -webkit-justify-content: center;
134
- -moz-justify-content: center;
135
- -webkit-box-pack: center;
136
- -ms-flex-pack: center;
137
- align-items: center;
138
- -webkit-align-items: center;
139
- -moz-align-items: center;
140
- -webkit-box-align: center;
141
- -ms-flex-align: center;
142
- }
143
-
144
- .wpcfr-popup-wrap.middle-left {
145
- justify-content: flex-start;
146
- -webkit-justify-content: flex-start;
147
- -moz-justify-content: flex-start;
148
- -webkit-box-pack: start;
149
- -ms-flex-pack: start;
150
- align-items: center;
151
- -webkit-align-items: center;
152
- -moz-align-items: center;
153
- -webkit-box-align: center;
154
- -ms-flex-align: center;
155
- }
156
-
157
- .wpcfr-popup-wrap.bottom-right {
158
- justify-content: flex-end;
159
- -webkit-justify-content: flex-end;
160
- -moz-justify-content: flex-end;
161
- -webkit-box-pack: end;
162
- -ms-flex-pack: end;
163
- align-items: flex-end;
164
- -webkit-align-items: flex-end;
165
- -moz-align-items: flex-end;
166
- -webkit-box-align: end;
167
- -ms-flex-align: end;
168
- }
169
-
170
- .wpcfr-popup-wrap.bottom-center {
171
- justify-content: flex-start;
172
- -webkit-justify-content: flex-start;
173
- -moz-justify-content: flex-start;
174
- -webkit-box-pack: start;
175
- -ms-flex-pack: start;
176
- align-items: flex-end;
177
- -webkit-align-items: flex-end;
178
- -moz-align-items: flex-end;
179
- -webkit-box-align: end;
180
- -ms-flex-align: end;
181
- }
182
-
183
- .wpcfr-popup-wrap.bottom-left {
184
- justify-content: flex-start;
185
- -webkit-justify-content: flex-start;
186
- -moz-justify-content: flex-start;
187
- -webkit-box-pack: start;
188
- -ms-flex-pack: start;
189
- align-items: flex-end;
190
- -webkit-align-items: flex-end;
191
- -moz-align-items: flex-end;
192
- -webkit-box-align: end;
193
- -ms-flex-align: end;
194
- }
195
-
196
- .wpcfr-popup-wrap .wpcfr-popup-wrap-inner {
197
- width: 500px;
198
- height: 300px;
199
- background: #fff;
200
- position: relative;
201
- }
202
-
203
- .wpcfr-popup-wrap .wpcfr-close-popup {
204
- position: absolute;
205
- cursor: pointer;
206
- }
207
-
208
- .wpcfr-popup-wrap .wpcfr-close-popup.bottom-right {
209
- -webkit-transform: translateX(-50%) translateY(50%);
210
- -ms-transform: translateX(-50%) translateY(50%);
211
- transform: translateX(-50%) translateY(50%);
212
- right: 0;
213
- bottom: 0;
214
- }
215
-
216
- .wpcfr-popup-wrap .wpcfr-close-popup.bottom-center {
217
- -webkit-transform: translateX(-50%) translateY(50%);
218
- -ms-transform: translateX(-50%) translateY(50%);
219
- transform: translateX(-50%) translateY(50%);
220
- bottom: 0;
221
- left: 50%;
222
- }
223
-
224
- .wpcfr-popup-wrap .wpcfr-close-popup.bottom-left {
225
- -webkit-transform: translateX(-50%) translateY(50%);
226
- -ms-transform: translateX(-50%) translateY(50%);
227
- transform: translateX(-50%) translateY(50%);
228
- bottom: 0;
229
- left: 0;
230
- }
231
-
232
- .wpcfr-popup-wrap .wpcfr-close-popup.top-right {
233
- -webkit-transform: translateX(50%) translateY(-50%);
234
- -ms-transform: translateX(50%) translateY(-50%);
235
- transform: translateX(50%) translateY(-50%);
236
- right: 0;
237
- top: 0;
238
- }
239
-
240
- .wpcfr-popup-wrap .wpcfr-close-popup.top-center {
241
- -webkit-transform: translateX(-50%) translateY(-50%);
242
- -ms-transform: translateX(-50%) translateY(-50%);
243
- transform: translateX(-50%) translateY(-50%);
244
- top: 0;
245
- left: 50%;
246
- }
247
-
248
- .wpcfr-popup-wrap .wpcfr-close-popup.top-left {
249
- -webkit-transform: translateX(-50%) translateY(-50%);
250
- -ms-transform: translateX(-50%) translateY(-50%);
251
- transform: translateX(-50%) translateY(-50%);
252
- top: 0;
253
- }
254
-
255
- .wpcfr-popup-wrap.wpcfr-popup-wrap-default {
256
- background: rgba(0, 0, 0, 0.4);
257
- }
258
-
259
- .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-inner {
260
- max-width: 95%;
261
- max-height: 100vh;
262
- width: 500px;
263
- min-height: 300px;
264
- background: #fff;
265
- -webkit-box-shadow: 0px 0px 20px #4b4b4b;
266
- box-shadow: 0px 0px 20px #4b4b4b;
267
- border-radius: 2px;
268
- }
269
-
270
- .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content {
271
- display: -webkit-box;
272
- display: -moz-flex;
273
- display: -ms-flexbox;
274
- display: flex;
275
- overflow: hidden;
276
- min-height: 100%;
277
- }
278
-
279
- .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content .wpcfr-2-rows {
280
- display: -webkit-box;
281
- display: -moz-flex;
282
- display: -ms-flexbox;
283
- display: flex;
284
- flex-direction: column;
285
- -moz-flex-direction: column;
286
- -ms-flex-direction: column;
287
- -webkit-box-direction: normal;
288
- -webkit-box-orient: vertical;
289
- width: 100%;
290
- }
291
-
292
- .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content .wpcfr-2-rows .wpcfr-row {
293
- height: 40%;
294
- padding: 2%;
295
- }
296
-
297
- .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content .wpcfr-2-rows .wpcfr-row:nth-child(2) {
298
- height: 60%;
299
- background: #e9e9e9;
300
- }
301
-
302
- .wpcfr-popup-wrap ::-webkit-scrollbar {
303
- width: 10px;
304
- }
305
-
306
- .wpcfr-popup-wrap ::-webkit-scrollbar-track {
307
- border-radius: 0;
308
- }
309
-
310
- .wpcfr-popup-wrap ::-webkit-scrollbar-thumb {
311
- background: #ccc;
312
- border-radius: 0;
313
- }
314
-
315
- .wpcfr-popup-wrap .wpcfr-popup-wrap-inner {
316
- width: 100%;
317
- max-width: 800px;
318
- height: 60%;
319
- padding: 20px;
320
- border: 1px solid #d1d1d1;
321
- -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
322
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
323
- }
324
-
325
- .wpcfr-popup-wrap .wpcfr-popup-wrap-inner .wpcfr-popup-wrap-content {
326
- height: 100%;
327
- overflow-x: hidden;
328
- overflow-y: auto;
329
- }
330
-
331
- .wpcfr-popup-wrap .wpcfr-popup-wrap-inner .wpcfr-popup-wrap-content textarea {
332
- width: 96%;
333
- direction: ltr;
334
- }
335
-
336
- #leads-panel .dashicons-minus {
337
- margin-top: 5px;
338
- }
339
-
340
- .wpcf7r-update-extensions {
341
- display: inline-block;
342
- min-width: 18px;
343
- height: 18px;
344
- -webkit-box-sizing: border-box;
345
- box-sizing: border-box;
346
- padding: 0 5px;
347
- margin: 1px 0 -1px 2px;
348
- font-size: 11px;
349
- line-height: 1.6;
350
- color: #fff;
351
- text-align: center;
352
- vertical-align: top;
353
- background-color: #ca4a1f;
354
- border-radius: 9px;
355
- }
356
-
357
- .wrap-wpcf7redirect section.padbox .padbox {
358
- padding: 20px;
359
- }
360
-
361
- .wrap-wpcf7redirect .padbox {
362
- padding: 8px 12px;
363
- }
364
-
365
- .wrap-wpcf7redirect .user-message {
366
- padding: 20px;
367
- font-size: 14px;
368
- color: #000;
369
- background: #fff;
370
- border: 1px solid #ccd0d4;
371
- border-bottom: 0;
372
- }
373
-
374
- .wrap-wpcf7redirect .user-message ul {
375
- margin: 0 10px;
376
- }
377
-
378
- .wrap-wpcf7redirect .user-message ul li {
379
- position: relative;
380
- }
381
-
382
- .wrap-wpcf7redirect .user-message ul li:before {
383
- position: absolute;
384
- top: 50%;
385
- left: -10px;
386
- display: block;
387
- width: 5px;
388
- height: 5px;
389
- content: '';
390
- background: #65b1fc;
391
- -webkit-transform: translateY(-50%);
392
- -ms-transform: translateY(-50%);
393
- transform: translateY(-50%);
394
- }
395
-
396
- .wrap-wpcf7redirect h2 {
397
- padding: 8px 12px;
398
- margin: 0 -12px 20px;
399
- font-size: 14px;
400
- line-height: 1.4;
401
- border-bottom: 1px solid #eee;
402
- }
403
-
404
- #steps-panel .success-message,
405
- #extensions-panel .success-message,
406
- #leads-panel .success-message,
407
- #redirect-panel .success-message {
408
- padding: 10px;
409
- margin-bottom: 20px;
410
- font-size: 20px;
411
- color: #fff;
412
- background: #136ef8;
413
- }
414
-
415
- #steps-panel .select2-container .select2-selection--single,
416
- #extensions-panel .select2-container .select2-selection--single,
417
- #leads-panel .select2-container .select2-selection--single,
418
- #redirect-panel .select2-container .select2-selection--single {
419
- display: block;
420
- height: 38px;
421
- -webkit-box-sizing: border-box;
422
- box-sizing: border-box;
423
- cursor: pointer;
424
- -webkit-user-select: none;
425
- -moz-user-select: none;
426
- -ms-user-select: none;
427
- user-select: none;
428
- }
429
-
430
- #steps-panel .select2-container--default .select2-selection--single,
431
- #extensions-panel .select2-container--default .select2-selection--single,
432
- #leads-panel .select2-container--default .select2-selection--single,
433
- #redirect-panel .select2-container--default .select2-selection--single {
434
- border-radius: 0;
435
- }
436
-
437
- #steps-panel .field-wrap,
438
- #extensions-panel .field-wrap,
439
- #leads-panel .field-wrap,
440
- #redirect-panel .field-wrap {
441
- position: relative;
442
- }
443
-
444
- #steps-panel label.error,
445
- #extensions-panel label.error,
446
- #leads-panel label.error,
447
- #redirect-panel label.error {
448
- position: absolute;
449
- top: 100%;
450
- z-index: 99;
451
- display: block;
452
- width: 100%;
453
- font-size: 12px;
454
- color: red;
455
- text-align: center;
456
- }
457
-
458
- #steps-panel .dashicons-minus,
459
- #extensions-panel .dashicons-minus,
460
- #leads-panel .dashicons-minus,
461
- #redirect-panel .dashicons-minus {
462
- cursor: pointer;
463
- }
464
-
465
- #steps-panel [data-toggle],
466
- #extensions-panel [data-toggle],
467
- #leads-panel [data-toggle],
468
- #redirect-panel [data-toggle] {
469
- -webkit-transition: all 300ms ease;
470
- -o-transition: all 300ms ease;
471
- transition: all 300ms ease;
472
- cursor: pointer;
473
- }
474
-
475
- #steps-panel [data-toggle]:after,
476
- #extensions-panel [data-toggle]:after,
477
- #leads-panel [data-toggle]:after,
478
- #redirect-panel [data-toggle]:after {
479
- opacity: .8;
480
- }
481
-
482
- #steps-panel .mail-tags-title,
483
- #extensions-panel .mail-tags-title,
484
- #leads-panel .mail-tags-title,
485
- #redirect-panel .mail-tags-title {
486
- text-align: right;
487
- }
488
-
489
- #steps-panel .wp-list-table-inner tr,
490
- #extensions-panel .wp-list-table-inner tr,
491
- #leads-panel .wp-list-table-inner tr,
492
- #redirect-panel .wp-list-table-inner tr {
493
- position: relative;
494
- }
495
-
496
- #steps-panel span.err,
497
- #extensions-panel span.err,
498
- #leads-panel span.err,
499
- #redirect-panel span.err {
500
- position: relative;
501
- display: block;
502
- font-size: 12px;
503
- color: red;
504
- }
505
-
506
- #steps-panel .section-inner-wrap,
507
- #extensions-panel .section-inner-wrap,
508
- #leads-panel .section-inner-wrap,
509
- #redirect-panel .section-inner-wrap {
510
- display: none;
511
- }
512
-
513
- #steps-panel select,
514
- #extensions-panel select,
515
- #leads-panel select,
516
- #redirect-panel select {
517
- max-width: 100%;
518
- }
519
-
520
- #steps-panel .hide_api_key .tags-map-api-key,
521
- #extensions-panel .hide_api_key .tags-map-api-key,
522
- #leads-panel .hide_api_key .tags-map-api-key,
523
- #redirect-panel .hide_api_key .tags-map-api-key {
524
- display: none;
525
- }
526
-
527
- #steps-panel .qs-tooltip,
528
- #extensions-panel .qs-tooltip,
529
- #leads-panel .qs-tooltip,
530
- #redirect-panel .qs-tooltip {
531
- position: absolute;
532
- }
533
-
534
- #steps-panel .qs-tooltip .qs-tooltip-inner,
535
- #extensions-panel .qs-tooltip .qs-tooltip-inner,
536
- #leads-panel .qs-tooltip .qs-tooltip-inner,
537
- #redirect-panel .qs-tooltip .qs-tooltip-inner {
538
- -webkit-transition: all 500ms ease;
539
- -o-transition: all 500ms ease;
540
- transition: all 500ms ease;
541
- position: absolute;
542
- bottom: 100%;
543
- left: 50%;
544
- z-index: -1;
545
- min-width: 200px;
546
- padding: 20px;
547
- font-size: 14px;
548
- background: #fff;
549
- border: 1px solid;
550
- border-radius: 5px;
551
- opacity: 0;
552
- -webkit-transform: translateX(-50%);
553
- -ms-transform: translateX(-50%);
554
- transform: translateX(-50%);
555
- }
556
-
557
- #steps-panel .qs-tooltip:hover .qs-tooltip-inner,
558
- #extensions-panel .qs-tooltip:hover .qs-tooltip-inner,
559
- #leads-panel .qs-tooltip:hover .qs-tooltip-inner,
560
- #redirect-panel .qs-tooltip:hover .qs-tooltip-inner {
561
- z-index: 9999;
562
- opacity: 1;
563
- }
564
-
565
- #steps-panel .wpcf7-redirect-butify-wrap,
566
- #extensions-panel .wpcf7-redirect-butify-wrap,
567
- #leads-panel .wpcf7-redirect-butify-wrap,
568
- #redirect-panel .wpcf7-redirect-butify-wrap {
569
- float: right;
570
- }
571
-
572
- #steps-panel .action-container .repeater-table .field-wrap,
573
- #extensions-panel .action-container .repeater-table .field-wrap,
574
- #leads-panel .action-container .repeater-table .field-wrap,
575
- #redirect-panel .action-container .repeater-table .field-wrap {
576
- margin-bottom: 0;
577
- }
578
-
579
- #steps-panel .action-container .repeater-table td,
580
- #extensions-panel .action-container .repeater-table td,
581
- #leads-panel .action-container .repeater-table td,
582
- #redirect-panel .action-container .repeater-table td {
583
- padding: 5px 0;
584
- }
585
-
586
- #steps-panel .action-container .qs-repeater-action,
587
- #extensions-panel .action-container .qs-repeater-action,
588
- #leads-panel .action-container .qs-repeater-action,
589
- #redirect-panel .action-container .qs-repeater-action {
590
- padding: 6px 0 0 0;
591
- margin-top: 0 !important;
592
- }
593
-
594
- #steps-panel .action-container .qs-repeater-action span,
595
- #extensions-panel .action-container .qs-repeater-action span,
596
- #leads-panel .action-container .qs-repeater-action span,
597
- #redirect-panel .action-container .qs-repeater-action span {
598
- -webkit-transition: all 300ms ease;
599
- -o-transition: all 300ms ease;
600
- transition: all 300ms ease;
601
- cursor: pointer;
602
- }
603
-
604
- #steps-panel .action-container .qs-repeater-action span:hover,
605
- #extensions-panel .action-container .qs-repeater-action span:hover,
606
- #leads-panel .action-container .qs-repeater-action span:hover,
607
- #redirect-panel .action-container .qs-repeater-action span:hover {
608
- opacity: .8;
609
- }
610
-
611
- #steps-panel .qs-repeater-row .dashicons-plus,
612
- #extensions-panel .qs-repeater-row .dashicons-plus,
613
- #leads-panel .qs-repeater-row .dashicons-plus,
614
- #redirect-panel .qs-repeater-row .dashicons-plus {
615
- display: none;
616
- }
617
-
618
- #steps-panel .qs-repeater-row:last-child .dashicons-plus,
619
- #extensions-panel .qs-repeater-row:last-child .dashicons-plus,
620
- #leads-panel .qs-repeater-row:last-child .dashicons-plus,
621
- #redirect-panel .qs-repeater-row:last-child .dashicons-plus {
622
- display: inline-block;
623
- }
624
-
625
- #steps-panel .qs-repeater-row:first-child .dashicons-minus,
626
- #extensions-panel .qs-repeater-row:first-child .dashicons-minus,
627
- #leads-panel .qs-repeater-row:first-child .dashicons-minus,
628
- #redirect-panel .qs-repeater-row:first-child .dashicons-minus {
629
- display: none;
630
- }
631
-
632
- #steps-panel .qs-repeater-row .qs-repeater-action,
633
- #extensions-panel .qs-repeater-row .qs-repeater-action,
634
- #leads-panel .qs-repeater-row .qs-repeater-action,
635
- #redirect-panel .qs-repeater-row .qs-repeater-action {
636
- margin-top: 8px;
637
- }
638
-
639
- #steps-panel .qs-repeater-row .qs-repeater-action .dashicons,
640
- #extensions-panel .qs-repeater-row .qs-repeater-action .dashicons,
641
- #leads-panel .qs-repeater-row .qs-repeater-action .dashicons,
642
- #redirect-panel .qs-repeater-row .qs-repeater-action .dashicons {
643
- cursor: pointer;
644
- }
645
-
646
- #steps-panel .field-wrap,
647
- #extensions-panel .field-wrap,
648
- #leads-panel .field-wrap,
649
- #redirect-panel .field-wrap {
650
- padding: 0 10px;
651
- clear: both;
652
- }
653
-
654
- #steps-panel .field-wrap .field-wrap,
655
- #extensions-panel .field-wrap .field-wrap,
656
- #leads-panel .field-wrap .field-wrap,
657
- #redirect-panel .field-wrap .field-wrap {
658
- clear: none;
659
- }
660
-
661
- #steps-panel .qs-section,
662
- #extensions-panel .qs-section,
663
- #leads-panel .qs-section,
664
- #redirect-panel .qs-section {
665
- padding: 10px;
666
- margin: 10px;
667
- background: #f9f9f9;
668
- border: 1px solid #555;
669
- }
670
-
671
- #steps-panel .qs-section > label,
672
- #extensions-panel .qs-section > label,
673
- #leads-panel .qs-section > label,
674
- #redirect-panel .qs-section > label {
675
- margin-bottom: 0 !important;
676
- }
677
-
678
- #steps-panel .clearfix:after,
679
- #extensions-panel .clearfix:after,
680
- #leads-panel .clearfix:after,
681
- #redirect-panel .clearfix:after {
682
- display: block;
683
- clear: both;
684
- content: '';
685
- }
686
-
687
- #steps-panel .migrate-from-redirection,
688
- #steps-panel .migrate-from-send-to-api,
689
- #extensions-panel .migrate-from-redirection,
690
- #extensions-panel .migrate-from-send-to-api,
691
- #leads-panel .migrate-from-redirection,
692
- #leads-panel .migrate-from-send-to-api,
693
- #redirect-panel .migrate-from-redirection,
694
- #redirect-panel .migrate-from-send-to-api {
695
- float: right;
696
- }
697
-
698
- #steps-panel .error-messageselect,
699
- #extensions-panel .error-messageselect,
700
- #leads-panel .error-messageselect,
701
- #redirect-panel .error-messageselect {
702
- border: 1px solid red;
703
- }
704
-
705
- #steps-panel .error-label,
706
- #extensions-panel .error-label,
707
- #leads-panel .error-label,
708
- #redirect-panel .error-label {
709
- font-size: 14px;
710
- color: red;
711
- }
712
-
713
- #steps-panel .add-new-action-wrap .error-label,
714
- #extensions-panel .add-new-action-wrap .error-label,
715
- #leads-panel .add-new-action-wrap .error-label,
716
- #redirect-panel .add-new-action-wrap .error-label {
717
- position: absolute;
718
- top: 100%;
719
- left: 0;
720
- }
721
-
722
- #steps-panel .actions-list tbody tr.action-container > td,
723
- #extensions-panel .actions-list tbody tr.action-container > td,
724
- #leads-panel .actions-list tbody tr.action-container > td,
725
- #redirect-panel .actions-list tbody tr.action-container > td {
726
- border-bottom: 0 !important;
727
- }
728
-
729
- #steps-panel .wpcf7r-checkbox input,
730
- #extensions-panel .wpcf7r-checkbox input,
731
- #leads-panel .wpcf7r-checkbox input,
732
- #redirect-panel .wpcf7r-checkbox input {
733
- position: absolute;
734
- visibility: hidden;
735
- opacity: 0;
736
- }
737
-
738
- #steps-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button,
739
- #extensions-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button,
740
- #leads-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button,
741
- #redirect-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button {
742
- border: 2px solid #1f8cbe;
743
- }
744
-
745
- #steps-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button,
746
- #extensions-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button,
747
- #leads-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button,
748
- #redirect-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button {
749
- right: 1px;
750
- background: #1f8cbe;
751
- }
752
-
753
- #steps-panel .wpcf7r-checkbox strong.checkbox-label,
754
- #extensions-panel .wpcf7r-checkbox strong.checkbox-label,
755
- #leads-panel .wpcf7r-checkbox strong.checkbox-label,
756
- #redirect-panel .wpcf7r-checkbox strong.checkbox-label {
757
- font-weight: normal;
758
- }
759
-
760
- #steps-panel .wpcf7r-checkbox .wpcf7r-on-off-button,
761
- #extensions-panel .wpcf7r-checkbox .wpcf7r-on-off-button,
762
- #leads-panel .wpcf7r-checkbox .wpcf7r-on-off-button,
763
- #redirect-panel .wpcf7r-checkbox .wpcf7r-on-off-button {
764
- position: relative;
765
- top: 3px;
766
- display: inline-block;
767
- width: 14px;
768
- padding: 6px;
769
- margin-right: 5px;
770
- border: 2px solid #4f4f4f;
771
- border-radius: 50px;
772
- }
773
-
774
- #steps-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button,
775
- #extensions-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button,
776
- #leads-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button,
777
- #redirect-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button {
778
- -webkit-transition: all 250ms ease;
779
- -o-transition: all 250ms ease;
780
- transition: all 250ms ease;
781
- position: absolute;
782
- top: 1px;
783
- right: calc(100% - 12px);
784
- display: inline-block;
785
- width: 10px;
786
- height: 10px;
787
- cursor: pointer;
788
- background: #4f4f4f;
789
- border-radius: 50%;
790
- }
791
-
792
- #steps-panel .conditional-logic-blocks,
793
- #extensions-panel .conditional-logic-blocks,
794
- #leads-panel .conditional-logic-blocks,
795
- #redirect-panel .conditional-logic-blocks {
796
- display: none;
797
- }
798
-
799
- #steps-panel .conditional-logic-blocks.active,
800
- #extensions-panel .conditional-logic-blocks.active,
801
- #leads-panel .conditional-logic-blocks.active,
802
- #redirect-panel .conditional-logic-blocks.active {
803
- display: block;
804
- }
805
-
806
- #steps-panel .check-column,
807
- #extensions-panel .check-column,
808
- #leads-panel .check-column,
809
- #redirect-panel .check-column {
810
- padding: 10px;
811
- }
812
-
813
- #steps-panel .check-column .handle,
814
- #extensions-panel .check-column .handle,
815
- #leads-panel .check-column .handle,
816
- #redirect-panel .check-column .handle {
817
- cursor: pointer;
818
- }
819
-
820
- #steps-panel .action-container .wp-list-table-inner td,
821
- #steps-panel .action-container .wp-list-table-inner th,
822
- #extensions-panel .action-container .wp-list-table-inner td,
823
- #extensions-panel .action-container .wp-list-table-inner th,
824
- #leads-panel .action-container .wp-list-table-inner td,
825
- #leads-panel .action-container .wp-list-table-inner th,
826
- #redirect-panel .action-container .wp-list-table-inner td,
827
- #redirect-panel .action-container .wp-list-table-inner th {
828
- padding: 5px 10px;
829
- }
830
-
831
- #steps-panel .action-container td,
832
- #extensions-panel .action-container td,
833
- #leads-panel .action-container td,
834
- #redirect-panel .action-container td {
835
- padding: 0;
836
- }
837
-
838
- #steps-panel .wp-list-table tr td,
839
- #extensions-panel .wp-list-table tr td,
840
- #leads-panel .wp-list-table tr td,
841
- #redirect-panel .wp-list-table tr td {
842
- position: relative;
843
- }
844
-
845
- #steps-panel .hidden-action,
846
- #extensions-panel .hidden-action,
847
- #leads-panel .hidden-action,
848
- #redirect-panel .hidden-action {
849
- display: none;
850
- padding: 10px;
851
- }
852
-
853
- #steps-panel .actions-list,
854
- #extensions-panel .actions-list,
855
- #leads-panel .actions-list,
856
- #redirect-panel .actions-list {
857
- position: relative;
858
- margin-top: 20px;
859
- margin-bottom: 20px;
860
- }
861
-
862
- #steps-panel .actions-list .actions,
863
- #extensions-panel .actions-list .actions,
864
- #leads-panel .actions-list .actions,
865
- #redirect-panel .actions-list .actions {
866
- margin-bottom: 20px;
867
- }
868
-
869
- #steps-panel .actions-list tbody tr[data-actionid] > td,
870
- #extensions-panel .actions-list tbody tr[data-actionid] > td,
871
- #leads-panel .actions-list tbody tr[data-actionid] > td,
872
- #redirect-panel .actions-list tbody tr[data-actionid] > td {
873
- border-bottom: 1px solid #e1e1e1;
874
- }
875
-
876
- #steps-panel .actions-list tbody tr.non-active .column-status a,
877
- #extensions-panel .actions-list tbody tr.non-active .column-status a,
878
- #leads-panel .actions-list tbody tr.non-active .column-status a,
879
- #redirect-panel .actions-list tbody tr.non-active .column-status a {
880
- color: red;
881
- }
882
-
883
- #steps-panel .open-tab,
884
- #extensions-panel .open-tab,
885
- #leads-panel .open-tab,
886
- #redirect-panel .open-tab {
887
- float: right;
888
- cursor: pointer;
889
- }
890
-
891
- #steps-panel .active .open-tab.dashicons-arrow-down-alt2:before,
892
- #extensions-panel .active .open-tab.dashicons-arrow-down-alt2:before,
893
- #leads-panel .active .open-tab.dashicons-arrow-down-alt2:before,
894
- #redirect-panel .active .open-tab.dashicons-arrow-down-alt2:before {
895
- content: '\f343';
896
- }
897
-
898
- #steps-panel [data-tab],
899
- #extensions-panel [data-tab],
900
- #leads-panel [data-tab],
901
- #redirect-panel [data-tab] {
902
- display: none;
903
- width: 100%;
904
- clear: both;
905
- }
906
-
907
- #steps-panel h3,
908
- #extensions-panel h3,
909
- #leads-panel h3,
910
- #redirect-panel h3 {
911
- margin-top: 0;
912
- margin-bottom: 0;
913
- }
914
-
915
- #steps-panel h3.active .dashicons-plus-alt:before,
916
- #extensions-panel h3.active .dashicons-plus-alt:before,
917
- #leads-panel h3.active .dashicons-plus-alt:before,
918
- #redirect-panel h3.active .dashicons-plus-alt:before {
919
- content: '\f460';
920
- }
921
-
922
- #steps-panel [data-tab-target],
923
- #extensions-panel [data-tab-target],
924
- #leads-panel [data-tab-target],
925
- #redirect-panel [data-tab-target] {
926
- cursor: pointer;
927
- }
928
-
929
- #steps-panel .conditional-groups-wrap:after,
930
- #extensions-panel .conditional-groups-wrap:after,
931
- #leads-panel .conditional-groups-wrap:after,
932
- #redirect-panel .conditional-groups-wrap:after {
933
- display: block;
934
- clear: both;
935
- content: '';
936
- }
937
-
938
- #steps-panel .conditional-groups-wrap .group-title,
939
- #extensions-panel .conditional-groups-wrap .group-title,
940
- #leads-panel .conditional-groups-wrap .group-title,
941
- #redirect-panel .conditional-groups-wrap .group-title {
942
- padding: 0 10px;
943
- font-weight: bold;
944
- }
945
-
946
- #steps-panel .conditional-groups-wrap .wpcf7r-add-block,
947
- #extensions-panel .conditional-groups-wrap .wpcf7r-add-block,
948
- #leads-panel .conditional-groups-wrap .wpcf7r-add-block,
949
- #redirect-panel .conditional-groups-wrap .wpcf7r-add-block {
950
- padding: 5px 0;
951
- cursor: pointer;
952
- }
953
-
954
- #steps-panel .conditional-groups-wrap .wpcf7r-add-block:hover,
955
- #extensions-panel .conditional-groups-wrap .wpcf7r-add-block:hover,
956
- #leads-panel .conditional-groups-wrap .wpcf7r-add-block:hover,
957
- #redirect-panel .conditional-groups-wrap .wpcf7r-add-block:hover {
958
- -webkit-transition: all 150ms ease;
959
- -o-transition: all 150ms ease;
960
- transition: all 150ms ease;
961
- color: #1e8cbe;
962
- }
963
-
964
- #steps-panel .conditional-groups-wrap .conditional-groups .dashicons-minus,
965
- #extensions-panel .conditional-groups-wrap .conditional-groups .dashicons-minus,
966
- #leads-panel .conditional-groups-wrap .conditional-groups .dashicons-minus,
967
- #redirect-panel .conditional-groups-wrap .conditional-groups .dashicons-minus {
968
- -webkit-transition: all 150ms ease;
969
- -o-transition: all 150ms ease;
970
- transition: all 150ms ease;
971
- float: right;
972
- padding: 3px;
973
- cursor: pointer;
974
- border: 1px solid #ccc;
975
- border-radius: 50%;
976
- }
977
-
978
- #steps-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover,
979
- #extensions-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover,
980
- #leads-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover,
981
- #redirect-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover {
982
- color: #fff;
983
- background: #1e8cbe;
984
- border: 1px solid #1e8cbe;
985
- }
986
-
987
- #steps-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
988
- #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus,
989
- #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
990
- #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus,
991
- #leads-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
992
- #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus,
993
- #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
994
- #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus {
995
- display: none;
996
- }
997
-
998
- #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
999
- #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul,
1000
- #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
1001
- #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul,
1002
- #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
1003
- #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul,
1004
- #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
1005
- #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul {
1006
- display: -webkit-box;
1007
- display: -moz-flex;
1008
- display: -ms-flexbox;
1009
- display: flex;
1010
- justify-content: space-around;
1011
- -webkit-justify-content: space-around;
1012
- -moz-justify-content: space-around;
1013
- -ms-flex-pack: distribute;
1014
- margin-bottom: 0;
1015
- }
1016
-
1017
- #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1018
- #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li,
1019
- #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1020
- #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li,
1021
- #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1022
- #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li,
1023
- #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1024
- #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li {
1025
- width: 33%;
1026
- padding: 0 10px;
1027
- margin-bottom: 0;
1028
- }
1029
-
1030
- #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1031
- #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select,
1032
- #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1033
- #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select,
1034
- #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1035
- #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select,
1036
- #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1037
- #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select {
1038
- width: 100%;
1039
- }
1040
-
1041
- #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1042
- #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value,
1043
- #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1044
- #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value,
1045
- #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1046
- #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value,
1047
- #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1048
- #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value {
1049
- float: left;
1050
- width: calc(100% - 50px);
1051
- }
1052
-
1053
- #steps-panel .conditional-groups-wrap .conditional-groups .row-titles,
1054
- #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles,
1055
- #leads-panel .conditional-groups-wrap .conditional-groups .row-titles,
1056
- #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles {
1057
- width: 90%;
1058
- }
1059
-
1060
- #steps-panel .conditional-groups-wrap .wpcfr-rule-group,
1061
- #extensions-panel .conditional-groups-wrap .wpcfr-rule-group,
1062
- #leads-panel .conditional-groups-wrap .wpcfr-rule-group,
1063
- #redirect-panel .conditional-groups-wrap .wpcfr-rule-group {
1064
- padding: 0 0 10px 0;
1065
- }
1066
-
1067
- #steps-panel .conditional-groups-wrap .wpcfr-rule-group:after,
1068
- #extensions-panel .conditional-groups-wrap .wpcfr-rule-group:after,
1069
- #leads-panel .conditional-groups-wrap .wpcfr-rule-group:after,
1070
- #redirect-panel .conditional-groups-wrap .wpcfr-rule-group:after {
1071
- display: block;
1072
- clear: both;
1073
- content: '';
1074
- }
1075
-
1076
- #steps-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title,
1077
- #extensions-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title,
1078
- #leads-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title,
1079
- #redirect-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title {
1080
- display: none;
1081
- }
1082
-
1083
- #steps-panel .leads-list input,
1084
- #extensions-panel .leads-list input,
1085
- #leads-panel .leads-list input,
1086
- #redirect-panel .leads-list input {
1087
- max-width: 100%;
1088
- }
1089
-
1090
- #steps-panel .leads-list td,
1091
- #extensions-panel .leads-list td,
1092
- #leads-panel .leads-list td,
1093
- #redirect-panel .leads-list td {
1094
- padding: 5px !important;
1095
- }
1096
-
1097
- #steps-panel .leads-list td input,
1098
- #steps-panel .leads-list td select,
1099
- #steps-panel .leads-list td textarea,
1100
- #extensions-panel .leads-list td input,
1101
- #extensions-panel .leads-list td select,
1102
- #extensions-panel .leads-list td textarea,
1103
- #leads-panel .leads-list td input,
1104
- #leads-panel .leads-list td select,
1105
- #leads-panel .leads-list td textarea,
1106
- #redirect-panel .leads-list td input,
1107
- #redirect-panel .leads-list td select,
1108
- #redirect-panel .leads-list td textarea {
1109
- width: 100%;
1110
- }
1111
-
1112
- #steps-panel .leads-list td .field-wrap,
1113
- #extensions-panel .leads-list td .field-wrap,
1114
- #leads-panel .leads-list td .field-wrap,
1115
- #redirect-panel .leads-list td .field-wrap {
1116
- padding: 0;
1117
- }
1118
-
1119
- #steps-panel .groups-actions,
1120
- #extensions-panel .groups-actions,
1121
- #leads-panel .groups-actions,
1122
- #redirect-panel .groups-actions {
1123
- margin-top: 10px;
1124
- }
1125
-
1126
- #steps-panel .add-condition,
1127
- #extensions-panel .add-condition,
1128
- #leads-panel .add-condition,
1129
- #redirect-panel .add-condition {
1130
- display: none;
1131
- float: right;
1132
- }
1133
-
1134
- #steps-panel .wpcf7r-what-to-do .field-wrap label,
1135
- #extensions-panel .wpcf7r-what-to-do .field-wrap label,
1136
- #leads-panel .wpcf7r-what-to-do .field-wrap label,
1137
- #redirect-panel .wpcf7r-what-to-do .field-wrap label {
1138
- float: right;
1139
- width: calc(100% - 30px);
1140
- }
1141
-
1142
- #steps-panel .group-group-0 .row-template:first-child .dashicons-minus,
1143
- #extensions-panel .group-group-0 .row-template:first-child .dashicons-minus,
1144
- #leads-panel .group-group-0 .row-template:first-child .dashicons-minus,
1145
- #redirect-panel .group-group-0 .row-template:first-child .dashicons-minus {
1146
- display: none;
1147
- }
1148
-
1149
- #steps-panel .conditional-group-block,
1150
- #extensions-panel .conditional-group-block,
1151
- #leads-panel .conditional-group-block,
1152
- #redirect-panel .conditional-group-block {
1153
- display: none;
1154
- }
1155
-
1156
- #steps-panel .conditional-group-block.active,
1157
- #extensions-panel .conditional-group-block.active,
1158
- #leads-panel .conditional-group-block.active,
1159
- #redirect-panel .conditional-group-block.active {
1160
- display: block;
1161
- }
1162
-
1163
- #steps-panel .conditional-group-block tbody tr:last-child .add-condition,
1164
- #extensions-panel .conditional-group-block tbody tr:last-child .add-condition,
1165
- #leads-panel .conditional-group-block tbody tr:last-child .add-condition,
1166
- #redirect-panel .conditional-group-block tbody tr:last-child .add-condition {
1167
- display: block;
1168
- }
1169
-
1170
- #steps-panel .title-or,
1171
- #extensions-panel .title-or,
1172
- #leads-panel .title-or,
1173
- #redirect-panel .title-or {
1174
- padding: 8px !important;
1175
- margin-bottom: 10px;
1176
- text-align: center;
1177
- background: #e8e8e8;
1178
- }
1179
-
1180
- #steps-panel .field-wrap input[type='checkbox']:checked + label + input,
1181
- #extensions-panel .field-wrap input[type='checkbox']:checked + label + input,
1182
- #leads-panel .field-wrap input[type='checkbox']:checked + label + input,
1183
- #redirect-panel .field-wrap input[type='checkbox']:checked + label + input {
1184
- display: block;
1185
- }
1186
-
1187
- #steps-panel .conditional-group-block-title,
1188
- #extensions-panel .conditional-group-block-title,
1189
- #leads-panel .conditional-group-block-title,
1190
- #redirect-panel .conditional-group-block-title {
1191
- padding: 0 10px;
1192
- }
1193
-
1194
- #steps-panel .conditional-group-titles,
1195
- #extensions-panel .conditional-group-titles,
1196
- #leads-panel .conditional-group-titles,
1197
- #redirect-panel .conditional-group-titles {
1198
- display: -webkit-box;
1199
- display: -moz-flex;
1200
- display: -ms-flexbox;
1201
- display: flex;
1202
- flex-wrap: wrap;
1203
- -webkit-flex-wrap: wrap;
1204
- -moz-flex-wrap: wrap;
1205
- -ms-flex-wrap: wrap;
1206
- }
1207
-
1208
- #steps-panel .conditional-group-titles:after,
1209
- #extensions-panel .conditional-group-titles:after,
1210
- #leads-panel .conditional-group-titles:after,
1211
- #redirect-panel .conditional-group-titles:after {
1212
- display: block;
1213
- clear: both;
1214
- content: '';
1215
- }
1216
-
1217
- #steps-panel .conditional-group-titles .block-title,
1218
- #extensions-panel .conditional-group-titles .block-title,
1219
- #leads-panel .conditional-group-titles .block-title,
1220
- #redirect-panel .conditional-group-titles .block-title {
1221
- display: -webkit-box;
1222
- display: -moz-flex;
1223
- display: -ms-flexbox;
1224
- display: flex;
1225
- }
1226
-
1227
- #steps-panel .conditional-group-titles .block-title:first-child .dashicons-minus,
1228
- #extensions-panel .conditional-group-titles .block-title:first-child .dashicons-minus,
1229
- #leads-panel .conditional-group-titles .block-title:first-child .dashicons-minus,
1230
- #redirect-panel .conditional-group-titles .block-title:first-child .dashicons-minus {
1231
- display: none !important;
1232
- }
1233
-
1234
- #steps-panel .conditional-group-titles .block-title [type='text'][readonly],
1235
- #extensions-panel .conditional-group-titles .block-title [type='text'][readonly],
1236
- #leads-panel .conditional-group-titles .block-title [type='text'][readonly],
1237
- #redirect-panel .conditional-group-titles .block-title [type='text'][readonly] {
1238
- display: inline-block;
1239
- width: auto !important;
1240
- cursor: pointer;
1241
- border: 0;
1242
- -webkit-box-shadow: none;
1243
- box-shadow: none;
1244
- }
1245
-
1246
- #steps-panel .conditional-group-titles .block-title .dashicons,
1247
- #extensions-panel .conditional-group-titles .block-title .dashicons,
1248
- #leads-panel .conditional-group-titles .block-title .dashicons,
1249
- #redirect-panel .conditional-group-titles .block-title .dashicons {
1250
- margin-top: 4px;
1251
- cursor: pointer;
1252
- }
1253
-
1254
- #steps-panel .conditional-group-titles .block-title .dashicons.show-on-edit,
1255
- #extensions-panel .conditional-group-titles .block-title .dashicons.show-on-edit,
1256
- #leads-panel .conditional-group-titles .block-title .dashicons.show-on-edit,
1257
- #redirect-panel .conditional-group-titles .block-title .dashicons.show-on-edit {
1258
- display: none;
1259
- }
1260
-
1261
- #steps-panel .conditional-group-titles .block-title.active,
1262
- #extensions-panel .conditional-group-titles .block-title.active,
1263
- #leads-panel .conditional-group-titles .block-title.active,
1264
- #redirect-panel .conditional-group-titles .block-title.active {
1265
- color: #0085ba;
1266
- }
1267
-
1268
- #steps-panel .conditional-group-titles .block-title.active input,
1269
- #extensions-panel .conditional-group-titles .block-title.active input,
1270
- #leads-panel .conditional-group-titles .block-title.active input,
1271
- #redirect-panel .conditional-group-titles .block-title.active input {
1272
- color: #0085ba;
1273
- }
1274
-
1275
- #steps-panel .conditional-group-titles .block-title.edit .dashicons,
1276
- #extensions-panel .conditional-group-titles .block-title.edit .dashicons,
1277
- #leads-panel .conditional-group-titles .block-title.edit .dashicons,
1278
- #redirect-panel .conditional-group-titles .block-title.edit .dashicons {
1279
- display: none;
1280
- cursor: pointer;
1281
- }
1282
-
1283
- #steps-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit,
1284
- #extensions-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit,
1285
- #leads-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit,
1286
- #redirect-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit {
1287
- display: block;
1288
- }
1289
-
1290
- #steps-panel .wpcf7-then,
1291
- #extensions-panel .wpcf7-then,
1292
- #leads-panel .wpcf7-then,
1293
- #redirect-panel .wpcf7-then {
1294
- padding: 10px;
1295
- }
1296
-
1297
- #steps-panel [data-redirect-type],
1298
- #extensions-panel [data-redirect-type],
1299
- #leads-panel [data-redirect-type],
1300
- #redirect-panel [data-redirect-type] {
1301
- display: none;
1302
- }
1303
-
1304
- #steps-panel .wpcfr-banner-holder .dashicons-no,
1305
- #extensions-panel .wpcfr-banner-holder .dashicons-no,
1306
- #leads-panel .wpcfr-banner-holder .dashicons-no,
1307
- #redirect-panel .wpcfr-banner-holder .dashicons-no {
1308
- cursor: pointer;
1309
- }
1310
-
1311
- #steps-panel img,
1312
- #extensions-panel img,
1313
- #leads-panel img,
1314
- #redirect-panel img {
1315
- max-width: 100%;
1316
- }
1317
-
1318
- #steps-panel .wpcf7-error-message,
1319
- #extensions-panel .wpcf7-error-message,
1320
- #leads-panel .wpcf7-error-message,
1321
- #redirect-panel .wpcf7-error-message {
1322
- padding: 20px 0;
1323
- color: red;
1324
- }
1325
-
1326
- #steps-panel .select2-container,
1327
- #extensions-panel .select2-container,
1328
- #leads-panel .select2-container,
1329
- #redirect-panel .select2-container {
1330
- display: block;
1331
- width: 100% !important;
1332
- }
1333
-
1334
- #steps-panel .select2-container--default .select2-selection--single .select2-selection__arrow,
1335
- #extensions-panel .select2-container--default .select2-selection--single .select2-selection__arrow,
1336
- #leads-panel .select2-container--default .select2-selection--single .select2-selection__arrow,
1337
- #redirect-panel .select2-container--default .select2-selection--single .select2-selection__arrow {
1338
- height: 36px;
1339
- }
1340
-
1341
- #steps-panel .select2-container--default .select2-selection--single .select2-selection__rendered,
1342
- #extensions-panel .select2-container--default .select2-selection--single .select2-selection__rendered,
1343
- #leads-panel .select2-container--default .select2-selection--single .select2-selection__rendered,
1344
- #redirect-panel .select2-container--default .select2-selection--single .select2-selection__rendered {
1345
- line-height: 35px;
1346
- }
1347
-
1348
- #steps-panel .wpcf7-success-message,
1349
- #extensions-panel .wpcf7-success-message,
1350
- #leads-panel .wpcf7-success-message,
1351
- #redirect-panel .wpcf7-success-message {
1352
- margin-top: 10px;
1353
- font-weight: bold;
1354
- color: green;
1355
- }
1356
-
1357
- #steps-panel .field-wrap,
1358
- #extensions-panel .field-wrap,
1359
- #leads-panel .field-wrap,
1360
- #redirect-panel .field-wrap {
1361
- margin-bottom: 10px;
1362
- }
1363
-
1364
- #steps-panel .field-wrap select,
1365
- #steps-panel .field-wrap [type='number'],
1366
- #steps-panel .field-wrap [type='email'],
1367
- #steps-panel .field-wrap [type='password'],
1368
- #steps-panel .field-wrap [type='url'],
1369
- #steps-panel .field-wrap [type='text'],
1370
- #extensions-panel .field-wrap select,
1371
- #extensions-panel .field-wrap [type='number'],
1372
- #extensions-panel .field-wrap [type='email'],
1373
- #extensions-panel .field-wrap [type='password'],
1374
- #extensions-panel .field-wrap [type='url'],
1375
- #extensions-panel .field-wrap [type='text'],
1376
- #leads-panel .field-wrap select,
1377
- #leads-panel .field-wrap [type='number'],
1378
- #leads-panel .field-wrap [type='email'],
1379
- #leads-panel .field-wrap [type='password'],
1380
- #leads-panel .field-wrap [type='url'],
1381
- #leads-panel .field-wrap [type='text'],
1382
- #redirect-panel .field-wrap select,
1383
- #redirect-panel .field-wrap [type='number'],
1384
- #redirect-panel .field-wrap [type='email'],
1385
- #redirect-panel .field-wrap [type='password'],
1386
- #redirect-panel .field-wrap [type='url'],
1387
- #redirect-panel .field-wrap [type='text'] {
1388
- width: 100%;
1389
- height: 38px;
1390
- margin: 0;
1391
- border-radius: 0;
1392
- }
1393
-
1394
- #steps-panel .field-wrap textarea,
1395
- #extensions-panel .field-wrap textarea,
1396
- #leads-panel .field-wrap textarea,
1397
- #redirect-panel .field-wrap textarea {
1398
- width: 100%;
1399
- margin: 0;
1400
- border-radius: 0;
1401
- -webkit-box-shadow: 0;
1402
- box-shadow: 0;
1403
- }
1404
-
1405
- #steps-panel .field-wrap .image-uploader-btn,
1406
- #extensions-panel .field-wrap .image-uploader-btn,
1407
- #leads-panel .field-wrap .image-uploader-btn,
1408
- #redirect-panel .field-wrap .image-uploader-btn {
1409
- display: block;
1410
- clear: both;
1411
- }
1412
-
1413
- #steps-panel .field-wrap .wp-picker-container .wp-color-result,
1414
- #extensions-panel .field-wrap .wp-picker-container .wp-color-result,
1415
- #leads-panel .field-wrap .wp-picker-container .wp-color-result,
1416
- #redirect-panel .field-wrap .wp-picker-container .wp-color-result {
1417
- width: 38px;
1418
- height: 38px;
1419
- overflow: hidden;
1420
- text-indent: -999px;
1421
- vertical-align: top;
1422
- border: 1px solid #000;
1423
- border-radius: 50%;
1424
- }
1425
-
1426
- #steps-panel .field-wrap [type='checkbox'],
1427
- #extensions-panel .field-wrap [type='checkbox'],
1428
- #leads-panel .field-wrap [type='checkbox'],
1429
- #redirect-panel .field-wrap [type='checkbox'] {
1430
- margin-top: 1px;
1431
- }
1432
-
1433
- #steps-panel .field-wrap textarea,
1434
- #extensions-panel .field-wrap textarea,
1435
- #leads-panel .field-wrap textarea,
1436
- #redirect-panel .field-wrap textarea {
1437
- width: 100%;
1438
- direction: ltr;
1439
- }
1440
-
1441
- #steps-panel .repeater-wrap,
1442
- #extensions-panel .repeater-wrap,
1443
- #leads-panel .repeater-wrap,
1444
- #redirect-panel .repeater-wrap {
1445
- display: block;
1446
- width: 100%;
1447
- }
1448
-
1449
- #steps-panel .repeater-wrap:before,
1450
- #steps-panel .repeater-wrap:after,
1451
- #extensions-panel .repeater-wrap:before,
1452
- #extensions-panel .repeater-wrap:after,
1453
- #leads-panel .repeater-wrap:before,
1454
- #leads-panel .repeater-wrap:after,
1455
- #redirect-panel .repeater-wrap:before,
1456
- #redirect-panel .repeater-wrap:after {
1457
- display: table;
1458
- clear: both;
1459
- content: ' ';
1460
- }
1461
-
1462
- #steps-panel .qs-row,
1463
- #extensions-panel .qs-row,
1464
- #leads-panel .qs-row,
1465
- #redirect-panel .qs-row {
1466
- float: left;
1467
- width: 100%;
1468
- -webkit-box-sizing: border-box;
1469
- box-sizing: border-box;
1470
- margin: 0 auto;
1471
- }
1472
-
1473
- #steps-panel .qs-row .image-uploader-btn,
1474
- #extensions-panel .qs-row .image-uploader-btn,
1475
- #leads-panel .qs-row .image-uploader-btn,
1476
- #redirect-panel .qs-row .image-uploader-btn {
1477
- max-width: 100px;
1478
- text-align: center;
1479
- padding: 5px;
1480
- min-height: 0;
1481
- height: auto;
1482
- line-height: normal;
1483
- }
1484
-
1485
- #steps-panel .qs-row:before,
1486
- #steps-panel .qs-row:after,
1487
- #extensions-panel .qs-row:before,
1488
- #extensions-panel .qs-row:after,
1489
- #leads-panel .qs-row:before,
1490
- #leads-panel .qs-row:after,
1491
- #redirect-panel .qs-row:before,
1492
- #redirect-panel .qs-row:after {
1493
- display: table;
1494
- clear: both;
1495
- content: ' ';
1496
- }
1497
-
1498
- #steps-panel .qs-row .qs-col,
1499
- #extensions-panel .qs-row .qs-col,
1500
- #leads-panel .qs-row .qs-col,
1501
- #redirect-panel .qs-row .qs-col {
1502
- position: relative;
1503
- float: left;
1504
- -webkit-box-sizing: border-box;
1505
- box-sizing: border-box;
1506
- padding-right: 10px;
1507
- padding-left: 10px;
1508
- clear: none;
1509
- }
1510
-
1511
- #steps-panel .qs-row .qs-col.clear,
1512
- #extensions-panel .qs-row .qs-col.clear,
1513
- #leads-panel .qs-row .qs-col.clear,
1514
- #redirect-panel .qs-row .qs-col.clear {
1515
- clear: both;
1516
- }
1517
-
1518
- #steps-panel .qs-row label,
1519
- #extensions-panel .qs-row label,
1520
- #leads-panel .qs-row label,
1521
- #redirect-panel .qs-row label {
1522
- display: block;
1523
- }
1524
-
1525
- #steps-panel .qs-row .qs-col-12,
1526
- #extensions-panel .qs-row .qs-col-12,
1527
- #leads-panel .qs-row .qs-col-12,
1528
- #redirect-panel .qs-row .qs-col-12 {
1529
- width: 100%;
1530
- }
1531
-
1532
- #steps-panel .qs-row .qs-col-8,
1533
- #extensions-panel .qs-row .qs-col-8,
1534
- #leads-panel .qs-row .qs-col-8,
1535
- #redirect-panel .qs-row .qs-col-8 {
1536
- width: 66%;
1537
- }
1538
-
1539
- #steps-panel .qs-row .qs-col-7,
1540
- #extensions-panel .qs-row .qs-col-7,
1541
- #leads-panel .qs-row .qs-col-7,
1542
- #redirect-panel .qs-row .qs-col-7 {
1543
- width: 58%;
1544
- }
1545
-
1546
- #steps-panel .qs-row .qs-col-6,
1547
- #extensions-panel .qs-row .qs-col-6,
1548
- #leads-panel .qs-row .qs-col-6,
1549
- #redirect-panel .qs-row .qs-col-6 {
1550
- width: 50%;
1551
- }
1552
-
1553
- #steps-panel .qs-row .qs-col-5,
1554
- #extensions-panel .qs-row .qs-col-5,
1555
- #leads-panel .qs-row .qs-col-5,
1556
- #redirect-panel .qs-row .qs-col-5 {
1557
- width: 43%;
1558
- }
1559
-
1560
- #steps-panel .qs-row .qs-col-4,
1561
- #extensions-panel .qs-row .qs-col-4,
1562
- #leads-panel .qs-row .qs-col-4,
1563
- #redirect-panel .qs-row .qs-col-4 {
1564
- width: 33%;
1565
- }
1566
-
1567
- #steps-panel .qs-row .qs-col-3,
1568
- #extensions-panel .qs-row .qs-col-3,
1569
- #leads-panel .qs-row .qs-col-3,
1570
- #redirect-panel .qs-row .qs-col-3 {
1571
- width: 25%;
1572
- }
1573
-
1574
- #steps-panel .qs-row .qs-col-2,
1575
- #extensions-panel .qs-row .qs-col-2,
1576
- #leads-panel .qs-row .qs-col-2,
1577
- #redirect-panel .qs-row .qs-col-2 {
1578
- width: 16.666666666666%;
1579
- }
1580
-
1581
- #steps-panel .qs-row .qs-col-1,
1582
- #extensions-panel .qs-row .qs-col-1,
1583
- #leads-panel .qs-row .qs-col-1,
1584
- #redirect-panel .qs-row .qs-col-1 {
1585
- width: 8%;
1586
- }
1587
-
1588
- #steps-panel .field-wrap-after-sent-script,
1589
- #extensions-panel .field-wrap-after-sent-script,
1590
- #leads-panel .field-wrap-after-sent-script,
1591
- #redirect-panel .field-wrap-after-sent-script {
1592
- margin-top: 10px;
1593
- }
1594
-
1595
- #steps-panel .field-wrap-page-id label,
1596
- #steps-panel .field-wrap-after-sent-script label,
1597
- #extensions-panel .field-wrap-page-id label,
1598
- #extensions-panel .field-wrap-after-sent-script label,
1599
- #leads-panel .field-wrap-page-id label,
1600
- #leads-panel .field-wrap-after-sent-script label,
1601
- #redirect-panel .field-wrap-page-id label,
1602
- #redirect-panel .field-wrap-after-sent-script label {
1603
- margin-bottom: 5px;
1604
- }
1605
-
1606
- #steps-panel .field-wrap-http-build-query-selectively [type='text'],
1607
- #extensions-panel .field-wrap-http-build-query-selectively [type='text'],
1608
- #leads-panel .field-wrap-http-build-query-selectively [type='text'],
1609
- #redirect-panel .field-wrap-http-build-query-selectively [type='text'] {
1610
- margin-top: 10px;
1611
- }
1612
-
1613
- #steps-panel .field-wrap-after-sent-script .field-message,
1614
- #extensions-panel .field-wrap-after-sent-script .field-message,
1615
- #leads-panel .field-wrap-after-sent-script .field-message,
1616
- #redirect-panel .field-wrap-after-sent-script .field-message {
1617
- margin-bottom: 10px;
1618
- }
1619
-
1620
- #steps-panel .field-notice,
1621
- #extensions-panel .field-notice,
1622
- #leads-panel .field-notice,
1623
- #redirect-panel .field-notice {
1624
- padding: 5px;
1625
- margin-top: 10px;
1626
- margin-bottom: 10px;
1627
- background: #fff;
1628
- border: 1px solid;
1629
- border-radius: 4px;
1630
- }
1631
-
1632
- #steps-panel .field-notice-alert,
1633
- #extensions-panel .field-notice-alert,
1634
- #leads-panel .field-notice-alert,
1635
- #redirect-panel .field-notice-alert {
1636
- color: #8a6d3b;
1637
- background-color: #fcf8e3;
1638
- border: 1px solid #faebcc;
1639
- }
1640
-
1641
- #steps-panel .field-hidden,
1642
- #steps-panel .field-notice-hidden,
1643
- #extensions-panel .field-hidden,
1644
- #extensions-panel .field-notice-hidden,
1645
- #leads-panel .field-hidden,
1646
- #leads-panel .field-notice-hidden,
1647
- #redirect-panel .field-hidden,
1648
- #redirect-panel .field-notice-hidden {
1649
- display: none;
1650
- }
1651
-
1652
- #steps-panel .field-warning-alert,
1653
- #extensions-panel .field-warning-alert,
1654
- #leads-panel .field-warning-alert,
1655
- #redirect-panel .field-warning-alert {
1656
- color: #a94442;
1657
- background-color: #f2dede;
1658
- border-color: #ebccd1;
1659
- }
1660
-
1661
- .home-hero-minititle {
1662
- color: #fff !important;
1663
- }
1664
-
1665
- .accessibe-logo {
1666
- padding: 10px 0;
1667
- background: #fff;
1668
- }
1669
-
1670
- .accessibe-logo img {
1671
- width: 200px;
1672
- }
1673
-
1674
- .page-settings .image-uploader-btn {
1675
- display: block;
1676
- margin-top: 10PX;
1677
- }
1678
-
1679
- .page-settings .field-wrap {
1680
- display: -webkit-box;
1681
- display: -ms-flexbox;
1682
- display: flex;
1683
- float: left;
1684
- width: 48%;
1685
- padding: 0 1% !important;
1686
- margin-bottom: 20px;
1687
- clear: none !important;
1688
- -webkit-box-orient: vertical;
1689
- -webkit-box-direction: normal;
1690
- -ms-flex-direction: column;
1691
- flex-direction: column;
1692
- }
1693
-
1694
- .page-settings .field-wrap select,
1695
- .page-settings .field-wrap input {
1696
- width: 100%;
1697
- }
1698
-
1699
- .page-settings .field-wrap label {
1700
- margin-bottom: 10px;
1701
- }
1702
-
1703
- .page-settings .field-wrap.field-wrap-footerHtml {
1704
- width: 100%;
1705
- }
1706
-
1707
- #debug-panel label.error {
1708
- font-weight: bold;
1709
- color: red;
1710
- }
1711
-
1712
- .extensions-list .button-primary {
1713
- display: -webkit-box;
1714
- display: -moz-flex;
1715
- display: -ms-flexbox;
1716
- display: flex;
1717
- align-items: center;
1718
- -webkit-align-items: center;
1719
- -moz-align-items: center;
1720
- -webkit-box-align: center;
1721
- -ms-flex-align: center;
1722
- justify-content: center;
1723
- -webkit-justify-content: center;
1724
- -moz-justify-content: center;
1725
- -webkit-box-pack: center;
1726
- -ms-flex-pack: center;
1727
- }
1728
-
1729
- .extensions-list .button-primary.btn-deactivate {
1730
- font-size: 16px;
1731
- color: #000;
1732
- background: #f1f1f1;
1733
- }
1734
-
1735
- .extensions-list .actions {
1736
- position: relative;
1737
- }
1738
-
1739
- .extensions-list .extensions {
1740
- display: -webkit-box;
1741
- display: -moz-flex;
1742
- display: -ms-flexbox;
1743
- display: flex;
1744
- flex-wrap: wrap;
1745
- -webkit-flex-wrap: wrap;
1746
- -moz-flex-wrap: wrap;
1747
- -ms-flex-wrap: wrap;
1748
- justify-content: space-between;
1749
- -webkit-justify-content: space-between;
1750
- -moz-justify-content: space-between;
1751
- -webkit-box-pack: justify;
1752
- -ms-flex-pack: justify;
1753
- position: relative;
1754
- -webkit-box-sizing: border-box;
1755
- box-sizing: border-box;
1756
- margin: 0 -10px;
1757
- }
1758
-
1759
- .extensions-list .extensions .needs-activation .promo-purchase-link,
1760
- .extensions-list .extensions .needs-activation .actions .btn-activate {
1761
- font-size: 18px;
1762
- background: #333;
1763
- }
1764
-
1765
- .extensions-list .extensions .dashicons-editor-code {
1766
- margin-right: 5px;
1767
- }
1768
-
1769
- .extensions-list .extensions .promo-box {
1770
- height: 100%;
1771
- border: 1px solid #e6e6e6;
1772
- }
1773
-
1774
- .extensions-list .extensions .promo-purchase-link {
1775
- display: -webkit-box;
1776
- display: -moz-flex;
1777
- display: -ms-flexbox;
1778
- display: flex;
1779
- align-items: center;
1780
- -webkit-align-items: center;
1781
- -moz-align-items: center;
1782
- -webkit-box-align: center;
1783
- -ms-flex-align: center;
1784
- justify-content: center;
1785
- -webkit-justify-content: center;
1786
- -moz-justify-content: center;
1787
- -webkit-box-pack: center;
1788
- -ms-flex-pack: center;
1789
- padding: 0 10px 2px 10px;
1790
- font-size: 1.1rem;
1791
- line-height: normal;
1792
- color: #fff;
1793
- text-decoration: none;
1794
- cursor: pointer;
1795
- background: #007cba;
1796
- border-radius: 0;
1797
- }
1798
-
1799
- .extensions-list .extensions .promo-purchase-link:hover {
1800
- opacity: .8;
1801
- }
1802
-
1803
- .extensions-list .extensions .promo-purchase-link a {
1804
- font-size: 1.1rem;
1805
- color: #fff;
1806
- text-decoration: none;
1807
- }
1808
-
1809
- .extensions-list .extensions .dashicons-arrow-down-alt {
1810
- margin: 0 10px;
1811
- }
1812
-
1813
- .extensions-list .extensions .actions .btn-activate,
1814
- .extensions-list .extensions .btn-getit {
1815
- display: -webkit-box;
1816
- display: -ms-flexbox;
1817
- display: flex;
1818
- -webkit-box-pack: center;
1819
- -ms-flex-pack: center;
1820
- justify-content: center;
1821
- -webkit-box-align: center;
1822
- -ms-flex-align: center;
1823
- align-items: center;
1824
- width: 100%;
1825
- padding: 8px;
1826
- font-size: 16px;
1827
- color: #fff;
1828
- text-decoration: none;
1829
- text-shadow: none;
1830
- background: #007cba;
1831
- border-color: #007cba;
1832
- }
1833
-
1834
- .extensions-list .extensions .actions .btn-activate:hover,
1835
- .extensions-list .extensions .btn-getit:hover {
1836
- opacity: .8;
1837
- }
1838
-
1839
- .extensions-list .extensions .button-primary {
1840
- margin-left: 5px;
1841
- font-size: 16px;
1842
- border-color: transparent;
1843
- border-radius: 0;
1844
- }
1845
-
1846
- .extensions-list .extensions .promo-box-inner {
1847
- display: -webkit-box;
1848
- display: -moz-flex;
1849
- display: -ms-flexbox;
1850
- display: flex;
1851
- justify-content: space-between;
1852
- -webkit-justify-content: space-between;
1853
- -moz-justify-content: space-between;
1854
- -webkit-box-pack: justify;
1855
- -ms-flex-pack: justify;
1856
- flex-direction: column;
1857
- -moz-flex-direction: column;
1858
- -ms-flex-direction: column;
1859
- -webkit-box-direction: normal;
1860
- -webkit-box-orient: vertical;
1861
- height: 100%;
1862
- }
1863
-
1864
- .extensions-list .extensions .promo-box-inner h2 {
1865
- margin-bottom: 0;
1866
- }
1867
-
1868
- .extensions-list .extensions .has-update .btn-update {
1869
- color: #000;
1870
- background: #ffdc2e;
1871
- border-color: #000;
1872
- }
1873
-
1874
- .extensions-list .extensions .serial {
1875
- display: -webkit-box;
1876
- display: -moz-flex;
1877
- display: -ms-flexbox;
1878
- display: flex;
1879
- -webkit-transition: all 350ms ease;
1880
- -o-transition: all 350ms ease;
1881
- transition: all 350ms ease;
1882
- position: absolute;
1883
- top: 0;
1884
- width: 100%;
1885
- height: 100%;
1886
- visibility: hidden;
1887
- background: #fff;
1888
- opacity: 0;
1889
- }
1890
-
1891
- .extensions-list .extensions .serial.open {
1892
- visibility: visible;
1893
- opacity: 1;
1894
- }
1895
-
1896
- .extensions-list .extensions .serial input[type='text'] {
1897
- width: 70%;
1898
- min-height: 0;
1899
- }
1900
-
1901
- .extensions-list .extensions .serial button {
1902
- margin: 0 1px;
1903
- line-height: normal;
1904
- }
1905
-
1906
- .extensions-list .extensions div.err {
1907
- position: absolute;
1908
- top: 100%;
1909
- left: 0;
1910
- z-index: 999;
1911
- padding: 0 0;
1912
- color: red;
1913
- }
1914
-
1915
- .extensions-list .extensions .extension {
1916
- -webkit-transition: all 250ms ease;
1917
- -o-transition: all 250ms ease;
1918
- transition: all 250ms ease;
1919
- position: relative;
1920
- width: 300px;
1921
- -webkit-box-sizing: border-box;
1922
- box-sizing: border-box;
1923
- box-sizing: border-box;
1924
- margin: 0 10px 20px 10px;
1925
- text-align: center;
1926
- background: #fff;
1927
- -webkit-box-flex: 1;
1928
- -ms-flex-positive: 1;
1929
- flex-grow: 1;
1930
- }
1931
-
1932
- .extensions-list .extensions .extension h2 {
1933
- font-size: 18px;
1934
- font-weight: 500;
1935
- color: #0e579f;
1936
- }
1937
-
1938
- .extensions-list .extensions .extension .promo-box-thumb {
1939
- padding: 40px;
1940
- background: #f5f5f5;
1941
- }
1942
-
1943
- .extensions-list .extensions .extension .promo-box-thumb img {
1944
- height: 50px;
1945
- }
1946
-
1947
- .extensions-list .extensions .extension .description {
1948
- min-height: 65px;
1949
- font-size: 14px;
1950
- line-height: 16px;
1951
- color: #999;
1952
- }
1953
-
1954
- .extensions-list .extensions .extension .dashicons-buddicons-groups:before {
1955
- position: relative;
1956
- content: '\f456';
1957
- }
1958
-
1959
- .extensions-list .extensions .extension .promo-version {
1960
- display: -webkit-box;
1961
- display: -moz-flex;
1962
- display: -ms-flexbox;
1963
- display: flex;
1964
- justify-content: center;
1965
- -webkit-justify-content: center;
1966
- -moz-justify-content: center;
1967
- -webkit-box-pack: center;
1968
- -ms-flex-pack: center;
1969
- align-items: center;
1970
- -webkit-align-items: center;
1971
- -moz-align-items: center;
1972
- -webkit-box-align: center;
1973
- -ms-flex-align: center;
1974
- flex-direction: row-reverse;
1975
- -moz-flex-direction: row-reverse;
1976
- -ms-flex-direction: row-reverse;
1977
- -webkit-box-direction: reverse;
1978
- -webkit-box-orient: horizontal;
1979
- color: #000;
1980
- }
1981
-
1982
- .extensions-list .extensions .extension .promo-version .badge {
1983
- padding: 3px 10px;
1984
- font-size: 16px;
1985
- line-height: normal;
1986
- color: #fff;
1987
- background: #c90a0abd;
1988
- }
1989
-
1990
- .extensions-list .extensions .extension .promo-version span {
1991
- font-size: 20px;
1992
- }
1993
-
1994
- .extensions-list .extensions .extension .promo-version small {
1995
- font-size: 16px;
1996
- }
1997
-
1998
- .extensions-list .extensions .extension .promo-box-content {
1999
- height: 100%;
2000
- padding: 0;
2001
- }
2002
-
2003
- .extensions-list .extensions .extension .promo-bot-title {
2004
- display: -webkit-box;
2005
- display: -moz-flex;
2006
- display: -ms-flexbox;
2007
- display: flex;
2008
- justify-content: space-between;
2009
- -webkit-justify-content: space-between;
2010
- -moz-justify-content: space-between;
2011
- -webkit-box-pack: justify;
2012
- -ms-flex-pack: justify;
2013
- height: 31px;
2014
- padding: 9px 15px;
2015
- background: #f1f1f1;
2016
- border-bottom: 1px solid #e6e6e6;
2017
- }
2018
-
2019
- .extensions-list .extensions .extension:hover {
2020
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
2021
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
2022
- }
2023
-
2024
- .extensions-list .extensions .extension .promo-box-description {
2025
- padding: 20px;
2026
- text-align: left;
2027
- }
2028
-
2029
- .extensions-list .extensions .extension .promo-box-description h3 {
2030
- height: 24px;
2031
- margin-top: 0;
2032
- }
2033
-
2034
- .extensions-list .extensions .extension .promo-actions-box {
2035
- position: relative;
2036
- overflow: hidden;
2037
- }
2038
-
2039
- section.padbox .padbox {
2040
- padding: 20px;
2041
- }
2042
-
2043
- .mail-tags-wrapper-inner.field-hidden {
2044
- padding: 10px;
2045
- background: #ddd;
2046
- border: 1px solid;
2047
- }
2048
-
2049
- .accessibie-plugin .promo-box-thumb img {
2050
- max-width: 90% !important;
2051
- }
2052
-
2053
- .rp-overlay {
2054
- position: fixed;
2055
- top: 0;
2056
- left: 0;
2057
- z-index: 99;
2058
- display: -webkit-box;
2059
- display: -ms-flexbox;
2060
- display: flex;
2061
- -webkit-box-pack: center;
2062
- -ms-flex-pack: center;
2063
- justify-content: center;
2064
- -webkit-box-align: center;
2065
- -ms-flex-align: center;
2066
- align-items: center;
2067
- width: 100%;
2068
- height: 100%;
2069
- color: #fff;
2070
- visibility: hidden;
2071
- background: rgba(0, 0, 0, 0.8);
2072
- opacity: 0;
2073
- -webkit-transition: all 500ms ease;
2074
- -o-transition: all 500ms ease;
2075
- transition: all 500ms ease;
2076
- direction: ltr;
2077
- }
2078
-
2079
- .rp-overlay.active {
2080
- visibility: visible;
2081
- opacity: 1;
2082
- }
2083
-
2084
- .rp-overlay * {
2085
- -webkit-box-sizing: border-box;
2086
- box-sizing: border-box;
2087
- }
2088
-
2089
- .rp-overlay .rp-discount {
2090
- position: relative;
2091
- display: block;
2092
- width: 700px;
2093
- max-width: 100%;
2094
- height: 500px;
2095
- padding: 40px 30px;
2096
- margin: auto;
2097
- background: url(../../build/images/banner-pro.png);
2098
- background-size: cover;
2099
- }
2100
-
2101
- .rp-overlay .rp-discount .rp-contact-form-form input[type=email] {
2102
- width: 100%;
2103
- padding: 6px 10px;
2104
- }
2105
-
2106
- .rp-overlay .rp-discount .rp-close {
2107
- position: absolute;
2108
- top: 10px;
2109
- right: 15px;
2110
- padding: 0;
2111
- font-size: 44px;
2112
- color: #fff;
2113
- cursor: pointer;
2114
- background: none;
2115
- border: none;
2116
- }
2117
-
2118
- .rp-overlay .rp-discount .rp-top-title {
2119
- display: inline-block;
2120
- padding-bottom: 8px;
2121
- margin-bottom: 30px;
2122
- font-size: 20px;
2123
- font-weight: 700;
2124
- color: #9cd8eb;
2125
- text-transform: uppercase;
2126
- border-bottom: 1px solid #72aee2;
2127
- }
2128
-
2129
- .rp-overlay .rp-discount .rp-title-large {
2130
- display: block;
2131
- font-size: 62px;
2132
- font-weight: 800;
2133
- line-height: 1;
2134
- text-transform: uppercase;
2135
- }
2136
-
2137
- .rp-overlay .rp-discount .rp-features-list {
2138
- margin-bottom: 30px;
2139
- }
2140
-
2141
- .rp-overlay .rp-discount .rp-features-list li {
2142
- font-size: 20px;
2143
- font-weight: 500;
2144
- }
2145
-
2146
- .rp-overlay .rp-discount .rp-features-list li:before {
2147
- position: relative;
2148
- top: 9px;
2149
- font-family: 'dashicons';
2150
- font-size: 34px;
2151
- content: '\f147';
2152
- }
2153
-
2154
- .rp-overlay .rp-discount .rp-contact-form ::-webkit-input-placeholder {
2155
- color: #fff;
2156
- }
2157
-
2158
- .rp-overlay .rp-discount .rp-contact-form ::-moz-placeholder {
2159
- color: #fff;
2160
- }
2161
-
2162
- .rp-overlay .rp-discount .rp-contact-form :-ms-input-placeholder {
2163
- color: #fff;
2164
- }
2165
-
2166
- .rp-overlay .rp-discount .rp-contact-form :-moz-placeholder {
2167
- color: #fff;
2168
- }
2169
-
2170
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-title {
2171
- display: block;
2172
- padding: 0 20px;
2173
- margin-bottom: 10px;
2174
- font-size: 20px;
2175
- font-weight: 500;
2176
- color: #9cd8eb;
2177
- }
2178
-
2179
- .rp-overlay .rp-discount .rp-contact-form .rp-cols {
2180
- display: -webkit-box;
2181
- display: -ms-flexbox;
2182
- display: flex;
2183
- -webkit-box-pack: justify;
2184
- -ms-flex-pack: justify;
2185
- justify-content: space-between;
2186
- }
2187
-
2188
- .rp-overlay .rp-discount .rp-contact-form .rp-form-message {
2189
- position: absolute;
2190
- top: 67px;
2191
- left: 0;
2192
- width: 100%;
2193
- padding-left: 5px;
2194
- font-size: 12px;
2195
- }
2196
-
2197
- .rp-overlay .rp-discount .rp-contact-form .rp-form-message .rp-form-message-text {
2198
- display: block;
2199
- padding: 16px;
2200
- padding-top: 5px;
2201
- color: #1478ce;
2202
- text-decoration: none;
2203
- background: #fff;
2204
- }
2205
-
2206
- .rp-overlay .rp-discount .rp-contact-form .rp-col-featured .rp-text {
2207
- display: block;
2208
- margin-bottom: 5px;
2209
- font-size: 14px;
2210
- color: #fff;
2211
- }
2212
-
2213
- .rp-overlay .rp-discount .rp-contact-form .rp-col-featured .logo-querysol {
2214
- display: block;
2215
- width: 140px;
2216
- height: 18px;
2217
- background: url(../../build/images/logo-querysol.png);
2218
- background-size: 100%;
2219
- }
2220
-
2221
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form strong {
2222
- font-size: 14px;
2223
- font-weight: bold;
2224
- text-decoration: underline;
2225
- }
2226
-
2227
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap {
2228
- position: relative;
2229
- margin-bottom: 5px;
2230
- }
2231
-
2232
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit {
2233
- display: -webkit-box;
2234
- display: -moz-flex;
2235
- display: -ms-flexbox;
2236
- display: flex;
2237
- justify-content: center;
2238
- -webkit-justify-content: center;
2239
- -moz-justify-content: center;
2240
- -webkit-box-pack: center;
2241
- -ms-flex-pack: center;
2242
- align-items: center;
2243
- -webkit-align-items: center;
2244
- -moz-align-items: center;
2245
- -webkit-box-align: center;
2246
- -ms-flex-align: center;
2247
- position: absolute;
2248
- top: 1px;
2249
- right: 0;
2250
- width: 40px;
2251
- height: calc(100% - 2px);
2252
- padding: 0;
2253
- padding: 0;
2254
- cursor: pointer;
2255
- background: #388cd5;
2256
- border: none;
2257
- }
2258
-
2259
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit:focus {
2260
- outline: none;
2261
- }
2262
-
2263
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit .rp-icon-plane {
2264
- position: relative;
2265
- width: 17px;
2266
- height: 17px;
2267
- background: url(../../build/images/icon-plane.png);
2268
- background-size: 100%;
2269
- }
2270
-
2271
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit .rp-icon-plane:hover {
2272
- opacity: .8;
2273
- }
2274
-
2275
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .checkbox-wrap {
2276
- display: -webkit-box;
2277
- display: -ms-flexbox;
2278
- display: flex;
2279
- -webkit-box-align: center;
2280
- -ms-flex-align: center;
2281
- align-items: center;
2282
- }
2283
-
2284
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .checkbox-wrap #rp_get_offers {
2285
- width: 14px;
2286
- min-width: 14px;
2287
- height: 14px;
2288
- min-height: 14px;
2289
- margin: 0 5px;
2290
- }
2291
-
2292
- .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .checkbox-wrap label {
2293
- font-size: 12px;
2294
- }
2295
-
2296
- .rp-overlay .rp-footer {
2297
- position: absolute;
2298
- bottom: 0;
2299
- left: 0;
2300
- width: 100%;
2301
- padding: 0 30px 7px;
2302
- }
2303
-
2304
- .rp-overlay .rp-footer .rp-footer-top {
2305
- padding: 10px 0;
2306
- border-top: 1px solid #72aee2;
2307
- border-bottom: 1px solid #72aee2;
2308
- }
2309
-
2310
- .rp-overlay .rp-footer .rp-footer-top a {
2311
- font-weight: 600;
2312
- color: #fff;
2313
- }
2314
-
2315
- .rp-overlay .rp-footer .rp-footer-bottom {
2316
- padding: 12px 30px;
2317
- font-size: 12px;
2318
- text-align: center;
2319
- }
2320
-
2321
- .rp-loader-wrap {
2322
- display: block;
2323
- padding: 5px;
2324
- text-align: center;
2325
- }
2326
-
2327
- .rp-loader-wrap .rp-loader {
2328
- display: inline-block;
2329
- width: 20px;
2330
- height: 20px;
2331
- border: 3px solid #f3f3f3;
2332
- border-top: 3px solid #3498db;
2333
- border-radius: 50%;
2334
- -webkit-animation: rp_spin 2s linear infinite;
2335
- animation: rp_spin 2s linear infinite;
2336
- }
2337
-
2338
- @-webkit-keyframes rp_spin {
2339
- 0% {
2340
- -webkit-transform: rotate(0deg);
2341
- }
2342
-
2343
- 100% {
2344
- -webkit-transform: rotate(360deg);
2345
- }
2346
- }
2347
-
2348
- @keyframes rp_spin {
2349
- 0% {
2350
- -webkit-transform: rotate(0deg);
2351
- transform: rotate(0deg);
2352
- }
2353
-
2354
- 100% {
2355
- -webkit-transform: rotate(360deg);
2356
- transform: rotate(360deg);
2357
- }
2358
- }
2359
-
2360
- .wrap-accesibe {
2361
- direction: ltr;
2362
- }
2363
-
2364
- .wrap-accesibe iframe {
2365
- height: calc(100vh - 280px) !important;
2366
- }
2367
-
2368
- .wrap-accesibe .wp-picker-container .button,
2369
- .wrap-accesibe .wp-picker-container .button-secondary {
2370
- width: 38px;
2371
- height: 38px;
2372
- overflow: hidden;
2373
- text-indent: -999px;
2374
- vertical-align: top;
2375
- border: 1px solid #000;
2376
- border-radius: 50%;
2377
- }
2378
-
2379
- .wrap-accesibe .success-message {
2380
- padding: 24px 40px;
2381
- margin-bottom: 30px;
2382
- font-size: 18px;
2383
- font-weight: normal;
2384
- line-height: 21px;
2385
- color: #fff;
2386
- background: #1871f8;
2387
- }
2388
-
2389
- .wrap-accesibe .success-message h3 {
2390
- margin: 0;
2391
- font-size: 24px;
2392
- font-style: normal;
2393
- font-weight: 600;
2394
- line-height: 32px;
2395
- color: #80d9ff;
2396
- /* identical to box height */
2397
- text-align: left;
2398
- }
2399
-
2400
- .wrap-accesibe .success-content a {
2401
- font-weight: 600;
2402
- color: #80d8ff;
2403
- }
2404
-
2405
- .wrap-accesibe .success-message-subtitle {
2406
- margin-bottom: 20px;
2407
- }
2408
-
2409
- .wrap-accesibe .accesibe-settings-form-footer {
2410
- padding: 0 40px;
2411
- margin-top: 40px;
2412
- }
2413
-
2414
- .wrap-accesibe .logo-row {
2415
- display: -webkit-box;
2416
- display: -ms-flexbox;
2417
- display: flex;
2418
- -webkit-box-pack: justify;
2419
- -ms-flex-pack: justify;
2420
- justify-content: space-between;
2421
- padding: 10px 0;
2422
- }
2423
-
2424
- .wrap-accesibe .logo-row .accesibe-settings-form {
2425
- height: auto;
2426
- padding: 0;
2427
- overflow: auto;
2428
- }
2429
-
2430
- .wrap-accesibe .top-logo {
2431
- padding: 10px 30px;
2432
- }
2433
-
2434
- .wrap-accesibe .top-logo .site-button {
2435
- padding: 0 20px !important;
2436
- margin-top: 0 !important;
2437
- }
2438
-
2439
- .wrap-accesibe .home-hero {
2440
- position: relative;
2441
- display: block !important;
2442
- min-height: 700px;
2443
- max-height: none !important;
2444
- padding: 0 !important;
2445
- background-attachment: fixed;
2446
- }
2447
-
2448
- .wrap-accesibe .scanning {
2449
- padding: 10px 40px;
2450
- font-size: 18px;
2451
- font-weight: bold;
2452
- background: #e7faf0;
2453
- }
2454
-
2455
- .wrap-accesibe .scanning-tip {
2456
- padding: 11px 40px;
2457
- font-size: 16px;
2458
- background: blanchedalmond;
2459
- }
2460
-
2461
- .wrap-accesibe .reg-form.wrapper {
2462
- position: relative;
2463
- z-index: 9;
2464
- }
2465
-
2466
- .wrap-accesibe .home-hero-cta {
2467
- display: -webkit-box;
2468
- display: -moz-flex;
2469
- display: -ms-flexbox;
2470
- display: flex;
2471
- justify-content: space-between;
2472
- -webkit-justify-content: space-between;
2473
- -moz-justify-content: space-between;
2474
- -webkit-box-pack: justify;
2475
- -ms-flex-pack: justify;
2476
- align-items: center;
2477
- -webkit-align-items: center;
2478
- -moz-align-items: center;
2479
- -webkit-box-align: center;
2480
- -ms-flex-align: center;
2481
- flex-wrap: wrap;
2482
- -webkit-flex-wrap: wrap;
2483
- -moz-flex-wrap: wrap;
2484
- -ms-flex-wrap: wrap;
2485
- flex-direction: column;
2486
- -moz-flex-direction: column;
2487
- -ms-flex-direction: column;
2488
- -webkit-box-direction: normal;
2489
- -webkit-box-orient: vertical;
2490
- }
2491
-
2492
- .wrap-accesibe .home-hero .home-hero-image {
2493
- position: absolute;
2494
- top: 0;
2495
- right: 0;
2496
- z-index: 1;
2497
- z-index: 999;
2498
- width: 47%;
2499
- height: auto;
2500
- -webkit-transition: all .15s ease;
2501
- -o-transition: all .15s ease;
2502
- transition: all .15s ease;
2503
- }
2504
-
2505
- .wrap-accesibe .home-hero .home-hero-image:hover .play-button {
2506
- -webkit-transform: scale(1.1);
2507
- -ms-transform: scale(1.1);
2508
- transform: scale(1.1);
2509
- }
2510
-
2511
- .wrap-accesibe .home-hero .home-hero-image:active .play-button {
2512
- -webkit-transform: scale(1);
2513
- -ms-transform: scale(1);
2514
- transform: scale(1);
2515
- }
2516
-
2517
- .wrap-accesibe .home-hero .home-hero-image .hero-tooltip {
2518
- position: absolute;
2519
- top: 0;
2520
- right: 0;
2521
- }
2522
-
2523
- .wrap-accesibe .home-hero .home-hero-image .hero-cover-image {
2524
- display: block;
2525
- display: none;
2526
- width: 95%;
2527
- max-width: 100% !important;
2528
- max-height: 400px;
2529
- margin-left: auto;
2530
- -o-object-fit: contain;
2531
- object-fit: contain;
2532
- -o-object-position: top right;
2533
- object-position: top right;
2534
- }
2535
-
2536
- .wrap-accesibe .home-hero .home-hero-image .play-button-wrap {
2537
- position: absolute;
2538
- top: 50%;
2539
- left: 50%;
2540
- width: 100%;
2541
- height: 100%;
2542
- cursor: pointer;
2543
- -webkit-transform: translateX(-50%) translateY(-50%);
2544
- -ms-transform: translateX(-50%) translateY(-50%);
2545
- transform: translateX(-50%) translateY(-50%);
2546
- }
2547
-
2548
- .wrap-accesibe .home-hero .home-hero-image .play-button-wrap .play-button {
2549
- position: relative;
2550
- top: -70px;
2551
- right: -50px;
2552
- z-index: 2;
2553
- margin: auto;
2554
- }
2555
-
2556
- .wrap-accesibe .site-button {
2557
- width: 100%;
2558
- max-width: 300px;
2559
- height: 57px;
2560
- font-size: 16px;
2561
- font-weight: 600;
2562
- line-height: 21px;
2563
- color: #fff;
2564
- text-align: center;
2565
- background: #136ef8;
2566
- border: 0;
2567
- border-radius: 10px;
2568
- -webkit-box-shadow: none;
2569
- box-shadow: none;
2570
- }
2571
-
2572
- .wrap-accesibe input[type='checkbox'] {
2573
- width: auto;
2574
- }
2575
-
2576
- .wrap-accesibe .accesibe-settings-form {
2577
- height: 100%;
2578
- padding: 20px 30px 30px 30px;
2579
- overflow: auto;
2580
- }
2581
-
2582
- .wrap-accesibe .accesibe-settings-form .site-button {
2583
- width: auto;
2584
- min-width: 200px;
2585
- margin-top: 20px;
2586
- }
2587
-
2588
- .wrap-accesibe .accesibe-settings-form .field-wrap {
2589
- margin-bottom: 10px;
2590
- }
2591
-
2592
- .wrap-accesibe .accesibe-settings-form .field-wrap select,
2593
- .wrap-accesibe .accesibe-settings-form .field-wrap [type='number'],
2594
- .wrap-accesibe .accesibe-settings-form .field-wrap [type='email'],
2595
- .wrap-accesibe .accesibe-settings-form .field-wrap [type='url'],
2596
- .wrap-accesibe .accesibe-settings-form .field-wrap [type='text'] {
2597
- width: 100%;
2598
- height: 38px;
2599
- margin: 0;
2600
- border-radius: 0;
2601
- }
2602
-
2603
- .wrap-accesibe .home-hero .home-hero-content .home-hero-minititle {
2604
- display: block;
2605
- font-size: 17px;
2606
- font-weight: 600;
2607
- line-height: 1;
2608
- color: #136ef8;
2609
- letter-spacing: -.5px;
2610
- }
2611
-
2612
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
2613
- font-size: 28px;
2614
- }
2615
-
2616
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
2617
- margin: 0;
2618
- margin-bottom: 100px;
2619
- font-size: 42px;
2620
- font-style: normal;
2621
- font-weight: 600;
2622
- line-height: 48px;
2623
- color: #fff;
2624
- }
2625
-
2626
- .wrap-accesibe .hero-right-inner {
2627
- max-width: 462px;
2628
- padding: 40px 0;
2629
- margin: auto;
2630
- margin-left: 10%;
2631
- }
2632
-
2633
- .wrap-accesibe .hero-right-inner h4 {
2634
- font-size: 24px;
2635
- font-weight: 600;
2636
- line-height: 32px;
2637
- color: #136ef8;
2638
- }
2639
-
2640
- .wrap-accesibe .hero-right-inner .accessibe-logo {
2641
- padding: 0;
2642
- margin-bottom: 40px;
2643
- }
2644
-
2645
- .wrap-accesibe .hero-left-inner {
2646
- max-width: 600px;
2647
- }
2648
-
2649
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title em:before {
2650
- bottom: 10px;
2651
- }
2652
-
2653
- .wrap-accesibe .home-hero-checkmarks {
2654
- margin-top: 20px;
2655
- }
2656
-
2657
- .wrap-accesibe .main-form-wrap {
2658
- display: -webkit-box;
2659
- display: -ms-flexbox;
2660
- display: flex;
2661
- -webkit-box-pack: center;
2662
- -ms-flex-pack: center;
2663
- justify-content: center;
2664
- }
2665
-
2666
- .wrap-accesibe .main-form-wrap .field-wrap textarea,
2667
- .wrap-accesibe .main-form-wrap .field-wrap select,
2668
- .wrap-accesibe .main-form-wrap .field-wrap [type='number'],
2669
- .wrap-accesibe .main-form-wrap .field-wrap [type='email'],
2670
- .wrap-accesibe .main-form-wrap .field-wrap [type='url'],
2671
- .wrap-accesibe .main-form-wrap .field-wrap [type='password'],
2672
- .wrap-accesibe .main-form-wrap .field-wrap [type='text'] {
2673
- height: 57px;
2674
- -webkit-box-sizing: border-box;
2675
- box-sizing: border-box;
2676
- padding: 0 10px;
2677
- font-size: 16px;
2678
- font-style: normal;
2679
- font-weight: 600;
2680
- line-height: 21px;
2681
- color: #bfbfbf;
2682
- border: 2px solid #eaeaea;
2683
- border-radius: 10px;
2684
- }
2685
-
2686
- .wrap-accesibe .main-form-wrap label {
2687
- margin-bottom: 16px;
2688
- font-size: 16px;
2689
- font-style: normal;
2690
- font-weight: 600;
2691
- line-height: 21px;
2692
- color: #bfbfbf;
2693
- }
2694
-
2695
- .wrap-accesibe .home-hero-checkmarks .home-hero-checkmark {
2696
- position: relative;
2697
- display: block;
2698
- padding-left: 45px;
2699
- margin: 30px 0;
2700
- font-size: 18px;
2701
- line-height: 1.3;
2702
- color: #fff;
2703
- text-align: left;
2704
- }
2705
-
2706
- .wrap-accesibe section.home-hero.hero-standard.hero-standard-full {
2707
- position: relative;
2708
- }
2709
-
2710
- .wrap-accesibe h3.home-hero-title {
2711
- color: #fff;
2712
- }
2713
-
2714
- .wrap-accesibe .home-hero-content {
2715
- display: block;
2716
- width: 100%;
2717
- -webkit-box-sizing: border-box;
2718
- box-sizing: border-box;
2719
- background: #136ef8;
2720
- }
2721
-
2722
- .wrap-accesibe .hero-right,
2723
- .wrap-accesibe .hero-left {
2724
- width: 50%;
2725
- }
2726
-
2727
- .wrap-accesibe .hero-left {
2728
- display: -webkit-box;
2729
- display: -moz-flex;
2730
- display: -ms-flexbox;
2731
- display: flex;
2732
- justify-content: center;
2733
- -webkit-justify-content: center;
2734
- -moz-justify-content: center;
2735
- -webkit-box-pack: center;
2736
- -ms-flex-pack: center;
2737
- align-items: space-between;
2738
- -webkit-align-items: space-between;
2739
- -moz-align-items: space-between;
2740
- -webkit-box-align: space-between;
2741
- -ms-flex-align: space-between;
2742
- flex-direction: column;
2743
- -moz-flex-direction: column;
2744
- -ms-flex-direction: column;
2745
- -webkit-box-direction: normal;
2746
- -webkit-box-orient: vertical;
2747
- padding: 120px 40px;
2748
- }
2749
-
2750
- .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark .icon {
2751
- display: -webkit-box;
2752
- display: -moz-flex;
2753
- display: -ms-flexbox;
2754
- display: flex;
2755
- justify-content: center;
2756
- -webkit-justify-content: center;
2757
- -moz-justify-content: center;
2758
- -webkit-box-pack: center;
2759
- -ms-flex-pack: center;
2760
- align-items: center;
2761
- -webkit-align-items: center;
2762
- -moz-align-items: center;
2763
- -webkit-box-align: center;
2764
- -ms-flex-align: center;
2765
- position: absolute;
2766
- top: -5px;
2767
- left: 0;
2768
- width: 23px;
2769
- height: 23px;
2770
- padding: 6px;
2771
- background-color: #81d9ff;
2772
- border-radius: 50%;
2773
- }
2774
-
2775
- .wrap-accesibe .agreement {
2776
- margin-top: 10px;
2777
- margin-bottom: 20px;
2778
- }
2779
-
2780
- .wrap-accesibe .popup.popup-account .content .account-stages-wrapper .account-stage-wrapper .account-body .highlight a {
2781
- color: #136ef8;
2782
- }
2783
-
2784
- .wrap-accesibe .highlight {
2785
- background: transparent;
2786
- }
2787
-
2788
- .wrap-accesibe .field-wrap {
2789
- padding: 0 0;
2790
- margin-bottom: 20px;
2791
- }
2792
-
2793
- .wrap-accesibe .agreement {
2794
- display: -webkit-box;
2795
- display: -ms-flexbox;
2796
- display: flex;
2797
- -webkit-box-pack: justify;
2798
- -ms-flex-pack: justify;
2799
- justify-content: space-between;
2800
- -webkit-box-align: center;
2801
- -ms-flex-align: center;
2802
- align-items: center;
2803
- }
2804
-
2805
- .wrap-accesibe .agreement label a,
2806
- .wrap-accesibe .agreement label {
2807
- font-size: 16px;
2808
- font-style: normal;
2809
- font-weight: normal;
2810
- line-height: 10px;
2811
- color: #bfbfbf;
2812
- }
2813
-
2814
- .wrap-accesibe .agreement input[type=checkbox] {
2815
- position: relative;
2816
- top: 3px;
2817
- }
2818
-
2819
- .wrap-accesibe .home-hero-cta .field-wrap {
2820
- display: -webkit-box;
2821
- display: -ms-flexbox;
2822
- display: flex;
2823
- width: calc(100%);
2824
- padding: 0 0;
2825
- margin-bottom: 30px;
2826
- -webkit-box-orient: vertical;
2827
- -webkit-box-direction: normal;
2828
- -ms-flex-direction: column;
2829
- flex-direction: column;
2830
- }
2831
-
2832
- .wrap-accesibe .footer-wrap {
2833
- display: -webkit-box;
2834
- display: -ms-flexbox;
2835
- display: flex;
2836
- -webkit-box-pack: justify;
2837
- -ms-flex-pack: justify;
2838
- justify-content: space-between;
2839
- padding: 0 40px;
2840
- margin: 40px 0;
2841
- text-align: right;
2842
- }
2843
-
2844
- .wrap-accesibe .home-hero .home-hero-logos {
2845
- position: absolute;
2846
- bottom: -75px;
2847
- left: 50%;
2848
- z-index: 2;
2849
- width: 90%;
2850
- max-width: 1024px;
2851
- padding: 30px 50px;
2852
- text-align: center;
2853
- background-color: #fff;
2854
- border-radius: 10px;
2855
- -webkit-box-shadow: 0 0 50px 0 rgba(50, 50, 50, 0.1);
2856
- box-shadow: 0 0 50px 0 rgba(50, 50, 50, 0.1);
2857
- -webkit-transform: translateX(-50%);
2858
- -ms-transform: translateX(-50%);
2859
- transform: translateX(-50%);
2860
- }
2861
-
2862
- .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
2863
- display: block;
2864
- margin-bottom: 20px;
2865
- font-size: 18px;
2866
- line-height: 1;
2867
- }
2868
-
2869
- .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title br {
2870
- display: none !important;
2871
- }
2872
-
2873
- .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title em {
2874
- display: inline-block;
2875
- padding: 5px 12px;
2876
- margin: 0 3px;
2877
- font-style: normal;
2878
- font-weight: 600;
2879
- color: #136ef8;
2880
- background-color: #e3e8fb;
2881
- border-radius: 50px;
2882
- }
2883
-
2884
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item {
2885
- display: -webkit-box;
2886
- display: -ms-flexbox;
2887
- display: flex;
2888
- -webkit-box-pack: center;
2889
- -ms-flex-pack: center;
2890
- justify-content: center;
2891
- -webkit-box-align: center;
2892
- -ms-flex-align: center;
2893
- align-items: center;
2894
- height: 50px;
2895
- }
2896
-
2897
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img {
2898
- display: block;
2899
- max-width: 110px !important;
2900
- max-height: 35px !important;
2901
- margin: auto;
2902
- -webkit-transition: all .15s ease;
2903
- -o-transition: all .15s ease;
2904
- transition: all .15s ease;
2905
- }
2906
-
2907
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img:hover {
2908
- -webkit-transform: scale(1.15);
2909
- -ms-transform: scale(1.15);
2910
- transform: scale(1.15);
2911
- }
2912
-
2913
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img:active {
2914
- -webkit-transform: scale(1);
2915
- -ms-transform: scale(1);
2916
- transform: scale(1);
2917
- }
2918
-
2919
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item .logo-higher img {
2920
- max-height: 45px !important;
2921
- }
2922
-
2923
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item .logo-shorter img {
2924
- max-height: 25px !important;
2925
- }
2926
-
2927
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item .logo-wider img {
2928
- max-width: 125px !important;
2929
- }
2930
-
2931
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev {
2932
- left: -25px;
2933
- }
2934
-
2935
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next {
2936
- right: -25px;
2937
- }
2938
-
2939
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev,
2940
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next {
2941
- top: -10px;
2942
- width: 20px;
2943
- height: 20px;
2944
- background: transparent;
2945
- -webkit-box-shadow: 0 0 0 transparent;
2946
- box-shadow: 0 0 0 transparent;
2947
- }
2948
-
2949
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev .icon,
2950
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next .icon {
2951
- width: 17px;
2952
- }
2953
-
2954
- @media screen and (max-width: 1700px) {
2955
- .wrap-accesibe .home-hero .home-hero-image .hero-cover-image {
2956
- width: auto !important;
2957
- }
2958
-
2959
- .wrap-accesibe .home-hero .home-hero-content .home-hero-minititle {
2960
- font-size: 16px;
2961
- }
2962
-
2963
- .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
2964
- font-size: 16px;
2965
- }
2966
-
2967
- .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
2968
- font-size: 16px;
2969
- }
2970
-
2971
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img {
2972
- max-width: 100px !important;
2973
- max-height: 30px !important;
2974
- }
2975
-
2976
- .wrap-accesibe .home-hero .home-hero-logos {
2977
- max-width: 960px;
2978
- padding-top: 20px;
2979
- padding-bottom: 20px;
2980
- }
2981
- }
2982
-
2983
- @media screen and (max-width: 1300px) {
2984
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
2985
- font-size: 28px;
2986
- }
2987
-
2988
- .wrap-accesibe .main-form-wrap {
2989
- flex-direction: column;
2990
- -moz-flex-direction: column;
2991
- -ms-flex-direction: column;
2992
- -webkit-box-direction: normal;
2993
- -webkit-box-orient: vertical;
2994
- }
2995
-
2996
- .wrap-accesibe .hero-right,
2997
- .wrap-accesibe .hero-left {
2998
- width: 100%;
2999
- }
3000
-
3001
- .wrap-accesibe .hero-right-inner,
3002
- .wrap-accesibe .hero-left {
3003
- padding: 40px 40px;
3004
- }
3005
-
3006
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
3007
- margin-bottom: 20px;
3008
- }
3009
-
3010
- .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
3011
- margin: 28px 0;
3012
- }
3013
-
3014
- .wrap-accesibe .hero-right-inner {
3015
- margin-left: 0;
3016
- }
3017
- }
3018
-
3019
- @media screen and (max-width: 1024px) {
3020
- .wrap-accesibe .home-hero .home-hero-image .hero-tooltip {
3021
- display: none !important;
3022
- }
3023
-
3024
- .wrap-accesibe .home-hero .home-hero-image .hero-cover-image {
3025
- max-width: 100% !important;
3026
- height: auto;
3027
- max-height: 100%;
3028
- }
3029
-
3030
- .wrap-accesibe .home-hero .home-hero-image {
3031
- position: relative;
3032
- top: auto;
3033
- right: auto;
3034
- bottom: auto;
3035
- left: auto;
3036
- display: none;
3037
- float: right;
3038
- width: 100%;
3039
- height: auto;
3040
- padding-left: 50px;
3041
- margin: 0;
3042
- }
3043
-
3044
- .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
3045
- max-width: 450px;
3046
- margin-right: auto;
3047
- margin-left: auto;
3048
- }
3049
-
3050
- .wrap-accesibe .home-hero .home-hero-logos {
3051
- position: relative;
3052
- top: auto;
3053
- right: auto;
3054
- bottom: -50px;
3055
- left: auto;
3056
- z-index: 3;
3057
- max-width: 750px;
3058
- margin: auto;
3059
- -webkit-transform: translateY(0);
3060
- -ms-transform: translateY(0);
3061
- transform: translateY(0);
3062
- }
3063
-
3064
- .wrap-accesibe .home-hero {
3065
- height: auto;
3066
- background-attachment: scroll;
3067
- }
3068
- }
3069
-
3070
- @media screen and (max-width: 700px) {
3071
- .wrap-accesibe .home-hero .home-hero-image {
3072
- display: block;
3073
- height: 350px;
3074
- }
3075
-
3076
- .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
3077
- text-align: left;
3078
- }
3079
-
3080
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev {
3081
- left: 10px;
3082
- }
3083
-
3084
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next {
3085
- right: 10px;
3086
- }
3087
-
3088
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav {
3089
- display: none;
3090
- }
3091
-
3092
- .wrap-accesibe .home-hero .home-hero-logos {
3093
- padding: 20px;
3094
- }
3095
- }
3096
-
3097
- @media screen and (max-width: 500px) {
3098
- .wrap-accesibe .home-hero .home-hero-image .play-button-wrap .play-button {
3099
- top: -25px;
3100
- right: -25px;
3101
- }
3102
-
3103
- .wrap-accesibe .home-hero .home-hero-image {
3104
- height: auto;
3105
- }
3106
-
3107
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title br {
3108
- display: none;
3109
- }
3110
-
3111
- .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
3112
- font-size: 27px;
3113
- }
3114
-
3115
- .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
3116
- font-size: 16px;
3117
- }
3118
-
3119
- .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
3120
- margin-bottom: 30px;
3121
- font-size: 16px;
3122
- }
3123
-
3124
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item:nth-child(-n + 10) {
3125
- display: block;
3126
- }
3127
-
3128
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item {
3129
- display: none;
3130
- width: 50% !important;
3131
- }
3132
-
3133
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage {
3134
- display: -webkit-box;
3135
- display: -ms-flexbox;
3136
- display: flex;
3137
- -webkit-box-pack: justify;
3138
- -ms-flex-pack: justify;
3139
- justify-content: space-between;
3140
- -webkit-box-align: start;
3141
- -ms-flex-align: start;
3142
- align-items: flex-start;
3143
- width: 100% !important;
3144
- -webkit-transform: none !important;
3145
- -ms-transform: none !important;
3146
- transform: none !important;
3147
- -ms-flex-wrap: wrap;
3148
- flex-wrap: wrap;
3149
- }
3150
-
3151
- .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav {
3152
- display: none !important;
3153
- }
3154
-
3155
- .wrap-accesibe .home-hero .home-hero-logos {
3156
- bottom: -35px;
3157
- }
3158
  }
1
  .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
2
 
3
+ .settings_page_wpc7_redirect .padbox form > div {
4
+ display: none !important;
5
+ }
6
+
7
+ .settings_page_wpc7_redirect .padbox form > div#setting-error-not-valid-serial {
8
+ display: block !important;
9
+ }
10
+
11
+ #debug-info {
12
+ margin-bottom: 10px;
13
+ }
14
+
15
+ .extensions-list-wrap {
16
+ background: #fff;
17
+ }
18
+
19
+ .extensions-list-wrap .padbox {
20
+ padding: 2rem;
21
+ }
22
+
23
+ .wpcf7r_loader {
24
+ -webkit-transition: all 250ms ease;
25
+ -o-transition: all 250ms ease;
26
+ transition: all 250ms ease;
27
+ position: absolute;
28
+ top: 0;
29
+ right: 0;
30
+ width: 100%;
31
+ height: 100%;
32
+ visibility: hidden;
33
+ background: url("../../build/images/loader.gif") 50% 50% rgba(255, 255, 255, 0.8) no-repeat;
34
+ background-size: 50px;
35
+ opacity: 0;
36
+ }
37
+
38
+ .wpcf7r_loader.active {
39
+ visibility: visible;
40
+ opacity: 1;
41
+ }
42
+
43
+ .new-action-selector {
44
+ display: block;
45
+ float: left;
46
+ margin-right: 10px;
47
+ }
48
+
49
+ .mail-tags-wrapper {
50
+ margin-top: 5px;
51
+ }
52
+
53
+ .settings_page_wpc7_redirect .padbox {
54
+ padding: 20px;
55
+ }
56
+
57
+ div#wpcf7r_leads .field-wrap {
58
+ display: -webkit-box;
59
+ display: -moz-flex;
60
+ display: -ms-flexbox;
61
+ display: flex;
62
+ margin-bottom: 10px;
63
+ }
64
+
65
+ div#wpcf7r_leads .field-wrap label {
66
+ display: -webkit-box;
67
+ display: -moz-flex;
68
+ display: -ms-flexbox;
69
+ display: flex;
70
+ align-items: center;
71
+ -webkit-align-items: center;
72
+ -moz-align-items: center;
73
+ -webkit-box-align: center;
74
+ -ms-flex-align: center;
75
+ width: 40%;
76
+ }
77
+
78
+ .wpcfr-popup-wrap {
79
+ position: fixed;
80
+ top: 0;
81
+ right: 0;
82
+ width: 100%;
83
+ height: 100%;
84
+ z-index: 999999;
85
+ display: -webkit-box;
86
+ display: -moz-flex;
87
+ display: -ms-flexbox;
88
+ display: flex;
89
+ /* width */
90
+ /* Track */
91
+ /* Handle */
92
+ }
93
+
94
+ .wpcfr-popup-wrap.top-right {
95
+ justify-content: flex-end;
96
+ -webkit-justify-content: flex-end;
97
+ -moz-justify-content: flex-end;
98
+ -webkit-box-pack: end;
99
+ -ms-flex-pack: end;
100
+ }
101
+
102
+ .wpcfr-popup-wrap.top-center {
103
+ justify-content: center;
104
+ -webkit-justify-content: center;
105
+ -moz-justify-content: center;
106
+ -webkit-box-pack: center;
107
+ -ms-flex-pack: center;
108
+ }
109
+
110
+ .wpcfr-popup-wrap.top-left {
111
+ justify-content: flex-start;
112
+ -webkit-justify-content: flex-start;
113
+ -moz-justify-content: flex-start;
114
+ -webkit-box-pack: start;
115
+ -ms-flex-pack: start;
116
+ }
117
+
118
+ .wpcfr-popup-wrap.middle-right {
119
+ justify-content: flex-end;
120
+ -webkit-justify-content: flex-end;
121
+ -moz-justify-content: flex-end;
122
+ -webkit-box-pack: end;
123
+ -ms-flex-pack: end;
124
+ align-items: center;
125
+ -webkit-align-items: center;
126
+ -moz-align-items: center;
127
+ -webkit-box-align: center;
128
+ -ms-flex-align: center;
129
+ }
130
+
131
+ .wpcfr-popup-wrap.middle-center {
132
+ justify-content: center;
133
+ -webkit-justify-content: center;
134
+ -moz-justify-content: center;
135
+ -webkit-box-pack: center;
136
+ -ms-flex-pack: center;
137
+ align-items: center;
138
+ -webkit-align-items: center;
139
+ -moz-align-items: center;
140
+ -webkit-box-align: center;
141
+ -ms-flex-align: center;
142
+ }
143
+
144
+ .wpcfr-popup-wrap.middle-left {
145
+ justify-content: flex-start;
146
+ -webkit-justify-content: flex-start;
147
+ -moz-justify-content: flex-start;
148
+ -webkit-box-pack: start;
149
+ -ms-flex-pack: start;
150
+ align-items: center;
151
+ -webkit-align-items: center;
152
+ -moz-align-items: center;
153
+ -webkit-box-align: center;
154
+ -ms-flex-align: center;
155
+ }
156
+
157
+ .wpcfr-popup-wrap.bottom-right {
158
+ justify-content: flex-end;
159
+ -webkit-justify-content: flex-end;
160
+ -moz-justify-content: flex-end;
161
+ -webkit-box-pack: end;
162
+ -ms-flex-pack: end;
163
+ align-items: flex-end;
164
+ -webkit-align-items: flex-end;
165
+ -moz-align-items: flex-end;
166
+ -webkit-box-align: end;
167
+ -ms-flex-align: end;
168
+ }
169
+
170
+ .wpcfr-popup-wrap.bottom-center {
171
+ justify-content: flex-start;
172
+ -webkit-justify-content: flex-start;
173
+ -moz-justify-content: flex-start;
174
+ -webkit-box-pack: start;
175
+ -ms-flex-pack: start;
176
+ align-items: flex-end;
177
+ -webkit-align-items: flex-end;
178
+ -moz-align-items: flex-end;
179
+ -webkit-box-align: end;
180
+ -ms-flex-align: end;
181
+ }
182
+
183
+ .wpcfr-popup-wrap.bottom-left {
184
+ justify-content: flex-start;
185
+ -webkit-justify-content: flex-start;
186
+ -moz-justify-content: flex-start;
187
+ -webkit-box-pack: start;
188
+ -ms-flex-pack: start;
189
+ align-items: flex-end;
190
+ -webkit-align-items: flex-end;
191
+ -moz-align-items: flex-end;
192
+ -webkit-box-align: end;
193
+ -ms-flex-align: end;
194
+ }
195
+
196
+ .wpcfr-popup-wrap .wpcfr-popup-wrap-inner {
197
+ width: 500px;
198
+ height: 300px;
199
+ background: #fff;
200
+ position: relative;
201
+ }
202
+
203
+ .wpcfr-popup-wrap .wpcfr-close-popup {
204
+ position: absolute;
205
+ cursor: pointer;
206
+ }
207
+
208
+ .wpcfr-popup-wrap .wpcfr-close-popup.bottom-right {
209
+ -webkit-transform: translateX(-50%) translateY(50%);
210
+ -ms-transform: translateX(-50%) translateY(50%);
211
+ transform: translateX(-50%) translateY(50%);
212
+ right: 0;
213
+ bottom: 0;
214
+ }
215
+
216
+ .wpcfr-popup-wrap .wpcfr-close-popup.bottom-center {
217
+ -webkit-transform: translateX(-50%) translateY(50%);
218
+ -ms-transform: translateX(-50%) translateY(50%);
219
+ transform: translateX(-50%) translateY(50%);
220
+ bottom: 0;
221
+ left: 50%;
222
+ }
223
+
224
+ .wpcfr-popup-wrap .wpcfr-close-popup.bottom-left {
225
+ -webkit-transform: translateX(-50%) translateY(50%);
226
+ -ms-transform: translateX(-50%) translateY(50%);
227
+ transform: translateX(-50%) translateY(50%);
228
+ bottom: 0;
229
+ left: 0;
230
+ }
231
+
232
+ .wpcfr-popup-wrap .wpcfr-close-popup.top-right {
233
+ -webkit-transform: translateX(50%) translateY(-50%);
234
+ -ms-transform: translateX(50%) translateY(-50%);
235
+ transform: translateX(50%) translateY(-50%);
236
+ right: 0;
237
+ top: 0;
238
+ }
239
+
240
+ .wpcfr-popup-wrap .wpcfr-close-popup.top-center {
241
+ -webkit-transform: translateX(-50%) translateY(-50%);
242
+ -ms-transform: translateX(-50%) translateY(-50%);
243
+ transform: translateX(-50%) translateY(-50%);
244
+ top: 0;
245
+ left: 50%;
246
+ }
247
+
248
+ .wpcfr-popup-wrap .wpcfr-close-popup.top-left {
249
+ -webkit-transform: translateX(-50%) translateY(-50%);
250
+ -ms-transform: translateX(-50%) translateY(-50%);
251
+ transform: translateX(-50%) translateY(-50%);
252
+ top: 0;
253
+ }
254
+
255
+ .wpcfr-popup-wrap.wpcfr-popup-wrap-default {
256
+ background: rgba(0, 0, 0, 0.4);
257
+ }
258
+
259
+ .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-inner {
260
+ max-width: 95%;
261
+ max-height: 100vh;
262
+ width: 500px;
263
+ min-height: 300px;
264
+ background: #fff;
265
+ -webkit-box-shadow: 0px 0px 20px #4b4b4b;
266
+ box-shadow: 0px 0px 20px #4b4b4b;
267
+ border-radius: 2px;
268
+ }
269
+
270
+ .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content {
271
+ display: -webkit-box;
272
+ display: -moz-flex;
273
+ display: -ms-flexbox;
274
+ display: flex;
275
+ overflow: hidden;
276
+ min-height: 100%;
277
+ }
278
+
279
+ .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content .wpcfr-2-rows {
280
+ display: -webkit-box;
281
+ display: -moz-flex;
282
+ display: -ms-flexbox;
283
+ display: flex;
284
+ flex-direction: column;
285
+ -moz-flex-direction: column;
286
+ -ms-flex-direction: column;
287
+ -webkit-box-direction: normal;
288
+ -webkit-box-orient: vertical;
289
+ width: 100%;
290
+ }
291
+
292
+ .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content .wpcfr-2-rows .wpcfr-row {
293
+ height: 40%;
294
+ padding: 2%;
295
+ }
296
+
297
+ .wpcfr-popup-wrap.wpcfr-popup-wrap-default .wpcfr-popup-wrap-content .wpcfr-2-rows .wpcfr-row:nth-child(2) {
298
+ height: 60%;
299
+ background: #e9e9e9;
300
+ }
301
+
302
+ .wpcfr-popup-wrap ::-webkit-scrollbar {
303
+ width: 10px;
304
+ }
305
+
306
+ .wpcfr-popup-wrap ::-webkit-scrollbar-track {
307
+ border-radius: 0;
308
+ }
309
+
310
+ .wpcfr-popup-wrap ::-webkit-scrollbar-thumb {
311
+ background: #ccc;
312
+ border-radius: 0;
313
+ }
314
+
315
+ .wpcfr-popup-wrap .wpcfr-popup-wrap-inner {
316
+ width: 100%;
317
+ max-width: 800px;
318
+ height: 60%;
319
+ padding: 20px;
320
+ border: 1px solid #d1d1d1;
321
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
322
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
323
+ }
324
+
325
+ .wpcfr-popup-wrap .wpcfr-popup-wrap-inner .wpcfr-popup-wrap-content {
326
+ height: 100%;
327
+ overflow-x: hidden;
328
+ overflow-y: auto;
329
+ }
330
+
331
+ .wpcfr-popup-wrap .wpcfr-popup-wrap-inner .wpcfr-popup-wrap-content textarea {
332
+ width: 96%;
333
+ direction: ltr;
334
+ }
335
+
336
+ #leads-panel .dashicons-minus {
337
+ margin-top: 5px;
338
+ }
339
+
340
+ .wpcf7r-update-extensions {
341
+ display: inline-block;
342
+ min-width: 18px;
343
+ height: 18px;
344
+ -webkit-box-sizing: border-box;
345
+ box-sizing: border-box;
346
+ padding: 0 5px;
347
+ margin: 1px 0 -1px 2px;
348
+ font-size: 11px;
349
+ line-height: 1.6;
350
+ color: #fff;
351
+ text-align: center;
352
+ vertical-align: top;
353
+ background-color: #ca4a1f;
354
+ border-radius: 9px;
355
+ }
356
+
357
+ .wrap-wpcf7redirect section.padbox .padbox {
358
+ padding: 20px;
359
+ }
360
+
361
+ .wrap-wpcf7redirect .padbox {
362
+ padding: 8px 12px;
363
+ }
364
+
365
+ .wrap-wpcf7redirect .user-message {
366
+ padding: 20px;
367
+ font-size: 14px;
368
+ color: #000;
369
+ background: #fff;
370
+ border: 1px solid #ccd0d4;
371
+ border-bottom: 0;
372
+ }
373
+
374
+ .wrap-wpcf7redirect .user-message ul {
375
+ margin: 0 10px;
376
+ }
377
+
378
+ .wrap-wpcf7redirect .user-message ul li {
379
+ position: relative;
380
+ }
381
+
382
+ .wrap-wpcf7redirect .user-message ul li:before {
383
+ position: absolute;
384
+ top: 50%;
385
+ left: -10px;
386
+ display: block;
387
+ width: 5px;
388
+ height: 5px;
389
+ content: '';
390
+ background: #65b1fc;
391
+ -webkit-transform: translateY(-50%);
392
+ -ms-transform: translateY(-50%);
393
+ transform: translateY(-50%);
394
+ }
395
+
396
+ .wrap-wpcf7redirect h2 {
397
+ padding: 8px 12px;
398
+ margin: 0 -12px 20px;
399
+ font-size: 14px;
400
+ line-height: 1.4;
401
+ border-bottom: 1px solid #eee;
402
+ }
403
+
404
+ #steps-panel .success-message,
405
+ #extensions-panel .success-message,
406
+ #leads-panel .success-message,
407
+ #redirect-panel .success-message {
408
+ padding: 10px;
409
+ margin-bottom: 20px;
410
+ font-size: 20px;
411
+ color: #fff;
412
+ background: #136ef8;
413
+ }
414
+
415
+ #steps-panel .select2-container .select2-selection--single,
416
+ #extensions-panel .select2-container .select2-selection--single,
417
+ #leads-panel .select2-container .select2-selection--single,
418
+ #redirect-panel .select2-container .select2-selection--single {
419
+ display: block;
420
+ height: 38px;
421
+ -webkit-box-sizing: border-box;
422
+ box-sizing: border-box;
423
+ cursor: pointer;
424
+ -webkit-user-select: none;
425
+ -moz-user-select: none;
426
+ -ms-user-select: none;
427
+ user-select: none;
428
+ }
429
+
430
+ #steps-panel .select2-container--default .select2-selection--single,
431
+ #extensions-panel .select2-container--default .select2-selection--single,
432
+ #leads-panel .select2-container--default .select2-selection--single,
433
+ #redirect-panel .select2-container--default .select2-selection--single {
434
+ border-radius: 0;
435
+ }
436
+
437
+ #steps-panel .field-wrap,
438
+ #extensions-panel .field-wrap,
439
+ #leads-panel .field-wrap,
440
+ #redirect-panel .field-wrap {
441
+ position: relative;
442
+ }
443
+
444
+ #steps-panel label.error,
445
+ #extensions-panel label.error,
446
+ #leads-panel label.error,
447
+ #redirect-panel label.error {
448
+ position: absolute;
449
+ top: 100%;
450
+ z-index: 99;
451
+ display: block;
452
+ width: 100%;
453
+ font-size: 12px;
454
+ color: red;
455
+ text-align: center;
456
+ }
457
+
458
+ #steps-panel .dashicons-minus,
459
+ #extensions-panel .dashicons-minus,
460
+ #leads-panel .dashicons-minus,
461
+ #redirect-panel .dashicons-minus {
462
+ cursor: pointer;
463
+ }
464
+
465
+ #steps-panel [data-toggle],
466
+ #extensions-panel [data-toggle],
467
+ #leads-panel [data-toggle],
468
+ #redirect-panel [data-toggle] {
469
+ -webkit-transition: all 300ms ease;
470
+ -o-transition: all 300ms ease;
471
+ transition: all 300ms ease;
472
+ cursor: pointer;
473
+ }
474
+
475
+ #steps-panel [data-toggle]:after,
476
+ #extensions-panel [data-toggle]:after,
477
+ #leads-panel [data-toggle]:after,
478
+ #redirect-panel [data-toggle]:after {
479
+ opacity: .8;
480
+ }
481
+
482
+ #steps-panel .mail-tags-title,
483
+ #extensions-panel .mail-tags-title,
484
+ #leads-panel .mail-tags-title,
485
+ #redirect-panel .mail-tags-title {
486
+ text-align: right;
487
+ }
488
+
489
+ #steps-panel .wp-list-table-inner tr,
490
+ #extensions-panel .wp-list-table-inner tr,
491
+ #leads-panel .wp-list-table-inner tr,
492
+ #redirect-panel .wp-list-table-inner tr {
493
+ position: relative;
494
+ }
495
+
496
+ #steps-panel span.err,
497
+ #extensions-panel span.err,
498
+ #leads-panel span.err,
499
+ #redirect-panel span.err {
500
+ position: relative;
501
+ display: block;
502
+ font-size: 12px;
503
+ color: red;
504
+ }
505
+
506
+ #steps-panel .section-inner-wrap,
507
+ #extensions-panel .section-inner-wrap,
508
+ #leads-panel .section-inner-wrap,
509
+ #redirect-panel .section-inner-wrap {
510
+ display: none;
511
+ }
512
+
513
+ #steps-panel select,
514
+ #extensions-panel select,
515
+ #leads-panel select,
516
+ #redirect-panel select {
517
+ max-width: 100%;
518
+ }
519
+
520
+ #steps-panel .hide_api_key .tags-map-api-key,
521
+ #extensions-panel .hide_api_key .tags-map-api-key,
522
+ #leads-panel .hide_api_key .tags-map-api-key,
523
+ #redirect-panel .hide_api_key .tags-map-api-key {
524
+ display: none;
525
+ }
526
+
527
+ #steps-panel .qs-tooltip,
528
+ #extensions-panel .qs-tooltip,
529
+ #leads-panel .qs-tooltip,
530
+ #redirect-panel .qs-tooltip {
531
+ position: absolute;
532
+ }
533
+
534
+ #steps-panel .qs-tooltip .qs-tooltip-inner,
535
+ #extensions-panel .qs-tooltip .qs-tooltip-inner,
536
+ #leads-panel .qs-tooltip .qs-tooltip-inner,
537
+ #redirect-panel .qs-tooltip .qs-tooltip-inner {
538
+ -webkit-transition: all 500ms ease;
539
+ -o-transition: all 500ms ease;
540
+ transition: all 500ms ease;
541
+ position: absolute;
542
+ bottom: 100%;
543
+ left: 50%;
544
+ z-index: -1;
545
+ min-width: 200px;
546
+ padding: 20px;
547
+ font-size: 14px;
548
+ background: #fff;
549
+ border: 1px solid;
550
+ border-radius: 5px;
551
+ opacity: 0;
552
+ -webkit-transform: translateX(-50%);
553
+ -ms-transform: translateX(-50%);
554
+ transform: translateX(-50%);
555
+ }
556
+
557
+ #steps-panel .qs-tooltip:hover .qs-tooltip-inner,
558
+ #extensions-panel .qs-tooltip:hover .qs-tooltip-inner,
559
+ #leads-panel .qs-tooltip:hover .qs-tooltip-inner,
560
+ #redirect-panel .qs-tooltip:hover .qs-tooltip-inner {
561
+ z-index: 9999;
562
+ opacity: 1;
563
+ }
564
+
565
+ #steps-panel .wpcf7-redirect-butify-wrap,
566
+ #extensions-panel .wpcf7-redirect-butify-wrap,
567
+ #leads-panel .wpcf7-redirect-butify-wrap,
568
+ #redirect-panel .wpcf7-redirect-butify-wrap {
569
+ float: right;
570
+ }
571
+
572
+ #steps-panel .action-container .repeater-table .field-wrap,
573
+ #extensions-panel .action-container .repeater-table .field-wrap,
574
+ #leads-panel .action-container .repeater-table .field-wrap,
575
+ #redirect-panel .action-container .repeater-table .field-wrap {
576
+ margin-bottom: 0;
577
+ }
578
+
579
+ #steps-panel .action-container .repeater-table td,
580
+ #extensions-panel .action-container .repeater-table td,
581
+ #leads-panel .action-container .repeater-table td,
582
+ #redirect-panel .action-container .repeater-table td {
583
+ padding: 5px 0;
584
+ }
585
+
586
+ #steps-panel .action-container .qs-repeater-action,
587
+ #extensions-panel .action-container .qs-repeater-action,
588
+ #leads-panel .action-container .qs-repeater-action,
589
+ #redirect-panel .action-container .qs-repeater-action {
590
+ padding: 6px 0 0 0;
591
+ margin-top: 0 !important;
592
+ }
593
+
594
+ #steps-panel .action-container .qs-repeater-action span,
595
+ #extensions-panel .action-container .qs-repeater-action span,
596
+ #leads-panel .action-container .qs-repeater-action span,
597
+ #redirect-panel .action-container .qs-repeater-action span {
598
+ -webkit-transition: all 300ms ease;
599
+ -o-transition: all 300ms ease;
600
+ transition: all 300ms ease;
601
+ cursor: pointer;
602
+ }
603
+
604
+ #steps-panel .action-container .qs-repeater-action span:hover,
605
+ #extensions-panel .action-container .qs-repeater-action span:hover,
606
+ #leads-panel .action-container .qs-repeater-action span:hover,
607
+ #redirect-panel .action-container .qs-repeater-action span:hover {
608
+ opacity: .8;
609
+ }
610
+
611
+ #steps-panel .qs-repeater-row .dashicons-plus,
612
+ #extensions-panel .qs-repeater-row .dashicons-plus,
613
+ #leads-panel .qs-repeater-row .dashicons-plus,
614
+ #redirect-panel .qs-repeater-row .dashicons-plus {
615
+ display: none;
616
+ }
617
+
618
+ #steps-panel .qs-repeater-row:last-child .dashicons-plus,
619
+ #extensions-panel .qs-repeater-row:last-child .dashicons-plus,
620
+ #leads-panel .qs-repeater-row:last-child .dashicons-plus,
621
+ #redirect-panel .qs-repeater-row:last-child .dashicons-plus {
622
+ display: inline-block;
623
+ }
624
+
625
+ #steps-panel .qs-repeater-row:first-child .dashicons-minus,
626
+ #extensions-panel .qs-repeater-row:first-child .dashicons-minus,
627
+ #leads-panel .qs-repeater-row:first-child .dashicons-minus,
628
+ #redirect-panel .qs-repeater-row:first-child .dashicons-minus {
629
+ display: none;
630
+ }
631
+
632
+ #steps-panel .qs-repeater-row .qs-repeater-action,
633
+ #extensions-panel .qs-repeater-row .qs-repeater-action,
634
+ #leads-panel .qs-repeater-row .qs-repeater-action,
635
+ #redirect-panel .qs-repeater-row .qs-repeater-action {
636
+ margin-top: 8px;
637
+ }
638
+
639
+ #steps-panel .qs-repeater-row .qs-repeater-action .dashicons,
640
+ #extensions-panel .qs-repeater-row .qs-repeater-action .dashicons,
641
+ #leads-panel .qs-repeater-row .qs-repeater-action .dashicons,
642
+ #redirect-panel .qs-repeater-row .qs-repeater-action .dashicons {
643
+ cursor: pointer;
644
+ }
645
+
646
+ #steps-panel .field-wrap,
647
+ #extensions-panel .field-wrap,
648
+ #leads-panel .field-wrap,
649
+ #redirect-panel .field-wrap {
650
+ padding: 0 10px;
651
+ clear: both;
652
+ }
653
+
654
+ #steps-panel .field-wrap .field-wrap,
655
+ #extensions-panel .field-wrap .field-wrap,
656
+ #leads-panel .field-wrap .field-wrap,
657
+ #redirect-panel .field-wrap .field-wrap {
658
+ clear: none;
659
+ }
660
+
661
+ #steps-panel .qs-section,
662
+ #extensions-panel .qs-section,
663
+ #leads-panel .qs-section,
664
+ #redirect-panel .qs-section {
665
+ padding: 10px;
666
+ margin: 10px;
667
+ background: #f9f9f9;
668
+ border: 1px solid #555;
669
+ }
670
+
671
+ #steps-panel .qs-section > label,
672
+ #extensions-panel .qs-section > label,
673
+ #leads-panel .qs-section > label,
674
+ #redirect-panel .qs-section > label {
675
+ margin-bottom: 0 !important;
676
+ }
677
+
678
+ #steps-panel .clearfix:after,
679
+ #extensions-panel .clearfix:after,
680
+ #leads-panel .clearfix:after,
681
+ #redirect-panel .clearfix:after {
682
+ display: block;
683
+ clear: both;
684
+ content: '';
685
+ }
686
+
687
+ #steps-panel .migrate-from-redirection,
688
+ #steps-panel .migrate-from-send-to-api,
689
+ #extensions-panel .migrate-from-redirection,
690
+ #extensions-panel .migrate-from-send-to-api,
691
+ #leads-panel .migrate-from-redirection,
692
+ #leads-panel .migrate-from-send-to-api,
693
+ #redirect-panel .migrate-from-redirection,
694
+ #redirect-panel .migrate-from-send-to-api {
695
+ float: right;
696
+ }
697
+
698
+ #steps-panel .error-messageselect,
699
+ #extensions-panel .error-messageselect,
700
+ #leads-panel .error-messageselect,
701
+ #redirect-panel .error-messageselect {
702
+ border: 1px solid red;
703
+ }
704
+
705
+ #steps-panel .error-label,
706
+ #extensions-panel .error-label,
707
+ #leads-panel .error-label,
708
+ #redirect-panel .error-label {
709
+ font-size: 14px;
710
+ color: red;
711
+ }
712
+
713
+ #steps-panel .add-new-action-wrap .error-label,
714
+ #extensions-panel .add-new-action-wrap .error-label,
715
+ #leads-panel .add-new-action-wrap .error-label,
716
+ #redirect-panel .add-new-action-wrap .error-label {
717
+ position: absolute;
718
+ top: 100%;
719
+ left: 0;
720
+ }
721
+
722
+ #steps-panel .actions-list tbody tr.action-container > td,
723
+ #extensions-panel .actions-list tbody tr.action-container > td,
724
+ #leads-panel .actions-list tbody tr.action-container > td,
725
+ #redirect-panel .actions-list tbody tr.action-container > td {
726
+ border-bottom: 0 !important;
727
+ }
728
+
729
+ #steps-panel .wpcf7r-checkbox input,
730
+ #extensions-panel .wpcf7r-checkbox input,
731
+ #leads-panel .wpcf7r-checkbox input,
732
+ #redirect-panel .wpcf7r-checkbox input {
733
+ position: absolute;
734
+ visibility: hidden;
735
+ opacity: 0;
736
+ }
737
+
738
+ #steps-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button,
739
+ #extensions-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button,
740
+ #leads-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button,
741
+ #redirect-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button {
742
+ border: 2px solid #1f8cbe;
743
+ }
744
+
745
+ #steps-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button,
746
+ #extensions-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button,
747
+ #leads-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button,
748
+ #redirect-panel .wpcf7r-checkbox input:checked + .wpcf7r-on-off-button .wpcf7r-toggle-button {
749
+ right: 1px;
750
+ background: #1f8cbe;
751
+ }
752
+
753
+ #steps-panel .wpcf7r-checkbox strong.checkbox-label,
754
+ #extensions-panel .wpcf7r-checkbox strong.checkbox-label,
755
+ #leads-panel .wpcf7r-checkbox strong.checkbox-label,
756
+ #redirect-panel .wpcf7r-checkbox strong.checkbox-label {
757
+ font-weight: normal;
758
+ }
759
+
760
+ #steps-panel .wpcf7r-checkbox .wpcf7r-on-off-button,
761
+ #extensions-panel .wpcf7r-checkbox .wpcf7r-on-off-button,
762
+ #leads-panel .wpcf7r-checkbox .wpcf7r-on-off-button,
763
+ #redirect-panel .wpcf7r-checkbox .wpcf7r-on-off-button {
764
+ position: relative;
765
+ top: 3px;
766
+ display: inline-block;
767
+ width: 14px;
768
+ padding: 6px;
769
+ margin-right: 5px;
770
+ border: 2px solid #4f4f4f;
771
+ border-radius: 50px;
772
+ }
773
+
774
+ #steps-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button,
775
+ #extensions-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button,
776
+ #leads-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button,
777
+ #redirect-panel .wpcf7r-checkbox .wpcf7r-on-off-button .wpcf7r-toggle-button {
778
+ -webkit-transition: all 250ms ease;
779
+ -o-transition: all 250ms ease;
780
+ transition: all 250ms ease;
781
+ position: absolute;
782
+ top: 1px;
783
+ right: calc(100% - 12px);
784
+ display: inline-block;
785
+ width: 10px;
786
+ height: 10px;
787
+ cursor: pointer;
788
+ background: #4f4f4f;
789
+ border-radius: 50%;
790
+ }
791
+
792
+ #steps-panel .conditional-logic-blocks,
793
+ #extensions-panel .conditional-logic-blocks,
794
+ #leads-panel .conditional-logic-blocks,
795
+ #redirect-panel .conditional-logic-blocks {
796
+ display: none;
797
+ }
798
+
799
+ #steps-panel .conditional-logic-blocks.active,
800
+ #extensions-panel .conditional-logic-blocks.active,
801
+ #leads-panel .conditional-logic-blocks.active,
802
+ #redirect-panel .conditional-logic-blocks.active {
803
+ display: block;
804
+ }
805
+
806
+ #steps-panel .check-column,
807
+ #extensions-panel .check-column,
808
+ #leads-panel .check-column,
809
+ #redirect-panel .check-column {
810
+ padding: 10px;
811
+ }
812
+
813
+ #steps-panel .check-column .handle,
814
+ #extensions-panel .check-column .handle,
815
+ #leads-panel .check-column .handle,
816
+ #redirect-panel .check-column .handle {
817
+ cursor: pointer;
818
+ }
819
+
820
+ #steps-panel .action-container .wp-list-table-inner td,
821
+ #steps-panel .action-container .wp-list-table-inner th,
822
+ #extensions-panel .action-container .wp-list-table-inner td,
823
+ #extensions-panel .action-container .wp-list-table-inner th,
824
+ #leads-panel .action-container .wp-list-table-inner td,
825
+ #leads-panel .action-container .wp-list-table-inner th,
826
+ #redirect-panel .action-container .wp-list-table-inner td,
827
+ #redirect-panel .action-container .wp-list-table-inner th {
828
+ padding: 5px 10px;
829
+ }
830
+
831
+ #steps-panel .action-container td,
832
+ #extensions-panel .action-container td,
833
+ #leads-panel .action-container td,
834
+ #redirect-panel .action-container td {
835
+ padding: 0;
836
+ }
837
+
838
+ #steps-panel .wp-list-table tr td,
839
+ #extensions-panel .wp-list-table tr td,
840
+ #leads-panel .wp-list-table tr td,
841
+ #redirect-panel .wp-list-table tr td {
842
+ position: relative;
843
+ }
844
+
845
+ #steps-panel .hidden-action,
846
+ #extensions-panel .hidden-action,
847
+ #leads-panel .hidden-action,
848
+ #redirect-panel .hidden-action {
849
+ display: none;
850
+ padding: 10px;
851
+ }
852
+
853
+ #steps-panel .actions-list,
854
+ #extensions-panel .actions-list,
855
+ #leads-panel .actions-list,
856
+ #redirect-panel .actions-list {
857
+ position: relative;
858
+ margin-top: 20px;
859
+ margin-bottom: 20px;
860
+ }
861
+
862
+ #steps-panel .actions-list .actions,
863
+ #extensions-panel .actions-list .actions,
864
+ #leads-panel .actions-list .actions,
865
+ #redirect-panel .actions-list .actions {
866
+ margin-bottom: 20px;
867
+ }
868
+
869
+ #steps-panel .actions-list tbody tr[data-actionid] > td,
870
+ #extensions-panel .actions-list tbody tr[data-actionid] > td,
871
+ #leads-panel .actions-list tbody tr[data-actionid] > td,
872
+ #redirect-panel .actions-list tbody tr[data-actionid] > td {
873
+ border-bottom: 1px solid #e1e1e1;
874
+ }
875
+
876
+ #steps-panel .actions-list tbody tr.non-active .column-status a,
877
+ #extensions-panel .actions-list tbody tr.non-active .column-status a,
878
+ #leads-panel .actions-list tbody tr.non-active .column-status a,
879
+ #redirect-panel .actions-list tbody tr.non-active .column-status a {
880
+ color: red;
881
+ }
882
+
883
+ #steps-panel .open-tab,
884
+ #extensions-panel .open-tab,
885
+ #leads-panel .open-tab,
886
+ #redirect-panel .open-tab {
887
+ float: right;
888
+ cursor: pointer;
889
+ }
890
+
891
+ #steps-panel .active .open-tab.dashicons-arrow-down-alt2:before,
892
+ #extensions-panel .active .open-tab.dashicons-arrow-down-alt2:before,
893
+ #leads-panel .active .open-tab.dashicons-arrow-down-alt2:before,
894
+ #redirect-panel .active .open-tab.dashicons-arrow-down-alt2:before {
895
+ content: '\f343';
896
+ }
897
+
898
+ #steps-panel [data-tab],
899
+ #extensions-panel [data-tab],
900
+ #leads-panel [data-tab],
901
+ #redirect-panel [data-tab] {
902
+ display: none;
903
+ width: 100%;
904
+ clear: both;
905
+ }
906
+
907
+ #steps-panel h3,
908
+ #extensions-panel h3,
909
+ #leads-panel h3,
910
+ #redirect-panel h3 {
911
+ margin-top: 0;
912
+ margin-bottom: 0;
913
+ }
914
+
915
+ #steps-panel h3.active .dashicons-plus-alt:before,
916
+ #extensions-panel h3.active .dashicons-plus-alt:before,
917
+ #leads-panel h3.active .dashicons-plus-alt:before,
918
+ #redirect-panel h3.active .dashicons-plus-alt:before {
919
+ content: '\f460';
920
+ }
921
+
922
+ #steps-panel [data-tab-target],
923
+ #extensions-panel [data-tab-target],
924
+ #leads-panel [data-tab-target],
925
+ #redirect-panel [data-tab-target] {
926
+ cursor: pointer;
927
+ }
928
+
929
+ #steps-panel .conditional-groups-wrap:after,
930
+ #extensions-panel .conditional-groups-wrap:after,
931
+ #leads-panel .conditional-groups-wrap:after,
932
+ #redirect-panel .conditional-groups-wrap:after {
933
+ display: block;
934
+ clear: both;
935
+ content: '';
936
+ }
937
+
938
+ #steps-panel .conditional-groups-wrap .group-title,
939
+ #extensions-panel .conditional-groups-wrap .group-title,
940
+ #leads-panel .conditional-groups-wrap .group-title,
941
+ #redirect-panel .conditional-groups-wrap .group-title {
942
+ padding: 0 10px;
943
+ font-weight: bold;
944
+ }
945
+
946
+ #steps-panel .conditional-groups-wrap .wpcf7r-add-block,
947
+ #extensions-panel .conditional-groups-wrap .wpcf7r-add-block,
948
+ #leads-panel .conditional-groups-wrap .wpcf7r-add-block,
949
+ #redirect-panel .conditional-groups-wrap .wpcf7r-add-block {
950
+ padding: 5px 0;
951
+ cursor: pointer;
952
+ }
953
+
954
+ #steps-panel .conditional-groups-wrap .wpcf7r-add-block:hover,
955
+ #extensions-panel .conditional-groups-wrap .wpcf7r-add-block:hover,
956
+ #leads-panel .conditional-groups-wrap .wpcf7r-add-block:hover,
957
+ #redirect-panel .conditional-groups-wrap .wpcf7r-add-block:hover {
958
+ -webkit-transition: all 150ms ease;
959
+ -o-transition: all 150ms ease;
960
+ transition: all 150ms ease;
961
+ color: #1e8cbe;
962
+ }
963
+
964
+ #steps-panel .conditional-groups-wrap .conditional-groups .dashicons-minus,
965
+ #extensions-panel .conditional-groups-wrap .conditional-groups .dashicons-minus,
966
+ #leads-panel .conditional-groups-wrap .conditional-groups .dashicons-minus,
967
+ #redirect-panel .conditional-groups-wrap .conditional-groups .dashicons-minus {
968
+ -webkit-transition: all 150ms ease;
969
+ -o-transition: all 150ms ease;
970
+ transition: all 150ms ease;
971
+ float: right;
972
+ padding: 3px;
973
+ cursor: pointer;
974
+ border: 1px solid #ccc;
975
+ border-radius: 50%;
976
+ }
977
+
978
+ #steps-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover,
979
+ #extensions-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover,
980
+ #leads-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover,
981
+ #redirect-panel .conditional-groups-wrap .conditional-groups .dashicons-minus:hover {
982
+ color: #fff;
983
+ background: #1e8cbe;
984
+ border: 1px solid #1e8cbe;
985
+ }
986
+
987
+ #steps-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
988
+ #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus,
989
+ #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
990
+ #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus,
991
+ #leads-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
992
+ #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus,
993
+ #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles:first-child .row-template:first-child .dashicons-minus,
994
+ #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group:first-child .row-template:first-child .dashicons-minus {
995
+ display: none;
996
+ }
997
+
998
+ #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
999
+ #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul,
1000
+ #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
1001
+ #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul,
1002
+ #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
1003
+ #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul,
1004
+ #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul,
1005
+ #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul {
1006
+ display: -webkit-box;
1007
+ display: -moz-flex;
1008
+ display: -ms-flexbox;
1009
+ display: flex;
1010
+ justify-content: space-around;
1011
+ -webkit-justify-content: space-around;
1012
+ -moz-justify-content: space-around;
1013
+ -ms-flex-pack: distribute;
1014
+ margin-bottom: 0;
1015
+ }
1016
+
1017
+ #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1018
+ #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li,
1019
+ #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1020
+ #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li,
1021
+ #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1022
+ #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li,
1023
+ #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul li,
1024
+ #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul li {
1025
+ width: 33%;
1026
+ padding: 0 10px;
1027
+ margin-bottom: 0;
1028
+ }
1029
+
1030
+ #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1031
+ #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select,
1032
+ #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1033
+ #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select,
1034
+ #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1035
+ #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select,
1036
+ #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul select,
1037
+ #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul select {
1038
+ width: 100%;
1039
+ }
1040
+
1041
+ #steps-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1042
+ #steps-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value,
1043
+ #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1044
+ #extensions-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value,
1045
+ #leads-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1046
+ #leads-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value,
1047
+ #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles ul .group_row_value,
1048
+ #redirect-panel .conditional-groups-wrap .conditional-groups .wpcfr-rule-group ul .group_row_value {
1049
+ float: left;
1050
+ width: calc(100% - 50px);
1051
+ }
1052
+
1053
+ #steps-panel .conditional-groups-wrap .conditional-groups .row-titles,
1054
+ #extensions-panel .conditional-groups-wrap .conditional-groups .row-titles,
1055
+ #leads-panel .conditional-groups-wrap .conditional-groups .row-titles,
1056
+ #redirect-panel .conditional-groups-wrap .conditional-groups .row-titles {
1057
+ width: 90%;
1058
+ }
1059
+
1060
+ #steps-panel .conditional-groups-wrap .wpcfr-rule-group,
1061
+ #extensions-panel .conditional-groups-wrap .wpcfr-rule-group,
1062
+ #leads-panel .conditional-groups-wrap .wpcfr-rule-group,
1063
+ #redirect-panel .conditional-groups-wrap .wpcfr-rule-group {
1064
+ padding: 0 0 10px 0;
1065
+ }
1066
+
1067
+ #steps-panel .conditional-groups-wrap .wpcfr-rule-group:after,
1068
+ #extensions-panel .conditional-groups-wrap .wpcfr-rule-group:after,
1069
+ #leads-panel .conditional-groups-wrap .wpcfr-rule-group:after,
1070
+ #redirect-panel .conditional-groups-wrap .wpcfr-rule-group:after {
1071
+ display: block;
1072
+ clear: both;
1073
+ content: '';
1074
+ }
1075
+
1076
+ #steps-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title,
1077
+ #extensions-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title,
1078
+ #leads-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title,
1079
+ #redirect-panel .conditional-groups-wrap .wpcfr-rule-group:first-child .group-title {
1080
+ display: none;
1081
+ }
1082
+
1083
+ #steps-panel .leads-list input,
1084
+ #extensions-panel .leads-list input,
1085
+ #leads-panel .leads-list input,
1086
+ #redirect-panel .leads-list input {
1087
+ max-width: 100%;
1088
+ }
1089
+
1090
+ #steps-panel .leads-list td,
1091
+ #extensions-panel .leads-list td,
1092
+ #leads-panel .leads-list td,
1093
+ #redirect-panel .leads-list td {
1094
+ padding: 5px !important;
1095
+ }
1096
+
1097
+ #steps-panel .leads-list td input,
1098
+ #steps-panel .leads-list td select,
1099
+ #steps-panel .leads-list td textarea,
1100
+ #extensions-panel .leads-list td input,
1101
+ #extensions-panel .leads-list td select,
1102
+ #extensions-panel .leads-list td textarea,
1103
+ #leads-panel .leads-list td input,
1104
+ #leads-panel .leads-list td select,
1105
+ #leads-panel .leads-list td textarea,
1106
+ #redirect-panel .leads-list td input,
1107
+ #redirect-panel .leads-list td select,
1108
+ #redirect-panel .leads-list td textarea {
1109
+ width: 100%;
1110
+ }
1111
+
1112
+ #steps-panel .leads-list td .field-wrap,
1113
+ #extensions-panel .leads-list td .field-wrap,
1114
+ #leads-panel .leads-list td .field-wrap,
1115
+ #redirect-panel .leads-list td .field-wrap {
1116
+ padding: 0;
1117
+ }
1118
+
1119
+ #steps-panel .groups-actions,
1120
+ #extensions-panel .groups-actions,
1121
+ #leads-panel .groups-actions,
1122
+ #redirect-panel .groups-actions {
1123
+ margin-top: 10px;
1124
+ }
1125
+
1126
+ #steps-panel .add-condition,
1127
+ #extensions-panel .add-condition,
1128
+ #leads-panel .add-condition,
1129
+ #redirect-panel .add-condition {
1130
+ display: none;
1131
+ float: right;
1132
+ }
1133
+
1134
+ #steps-panel .wpcf7r-what-to-do .field-wrap label,
1135
+ #extensions-panel .wpcf7r-what-to-do .field-wrap label,
1136
+ #leads-panel .wpcf7r-what-to-do .field-wrap label,
1137
+ #redirect-panel .wpcf7r-what-to-do .field-wrap label {
1138
+ float: right;
1139
+ width: calc(100% - 30px);
1140
+ }
1141
+
1142
+ #steps-panel .group-group-0 .row-template:first-child .dashicons-minus,
1143
+ #extensions-panel .group-group-0 .row-template:first-child .dashicons-minus,
1144
+ #leads-panel .group-group-0 .row-template:first-child .dashicons-minus,
1145
+ #redirect-panel .group-group-0 .row-template:first-child .dashicons-minus {
1146
+ display: none;
1147
+ }
1148
+
1149
+ #steps-panel .conditional-group-block,
1150
+ #extensions-panel .conditional-group-block,
1151
+ #leads-panel .conditional-group-block,
1152
+ #redirect-panel .conditional-group-block {
1153
+ display: none;
1154
+ }
1155
+
1156
+ #steps-panel .conditional-group-block.active,
1157
+ #extensions-panel .conditional-group-block.active,
1158
+ #leads-panel .conditional-group-block.active,
1159
+ #redirect-panel .conditional-group-block.active {
1160
+ display: block;
1161
+ }
1162
+
1163
+ #steps-panel .conditional-group-block tbody tr:last-child .add-condition,
1164
+ #extensions-panel .conditional-group-block tbody tr:last-child .add-condition,
1165
+ #leads-panel .conditional-group-block tbody tr:last-child .add-condition,
1166
+ #redirect-panel .conditional-group-block tbody tr:last-child .add-condition {
1167
+ display: block;
1168
+ }
1169
+
1170
+ #steps-panel .title-or,
1171
+ #extensions-panel .title-or,
1172
+ #leads-panel .title-or,
1173
+ #redirect-panel .title-or {
1174
+ padding: 8px !important;
1175
+ margin-bottom: 10px;
1176
+ text-align: center;
1177
+ background: #e8e8e8;
1178
+ }
1179
+
1180
+ #steps-panel .field-wrap input[type='checkbox']:checked + label + input,
1181
+ #extensions-panel .field-wrap input[type='checkbox']:checked + label + input,
1182
+ #leads-panel .field-wrap input[type='checkbox']:checked + label + input,
1183
+ #redirect-panel .field-wrap input[type='checkbox']:checked + label + input {
1184
+ display: block;
1185
+ }
1186
+
1187
+ #steps-panel .conditional-group-block-title,
1188
+ #extensions-panel .conditional-group-block-title,
1189
+ #leads-panel .conditional-group-block-title,
1190
+ #redirect-panel .conditional-group-block-title {
1191
+ padding: 0 10px;
1192
+ }
1193
+
1194
+ #steps-panel .conditional-group-titles,
1195
+ #extensions-panel .conditional-group-titles,
1196
+ #leads-panel .conditional-group-titles,
1197
+ #redirect-panel .conditional-group-titles {
1198
+ display: -webkit-box;
1199
+ display: -moz-flex;
1200
+ display: -ms-flexbox;
1201
+ display: flex;
1202
+ flex-wrap: wrap;
1203
+ -webkit-flex-wrap: wrap;
1204
+ -moz-flex-wrap: wrap;
1205
+ -ms-flex-wrap: wrap;
1206
+ }
1207
+
1208
+ #steps-panel .conditional-group-titles:after,
1209
+ #extensions-panel .conditional-group-titles:after,
1210
+ #leads-panel .conditional-group-titles:after,
1211
+ #redirect-panel .conditional-group-titles:after {
1212
+ display: block;
1213
+ clear: both;
1214
+ content: '';
1215
+ }
1216
+
1217
+ #steps-panel .conditional-group-titles .block-title,
1218
+ #extensions-panel .conditional-group-titles .block-title,
1219
+ #leads-panel .conditional-group-titles .block-title,
1220
+ #redirect-panel .conditional-group-titles .block-title {
1221
+ display: -webkit-box;
1222
+ display: -moz-flex;
1223
+ display: -ms-flexbox;
1224
+ display: flex;
1225
+ }
1226
+
1227
+ #steps-panel .conditional-group-titles .block-title:first-child .dashicons-minus,
1228
+ #extensions-panel .conditional-group-titles .block-title:first-child .dashicons-minus,
1229
+ #leads-panel .conditional-group-titles .block-title:first-child .dashicons-minus,
1230
+ #redirect-panel .conditional-group-titles .block-title:first-child .dashicons-minus {
1231
+ display: none !important;
1232
+ }
1233
+
1234
+ #steps-panel .conditional-group-titles .block-title [type='text'][readonly],
1235
+ #extensions-panel .conditional-group-titles .block-title [type='text'][readonly],
1236
+ #leads-panel .conditional-group-titles .block-title [type='text'][readonly],
1237
+ #redirect-panel .conditional-group-titles .block-title [type='text'][readonly] {
1238
+ display: inline-block;
1239
+ width: auto !important;
1240
+ cursor: pointer;
1241
+ border: 0;
1242
+ -webkit-box-shadow: none;
1243
+ box-shadow: none;
1244
+ }
1245
+
1246
+ #steps-panel .conditional-group-titles .block-title .dashicons,
1247
+ #extensions-panel .conditional-group-titles .block-title .dashicons,
1248
+ #leads-panel .conditional-group-titles .block-title .dashicons,
1249
+ #redirect-panel .conditional-group-titles .block-title .dashicons {
1250
+ margin-top: 4px;
1251
+ cursor: pointer;
1252
+ }
1253
+
1254
+ #steps-panel .conditional-group-titles .block-title .dashicons.show-on-edit,
1255
+ #extensions-panel .conditional-group-titles .block-title .dashicons.show-on-edit,
1256
+ #leads-panel .conditional-group-titles .block-title .dashicons.show-on-edit,
1257
+ #redirect-panel .conditional-group-titles .block-title .dashicons.show-on-edit {
1258
+ display: none;
1259
+ }
1260
+
1261
+ #steps-panel .conditional-group-titles .block-title.active,
1262
+ #extensions-panel .conditional-group-titles .block-title.active,
1263
+ #leads-panel .conditional-group-titles .block-title.active,
1264
+ #redirect-panel .conditional-group-titles .block-title.active {
1265
+ color: #0085ba;
1266
+ }
1267
+
1268
+ #steps-panel .conditional-group-titles .block-title.active input,
1269
+ #extensions-panel .conditional-group-titles .block-title.active input,
1270
+ #leads-panel .conditional-group-titles .block-title.active input,
1271
+ #redirect-panel .conditional-group-titles .block-title.active input {
1272
+ color: #0085ba;
1273
+ }
1274
+
1275
+ #steps-panel .conditional-group-titles .block-title.edit .dashicons,
1276
+ #extensions-panel .conditional-group-titles .block-title.edit .dashicons,
1277
+ #leads-panel .conditional-group-titles .block-title.edit .dashicons,
1278
+ #redirect-panel .conditional-group-titles .block-title.edit .dashicons {
1279
+ display: none;
1280
+ cursor: pointer;
1281
+ }
1282
+
1283
+ #steps-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit,
1284
+ #extensions-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit,
1285
+ #leads-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit,
1286
+ #redirect-panel .conditional-group-titles .block-title.edit .dashicons.show-on-edit {
1287
+ display: block;
1288
+ }
1289
+
1290
+ #steps-panel .wpcf7-then,
1291
+ #extensions-panel .wpcf7-then,
1292
+ #leads-panel .wpcf7-then,
1293
+ #redirect-panel .wpcf7-then {
1294
+ padding: 10px;
1295
+ }
1296
+
1297
+ #steps-panel [data-redirect-type],
1298
+ #extensions-panel [data-redirect-type],
1299
+ #leads-panel [data-redirect-type],
1300
+ #redirect-panel [data-redirect-type] {
1301
+ display: none;
1302
+ }
1303
+
1304
+ #steps-panel .wpcfr-banner-holder .dashicons-no,
1305
+ #extensions-panel .wpcfr-banner-holder .dashicons-no,
1306
+ #leads-panel .wpcfr-banner-holder .dashicons-no,
1307
+ #redirect-panel .wpcfr-banner-holder .dashicons-no {
1308
+ cursor: pointer;
1309
+ }
1310
+
1311
+ #steps-panel img,
1312
+ #extensions-panel img,
1313
+ #leads-panel img,
1314
+ #redirect-panel img {
1315
+ max-width: 100%;
1316
+ }
1317
+
1318
+ #steps-panel .wpcf7-error-message,
1319
+ #extensions-panel .wpcf7-error-message,
1320
+ #leads-panel .wpcf7-error-message,
1321
+ #redirect-panel .wpcf7-error-message {
1322
+ padding: 20px 0;
1323
+ color: red;
1324
+ }
1325
+
1326
+ #steps-panel .select2-container,
1327
+ #extensions-panel .select2-container,
1328
+ #leads-panel .select2-container,
1329
+ #redirect-panel .select2-container {
1330
+ display: block;
1331
+ width: 100% !important;
1332
+ }
1333
+
1334
+ #steps-panel .select2-container--default .select2-selection--single .select2-selection__arrow,
1335
+ #extensions-panel .select2-container--default .select2-selection--single .select2-selection__arrow,
1336
+ #leads-panel .select2-container--default .select2-selection--single .select2-selection__arrow,
1337
+ #redirect-panel .select2-container--default .select2-selection--single .select2-selection__arrow {
1338
+ height: 36px;
1339
+ }
1340
+
1341
+ #steps-panel .select2-container--default .select2-selection--single .select2-selection__rendered,
1342
+ #extensions-panel .select2-container--default .select2-selection--single .select2-selection__rendered,
1343
+ #leads-panel .select2-container--default .select2-selection--single .select2-selection__rendered,
1344
+ #redirect-panel .select2-container--default .select2-selection--single .select2-selection__rendered {
1345
+ line-height: 35px;
1346
+ }
1347
+
1348
+ #steps-panel .wpcf7-success-message,
1349
+ #extensions-panel .wpcf7-success-message,
1350
+ #leads-panel .wpcf7-success-message,
1351
+ #redirect-panel .wpcf7-success-message {
1352
+ margin-top: 10px;
1353
+ font-weight: bold;
1354
+ color: green;
1355
+ }
1356
+
1357
+ #steps-panel .field-wrap,
1358
+ #extensions-panel .field-wrap,
1359
+ #leads-panel .field-wrap,
1360
+ #redirect-panel .field-wrap {
1361
+ margin-bottom: 10px;
1362
+ }
1363
+
1364
+ #steps-panel .field-wrap select,
1365
+ #steps-panel .field-wrap [type='number'],
1366
+ #steps-panel .field-wrap [type='email'],
1367
+ #steps-panel .field-wrap [type='password'],
1368
+ #steps-panel .field-wrap [type='url'],
1369
+ #steps-panel .field-wrap [type='text'],
1370
+ #extensions-panel .field-wrap select,
1371
+ #extensions-panel .field-wrap [type='number'],
1372
+ #extensions-panel .field-wrap [type='email'],
1373
+ #extensions-panel .field-wrap [type='password'],
1374
+ #extensions-panel .field-wrap [type='url'],
1375
+ #extensions-panel .field-wrap [type='text'],
1376
+ #leads-panel .field-wrap select,
1377
+ #leads-panel .field-wrap [type='number'],
1378
+ #leads-panel .field-wrap [type='email'],
1379
+ #leads-panel .field-wrap [type='password'],
1380
+ #leads-panel .field-wrap [type='url'],
1381
+ #leads-panel .field-wrap [type='text'],
1382
+ #redirect-panel .field-wrap select,
1383
+ #redirect-panel .field-wrap [type='number'],
1384
+ #redirect-panel .field-wrap [type='email'],
1385
+ #redirect-panel .field-wrap [type='password'],
1386
+ #redirect-panel .field-wrap [type='url'],
1387
+ #redirect-panel .field-wrap [type='text'] {
1388
+ width: 100%;
1389
+ height: 38px;
1390
+ margin: 0;
1391
+ border-radius: 0;
1392
+ }
1393
+
1394
+ #steps-panel .field-wrap textarea,
1395
+ #extensions-panel .field-wrap textarea,
1396
+ #leads-panel .field-wrap textarea,
1397
+ #redirect-panel .field-wrap textarea {
1398
+ width: 100%;
1399
+ margin: 0;
1400
+ border-radius: 0;
1401
+ -webkit-box-shadow: 0;
1402
+ box-shadow: 0;
1403
+ }
1404
+
1405
+ #steps-panel .field-wrap .image-uploader-btn,
1406
+ #extensions-panel .field-wrap .image-uploader-btn,
1407
+ #leads-panel .field-wrap .image-uploader-btn,
1408
+ #redirect-panel .field-wrap .image-uploader-btn {
1409
+ display: block;
1410
+ clear: both;
1411
+ }
1412
+
1413
+ #steps-panel .field-wrap .wp-picker-container .wp-color-result,
1414
+ #extensions-panel .field-wrap .wp-picker-container .wp-color-result,
1415
+ #leads-panel .field-wrap .wp-picker-container .wp-color-result,
1416
+ #redirect-panel .field-wrap .wp-picker-container .wp-color-result {
1417
+ width: 38px;
1418
+ height: 38px;
1419
+ overflow: hidden;
1420
+ text-indent: -999px;
1421
+ vertical-align: top;
1422
+ border: 1px solid #000;
1423
+ border-radius: 50%;
1424
+ }
1425
+
1426
+ #steps-panel .field-wrap [type='checkbox'],
1427
+ #extensions-panel .field-wrap [type='checkbox'],
1428
+ #leads-panel .field-wrap [type='checkbox'],
1429
+ #redirect-panel .field-wrap [type='checkbox'] {
1430
+ margin-top: 1px;
1431
+ }
1432
+
1433
+ #steps-panel .field-wrap textarea,
1434
+ #extensions-panel .field-wrap textarea,
1435
+ #leads-panel .field-wrap textarea,
1436
+ #redirect-panel .field-wrap textarea {
1437
+ width: 100%;
1438
+ direction: ltr;
1439
+ }
1440
+
1441
+ #steps-panel .repeater-wrap,
1442
+ #extensions-panel .repeater-wrap,
1443
+ #leads-panel .repeater-wrap,
1444
+ #redirect-panel .repeater-wrap {
1445
+ display: block;
1446
+ width: 100%;
1447
+ }
1448
+
1449
+ #steps-panel .repeater-wrap:before,
1450
+ #steps-panel .repeater-wrap:after,
1451
+ #extensions-panel .repeater-wrap:before,
1452
+ #extensions-panel .repeater-wrap:after,
1453
+ #leads-panel .repeater-wrap:before,
1454
+ #leads-panel .repeater-wrap:after,
1455
+ #redirect-panel .repeater-wrap:before,
1456
+ #redirect-panel .repeater-wrap:after {
1457
+ display: table;
1458
+ clear: both;
1459
+ content: ' ';
1460
+ }
1461
+
1462
+ #steps-panel .qs-row,
1463
+ #extensions-panel .qs-row,
1464
+ #leads-panel .qs-row,
1465
+ #redirect-panel .qs-row {
1466
+ float: left;
1467
+ width: 100%;
1468
+ -webkit-box-sizing: border-box;
1469
+ box-sizing: border-box;
1470
+ margin: 0 auto;
1471
+ }
1472
+
1473
+ #steps-panel .qs-row .image-uploader-btn,
1474
+ #extensions-panel .qs-row .image-uploader-btn,
1475
+ #leads-panel .qs-row .image-uploader-btn,
1476
+ #redirect-panel .qs-row .image-uploader-btn {
1477
+ max-width: 100px;
1478
+ text-align: center;
1479
+ padding: 5px;
1480
+ min-height: 0;
1481
+ height: auto;
1482
+ line-height: normal;
1483
+ }
1484
+
1485
+ #steps-panel .qs-row:before,
1486
+ #steps-panel .qs-row:after,
1487
+ #extensions-panel .qs-row:before,
1488
+ #extensions-panel .qs-row:after,
1489
+ #leads-panel .qs-row:before,
1490
+ #leads-panel .qs-row:after,
1491
+ #redirect-panel .qs-row:before,
1492
+ #redirect-panel .qs-row:after {
1493
+ display: table;
1494
+ clear: both;
1495
+ content: ' ';
1496
+ }
1497
+
1498
+ #steps-panel .qs-row .qs-col,
1499
+ #extensions-panel .qs-row .qs-col,
1500
+ #leads-panel .qs-row .qs-col,
1501
+ #redirect-panel .qs-row .qs-col {
1502
+ position: relative;
1503
+ float: left;
1504
+ -webkit-box-sizing: border-box;
1505
+ box-sizing: border-box;
1506
+ padding-right: 10px;
1507
+ padding-left: 10px;
1508
+ clear: none;
1509
+ }
1510
+
1511
+ #steps-panel .qs-row .qs-col.clear,
1512
+ #extensions-panel .qs-row .qs-col.clear,
1513
+ #leads-panel .qs-row .qs-col.clear,
1514
+ #redirect-panel .qs-row .qs-col.clear {
1515
+ clear: both;
1516
+ }
1517
+
1518
+ #steps-panel .qs-row label,
1519
+ #extensions-panel .qs-row label,
1520
+ #leads-panel .qs-row label,
1521
+ #redirect-panel .qs-row label {
1522
+ display: block;
1523
+ }
1524
+
1525
+ #steps-panel .qs-row .qs-col-12,
1526
+ #extensions-panel .qs-row .qs-col-12,
1527
+ #leads-panel .qs-row .qs-col-12,
1528
+ #redirect-panel .qs-row .qs-col-12 {
1529
+ width: 100%;
1530
+ }
1531
+
1532
+ #steps-panel .qs-row .qs-col-8,
1533
+ #extensions-panel .qs-row .qs-col-8,
1534
+ #leads-panel .qs-row .qs-col-8,
1535
+ #redirect-panel .qs-row .qs-col-8 {
1536
+ width: 66%;
1537
+ }
1538
+
1539
+ #steps-panel .qs-row .qs-col-7,
1540
+ #extensions-panel .qs-row .qs-col-7,
1541
+ #leads-panel .qs-row .qs-col-7,
1542
+ #redirect-panel .qs-row .qs-col-7 {
1543
+ width: 58%;
1544
+ }
1545
+
1546
+ #steps-panel .qs-row .qs-col-6,
1547
+ #extensions-panel .qs-row .qs-col-6,
1548
+ #leads-panel .qs-row .qs-col-6,
1549
+ #redirect-panel .qs-row .qs-col-6 {
1550
+ width: 50%;
1551
+ }
1552
+
1553
+ #steps-panel .qs-row .qs-col-5,
1554
+ #extensions-panel .qs-row .qs-col-5,
1555
+ #leads-panel .qs-row .qs-col-5,
1556
+ #redirect-panel .qs-row .qs-col-5 {
1557
+ width: 43%;
1558
+ }
1559
+
1560
+ #steps-panel .qs-row .qs-col-4,
1561
+ #extensions-panel .qs-row .qs-col-4,
1562
+ #leads-panel .qs-row .qs-col-4,
1563
+ #redirect-panel .qs-row .qs-col-4 {
1564
+ width: 33%;
1565
+ }
1566
+
1567
+ #steps-panel .qs-row .qs-col-3,
1568
+ #extensions-panel .qs-row .qs-col-3,
1569
+ #leads-panel .qs-row .qs-col-3,
1570
+ #redirect-panel .qs-row .qs-col-3 {
1571
+ width: 25%;
1572
+ }
1573
+
1574
+ #steps-panel .qs-row .qs-col-2,
1575
+ #extensions-panel .qs-row .qs-col-2,
1576
+ #leads-panel .qs-row .qs-col-2,
1577
+ #redirect-panel .qs-row .qs-col-2 {
1578
+ width: 16.666666666666%;
1579
+ }
1580
+
1581
+ #steps-panel .qs-row .qs-col-1,
1582
+ #extensions-panel .qs-row .qs-col-1,
1583
+ #leads-panel .qs-row .qs-col-1,
1584
+ #redirect-panel .qs-row .qs-col-1 {
1585
+ width: 8%;
1586
+ }
1587
+
1588
+ #steps-panel .field-wrap-after-sent-script,
1589
+ #extensions-panel .field-wrap-after-sent-script,
1590
+ #leads-panel .field-wrap-after-sent-script,
1591
+ #redirect-panel .field-wrap-after-sent-script {
1592
+ margin-top: 10px;
1593
+ }
1594
+
1595
+ #steps-panel .field-wrap-page-id label,
1596
+ #steps-panel .field-wrap-after-sent-script label,
1597
+ #extensions-panel .field-wrap-page-id label,
1598
+ #extensions-panel .field-wrap-after-sent-script label,
1599
+ #leads-panel .field-wrap-page-id label,
1600
+ #leads-panel .field-wrap-after-sent-script label,
1601
+ #redirect-panel .field-wrap-page-id label,
1602
+ #redirect-panel .field-wrap-after-sent-script label {
1603
+ margin-bottom: 5px;
1604
+ }
1605
+
1606
+ #steps-panel .field-wrap-http-build-query-selectively [type='text'],
1607
+ #extensions-panel .field-wrap-http-build-query-selectively [type='text'],
1608
+ #leads-panel .field-wrap-http-build-query-selectively [type='text'],
1609
+ #redirect-panel .field-wrap-http-build-query-selectively [type='text'] {
1610
+ margin-top: 10px;
1611
+ }
1612
+
1613
+ #steps-panel .field-wrap-after-sent-script .field-message,
1614
+ #extensions-panel .field-wrap-after-sent-script .field-message,
1615
+ #leads-panel .field-wrap-after-sent-script .field-message,
1616
+ #redirect-panel .field-wrap-after-sent-script .field-message {
1617
+ margin-bottom: 10px;
1618
+ }
1619
+
1620
+ #steps-panel .field-notice,
1621
+ #extensions-panel .field-notice,
1622
+ #leads-panel .field-notice,
1623
+ #redirect-panel .field-notice {
1624
+ padding: 5px;
1625
+ margin-top: 10px;
1626
+ margin-bottom: 10px;
1627
+ background: #fff;
1628
+ border: 1px solid;
1629
+ border-radius: 4px;
1630
+ }
1631
+
1632
+ #steps-panel .field-notice-alert,
1633
+ #extensions-panel .field-notice-alert,
1634
+ #leads-panel .field-notice-alert,
1635
+ #redirect-panel .field-notice-alert {
1636
+ color: #8a6d3b;
1637
+ background-color: #fcf8e3;
1638
+ border: 1px solid #faebcc;
1639
+ }
1640
+
1641
+ #steps-panel .field-hidden,
1642
+ #steps-panel .field-notice-hidden,
1643
+ #extensions-panel .field-hidden,
1644
+ #extensions-panel .field-notice-hidden,
1645
+ #leads-panel .field-hidden,
1646
+ #leads-panel .field-notice-hidden,
1647
+ #redirect-panel .field-hidden,
1648
+ #redirect-panel .field-notice-hidden {
1649
+ display: none;
1650
+ }
1651
+
1652
+ #steps-panel .field-warning-alert,
1653
+ #extensions-panel .field-warning-alert,
1654
+ #leads-panel .field-warning-alert,
1655
+ #redirect-panel .field-warning-alert {
1656
+ color: #a94442;
1657
+ background-color: #f2dede;
1658
+ border-color: #ebccd1;
1659
+ }
1660
+
1661
+ .home-hero-minititle {
1662
+ color: #fff !important;
1663
+ }
1664
+
1665
+ .accessibe-logo {
1666
+ padding: 10px 0;
1667
+ background: #fff;
1668
+ }
1669
+
1670
+ .accessibe-logo img {
1671
+ width: 200px;
1672
+ }
1673
+
1674
+ .page-settings .image-uploader-btn {
1675
+ display: block;
1676
+ margin-top: 10PX;
1677
+ }
1678
+
1679
+ .page-settings .field-wrap {
1680
+ display: -webkit-box;
1681
+ display: -ms-flexbox;
1682
+ display: flex;
1683
+ float: left;
1684
+ width: 48%;
1685
+ padding: 0 1% !important;
1686
+ margin-bottom: 20px;
1687
+ clear: none !important;
1688
+ -webkit-box-orient: vertical;
1689
+ -webkit-box-direction: normal;
1690
+ -ms-flex-direction: column;
1691
+ flex-direction: column;
1692
+ }
1693
+
1694
+ .page-settings .field-wrap select,
1695
+ .page-settings .field-wrap input {
1696
+ width: 100%;
1697
+ }
1698
+
1699
+ .page-settings .field-wrap label {
1700
+ margin-bottom: 10px;
1701
+ }
1702
+
1703
+ .page-settings .field-wrap.field-wrap-footerHtml {
1704
+ width: 100%;
1705
+ }
1706
+
1707
+ #debug-panel label.error {
1708
+ font-weight: bold;
1709
+ color: red;
1710
+ }
1711
+
1712
+ .extensions-list .button-primary {
1713
+ display: -webkit-box;
1714
+ display: -moz-flex;
1715
+ display: -ms-flexbox;
1716
+ display: flex;
1717
+ align-items: center;
1718
+ -webkit-align-items: center;
1719
+ -moz-align-items: center;
1720
+ -webkit-box-align: center;
1721
+ -ms-flex-align: center;
1722
+ justify-content: center;
1723
+ -webkit-justify-content: center;
1724
+ -moz-justify-content: center;
1725
+ -webkit-box-pack: center;
1726
+ -ms-flex-pack: center;
1727
+ }
1728
+
1729
+ .extensions-list .button-primary.btn-deactivate {
1730
+ font-size: 16px;
1731
+ color: #000;
1732
+ background: #f1f1f1;
1733
+ }
1734
+
1735
+ .extensions-list .actions {
1736
+ position: relative;
1737
+ }
1738
+
1739
+ .extensions-list .extensions {
1740
+ display: -webkit-box;
1741
+ display: -moz-flex;
1742
+ display: -ms-flexbox;
1743
+ display: flex;
1744
+ flex-wrap: wrap;
1745
+ -webkit-flex-wrap: wrap;
1746
+ -moz-flex-wrap: wrap;
1747
+ -ms-flex-wrap: wrap;
1748
+ justify-content: space-between;
1749
+ -webkit-justify-content: space-between;
1750
+ -moz-justify-content: space-between;
1751
+ -webkit-box-pack: justify;
1752
+ -ms-flex-pack: justify;
1753
+ position: relative;
1754
+ -webkit-box-sizing: border-box;
1755
+ box-sizing: border-box;
1756
+ margin: 0 -10px;
1757
+ }
1758
+
1759
+ .extensions-list .extensions .needs-activation .promo-purchase-link,
1760
+ .extensions-list .extensions .needs-activation .actions .btn-activate {
1761
+ font-size: 18px;
1762
+ background: #333;
1763
+ }
1764
+
1765
+ .extensions-list .extensions .dashicons-editor-code {
1766
+ margin-right: 5px;
1767
+ }
1768
+
1769
+ .extensions-list .extensions .promo-box {
1770
+ height: 100%;
1771
+ border: 1px solid #e6e6e6;
1772
+ }
1773
+
1774
+ .extensions-list .extensions .promo-purchase-link {
1775
+ display: -webkit-box;
1776
+ display: -moz-flex;
1777
+ display: -ms-flexbox;
1778
+ display: flex;
1779
+ align-items: center;
1780
+ -webkit-align-items: center;
1781
+ -moz-align-items: center;
1782
+ -webkit-box-align: center;
1783
+ -ms-flex-align: center;
1784
+ justify-content: center;
1785
+ -webkit-justify-content: center;
1786
+ -moz-justify-content: center;
1787
+ -webkit-box-pack: center;
1788
+ -ms-flex-pack: center;
1789
+ padding: 0 10px 2px 10px;
1790
+ font-size: 1.1rem;
1791
+ line-height: normal;
1792
+ color: #fff;
1793
+ text-decoration: none;
1794
+ cursor: pointer;
1795
+ background: #007cba;
1796
+ border-radius: 0;
1797
+ }
1798
+
1799
+ .extensions-list .extensions .promo-purchase-link:hover {
1800
+ opacity: .8;
1801
+ }
1802
+
1803
+ .extensions-list .extensions .promo-purchase-link a {
1804
+ font-size: 1.1rem;
1805
+ color: #fff;
1806
+ text-decoration: none;
1807
+ }
1808
+
1809
+ .extensions-list .extensions .dashicons-arrow-down-alt {
1810
+ margin: 0 10px;
1811
+ }
1812
+
1813
+ .extensions-list .extensions .actions .btn-activate,
1814
+ .extensions-list .extensions .btn-getit {
1815
+ display: -webkit-box;
1816
+ display: -ms-flexbox;
1817
+ display: flex;
1818
+ -webkit-box-pack: center;
1819
+ -ms-flex-pack: center;
1820
+ justify-content: center;
1821
+ -webkit-box-align: center;
1822
+ -ms-flex-align: center;
1823
+ align-items: center;
1824
+ width: 100%;
1825
+ padding: 8px;
1826
+ font-size: 16px;
1827
+ color: #fff;
1828
+ text-decoration: none;
1829
+ text-shadow: none;
1830
+ background: #007cba;
1831
+ border-color: #007cba;
1832
+ }
1833
+
1834
+ .extensions-list .extensions .actions .btn-activate:hover,
1835
+ .extensions-list .extensions .btn-getit:hover {
1836
+ opacity: .8;
1837
+ }
1838
+
1839
+ .extensions-list .extensions .button-primary {
1840
+ margin-left: 5px;
1841
+ font-size: 16px;
1842
+ border-color: transparent;
1843
+ border-radius: 0;
1844
+ }
1845
+
1846
+ .extensions-list .extensions .promo-box-inner {
1847
+ display: -webkit-box;
1848
+ display: -moz-flex;
1849
+ display: -ms-flexbox;
1850
+ display: flex;
1851
+ justify-content: space-between;
1852
+ -webkit-justify-content: space-between;
1853
+ -moz-justify-content: space-between;
1854
+ -webkit-box-pack: justify;
1855
+ -ms-flex-pack: justify;
1856
+ flex-direction: column;
1857
+ -moz-flex-direction: column;
1858
+ -ms-flex-direction: column;
1859
+ -webkit-box-direction: normal;
1860
+ -webkit-box-orient: vertical;
1861
+ height: 100%;
1862
+ }
1863
+
1864
+ .extensions-list .extensions .promo-box-inner h2 {
1865
+ margin-bottom: 0;
1866
+ }
1867
+
1868
+ .extensions-list .extensions .has-update .btn-update {
1869
+ color: #000;
1870
+ background: #ffdc2e;
1871
+ border-color: #000;
1872
+ }
1873
+
1874
+ .extensions-list .extensions .serial {
1875
+ display: -webkit-box;
1876
+ display: -moz-flex;
1877
+ display: -ms-flexbox;
1878
+ display: flex;
1879
+ -webkit-transition: all 350ms ease;
1880
+ -o-transition: all 350ms ease;
1881
+ transition: all 350ms ease;
1882
+ position: absolute;
1883
+ top: 0;
1884
+ width: 100%;
1885
+ height: 100%;
1886
+ visibility: hidden;
1887
+ background: #fff;
1888
+ opacity: 0;
1889
+ }
1890
+
1891
+ .extensions-list .extensions .serial.open {
1892
+ visibility: visible;
1893
+ opacity: 1;
1894
+ }
1895
+
1896
+ .extensions-list .extensions .serial input[type='text'] {
1897
+ width: 70%;
1898
+ min-height: 0;
1899
+ }
1900
+
1901
+ .extensions-list .extensions .serial button {
1902
+ margin: 0 1px;
1903
+ line-height: normal;
1904
+ }
1905
+
1906
+ .extensions-list .extensions div.err {
1907
+ position: absolute;
1908
+ top: 100%;
1909
+ left: 0;
1910
+ z-index: 999;
1911
+ padding: 0 0;
1912
+ color: red;
1913
+ }
1914
+
1915
+ .extensions-list .extensions .extension {
1916
+ -webkit-transition: all 250ms ease;
1917
+ -o-transition: all 250ms ease;
1918
+ transition: all 250ms ease;
1919
+ position: relative;
1920
+ width: 300px;
1921
+ -webkit-box-sizing: border-box;
1922
+ box-sizing: border-box;
1923
+ box-sizing: border-box;
1924
+ margin: 0 10px 20px 10px;
1925
+ text-align: center;
1926
+ background: #fff;
1927
+ -webkit-box-flex: 1;
1928
+ -ms-flex-positive: 1;
1929
+ flex-grow: 1;
1930
+ }
1931
+
1932
+ .extensions-list .extensions .extension h2 {
1933
+ font-size: 18px;
1934
+ font-weight: 500;
1935
+ color: #0e579f;
1936
+ }
1937
+
1938
+ .extensions-list .extensions .extension .promo-box-thumb {
1939
+ padding: 40px;
1940
+ background: #f5f5f5;
1941
+ }
1942
+
1943
+ .extensions-list .extensions .extension .promo-box-thumb img {
1944
+ height: 50px;
1945
+ }
1946
+
1947
+ .extensions-list .extensions .extension .description {
1948
+ min-height: 65px;
1949
+ font-size: 14px;
1950
+ line-height: 16px;
1951
+ color: #999;
1952
+ }
1953
+
1954
+ .extensions-list .extensions .extension .dashicons-buddicons-groups:before {
1955
+ position: relative;
1956
+ content: '\f456';
1957
+ }
1958
+
1959
+ .extensions-list .extensions .extension .promo-version {
1960
+ display: -webkit-box;
1961
+ display: -moz-flex;
1962
+ display: -ms-flexbox;
1963
+ display: flex;
1964
+ justify-content: center;
1965
+ -webkit-justify-content: center;
1966
+ -moz-justify-content: center;
1967
+ -webkit-box-pack: center;
1968
+ -ms-flex-pack: center;
1969
+ align-items: center;
1970
+ -webkit-align-items: center;
1971
+ -moz-align-items: center;
1972
+ -webkit-box-align: center;
1973
+ -ms-flex-align: center;
1974
+ flex-direction: row-reverse;
1975
+ -moz-flex-direction: row-reverse;
1976
+ -ms-flex-direction: row-reverse;
1977
+ -webkit-box-direction: reverse;
1978
+ -webkit-box-orient: horizontal;
1979
+ color: #000;
1980
+ }
1981
+
1982
+ .extensions-list .extensions .extension .promo-version .badge {
1983
+ padding: 3px 10px;
1984
+ font-size: 16px;
1985
+ line-height: normal;
1986
+ color: #fff;
1987
+ background: #c90a0abd;
1988
+ }
1989
+
1990
+ .extensions-list .extensions .extension .promo-version span {
1991
+ font-size: 20px;
1992
+ }
1993
+
1994
+ .extensions-list .extensions .extension .promo-version small {
1995
+ font-size: 16px;
1996
+ }
1997
+
1998
+ .extensions-list .extensions .extension .promo-box-content {
1999
+ height: 100%;
2000
+ padding: 0;
2001
+ }
2002
+
2003
+ .extensions-list .extensions .extension .promo-bot-title {
2004
+ display: -webkit-box;
2005
+ display: -moz-flex;
2006
+ display: -ms-flexbox;
2007
+ display: flex;
2008
+ justify-content: space-between;
2009
+ -webkit-justify-content: space-between;
2010
+ -moz-justify-content: space-between;
2011
+ -webkit-box-pack: justify;
2012
+ -ms-flex-pack: justify;
2013
+ height: 31px;
2014
+ padding: 9px 15px;
2015
+ background: #f1f1f1;
2016
+ border-bottom: 1px solid #e6e6e6;
2017
+ }
2018
+
2019
+ .extensions-list .extensions .extension:hover {
2020
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
2021
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
2022
+ }
2023
+
2024
+ .extensions-list .extensions .extension .promo-box-description {
2025
+ padding: 20px;
2026
+ text-align: left;
2027
+ }
2028
+
2029
+ .extensions-list .extensions .extension .promo-box-description h3 {
2030
+ height: 24px;
2031
+ margin-top: 0;
2032
+ }
2033
+
2034
+ .extensions-list .extensions .extension .promo-actions-box {
2035
+ position: relative;
2036
+ overflow: hidden;
2037
+ }
2038
+
2039
+ section.padbox .padbox {
2040
+ padding: 20px;
2041
+ }
2042
+
2043
+ .mail-tags-wrapper-inner.field-hidden {
2044
+ padding: 10px;
2045
+ background: #ddd;
2046
+ border: 1px solid;
2047
+ }
2048
+
2049
+ .accessibie-plugin .promo-box-thumb img {
2050
+ max-width: 90% !important;
2051
+ }
2052
+
2053
+ .rp-overlay {
2054
+ position: fixed;
2055
+ top: 0;
2056
+ left: 0;
2057
+ z-index: 99;
2058
+ display: -webkit-box;
2059
+ display: -ms-flexbox;
2060
+ display: flex;
2061
+ -webkit-box-pack: center;
2062
+ -ms-flex-pack: center;
2063
+ justify-content: center;
2064
+ -webkit-box-align: center;
2065
+ -ms-flex-align: center;
2066
+ align-items: center;
2067
+ width: 100%;
2068
+ height: 100%;
2069
+ color: #fff;
2070
+ visibility: hidden;
2071
+ background: rgba(0, 0, 0, 0.8);
2072
+ opacity: 0;
2073
+ -webkit-transition: all 500ms ease;
2074
+ -o-transition: all 500ms ease;
2075
+ transition: all 500ms ease;
2076
+ direction: ltr;
2077
+ }
2078
+
2079
+ .rp-overlay.active {
2080
+ visibility: visible;
2081
+ opacity: 1;
2082
+ }
2083
+
2084
+ .rp-overlay * {
2085
+ -webkit-box-sizing: border-box;
2086
+ box-sizing: border-box;
2087
+ }
2088
+
2089
+ .rp-overlay .rp-discount {
2090
+ position: relative;
2091
+ display: block;
2092
+ width: 700px;
2093
+ max-width: 100%;
2094
+ height: 500px;
2095
+ padding: 40px 30px;
2096
+ margin: auto;
2097
+ background: url(../../build/images/banner-pro.png);
2098
+ background-size: cover;
2099
+ }
2100
+
2101
+ .rp-overlay .rp-discount .rp-contact-form-form input[type=email] {
2102
+ width: 100%;
2103
+ padding: 6px 10px;
2104
+ }
2105
+
2106
+ .rp-overlay .rp-discount .rp-close {
2107
+ position: absolute;
2108
+ top: 10px;
2109
+ right: 15px;
2110
+ padding: 0;
2111
+ font-size: 44px;
2112
+ color: #fff;
2113
+ cursor: pointer;
2114
+ background: none;
2115
+ border: none;
2116
+ }
2117
+
2118
+ .rp-overlay .rp-discount .rp-top-title {
2119
+ display: inline-block;
2120
+ padding-bottom: 8px;
2121
+ margin-bottom: 30px;
2122
+ font-size: 20px;
2123
+ font-weight: 700;
2124
+ color: #9cd8eb;
2125
+ text-transform: uppercase;
2126
+ border-bottom: 1px solid #72aee2;
2127
+ }
2128
+
2129
+ .rp-overlay .rp-discount .rp-title-large {
2130
+ display: block;
2131
+ font-size: 62px;
2132
+ font-weight: 800;
2133
+ line-height: 1;
2134
+ text-transform: uppercase;
2135
+ }
2136
+
2137
+ .rp-overlay .rp-discount .rp-features-list {
2138
+ margin-bottom: 30px;
2139
+ }
2140
+
2141
+ .rp-overlay .rp-discount .rp-features-list li {
2142
+ font-size: 20px;
2143
+ font-weight: 500;
2144
+ }
2145
+
2146
+ .rp-overlay .rp-discount .rp-features-list li:before {
2147
+ position: relative;
2148
+ top: 9px;
2149
+ font-family: 'dashicons';
2150
+ font-size: 34px;
2151
+ content: '\f147';
2152
+ }
2153
+
2154
+ .rp-overlay .rp-discount .rp-contact-form ::-webkit-input-placeholder {
2155
+ color: #fff;
2156
+ }
2157
+
2158
+ .rp-overlay .rp-discount .rp-contact-form ::-moz-placeholder {
2159
+ color: #fff;
2160
+ }
2161
+
2162
+ .rp-overlay .rp-discount .rp-contact-form :-ms-input-placeholder {
2163
+ color: #fff;
2164
+ }
2165
+
2166
+ .rp-overlay .rp-discount .rp-contact-form :-moz-placeholder {
2167
+ color: #fff;
2168
+ }
2169
+
2170
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-title {
2171
+ display: block;
2172
+ padding: 0 20px;
2173
+ margin-bottom: 10px;
2174
+ font-size: 20px;
2175
+ font-weight: 500;
2176
+ color: #9cd8eb;
2177
+ }
2178
+
2179
+ .rp-overlay .rp-discount .rp-contact-form .rp-cols {
2180
+ display: -webkit-box;
2181
+ display: -ms-flexbox;
2182
+ display: flex;
2183
+ -webkit-box-pack: justify;
2184
+ -ms-flex-pack: justify;
2185
+ justify-content: space-between;
2186
+ }
2187
+
2188
+ .rp-overlay .rp-discount .rp-contact-form .rp-form-message {
2189
+ position: absolute;
2190
+ top: 67px;
2191
+ left: 0;
2192
+ width: 100%;
2193
+ padding-left: 5px;
2194
+ font-size: 12px;
2195
+ }
2196
+
2197
+ .rp-overlay .rp-discount .rp-contact-form .rp-form-message .rp-form-message-text {
2198
+ display: block;
2199
+ padding: 16px;
2200
+ padding-top: 5px;
2201
+ color: #1478ce;
2202
+ text-decoration: none;
2203
+ background: #fff;
2204
+ }
2205
+
2206
+ .rp-overlay .rp-discount .rp-contact-form .rp-col-featured .rp-text {
2207
+ display: block;
2208
+ margin-bottom: 5px;
2209
+ font-size: 14px;
2210
+ color: #fff;
2211
+ }
2212
+
2213
+ .rp-overlay .rp-discount .rp-contact-form .rp-col-featured .logo-querysol {
2214
+ display: block;
2215
+ width: 140px;
2216
+ height: 18px;
2217
+ background: url(../../build/images/logo-querysol.png);
2218
+ background-size: 100%;
2219
+ }
2220
+
2221
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form strong {
2222
+ font-size: 14px;
2223
+ font-weight: bold;
2224
+ text-decoration: underline;
2225
+ }
2226
+
2227
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap {
2228
+ position: relative;
2229
+ margin-bottom: 5px;
2230
+ }
2231
+
2232
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit {
2233
+ display: -webkit-box;
2234
+ display: -moz-flex;
2235
+ display: -ms-flexbox;
2236
+ display: flex;
2237
+ justify-content: center;
2238
+ -webkit-justify-content: center;
2239
+ -moz-justify-content: center;
2240
+ -webkit-box-pack: center;
2241
+ -ms-flex-pack: center;
2242
+ align-items: center;
2243
+ -webkit-align-items: center;
2244
+ -moz-align-items: center;
2245
+ -webkit-box-align: center;
2246
+ -ms-flex-align: center;
2247
+ position: absolute;
2248
+ top: 1px;
2249
+ right: 0;
2250
+ width: 40px;
2251
+ height: calc(100% - 2px);
2252
+ padding: 0;
2253
+ padding: 0;
2254
+ cursor: pointer;
2255
+ background: #388cd5;
2256
+ border: none;
2257
+ }
2258
+
2259
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit:focus {
2260
+ outline: none;
2261
+ }
2262
+
2263
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit .rp-icon-plane {
2264
+ position: relative;
2265
+ width: 17px;
2266
+ height: 17px;
2267
+ background: url(../../build/images/icon-plane.png);
2268
+ background-size: 100%;
2269
+ }
2270
+
2271
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .input-wrap .btn-rp-submit .rp-icon-plane:hover {
2272
+ opacity: .8;
2273
+ }
2274
+
2275
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .checkbox-wrap {
2276
+ display: -webkit-box;
2277
+ display: -ms-flexbox;
2278
+ display: flex;
2279
+ -webkit-box-align: center;
2280
+ -ms-flex-align: center;
2281
+ align-items: center;
2282
+ }
2283
+
2284
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .checkbox-wrap #rp_get_offers {
2285
+ width: 14px;
2286
+ min-width: 14px;
2287
+ height: 14px;
2288
+ min-height: 14px;
2289
+ margin: 0 5px;
2290
+ }
2291
+
2292
+ .rp-overlay .rp-discount .rp-contact-form .rp-contact-form-form .checkbox-wrap label {
2293
+ font-size: 12px;
2294
+ }
2295
+
2296
+ .rp-overlay .rp-footer {
2297
+ position: absolute;
2298
+ bottom: 0;
2299
+ left: 0;
2300
+ width: 100%;
2301
+ padding: 0 30px 7px;
2302
+ }
2303
+
2304
+ .rp-overlay .rp-footer .rp-footer-top {
2305
+ padding: 10px 0;
2306
+ border-top: 1px solid #72aee2;
2307
+ border-bottom: 1px solid #72aee2;
2308
+ }
2309
+
2310
+ .rp-overlay .rp-footer .rp-footer-top a {
2311
+ font-weight: 600;
2312
+ color: #fff;
2313
+ }
2314
+
2315
+ .rp-overlay .rp-footer .rp-footer-bottom {
2316
+ padding: 12px 30px;
2317
+ font-size: 12px;
2318
+ text-align: center;
2319
+ }
2320
+
2321
+ .rp-loader-wrap {
2322
+ display: block;
2323
+ padding: 5px;
2324
+ text-align: center;
2325
+ }
2326
+
2327
+ .rp-loader-wrap .rp-loader {
2328
+ display: inline-block;
2329
+ width: 20px;
2330
+ height: 20px;
2331
+ border: 3px solid #f3f3f3;
2332
+ border-top: 3px solid #3498db;
2333
+ border-radius: 50%;
2334
+ -webkit-animation: rp_spin 2s linear infinite;
2335
+ animation: rp_spin 2s linear infinite;
2336
+ }
2337
+
2338
+ @-webkit-keyframes rp_spin {
2339
+ 0% {
2340
+ -webkit-transform: rotate(0deg);
2341
+ }
2342
+
2343
+ 100% {
2344
+ -webkit-transform: rotate(360deg);
2345
+ }
2346
+ }
2347
+
2348
+ @keyframes rp_spin {
2349
+ 0% {
2350
+ -webkit-transform: rotate(0deg);
2351
+ transform: rotate(0deg);
2352
+ }
2353
+
2354
+ 100% {
2355
+ -webkit-transform: rotate(360deg);
2356
+ transform: rotate(360deg);
2357
+ }
2358
+ }
2359
+
2360
+ .wrap-accesibe {
2361
+ direction: ltr;
2362
+ }
2363
+
2364
+ .wrap-accesibe iframe {
2365
+ height: calc(100vh - 280px) !important;
2366
+ }
2367
+
2368
+ .wrap-accesibe .wp-picker-container .button,
2369
+ .wrap-accesibe .wp-picker-container .button-secondary {
2370
+ width: 38px;
2371
+ height: 38px;
2372
+ overflow: hidden;
2373
+ text-indent: -999px;
2374
+ vertical-align: top;
2375
+ border: 1px solid #000;
2376
+ border-radius: 50%;
2377
+ }
2378
+
2379
+ .wrap-accesibe .success-message {
2380
+ padding: 24px 40px;
2381
+ margin-bottom: 30px;
2382
+ font-size: 18px;
2383
+ font-weight: normal;
2384
+ line-height: 21px;
2385
+ color: #fff;
2386
+ background: #1871f8;
2387
+ }
2388
+
2389
+ .wrap-accesibe .success-message h3 {
2390
+ margin: 0;
2391
+ font-size: 24px;
2392
+ font-style: normal;
2393
+ font-weight: 600;
2394
+ line-height: 32px;
2395
+ color: #80d9ff;
2396
+ /* identical to box height */
2397
+ text-align: left;
2398
+ }
2399
+
2400
+ .wrap-accesibe .success-content a {
2401
+ font-weight: 600;
2402
+ color: #80d8ff;
2403
+ }
2404
+
2405
+ .wrap-accesibe .success-message-subtitle {
2406
+ margin-bottom: 20px;
2407
+ }
2408
+
2409
+ .wrap-accesibe .accesibe-settings-form-footer {
2410
+ padding: 0 40px;
2411
+ margin-top: 40px;
2412
+ }
2413
+
2414
+ .wrap-accesibe .logo-row {
2415
+ display: -webkit-box;
2416
+ display: -ms-flexbox;
2417
+ display: flex;
2418
+ -webkit-box-pack: justify;
2419
+ -ms-flex-pack: justify;
2420
+ justify-content: space-between;
2421
+ padding: 10px 0;
2422
+ }
2423
+
2424
+ .wrap-accesibe .logo-row .accesibe-settings-form {
2425
+ height: auto;
2426
+ padding: 0;
2427
+ overflow: auto;
2428
+ }
2429
+
2430
+ .wrap-accesibe .top-logo {
2431
+ padding: 10px 30px;
2432
+ }
2433
+
2434
+ .wrap-accesibe .top-logo .site-button {
2435
+ padding: 0 20px !important;
2436
+ margin-top: 0 !important;
2437
+ }
2438
+
2439
+ .wrap-accesibe .home-hero {
2440
+ position: relative;
2441
+ display: block !important;
2442
+ min-height: 700px;
2443
+ max-height: none !important;
2444
+ padding: 0 !important;
2445
+ background-attachment: fixed;
2446
+ }
2447
+
2448
+ .wrap-accesibe .scanning {
2449
+ padding: 10px 40px;
2450
+ font-size: 18px;
2451
+ font-weight: bold;
2452
+ background: #e7faf0;
2453
+ }
2454
+
2455
+ .wrap-accesibe .scanning-tip {
2456
+ padding: 11px 40px;
2457
+ font-size: 16px;
2458
+ background: blanchedalmond;
2459
+ }
2460
+
2461
+ .wrap-accesibe .reg-form.wrapper {
2462
+ position: relative;
2463
+ z-index: 9;
2464
+ }
2465
+
2466
+ .wrap-accesibe .home-hero-cta {
2467
+ display: -webkit-box;
2468
+ display: -moz-flex;
2469
+ display: -ms-flexbox;
2470
+ display: flex;
2471
+ justify-content: space-between;
2472
+ -webkit-justify-content: space-between;
2473
+ -moz-justify-content: space-between;
2474
+ -webkit-box-pack: justify;
2475
+ -ms-flex-pack: justify;
2476
+ align-items: center;
2477
+ -webkit-align-items: center;
2478
+ -moz-align-items: center;
2479
+ -webkit-box-align: center;
2480
+ -ms-flex-align: center;
2481
+ flex-wrap: wrap;
2482
+ -webkit-flex-wrap: wrap;
2483
+ -moz-flex-wrap: wrap;
2484
+ -ms-flex-wrap: wrap;
2485
+ flex-direction: column;
2486
+ -moz-flex-direction: column;
2487
+ -ms-flex-direction: column;
2488
+ -webkit-box-direction: normal;
2489
+ -webkit-box-orient: vertical;
2490
+ }
2491
+
2492
+ .wrap-accesibe .home-hero .home-hero-image {
2493
+ position: absolute;
2494
+ top: 0;
2495
+ right: 0;
2496
+ z-index: 1;
2497
+ z-index: 999;
2498
+ width: 47%;
2499
+ height: auto;
2500
+ -webkit-transition: all .15s ease;
2501
+ -o-transition: all .15s ease;
2502
+ transition: all .15s ease;
2503
+ }
2504
+
2505
+ .wrap-accesibe .home-hero .home-hero-image:hover .play-button {
2506
+ -webkit-transform: scale(1.1);
2507
+ -ms-transform: scale(1.1);
2508
+ transform: scale(1.1);
2509
+ }
2510
+
2511
+ .wrap-accesibe .home-hero .home-hero-image:active .play-button {
2512
+ -webkit-transform: scale(1);
2513
+ -ms-transform: scale(1);
2514
+ transform: scale(1);
2515
+ }
2516
+
2517
+ .wrap-accesibe .home-hero .home-hero-image .hero-tooltip {
2518
+ position: absolute;
2519
+ top: 0;
2520
+ right: 0;
2521
+ }
2522
+
2523
+ .wrap-accesibe .home-hero .home-hero-image .hero-cover-image {
2524
+ display: block;
2525
+ display: none;
2526
+ width: 95%;
2527
+ max-width: 100% !important;
2528
+ max-height: 400px;
2529
+ margin-left: auto;
2530
+ -o-object-fit: contain;
2531
+ object-fit: contain;
2532
+ -o-object-position: top right;
2533
+ object-position: top right;
2534
+ }
2535
+
2536
+ .wrap-accesibe .home-hero .home-hero-image .play-button-wrap {
2537
+ position: absolute;
2538
+ top: 50%;
2539
+ left: 50%;
2540
+ width: 100%;
2541
+ height: 100%;
2542
+ cursor: pointer;
2543
+ -webkit-transform: translateX(-50%) translateY(-50%);
2544
+ -ms-transform: translateX(-50%) translateY(-50%);
2545
+ transform: translateX(-50%) translateY(-50%);
2546
+ }
2547
+
2548
+ .wrap-accesibe .home-hero .home-hero-image .play-button-wrap .play-button {
2549
+ position: relative;
2550
+ top: -70px;
2551
+ right: -50px;
2552
+ z-index: 2;
2553
+ margin: auto;
2554
+ }
2555
+
2556
+ .wrap-accesibe .site-button {
2557
+ width: 100%;
2558
+ max-width: 300px;
2559
+ height: 57px;
2560
+ font-size: 16px;
2561
+ font-weight: 600;
2562
+ line-height: 21px;
2563
+ color: #fff;
2564
+ text-align: center;
2565
+ background: #136ef8;
2566
+ border: 0;
2567
+ border-radius: 10px;
2568
+ -webkit-box-shadow: none;
2569
+ box-shadow: none;
2570
+ }
2571
+
2572
+ .wrap-accesibe input[type='checkbox'] {
2573
+ width: auto;
2574
+ }
2575
+
2576
+ .wrap-accesibe .accesibe-settings-form {
2577
+ height: 100%;
2578
+ padding: 20px 30px 30px 30px;
2579
+ overflow: auto;
2580
+ }
2581
+
2582
+ .wrap-accesibe .accesibe-settings-form .site-button {
2583
+ width: auto;
2584
+ min-width: 200px;
2585
+ margin-top: 20px;
2586
+ }
2587
+
2588
+ .wrap-accesibe .accesibe-settings-form .field-wrap {
2589
+ margin-bottom: 10px;
2590
+ }
2591
+
2592
+ .wrap-accesibe .accesibe-settings-form .field-wrap select,
2593
+ .wrap-accesibe .accesibe-settings-form .field-wrap [type='number'],
2594
+ .wrap-accesibe .accesibe-settings-form .field-wrap [type='email'],
2595
+ .wrap-accesibe .accesibe-settings-form .field-wrap [type='url'],
2596
+ .wrap-accesibe .accesibe-settings-form .field-wrap [type='text'] {
2597
+ width: 100%;
2598
+ height: 38px;
2599
+ margin: 0;
2600
+ border-radius: 0;
2601
+ }
2602
+
2603
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-minititle {
2604
+ display: block;
2605
+ font-size: 17px;
2606
+ font-weight: 600;
2607
+ line-height: 1;
2608
+ color: #136ef8;
2609
+ letter-spacing: -.5px;
2610
+ }
2611
+
2612
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
2613
+ font-size: 28px;
2614
+ }
2615
+
2616
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
2617
+ margin: 0;
2618
+ margin-bottom: 100px;
2619
+ font-size: 42px;
2620
+ font-style: normal;
2621
+ font-weight: 600;
2622
+ line-height: 48px;
2623
+ color: #fff;
2624
+ }
2625
+
2626
+ .wrap-accesibe .hero-right-inner {
2627
+ max-width: 462px;
2628
+ padding: 40px 0;
2629
+ margin: auto;
2630
+ margin-left: 10%;
2631
+ }
2632
+
2633
+ .wrap-accesibe .hero-right-inner h4 {
2634
+ font-size: 24px;
2635
+ font-weight: 600;
2636
+ line-height: 32px;
2637
+ color: #136ef8;
2638
+ }
2639
+
2640
+ .wrap-accesibe .hero-right-inner .accessibe-logo {
2641
+ padding: 0;
2642
+ margin-bottom: 40px;
2643
+ }
2644
+
2645
+ .wrap-accesibe .hero-left-inner {
2646
+ max-width: 600px;
2647
+ }
2648
+
2649
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title em:before {
2650
+ bottom: 10px;
2651
+ }
2652
+
2653
+ .wrap-accesibe .home-hero-checkmarks {
2654
+ margin-top: 20px;
2655
+ }
2656
+
2657
+ .wrap-accesibe .main-form-wrap {
2658
+ display: -webkit-box;
2659
+ display: -ms-flexbox;
2660
+ display: flex;
2661
+ -webkit-box-pack: center;
2662
+ -ms-flex-pack: center;
2663
+ justify-content: center;
2664
+ }
2665
+
2666
+ .wrap-accesibe .main-form-wrap .field-wrap textarea,
2667
+ .wrap-accesibe .main-form-wrap .field-wrap select,
2668
+ .wrap-accesibe .main-form-wrap .field-wrap [type='number'],
2669
+ .wrap-accesibe .main-form-wrap .field-wrap [type='email'],
2670
+ .wrap-accesibe .main-form-wrap .field-wrap [type='url'],
2671
+ .wrap-accesibe .main-form-wrap .field-wrap [type='password'],
2672
+ .wrap-accesibe .main-form-wrap .field-wrap [type='text'] {
2673
+ height: 57px;
2674
+ -webkit-box-sizing: border-box;
2675
+ box-sizing: border-box;
2676
+ padding: 0 10px;
2677
+ font-size: 16px;
2678
+ font-style: normal;
2679
+ font-weight: 600;
2680
+ line-height: 21px;
2681
+ color: #bfbfbf;
2682
+ border: 2px solid #eaeaea;
2683
+ border-radius: 10px;
2684
+ }
2685
+
2686
+ .wrap-accesibe .main-form-wrap label {
2687
+ margin-bottom: 16px;
2688
+ font-size: 16px;
2689
+ font-style: normal;
2690
+ font-weight: 600;
2691
+ line-height: 21px;
2692
+ color: #bfbfbf;
2693
+ }
2694
+
2695
+ .wrap-accesibe .home-hero-checkmarks .home-hero-checkmark {
2696
+ position: relative;
2697
+ display: block;
2698
+ padding-left: 45px;
2699
+ margin: 30px 0;
2700
+ font-size: 18px;
2701
+ line-height: 1.3;
2702
+ color: #fff;
2703
+ text-align: left;
2704
+ }
2705
+
2706
+ .wrap-accesibe section.home-hero.hero-standard.hero-standard-full {
2707
+ position: relative;
2708
+ }
2709
+
2710
+ .wrap-accesibe h3.home-hero-title {
2711
+ color: #fff;
2712
+ }
2713
+
2714
+ .wrap-accesibe .home-hero-content {
2715
+ display: block;
2716
+ width: 100%;
2717
+ -webkit-box-sizing: border-box;
2718
+ box-sizing: border-box;
2719
+ background: #136ef8;
2720
+ }
2721
+
2722
+ .wrap-accesibe .hero-right,
2723
+ .wrap-accesibe .hero-left {
2724
+ width: 50%;
2725
+ }
2726
+
2727
+ .wrap-accesibe .hero-left {
2728
+ display: -webkit-box;
2729
+ display: -moz-flex;
2730
+ display: -ms-flexbox;
2731
+ display: flex;
2732
+ justify-content: center;
2733
+ -webkit-justify-content: center;
2734
+ -moz-justify-content: center;
2735
+ -webkit-box-pack: center;
2736
+ -ms-flex-pack: center;
2737
+ align-items: space-between;
2738
+ -webkit-align-items: space-between;
2739
+ -moz-align-items: space-between;
2740
+ -webkit-box-align: space-between;
2741
+ -ms-flex-align: space-between;
2742
+ flex-direction: column;
2743
+ -moz-flex-direction: column;
2744
+ -ms-flex-direction: column;
2745
+ -webkit-box-direction: normal;
2746
+ -webkit-box-orient: vertical;
2747
+ padding: 120px 40px;
2748
+ }
2749
+
2750
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark .icon {
2751
+ display: -webkit-box;
2752
+ display: -moz-flex;
2753
+ display: -ms-flexbox;
2754
+ display: flex;
2755
+ justify-content: center;
2756
+ -webkit-justify-content: center;
2757
+ -moz-justify-content: center;
2758
+ -webkit-box-pack: center;
2759
+ -ms-flex-pack: center;
2760
+ align-items: center;
2761
+ -webkit-align-items: center;
2762
+ -moz-align-items: center;
2763
+ -webkit-box-align: center;
2764
+ -ms-flex-align: center;
2765
+ position: absolute;
2766
+ top: -5px;
2767
+ left: 0;
2768
+ width: 23px;
2769
+ height: 23px;
2770
+ padding: 6px;
2771
+ background-color: #81d9ff;
2772
+ border-radius: 50%;
2773
+ }
2774
+
2775
+ .wrap-accesibe .agreement {
2776
+ margin-top: 10px;
2777
+ margin-bottom: 20px;
2778
+ }
2779
+
2780
+ .wrap-accesibe .popup.popup-account .content .account-stages-wrapper .account-stage-wrapper .account-body .highlight a {
2781
+ color: #136ef8;
2782
+ }
2783
+
2784
+ .wrap-accesibe .highlight {
2785
+ background: transparent;
2786
+ }
2787
+
2788
+ .wrap-accesibe .field-wrap {
2789
+ padding: 0 0;
2790
+ margin-bottom: 20px;
2791
+ }
2792
+
2793
+ .wrap-accesibe .agreement {
2794
+ display: -webkit-box;
2795
+ display: -ms-flexbox;
2796
+ display: flex;
2797
+ -webkit-box-pack: justify;
2798
+ -ms-flex-pack: justify;
2799
+ justify-content: space-between;
2800
+ -webkit-box-align: center;
2801
+ -ms-flex-align: center;
2802
+ align-items: center;
2803
+ }
2804
+
2805
+ .wrap-accesibe .agreement label a,
2806
+ .wrap-accesibe .agreement label {
2807
+ font-size: 16px;
2808
+ font-style: normal;
2809
+ font-weight: normal;
2810
+ line-height: 10px;
2811
+ color: #bfbfbf;
2812
+ }
2813
+
2814
+ .wrap-accesibe .agreement input[type=checkbox] {
2815
+ position: relative;
2816
+ top: 3px;
2817
+ }
2818
+
2819
+ .wrap-accesibe .home-hero-cta .field-wrap {
2820
+ display: -webkit-box;
2821
+ display: -ms-flexbox;
2822
+ display: flex;
2823
+ width: calc(100%);
2824
+ padding: 0 0;
2825
+ margin-bottom: 30px;
2826
+ -webkit-box-orient: vertical;
2827
+ -webkit-box-direction: normal;
2828
+ -ms-flex-direction: column;
2829
+ flex-direction: column;
2830
+ }
2831
+
2832
+ .wrap-accesibe .footer-wrap {
2833
+ display: -webkit-box;
2834
+ display: -ms-flexbox;
2835
+ display: flex;
2836
+ -webkit-box-pack: justify;
2837
+ -ms-flex-pack: justify;
2838
+ justify-content: space-between;
2839
+ padding: 0 40px;
2840
+ margin: 40px 0;
2841
+ text-align: right;
2842
+ }
2843
+
2844
+ .wrap-accesibe .home-hero .home-hero-logos {
2845
+ position: absolute;
2846
+ bottom: -75px;
2847
+ left: 50%;
2848
+ z-index: 2;
2849
+ width: 90%;
2850
+ max-width: 1024px;
2851
+ padding: 30px 50px;
2852
+ text-align: center;
2853
+ background-color: #fff;
2854
+ border-radius: 10px;
2855
+ -webkit-box-shadow: 0 0 50px 0 rgba(50, 50, 50, 0.1);
2856
+ box-shadow: 0 0 50px 0 rgba(50, 50, 50, 0.1);
2857
+ -webkit-transform: translateX(-50%);
2858
+ -ms-transform: translateX(-50%);
2859
+ transform: translateX(-50%);
2860
+ }
2861
+
2862
+ .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
2863
+ display: block;
2864
+ margin-bottom: 20px;
2865
+ font-size: 18px;
2866
+ line-height: 1;
2867
+ }
2868
+
2869
+ .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title br {
2870
+ display: none !important;
2871
+ }
2872
+
2873
+ .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title em {
2874
+ display: inline-block;
2875
+ padding: 5px 12px;
2876
+ margin: 0 3px;
2877
+ font-style: normal;
2878
+ font-weight: 600;
2879
+ color: #136ef8;
2880
+ background-color: #e3e8fb;
2881
+ border-radius: 50px;
2882
+ }
2883
+
2884
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item {
2885
+ display: -webkit-box;
2886
+ display: -ms-flexbox;
2887
+ display: flex;
2888
+ -webkit-box-pack: center;
2889
+ -ms-flex-pack: center;
2890
+ justify-content: center;
2891
+ -webkit-box-align: center;
2892
+ -ms-flex-align: center;
2893
+ align-items: center;
2894
+ height: 50px;
2895
+ }
2896
+
2897
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img {
2898
+ display: block;
2899
+ max-width: 110px !important;
2900
+ max-height: 35px !important;
2901
+ margin: auto;
2902
+ -webkit-transition: all .15s ease;
2903
+ -o-transition: all .15s ease;
2904
+ transition: all .15s ease;
2905
+ }
2906
+
2907
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img:hover {
2908
+ -webkit-transform: scale(1.15);
2909
+ -ms-transform: scale(1.15);
2910
+ transform: scale(1.15);
2911
+ }
2912
+
2913
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img:active {
2914
+ -webkit-transform: scale(1);
2915
+ -ms-transform: scale(1);
2916
+ transform: scale(1);
2917
+ }
2918
+
2919
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item .logo-higher img {
2920
+ max-height: 45px !important;
2921
+ }
2922
+
2923
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item .logo-shorter img {
2924
+ max-height: 25px !important;
2925
+ }
2926
+
2927
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item .logo-wider img {
2928
+ max-width: 125px !important;
2929
+ }
2930
+
2931
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev {
2932
+ left: -25px;
2933
+ }
2934
+
2935
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next {
2936
+ right: -25px;
2937
+ }
2938
+
2939
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev,
2940
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next {
2941
+ top: -10px;
2942
+ width: 20px;
2943
+ height: 20px;
2944
+ background: transparent;
2945
+ -webkit-box-shadow: 0 0 0 transparent;
2946
+ box-shadow: 0 0 0 transparent;
2947
+ }
2948
+
2949
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev .icon,
2950
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next .icon {
2951
+ width: 17px;
2952
+ }
2953
+
2954
+ @media screen and (max-width: 1700px) {
2955
+ .wrap-accesibe .home-hero .home-hero-image .hero-cover-image {
2956
+ width: auto !important;
2957
+ }
2958
+
2959
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-minititle {
2960
+ font-size: 16px;
2961
+ }
2962
+
2963
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
2964
+ font-size: 16px;
2965
+ }
2966
+
2967
+ .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
2968
+ font-size: 16px;
2969
+ }
2970
+
2971
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item img {
2972
+ max-width: 100px !important;
2973
+ max-height: 30px !important;
2974
+ }
2975
+
2976
+ .wrap-accesibe .home-hero .home-hero-logos {
2977
+ max-width: 960px;
2978
+ padding-top: 20px;
2979
+ padding-bottom: 20px;
2980
+ }
2981
+ }
2982
+
2983
+ @media screen and (max-width: 1300px) {
2984
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
2985
+ font-size: 28px;
2986
+ }
2987
+
2988
+ .wrap-accesibe .main-form-wrap {
2989
+ flex-direction: column;
2990
+ -moz-flex-direction: column;
2991
+ -ms-flex-direction: column;
2992
+ -webkit-box-direction: normal;
2993
+ -webkit-box-orient: vertical;
2994
+ }
2995
+
2996
+ .wrap-accesibe .hero-right,
2997
+ .wrap-accesibe .hero-left {
2998
+ width: 100%;
2999
+ }
3000
+
3001
+ .wrap-accesibe .hero-right-inner,
3002
+ .wrap-accesibe .hero-left {
3003
+ padding: 40px 40px;
3004
+ }
3005
+
3006
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
3007
+ margin-bottom: 20px;
3008
+ }
3009
+
3010
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
3011
+ margin: 28px 0;
3012
+ }
3013
+
3014
+ .wrap-accesibe .hero-right-inner {
3015
+ margin-left: 0;
3016
+ }
3017
+ }
3018
+
3019
+ @media screen and (max-width: 1024px) {
3020
+ .wrap-accesibe .home-hero .home-hero-image .hero-tooltip {
3021
+ display: none !important;
3022
+ }
3023
+
3024
+ .wrap-accesibe .home-hero .home-hero-image .hero-cover-image {
3025
+ max-width: 100% !important;
3026
+ height: auto;
3027
+ max-height: 100%;
3028
+ }
3029
+
3030
+ .wrap-accesibe .home-hero .home-hero-image {
3031
+ position: relative;
3032
+ top: auto;
3033
+ right: auto;
3034
+ bottom: auto;
3035
+ left: auto;
3036
+ display: none;
3037
+ float: right;
3038
+ width: 100%;
3039
+ height: auto;
3040
+ padding-left: 50px;
3041
+ margin: 0;
3042
+ }
3043
+
3044
+ .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
3045
+ max-width: 450px;
3046
+ margin-right: auto;
3047
+ margin-left: auto;
3048
+ }
3049
+
3050
+ .wrap-accesibe .home-hero .home-hero-logos {
3051
+ position: relative;
3052
+ top: auto;
3053
+ right: auto;
3054
+ bottom: -50px;
3055
+ left: auto;
3056
+ z-index: 3;
3057
+ max-width: 750px;
3058
+ margin: auto;
3059
+ -webkit-transform: translateY(0);
3060
+ -ms-transform: translateY(0);
3061
+ transform: translateY(0);
3062
+ }
3063
+
3064
+ .wrap-accesibe .home-hero {
3065
+ height: auto;
3066
+ background-attachment: scroll;
3067
+ }
3068
+ }
3069
+
3070
+ @media screen and (max-width: 700px) {
3071
+ .wrap-accesibe .home-hero .home-hero-image {
3072
+ display: block;
3073
+ height: 350px;
3074
+ }
3075
+
3076
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
3077
+ text-align: left;
3078
+ }
3079
+
3080
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-prev {
3081
+ left: 10px;
3082
+ }
3083
+
3084
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav .owl-next {
3085
+ right: 10px;
3086
+ }
3087
+
3088
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav {
3089
+ display: none;
3090
+ }
3091
+
3092
+ .wrap-accesibe .home-hero .home-hero-logos {
3093
+ padding: 20px;
3094
+ }
3095
+ }
3096
+
3097
+ @media screen and (max-width: 500px) {
3098
+ .wrap-accesibe .home-hero .home-hero-image .play-button-wrap .play-button {
3099
+ top: -25px;
3100
+ right: -25px;
3101
+ }
3102
+
3103
+ .wrap-accesibe .home-hero .home-hero-image {
3104
+ height: auto;
3105
+ }
3106
+
3107
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title br {
3108
+ display: none;
3109
+ }
3110
+
3111
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-title {
3112
+ font-size: 27px;
3113
+ }
3114
+
3115
+ .wrap-accesibe .home-hero .home-hero-content .home-hero-checkmarks .home-hero-checkmark {
3116
+ font-size: 16px;
3117
+ }
3118
+
3119
+ .wrap-accesibe .home-hero .home-hero-logos .home-hero-logos-title {
3120
+ margin-bottom: 30px;
3121
+ font-size: 16px;
3122
+ }
3123
+
3124
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item:nth-child(-n + 10) {
3125
+ display: block;
3126
+ }
3127
+
3128
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage .owl-item {
3129
+ display: none;
3130
+ width: 50% !important;
3131
+ }
3132
+
3133
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-stage {
3134
+ display: -webkit-box;
3135
+ display: -ms-flexbox;
3136
+ display: flex;
3137
+ -webkit-box-pack: justify;
3138
+ -ms-flex-pack: justify;
3139
+ justify-content: space-between;
3140
+ -webkit-box-align: start;
3141
+ -ms-flex-align: start;
3142
+ align-items: flex-start;
3143
+ width: 100% !important;
3144
+ -webkit-transform: none !important;
3145
+ -ms-transform: none !important;
3146
+ transform: none !important;
3147
+ -ms-flex-wrap: wrap;
3148
+ flex-wrap: wrap;
3149
+ }
3150
+
3151
+ .wrap-accesibe .home-hero .home-hero-logos .clients-carousel .owl-nav {
3152
+ display: none !important;
3153
+ }
3154
+
3155
+ .wrap-accesibe .home-hero .home-hero-logos {
3156
+ bottom: -35px;
3157
+ }
3158
  }
build/images/index.php DELETED
File without changes
build/images/stripe.png ADDED
Binary file
build/index.php DELETED
File without changes
build/js/index.php DELETED
File without changes
build/js/wpcf7-redirect-backend-script.js CHANGED
@@ -4,94 +4,94 @@
4
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|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\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
5
  /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
6
  !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),--u;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;--u){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;--d)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,r,i=c(e),o=i[0],s=t[1];return e=i[1],o&&(n=D(o=l(o,s))),o?e=n&&n.normalize?n.normalize(e,(r=s,function(e){return l(e,r)})):l(e,s):(o=(i=c(e=l(e,s)))[0],e=i[1],o&&(n=D(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){"function"==typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===r||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},r.prototype.position=function(e,t){t.find(".select2-results").append(e)},r.prototype.sort=function(e){return this.options.get("sorter")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},r.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;s&&i.attr("title",s),l.StoreData(i[0],"data",r),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),r=i('<span class="select2-selection__clear" title="'+n()+'">&times;</span>');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event("select2:"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=r.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+r.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(":selected").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is("option"))return i.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=i.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,l(i.element).is("option"))return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,"data",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),r(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t,n=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===n.id}).length){var r=i.option(n);r.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([r])}t=n,i.trigger("select",{data:t})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),"string"==typeof t[r]&&0<t[r].indexOf("-")){var i=t[r].split("-")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if("string"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is("input")){var n=r(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===r.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===r.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t});;
7
- /**
8
- * Validation for fields
9
- * @constructor
10
- */
11
- function Wpcf7_admin_validations($){
12
-
13
- this.rules = {
14
-
15
- rules: {
16
-
17
- }
18
-
19
- };
20
-
21
- this.init = function(){
22
-
23
- this.addMethods();
24
-
25
- $('#wpcf7-contact-form-editor form').validate({
26
-
27
- rules: this.rules,
28
-
29
- onfocusout: function(element) {
30
-
31
- this.element(element);
32
-
33
- }
34
-
35
- });
36
-
37
- };
38
-
39
- this.addMethods = function(){
40
-
41
- this.nospaces();
42
-
43
- this.englishAndNumbersOnly();
44
-
45
- };
46
-
47
- /**
48
-
49
- * Allow only enlish and numbers
50
-
51
- * @return {[type]} [description]
52
-
53
- */
54
-
55
- this.englishAndNumbersOnly = function(){
56
-
57
- $.validator.addMethod("validateenglishnumbers", function(value, element) {
58
-
59
- return this.optional(element) || /^[a-z0-9_\-," "]+$/i.test(value);
60
-
61
- }, "English and numbers only");
62
-
63
- $.validator.addClassRules("validateenglishnumbers", {
64
-
65
- validateenglishnumbers: true
66
-
67
- });
68
-
69
- };
70
-
71
- /**
72
-
73
- * Disallow spaces
74
-
75
- */
76
-
77
- this.nospaces = function(){
78
-
79
- $.validator.addMethod("validatenospace", function(value, element) {
80
-
81
- return value.indexOf(" ") < 0 && value != "";
82
-
83
- }, "No spaces please");
84
-
85
- $.validator.addClassRules("validatenospace", {
86
-
87
- validatenospace: true
88
-
89
- });
90
-
91
- };
92
-
93
- this.init();
94
-
95
  }
96
  var wpcf7_redirect_admin;
97
 
@@ -133,7 +133,7 @@ var wpcf7_redirect_admin;
133
  }
134
 
135
  this.init_editors = function ($editor_action_wrap) {
136
- if ('undefined' !== typeof tinymce) {
137
  editor_id = $editor_action_wrap.find('textarea').prop('id');
138
 
139
  tinymce.init(tinyMCEPreInit.mceInit[editor_id]);
@@ -565,14 +565,14 @@ var wpcf7_redirect_admin;
565
  */
566
  this.select_toggler = function (e) {
567
  var $select = $(e.currentTarget);
568
-
569
  var toggler_name = $select.data('toggler-name');
570
  var selected_value = $select.val();
571
 
572
- $( '.' + toggler_name ).hide();
573
-
574
- if( selected_value ){
575
- $( '.' + toggler_name + '_' + selected_value).show();
576
  }
577
  }
578
 
@@ -1223,148 +1223,148 @@ var wpcf7_redirect_admin;
1223
  $(document.body).trigger('wpcf7r-loaded', wpcf7_redirect_admin);
1224
  });
1225
  })(jQuery);
1226
- jQuery(document).ready(function () {
1227
- set_event_listeneres();
1228
- disply_updates_marks();
1229
- });
1230
-
1231
- function disply_updates_marks() {
1232
- var update_count = jQuery('.extensions-list .has-update').length;
1233
- if (update_count) {
1234
- jQuery('li#extensions-panel-tab a').append(' <span class="update-plugins wpcf7r-update-extensions"><span class="plugin-count">' + update_count + '</span></span>');
1235
- }
1236
- }
1237
-
1238
- function set_event_listeneres() {
1239
- activate_serial_handler();
1240
- close_promo_box();
1241
- serial_activation_handler();
1242
- extension_deactivate_handler();
1243
- extension_update_handler();
1244
- }
1245
-
1246
- function extension_update_handler() {
1247
- jQuery('.extensions').on('click', '.promo-box .btn-update', function (e) {
1248
- e.preventDefault();
1249
- $extension = jQuery(this).parents('.promo-box');
1250
- show_extension_loader($extension);
1251
- update_wpcf7r_extension($extension);
1252
- });
1253
- }
1254
-
1255
- function activate_serial_handler() {
1256
- jQuery('.extensions').on('click', '.promo-box .btn-activate', function (e) {
1257
- e.preventDefault();
1258
- jQuery(this).parents('.promo-box').find('.serial').addClass('open');
1259
- });
1260
- }
1261
-
1262
- function close_promo_box() {
1263
- jQuery('.extensions').on('click', '.promo-box .btn-close', function (e) {
1264
- e.preventDefault();
1265
- jQuery(this).parents('.promo-box').find('.serial').removeClass('open');
1266
- });
1267
- }
1268
-
1269
- function serial_activation_handler() {
1270
- jQuery('.extensions').on('click', '.promo-box .btn-activate-serial', function (e) {
1271
- e.preventDefault();
1272
- $extension = jQuery(this).parents('.promo-box');
1273
- var serial = $extension.find('.serial-number').val();
1274
- if (!serial) {
1275
- $extension.find('.serial-number').addClass('err');
1276
- return false;
1277
- }
1278
- $extension.find('.serial-number').removeClass('err');
1279
- show_extension_loader($extension);
1280
- activate_extension($extension, serial);
1281
- });
1282
- }
1283
-
1284
- function extension_deactivate_handler() {
1285
- jQuery('.extensions').on('click', '.promo-box .btn-deactivate', function (e) {
1286
- e.preventDefault();
1287
- $extension = jQuery(this).parents('.promo-box');
1288
- show_extension_loader($extension);
1289
- deactivate_plugin_license($extension);
1290
- });
1291
- }
1292
-
1293
- function show_extension_loader($extension) {
1294
- $extension.append('<div class="wpcf7r_loader active"></div>');
1295
- }
1296
-
1297
- function deactivate_plugin_license($extension) {
1298
- var extension_name = $extension.data('extension');
1299
-
1300
- jQuery.ajax({
1301
- type: "post",
1302
- dataType: "json",
1303
- url: ajaxurl,
1304
- data: {
1305
- action: "deactivate_wpcf7r_extension",
1306
- extension_name: extension_name
1307
- },
1308
- success: function (response) {
1309
- console.log(response);
1310
- if (typeof response.error != 'undefined') {
1311
- jQuery('.actions').after('<div class="err">' + response.error + '</div>');
1312
- } else if (typeof response.extension_html != 'undefined') {
1313
- $extension.replaceWith(response.extension_html);
1314
- }
1315
- remove_extension_loader();
1316
- }
1317
- });
1318
- }
1319
-
1320
- function remove_extension_loader() {
1321
- jQuery('.wpcf7r_loader').remove();
1322
- }
1323
-
1324
- function update_wpcf7r_extension($extension) {
1325
- var extension_name = $extension.data('extension');
1326
-
1327
- jQuery.ajax({
1328
- type: "post",
1329
- dataType: "json",
1330
- url: ajaxurl,
1331
- data: {
1332
- action: "wpcf7r_extension_update",
1333
- extension_name: extension_name
1334
- },
1335
- success: function (response) {
1336
- if (response.extension_html != 'undefined' && response.extension_html) {
1337
- $extension.replaceWith(response.extension_html);
1338
- } else if (typeof response.error != 'undefined' && response.error) {
1339
- jQuery('.actions').after('<div class="err">' + response.error + '</div>');
1340
- }
1341
- remove_extension_loader();
1342
- }
1343
- });
1344
- }
1345
-
1346
- function activate_extension($extension, serial) {
1347
- var extension_name = $extension.data('extension');
1348
-
1349
- jQuery.ajax({
1350
- type: "post",
1351
- dataType: "json",
1352
- url: ajaxurl,
1353
- data: {
1354
- action: "activate_wpcf7r_extension",
1355
- extension_name: extension_name,
1356
- serial: serial
1357
- },
1358
- success: function (response) {
1359
- if (response.extension_html != 'undefined' && response.extension_html) {
1360
- $extension.replaceWith(response.extension_html);
1361
- window.location.reload();
1362
- } else if (typeof response.error != 'undefined' && response.error) {
1363
- $extension.find('.err').remove();
1364
- $extension.append('<div class="err">' + response.error + '</div>');
1365
- }
1366
-
1367
- remove_extension_loader();
1368
- }
1369
- });
1370
  }
4
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|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\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
5
  /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
6
  !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),--u;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;--u){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;--d)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,r,i=c(e),o=i[0],s=t[1];return e=i[1],o&&(n=D(o=l(o,s))),o?e=n&&n.normalize?n.normalize(e,(r=s,function(e){return l(e,r)})):l(e,s):(o=(i=c(e=l(e,s)))[0],e=i[1],o&&(n=D(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){"function"==typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===r||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},r.prototype.position=function(e,t){t.find(".select2-results").append(e)},r.prototype.sort=function(e){return this.options.get("sorter")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},r.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;s&&i.attr("title",s),l.StoreData(i[0],"data",r),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),r=i('<span class="select2-selection__clear" title="'+n()+'">&times;</span>');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event("select2:"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=r.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+r.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(":selected").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is("option"))return i.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=i.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,l(i.element).is("option"))return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,"data",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),r(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t,n=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===n.id}).length){var r=i.option(n);r.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([r])}t=n,i.trigger("select",{data:t})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),"string"==typeof t[r]&&0<t[r].indexOf("-")){var i=t[r].split("-")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if("string"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is("input")){var n=r(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===r.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===r.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t});;
7
+ /**
8
+ * Validation for fields
9
+ * @constructor
10
+ */
11
+ function Wpcf7_admin_validations($){
12
+
13
+ this.rules = {
14
+
15
+ rules: {
16
+
17
+ }
18
+
19
+ };
20
+
21
+ this.init = function(){
22
+
23
+ this.addMethods();
24
+
25
+ $('#wpcf7-contact-form-editor form').validate({
26
+
27
+ rules: this.rules,
28
+
29
+ onfocusout: function(element) {
30
+
31
+ this.element(element);
32
+
33
+ }
34
+
35
+ });
36
+
37
+ };
38
+
39
+ this.addMethods = function(){
40
+
41
+ this.nospaces();
42
+
43
+ this.englishAndNumbersOnly();
44
+
45
+ };
46
+
47
+ /**
48
+
49
+ * Allow only enlish and numbers
50
+
51
+ * @return {[type]} [description]
52
+
53
+ */
54
+
55
+ this.englishAndNumbersOnly = function(){
56
+
57
+ $.validator.addMethod("validateenglishnumbers", function(value, element) {
58
+
59
+ return this.optional(element) || /^[a-z0-9_\-," "]+$/i.test(value);
60
+
61
+ }, "English and numbers only");
62
+
63
+ $.validator.addClassRules("validateenglishnumbers", {
64
+
65
+ validateenglishnumbers: true
66
+
67
+ });
68
+
69
+ };
70
+
71
+ /**
72
+
73
+ * Disallow spaces
74
+
75
+ */
76
+
77
+ this.nospaces = function(){
78
+
79
+ $.validator.addMethod("validatenospace", function(value, element) {
80
+
81
+ return value.indexOf(" ") < 0 && value != "";
82
+
83
+ }, "No spaces please");
84
+
85
+ $.validator.addClassRules("validatenospace", {
86
+
87
+ validatenospace: true
88
+
89
+ });
90
+
91
+ };
92
+
93
+ this.init();
94
+
95
  }
96
  var wpcf7_redirect_admin;
97
 
133
  }
134
 
135
  this.init_editors = function ($editor_action_wrap) {
136
+ if ('undefined' !== typeof tinymce && 'undefined' !== typeof tinyMCEPreInit) {
137
  editor_id = $editor_action_wrap.find('textarea').prop('id');
138
 
139
  tinymce.init(tinyMCEPreInit.mceInit[editor_id]);
565
  */
566
  this.select_toggler = function (e) {
567
  var $select = $(e.currentTarget);
568
+
569
  var toggler_name = $select.data('toggler-name');
570
  var selected_value = $select.val();
571
 
572
+ $('.' + toggler_name).hide();
573
+
574
+ if (selected_value) {
575
+ $('.' + toggler_name + '_' + selected_value).show();
576
  }
577
  }
578
 
1223
  $(document.body).trigger('wpcf7r-loaded', wpcf7_redirect_admin);
1224
  });
1225
  })(jQuery);
1226
+ jQuery(document).ready(function () {
1227
+ set_event_listeneres();
1228
+ disply_updates_marks();
1229
+ });
1230
+
1231
+ function disply_updates_marks() {
1232
+ var update_count = jQuery('.extensions-list .has-update').length;
1233
+ if (update_count) {
1234
+ jQuery('li#extensions-panel-tab a').append(' <span class="update-plugins wpcf7r-update-extensions"><span class="plugin-count">' + update_count + '</span></span>');
1235
+ }
1236
+ }
1237
+
1238
+ function set_event_listeneres() {
1239
+ activate_serial_handler();
1240
+ close_promo_box();
1241
+ serial_activation_handler();
1242
+ extension_deactivate_handler();
1243
+ extension_update_handler();
1244
+ }
1245
+
1246
+ function extension_update_handler() {
1247
+ jQuery('.extensions').on('click', '.promo-box .btn-update', function (e) {
1248
+ e.preventDefault();
1249
+ $extension = jQuery(this).parents('.promo-box');
1250
+ show_extension_loader($extension);
1251
+ update_wpcf7r_extension($extension);
1252
+ });
1253
+ }
1254
+
1255
+ function activate_serial_handler() {
1256
+ jQuery('.extensions').on('click', '.promo-box .btn-activate', function (e) {
1257
+ e.preventDefault();
1258
+ jQuery(this).parents('.promo-box').find('.serial').addClass('open');
1259
+ });
1260
+ }
1261
+
1262
+ function close_promo_box() {
1263
+ jQuery('.extensions').on('click', '.promo-box .btn-close', function (e) {
1264
+ e.preventDefault();
1265
+ jQuery(this).parents('.promo-box').find('.serial').removeClass('open');
1266
+ });
1267
+ }
1268
+
1269
+ function serial_activation_handler() {
1270
+ jQuery('.extensions').on('click', '.promo-box .btn-activate-serial', function (e) {
1271
+ e.preventDefault();
1272
+ $extension = jQuery(this).parents('.promo-box');
1273
+ var serial = $extension.find('.serial-number').val();
1274
+ if (!serial) {
1275
+ $extension.find('.serial-number').addClass('err');
1276
+ return false;
1277
+ }
1278
+ $extension.find('.serial-number').removeClass('err');
1279
+ show_extension_loader($extension);
1280
+ activate_extension($extension, serial);
1281
+ });
1282
+ }
1283
+
1284
+ function extension_deactivate_handler() {
1285
+ jQuery('.extensions').on('click', '.promo-box .btn-deactivate', function (e) {
1286
+ e.preventDefault();
1287
+ $extension = jQuery(this).parents('.promo-box');
1288
+ show_extension_loader($extension);
1289
+ deactivate_plugin_license($extension);
1290
+ });
1291
+ }
1292
+
1293
+ function show_extension_loader($extension) {
1294
+ $extension.append('<div class="wpcf7r_loader active"></div>');
1295
+ }
1296
+
1297
+ function deactivate_plugin_license($extension) {
1298
+ var extension_name = $extension.data('extension');
1299
+
1300
+ jQuery.ajax({
1301
+ type: "post",
1302
+ dataType: "json",
1303
+ url: ajaxurl,
1304
+ data: {
1305
+ action: "deactivate_wpcf7r_extension",
1306
+ extension_name: extension_name
1307
+ },
1308
+ success: function (response) {
1309
+ console.log(response);
1310
+ if (typeof response.error != 'undefined') {
1311
+ jQuery('.actions').after('<div class="err">' + response.error + '</div>');
1312
+ } else if (typeof response.extension_html != 'undefined') {
1313
+ $extension.replaceWith(response.extension_html);
1314
+ }
1315
+ remove_extension_loader();
1316
+ }
1317
+ });
1318
+ }
1319
+
1320
+ function remove_extension_loader() {
1321
+ jQuery('.wpcf7r_loader').remove();
1322
+ }
1323
+
1324
+ function update_wpcf7r_extension($extension) {
1325
+ var extension_name = $extension.data('extension');
1326
+
1327
+ jQuery.ajax({
1328
+ type: "post",
1329
+ dataType: "json",
1330
+ url: ajaxurl,
1331
+ data: {
1332
+ action: "wpcf7r_extension_update",
1333
+ extension_name: extension_name
1334
+ },
1335
+ success: function (response) {
1336
+ if (response.extension_html != 'undefined' && response.extension_html) {
1337
+ $extension.replaceWith(response.extension_html);
1338
+ } else if (typeof response.error != 'undefined' && response.error) {
1339
+ jQuery('.actions').after('<div class="err">' + response.error + '</div>');
1340
+ }
1341
+ remove_extension_loader();
1342
+ }
1343
+ });
1344
+ }
1345
+
1346
+ function activate_extension($extension, serial) {
1347
+ var extension_name = $extension.data('extension');
1348
+
1349
+ jQuery.ajax({
1350
+ type: "post",
1351
+ dataType: "json",
1352
+ url: ajaxurl,
1353
+ data: {
1354
+ action: "activate_wpcf7r_extension",
1355
+ extension_name: extension_name,
1356
+ serial: serial
1357
+ },
1358
+ success: function (response) {
1359
+ if (response.extension_html != 'undefined' && response.extension_html) {
1360
+ $extension.replaceWith(response.extension_html);
1361
+ window.location.reload();
1362
+ } else if (typeof response.error != 'undefined' && response.error) {
1363
+ $extension.find('.err').remove();
1364
+ $extension.append('<div class="err">' + response.error + '</div>');
1365
+ }
1366
+
1367
+ remove_extension_loader();
1368
+ }
1369
+ });
1370
  }
classes/actions/class-wpcf7r-action-firescript.php CHANGED
@@ -1,83 +1,83 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Action_FireScript file - handles JavaScript actions
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- register_wpcf7r_actions(
9
- 'FireScript',
10
- __( 'Fire JavaScript', 'wpcf7-redirect' ),
11
- 'WPCF7R_Action_FireScript',
12
- 2
13
- );
14
-
15
- class WPCF7R_Action_FireScript extends WPCF7R_Action {
16
-
17
- public function __construct( $post ) {
18
- parent::__construct( $post );
19
-
20
- }
21
-
22
- /**
23
- * Get the fields relevant for this action
24
- */
25
- public function get_action_fields() {
26
- return array_merge(
27
- array(
28
- 'script' => array(
29
- 'name' => 'script',
30
- 'type' => 'textarea',
31
- 'label' => __( 'Paste your JavaScript here.', 'wpcf7-redirect' ),
32
- 'sub_title' => esc_html( __( '(Don\'t use <script> tags)', 'wpcf7-redirect' ) ),
33
- 'placeholder' => __( 'Paste your JavaScript here', 'wpcf7-redirect' ),
34
- 'value' => $this->get( 'script' ),
35
- ),
36
- 'short-tags-usage' => array(
37
- 'name' => 'general-alert',
38
- 'type' => 'notice',
39
- 'label' => __( 'Notice!', 'wpcf7-redirect' ),
40
- /* Translators: available mail tags */
41
- 'sub_title' => sprintf( __( 'You can use the following tags.<div>%s</div>', 'wpcf7-redirect' ), $this->get_formatted_mail_tags() ),
42
- 'placeholder' => '',
43
- 'class' => 'field-notice-alert',
44
- 'show_selector' => '',
45
- ),
46
- 'general-alert' => array(
47
- 'name' => 'general-alert',
48
- 'type' => 'notice',
49
- 'label' => __( 'Warning!', 'wpcf7-redirect' ),
50
- 'sub_title' => __(
51
- 'This option is for developers only - use with caution. If the plugin does not redirect after you have added scripts,
52
- it means you have a problem with your script. Either fix the script, or remove it.',
53
- 'wpcf7-redirect'
54
- ),
55
- 'placeholder' => '',
56
- 'class' => 'field-warning-alert',
57
- 'show_selector' => '',
58
- ),
59
- ),
60
- parent::get_default_fields()
61
- );
62
- }
63
-
64
- /**
65
- * Get settings page
66
- */
67
- public function get_action_settings() {
68
- $this->get_settings_template( 'html-action-send-to-email.php' );
69
- }
70
-
71
- /**
72
- * Handle a simple redirect rule
73
- */
74
- public function process( $submission ) {
75
-
76
- $script = $this->get( 'script' );
77
-
78
- $script = $this->replace_tags( $script, array() );
79
-
80
- return $script;
81
- }
82
-
83
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Action_FireScript file - handles JavaScript actions
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ register_wpcf7r_actions(
9
+ 'FireScript',
10
+ __( 'Fire JavaScript', 'wpcf7-redirect' ),
11
+ 'WPCF7R_Action_FireScript',
12
+ 2
13
+ );
14
+
15
+ class WPCF7R_Action_FireScript extends WPCF7R_Action {
16
+
17
+ public function __construct( $post ) {
18
+ parent::__construct( $post );
19
+
20
+ }
21
+
22
+ /**
23
+ * Get the fields relevant for this action
24
+ */
25
+ public function get_action_fields() {
26
+ return array_merge(
27
+ array(
28
+ 'script' => array(
29
+ 'name' => 'script',
30
+ 'type' => 'textarea',
31
+ 'label' => __( 'Paste your JavaScript here.', 'wpcf7-redirect' ),
32
+ 'sub_title' => esc_html( __( '(Don\'t use <script> tags)', 'wpcf7-redirect' ) ),
33
+ 'placeholder' => __( 'Paste your JavaScript here', 'wpcf7-redirect' ),
34
+ 'value' => $this->get( 'script' ),
35
+ ),
36
+ 'short-tags-usage' => array(
37
+ 'name' => 'general-alert',
38
+ 'type' => 'notice',
39
+ 'label' => __( 'Notice!', 'wpcf7-redirect' ),
40
+ /* Translators: available mail tags */
41
+ 'sub_title' => sprintf( __( 'You can use the following tags.<div>%s</div>', 'wpcf7-redirect' ), $this->get_formatted_mail_tags() ),
42
+ 'placeholder' => '',
43
+ 'class' => 'field-notice-alert',
44
+ 'show_selector' => '',
45
+ ),
46
+ 'general-alert' => array(
47
+ 'name' => 'general-alert',
48
+ 'type' => 'notice',
49
+ 'label' => __( 'Warning!', 'wpcf7-redirect' ),
50
+ 'sub_title' => __(
51
+ 'This option is for developers only - use with caution. If the plugin does not redirect after you have added scripts,
52
+ it means you have a problem with your script. Either fix the script, or remove it.',
53
+ 'wpcf7-redirect'
54
+ ),
55
+ 'placeholder' => '',
56
+ 'class' => 'field-warning-alert',
57
+ 'show_selector' => '',
58
+ ),
59
+ ),
60
+ parent::get_default_fields()
61
+ );
62
+ }
63
+
64
+ /**
65
+ * Get settings page
66
+ */
67
+ public function get_action_settings() {
68
+ $this->get_settings_template( 'html-action-send-to-email.php' );
69
+ }
70
+
71
+ /**
72
+ * Handle a simple redirect rule
73
+ */
74
+ public function process( $submission ) {
75
+
76
+ $script = $this->get( 'script' );
77
+
78
+ $script = $this->replace_tags( $script, array() );
79
+
80
+ return $script;
81
+ }
82
+
83
+ }
classes/actions/class-wpcf7r-action-honeypot.php CHANGED
@@ -1,163 +1,163 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Action_Honeypot
4
- * A Class that handles javascript actions
5
- */
6
-
7
- defined( 'ABSPATH' ) || exit;
8
-
9
- register_wpcf7r_actions(
10
- 'honeypot',
11
- __( 'Honeypot', 'wpcf7-redirect' ),
12
- 'WPCF7R_Action_Honeypot',
13
- 5
14
- );
15
-
16
- class WPCF7R_Action_Honeypot extends WPCF7R_Action {
17
- public function __construct( $post ) {
18
- parent::__construct( $post );
19
- }
20
-
21
- /**
22
- * Get the fields relevant for this action
23
- */
24
- public function get_action_fields() {
25
- return array_merge(
26
- array(
27
- 'general-alert' => array(
28
- 'name' => 'general-alert',
29
- 'type' => 'notice',
30
- 'label' => __( 'Notice!', 'wpcf7-redirect' ),
31
- 'sub_title' => __(
32
- 'Honeypot creates a random number of anti-spam fields on your form. If a robot fills out one of these fields the submission is marked as spam.<br/>
33
- <a href="https://en.wikipedia.org/wiki/Honeypot_(computing)" target="_blank">Learn More</a>',
34
- 'wpcf7-redirect'
35
- ),
36
- 'placeholder' => '',
37
- 'class' => 'field-warning-notice',
38
- 'show_selector' => '',
39
- ),
40
- ),
41
- parent::get_default_fields()
42
- );
43
- }
44
-
45
- /**
46
- * Create the honeypot field names
47
- *
48
- * @param integer $length
49
- */
50
- function readable_random_string( $length = 6 ) {
51
- $string = '';
52
- $vowels = array( 'a', 'e', 'i', 'o', 'u' );
53
- $consonants = array(
54
- 'b',
55
- 'c',
56
- 'd',
57
- 'f',
58
- 'g',
59
- 'h',
60
- 'j',
61
- 'k',
62
- 'l',
63
- 'm',
64
- 'n',
65
- 'p',
66
- 'r',
67
- 's',
68
- 't',
69
- 'v',
70
- 'w',
71
- 'x',
72
- 'y',
73
- 'z',
74
- );
75
- $max = $length / 2;
76
-
77
- for ( $i = 1; $i <= $max; $i++ ) {
78
- $string .= $consonants[ rand( 0, 19 ) ];
79
- $string .= $vowels[ rand( 0, 4 ) ];
80
- }
81
-
82
- return $string;
83
- }
84
-
85
- /**
86
- * Get the honeypot fields names
87
- */
88
- private function get_honeypot_names() {
89
- return get_post_meta( $this->get_id(), 'honeypot_names', true );
90
- }
91
-
92
- /**
93
- * Render callback
94
- */
95
- public function render_callback_once( $properties ) {
96
- add_action(
97
- 'wp_footer',
98
- function() {
99
- $honeypot_names = $this->get_honeypot_names();
100
-
101
- foreach ( $honeypot_names as $honeypot_name ) {
102
- echo "<style>.{$honeypot_name}{transform:scale(0);position: absolute;z-index: -10;}</style>";
103
- }
104
- }
105
- );
106
-
107
- return $properties;
108
- }
109
-
110
- /**
111
- * Render an element on the form frontend.
112
- *
113
- * @param array $properties
114
- * @param object $form
115
- */
116
- public function render_callback( $properties, $form ) {
117
- $honeypot_names = $this->get_honeypot_names();
118
-
119
- if ( ! $honeypot_names ) {
120
- $rand = rand( 1, 4 );
121
- $honeypot_names = array();
122
-
123
- for ( $i = 1;$i <= $rand;$i++ ) {
124
- $honeypot_names[] = $this->readable_random_string();
125
- }
126
-
127
- update_post_meta( $this->get_id(), 'honeypot_names', $honeypot_names );
128
- }
129
-
130
- if ( isset( $properties['form'] ) ) {
131
- foreach ( $honeypot_names as $honeypot_name ) {
132
- $properties['form'] .= "<p class='{$honeypot_name}'>[text {$honeypot_name}]</p>";
133
- }
134
- }
135
-
136
- return $properties;
137
- }
138
-
139
- /**
140
- * Process the honeypot validations
141
- */
142
- public function process_validation( $submission ) {
143
- $response = array();
144
- $posted_data = $submission->get_posted_data();
145
- $honeypot_names = $this->get_honeypot_names();
146
-
147
- if ( $honeypot_names ) {
148
- foreach ( $honeypot_names as $honeypot_name ) {
149
- if ( isset( $posted_data[ $honeypot_name ] ) && $posted_data[ $honeypot_name ] ) {
150
- $error = array(
151
- 'tag' => $honeypot_name,
152
- 'error_message' => __( 'Something went wrong', 'wpcf7-redirect' ),
153
- );
154
- $response['invalid_tags'][] = new WP_error( 'tag_invalid', $error );
155
- } else {
156
- $response['ignored_tags'][] = $honeypot_name;
157
- }
158
- }
159
- }
160
-
161
- return $response;
162
- }
163
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Action_Honeypot
4
+ * A Class that handles javascript actions
5
+ */
6
+
7
+ defined( 'ABSPATH' ) || exit;
8
+
9
+ register_wpcf7r_actions(
10
+ 'honeypot',
11
+ __( 'Honeypot', 'wpcf7-redirect' ),
12
+ 'WPCF7R_Action_Honeypot',
13
+ 5
14
+ );
15
+
16
+ class WPCF7R_Action_Honeypot extends WPCF7R_Action {
17
+ public function __construct( $post ) {
18
+ parent::__construct( $post );
19
+ }
20
+
21
+ /**
22
+ * Get the fields relevant for this action
23
+ */
24
+ public function get_action_fields() {
25
+ return array_merge(
26
+ array(
27
+ 'general-alert' => array(
28
+ 'name' => 'general-alert',
29
+ 'type' => 'notice',
30
+ 'label' => __( 'Notice!', 'wpcf7-redirect' ),
31
+ 'sub_title' => __(
32
+ 'Honeypot creates a random number of anti-spam fields on your form. If a robot fills out one of these fields the submission is marked as spam.<br/>
33
+ <a href="https://en.wikipedia.org/wiki/Honeypot_(computing)" target="_blank">Learn More</a>',
34
+ 'wpcf7-redirect'
35
+ ),
36
+ 'placeholder' => '',
37
+ 'class' => 'field-warning-notice',
38
+ 'show_selector' => '',
39
+ ),
40
+ ),
41
+ parent::get_default_fields()
42
+ );
43
+ }
44
+
45
+ /**
46
+ * Create the honeypot field names
47
+ *
48
+ * @param integer $length
49
+ */
50
+ function readable_random_string( $length = 6 ) {
51
+ $string = '';
52
+ $vowels = array( 'a', 'e', 'i', 'o', 'u' );
53
+ $consonants = array(
54
+ 'b',
55
+ 'c',
56
+ 'd',
57
+ 'f',
58
+ 'g',
59
+ 'h',
60
+ 'j',
61
+ 'k',
62
+ 'l',
63
+ 'm',
64
+ 'n',
65
+ 'p',
66
+ 'r',
67
+ 's',
68
+ 't',
69
+ 'v',
70
+ 'w',
71
+ 'x',
72
+ 'y',
73
+ 'z',
74
+ );
75
+ $max = $length / 2;
76
+
77
+ for ( $i = 1; $i <= $max; $i++ ) {
78
+ $string .= $consonants[ rand( 0, 19 ) ];
79
+ $string .= $vowels[ rand( 0, 4 ) ];
80
+ }
81
+
82
+ return $string;
83
+ }
84
+
85
+ /**
86
+ * Get the honeypot fields names
87
+ */
88
+ private function get_honeypot_names() {
89
+ return get_post_meta( $this->get_id(), 'honeypot_names', true );
90
+ }
91
+
92
+ /**
93
+ * Render callback
94
+ */
95
+ public function render_callback_once( $properties ) {
96
+ add_action(
97
+ 'wp_footer',
98
+ function() {
99
+ $honeypot_names = $this->get_honeypot_names();
100
+
101
+ foreach ( $honeypot_names as $honeypot_name ) {
102
+ echo "<style>.{$honeypot_name}{transform:scale(0);position: absolute;z-index: -10;}</style>";
103
+ }
104
+ }
105
+ );
106
+
107
+ return $properties;
108
+ }
109
+
110
+ /**
111
+ * Render an element on the form frontend.
112
+ *
113
+ * @param array $properties
114
+ * @param object $form
115
+ */
116
+ public function render_callback( $properties, $form ) {
117
+ $honeypot_names = $this->get_honeypot_names();
118
+
119
+ if ( ! $honeypot_names ) {
120
+ $rand = rand( 1, 4 );
121
+ $honeypot_names = array();
122
+
123
+ for ( $i = 1;$i <= $rand;$i++ ) {
124
+ $honeypot_names[] = $this->readable_random_string();
125
+ }
126
+
127
+ update_post_meta( $this->get_id(), 'honeypot_names', $honeypot_names );
128
+ }
129
+
130
+ if ( isset( $properties['form'] ) ) {
131
+ foreach ( $honeypot_names as $honeypot_name ) {
132
+ $properties['form'] .= "<p class='{$honeypot_name}'>[text {$honeypot_name}]</p>";
133
+ }
134
+ }
135
+
136
+ return $properties;
137
+ }
138
+
139
+ /**
140
+ * Process the honeypot validations
141
+ */
142
+ public function process_validation( $submission ) {
143
+ $response = array();
144
+ $posted_data = $submission->get_posted_data();
145
+ $honeypot_names = $this->get_honeypot_names();
146
+
147
+ if ( $honeypot_names ) {
148
+ foreach ( $honeypot_names as $honeypot_name ) {
149
+ if ( isset( $posted_data[ $honeypot_name ] ) && $posted_data[ $honeypot_name ] ) {
150
+ $error = array(
151
+ 'tag' => $honeypot_name,
152
+ 'error_message' => __( 'Something went wrong', 'wpcf7-redirect' ),
153
+ );
154
+ $response['invalid_tags'][] = new WP_error( 'tag_invalid', $error );
155
+ } else {
156
+ $response['ignored_tags'][] = $honeypot_name;
157
+ }
158
+ }
159
+ }
160
+
161
+ return $response;
162
+ }
163
+ }
classes/actions/class-wpcf7r-action-redirect.php CHANGED
@@ -1,280 +1,280 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Action_Redirect file.
4
- */
5
-
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- register_wpcf7r_actions(
11
- 'redirect',
12
- __( 'Redirect', 'wpcf7-redirect' ),
13
- 'WPCF7R_Action_Redirect',
14
- 1
15
- );
16
-
17
- /**
18
- * Class WPCF7R_Action_Redirect
19
- * A Class that handles redirect actions
20
- */
21
- class WPCF7R_Action_Redirect extends WPCF7R_Action {
22
-
23
- /**
24
- * Init the parent action class
25
- *
26
- * @param $post
27
- */
28
- public function __construct( $post ) {
29
- parent::__construct( $post );
30
-
31
- }
32
-
33
- /**
34
- * Get the action admin fields
35
- */
36
- public function get_action_fields() {
37
-
38
- $parent_fields = parent::get_default_fields();
39
-
40
- unset( $parent_fields['action_status'] );
41
-
42
- return array_merge(
43
- array(
44
- array(
45
- 'name' => 'use_external_url',
46
- 'type' => 'checkbox',
47
- 'label' => __( 'Use custom URL', 'wpcf7-redirect' ),
48
- 'sub_title' => '',
49
- 'placeholder' => '',
50
- 'show_selector' => '.field-wrap-external_url,.field-wrap-page_id',
51
- 'value' => $this->get( 'use_external_url' ),
52
- ),
53
- array(
54
- 'name' => 'page_id',
55
- 'type' => 'page_select',
56
- 'label' => __( 'Select a page', 'wpcf7-redirect' ),
57
- 'placeholder' => __( 'Select a page', 'wpcf7-redirect' ),
58
- 'value' => $this->get( 'page_id' ),
59
- 'class' => $this->get( 'use_external_url' ) ? 'field-hidden' : '',
60
- ),
61
- array(
62
- 'name' => 'external_url',
63
- 'type' => 'url',
64
- 'label' => __( 'Use external URL', 'wpcf7-redirect' ),
65
- 'placeholder' => __( 'Use external URL', 'wpcf7-redirect' ),
66
- 'tooltip' => __( 'You can build a custom url like this https://example.com/[your-name]?[your-email]&[your-tel]', 'wpcf7-redirect' ),
67
- 'footer' => '<div>' . $this->get_formatted_mail_tags() . '</div><div class="wpcf7-redirect-butify-wrap"></div>',
68
- 'value' => $this->get( 'external_url' ),
69
- 'class' => $this->get( 'use_external_url' ) ? '' : 'field-hidden',
70
- ),
71
- array(
72
- 'name' => 'redirect_as_x_form_encoded_url',
73
- 'type' => 'checkbox',
74
- 'label' => __( 'Redirect as X-WWW-FORM-URLENCODED (Form Post)', 'wpcf7-redirect' ),
75
- 'sub_title' => '',
76
- 'placeholder' => '',
77
- 'value' => $this->get( 'redirect_as_x_form_encoded_url' ),
78
- ),
79
- array(
80
- 'name' => 'open_in_new_tab',
81
- 'type' => 'checkbox',
82
- 'label' => __( 'Open page in a new tab', 'wpcf7-redirect' ),
83
- 'sub_title' => '',
84
- 'placeholder' => '',
85
- 'show_selector' => '.field-wrap-open_in_new_tab_notice',
86
- 'value' => $this->get( 'open_in_new_tab' ),
87
- ),
88
- array(
89
- 'name' => 'open_in_new_tab_notice',
90
- 'type' => 'notice',
91
- 'label' => '<strong>' . __( 'Notice!', 'wpcf7-redirect' ) . '</strong>',
92
- 'sub_title' => __( 'This option might not work as expected, since browsers often block popup windows. This option depends on the browser settings.', 'wpcf7-redirect' ),
93
- 'placeholder' => '',
94
- 'class' => $this->get( 'open_in_new_tab' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
95
- 'show_selector' => '',
96
- ),
97
- array(
98
- 'name' => 'http_build_query',
99
- 'type' => 'checkbox',
100
- 'label' => __( 'Pass all the fields from the form as URL query parameters', 'wpcf7-redirect' ),
101
- 'sub_title' => '',
102
- 'placeholder' => '',
103
- 'show_selector' => '.field-wrap-get_param_shortcode',
104
- 'value' => $this->get( 'http_build_query' ),
105
- ),
106
- array(
107
- 'name' => 'http_build_query_selectively',
108
- 'type' => 'checkbox',
109
- 'label' => __( 'Pass specific fields from the form as URL query parameters', 'wpcf7-redirect' ),
110
- 'sub_title' => '',
111
- 'placeholder' => '',
112
- 'show_selector' => '.field-wrap-http_build_query_selectively_fields,.field-wrap-get_param_shortcode',
113
- 'value' => $this->get( 'http_build_query_selectively' ),
114
- ),
115
- array(
116
- 'name' => 'url_encode',
117
- 'type' => 'checkbox',
118
- 'label' => __( 'Encode passed query parameters', 'wpcf7-redirect' ),
119
- 'sub_title' => '',
120
- 'placeholder' => '',
121
- 'value' => $this->get( 'url_encode' ),
122
- ),
123
- array(
124
- 'name' => 'http_build_query_selectively_fields',
125
- 'type' => 'text',
126
- 'label' => __( 'Fields to pass as URL query parameters, separated by commas:', 'wpcf7-redirect' ),
127
- 'footer' => '<div>' . $this->get_formatted_mail_tags( true ) . '</div><div class="wpcf7-redirect-butify-wrap"></div>',
128
- 'placeholder' => '',
129
- 'value' => $this->get( 'http_build_query_selectively_fields' ),
130
- 'class' => $this->get( 'http_build_query_selectively' ) ? '' : 'field-hidden',
131
- ),
132
- array(
133
- 'name' => 'get_param_shortcode',
134
- 'type' => 'notice',
135
- 'label' => '<strong>' . __( '[get_param]!', 'wpcf7-redirect' ) . '</strong>',
136
- 'sub_title' => __( 'You can use this tag on the target page to collect the data transerred [get_param param="your-name"].', 'wpcf7-redirect' ),
137
- 'placeholder' => '',
138
- 'class' => $this->get( 'http_build_query_selectively' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
139
- 'show_selector' => '',
140
- ),
141
- array(
142
- 'name' => 'delay_redirect_seconds',
143
- 'type' => 'number',
144
- 'label' => __( 'How many seconds to delay', 'wpcf7-redirect' ),
145
- 'placeholder' => __( 'Number of seconds', 'wpcf7-redirect' ),
146
- 'value' => $this->get( 'delay_redirect_seconds' ),
147
- 'class' => '',
148
- ),
149
- 'action_status' => array(
150
- 'name' => 'action_status',
151
- 'type' => 'checkbox',
152
- 'label' => $this->get_action_status_label(),
153
- 'sub_title' => __( 'if this is off the rule will not be applied', 'wpcf7-redirect' ),
154
- 'placeholder' => '',
155
- 'show_selector' => '.field-wrap-disable_default_email',
156
- 'toggle-label' => json_encode(
157
- array(
158
- '.field-wrap-action_status .checkbox-label,.column-status a' => array(
159
- __( 'Enabled', 'wpcf7-redirect' ),
160
- __( 'Disabled', 'wpcf7-redirect' ),
161
- ),
162
- )
163
- ),
164
- 'value' => $this->get( 'action_status' ),
165
- ),
166
- 'disable_default_email' => array(
167
- 'name' => 'disable_default_email',
168
- 'type' => 'notice',
169
- 'label' => __( '<strong>NOTICE!</strong><br/>', 'wpcf7-redirect' ),
170
- 'sub_title' => __( 'Redirection will always be the last action regardless of the actions order.', 'wpcf7-redirect' ),
171
- 'placeholder' => '',
172
- 'class' => $this->get( 'action_status' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
173
- 'show_selector' => '',
174
- ),
175
- ),
176
- $parent_fields
177
- );
178
- }
179
-
180
- /**
181
- * Get an HTML of the
182
- */
183
- public function get_action_settings() {
184
- $this->get_settings_template( 'html-action-redirect.php' );
185
- }
186
-
187
- /**
188
- * Handle a simple redirect rule
189
- *
190
- * @param $submission
191
- */
192
- public function process( $submission ) {
193
- $response = array();
194
-
195
- $this->posted_data = $submission->get_posted_data();
196
-
197
- foreach ( $this->posted_data as $posted_data_key => $posted_data_value ) {
198
- if ( is_array( $posted_data_value ) ) {
199
- $this->posted_data[ $posted_data_key ] = implode( ',', $posted_data_value );
200
- } elseif ( $this->get( 'url_encode' ) ) {
201
- $this->posted_data[ $posted_data_key ] = rawurlencode( $posted_data_value );
202
- }
203
- }
204
-
205
- if ( $this->get( 'use_external_url' ) === 'on' && $this->get( 'external_url' ) ) {
206
- $response = array(
207
- 'type' => 'redirect',
208
- 'redirect_url' => $this->replace_tags( $this->get( 'external_url' ) ),
209
- 'delay' => $this->get( 'delay_redirect_seconds' ) ? (int) $this->get( 'delay_redirect_seconds' ) : 0,
210
- );
211
- } elseif ( $this->get( 'page_id' ) ) {
212
- $response = array(
213
- 'type' => 'redirect',
214
- 'redirect_url' => get_permalink( $this->get( 'page_id' ) ),
215
- 'delay' => $this->get( 'delay_redirect_seconds' ) ? (int) $this->get( 'delay_redirect_seconds' ) : 0,
216
- );
217
- }
218
-
219
- if ( $this->get( 'redirect_as_x_form_encoded_url' ) && isset( $response['redirect_url'] ) && $response['redirect_url'] ) {
220
-
221
- ob_start();
222
-
223
- $params = parse_url( $response['redirect_url'] );
224
-
225
- parse_str( $params['query'], $fields );
226
-
227
- if ( isset( $fields['sum'] ) && isset( $fields['qty'] ) ) {
228
- $fields['sum'] = $fields['sum'] * $fields['qty'];
229
- }
230
-
231
- if ( $this->get( 'http_build_query_selectively' ) === 'on' ) {
232
- $fields_to_add = explode( ',', $this->get( 'http_build_query_selectively_fields' ) );
233
-
234
- foreach ( $fields_to_add as $field_to_add ) {
235
- $field_to_add = trim( $field_to_add );
236
- $fields[ $field_to_add ] = isset( $this->posted_data[ $field_to_add ] ) ? $this->posted_data[ $field_to_add ] : '';
237
- }
238
- } elseif ( $this->get( 'http_build_query' ) === 'on' ) {
239
- $fields = array_merge( $this->posted_data, $fields );
240
- }
241
-
242
- ?>
243
- <form id="cf7r-result-form" action="<?php echo $response['redirect_url']; ?>" method="post">
244
- <?php foreach ( $fields as $field_key => $field_value ) : ?>
245
- <input type="hidden" name="<?php echo $field_key; ?>" value="<?php echo $field_value; ?>">
246
- <?php endforeach; ?>
247
- </form>
248
- <?php
249
- $response['form'] = ob_get_clean();
250
-
251
- } elseif ( $this->get( 'http_build_query' ) === 'on' ) {
252
-
253
- $response['http_build_query'] = true;
254
-
255
- $response['redirect_url'] = add_query_arg( $this->posted_data, $response['redirect_url'] );
256
-
257
- } elseif ( $this->get( 'http_build_query_selectively' ) === 'on' ) {
258
-
259
- $fields_to_add = explode( ',', $this->get( 'http_build_query_selectively_fields' ) );
260
- $fields_to_add_args = array();
261
-
262
- foreach ( $fields_to_add as $field_to_add ) {
263
- $field_to_add = trim( $field_to_add );
264
- $fields_to_add_args[ $field_to_add ] = isset( $this->posted_data[ $field_to_add ] ) ? $this->posted_data[ $field_to_add ] : '';
265
- }
266
-
267
- $response['redirect_url'] = add_query_arg( $fields_to_add_args, $response['redirect_url'] );
268
- }
269
-
270
- if ( $this->get( 'after_sent_script' ) ) {
271
- $response['after_sent_script'] = $this->get( 'after_sent_script' );
272
- }
273
-
274
- if ( $this->get( 'open_in_new_tab' ) === 'on' ) {
275
- $response['type'] = 'new_tab';
276
- }
277
-
278
- return $response;
279
- }
280
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Action_Redirect file.
4
+ */
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ register_wpcf7r_actions(
11
+ 'redirect',
12
+ __( 'Redirect', 'wpcf7-redirect' ),
13
+ 'WPCF7R_Action_Redirect',
14
+ 1
15
+ );
16
+
17
+ /**
18
+ * Class WPCF7R_Action_Redirect
19
+ * A Class that handles redirect actions
20
+ */
21
+ class WPCF7R_Action_Redirect extends WPCF7R_Action {
22
+
23
+ /**
24
+ * Init the parent action class
25
+ *
26
+ * @param $post
27
+ */
28
+ public function __construct( $post ) {
29
+ parent::__construct( $post );
30
+
31
+ }
32
+
33
+ /**
34
+ * Get the action admin fields
35
+ */
36
+ public function get_action_fields() {
37
+
38
+ $parent_fields = parent::get_default_fields();
39
+
40
+ unset( $parent_fields['action_status'] );
41
+
42
+ return array_merge(
43
+ array(
44
+ array(
45
+ 'name' => 'use_external_url',
46
+ 'type' => 'checkbox',
47
+ 'label' => __( 'Use custom URL', 'wpcf7-redirect' ),
48
+ 'sub_title' => '',
49
+ 'placeholder' => '',
50
+ 'show_selector' => '.field-wrap-external_url,.field-wrap-page_id',
51
+ 'value' => $this->get( 'use_external_url' ),
52
+ ),
53
+ array(
54
+ 'name' => 'page_id',
55
+ 'type' => 'page_select',
56
+ 'label' => __( 'Select a page', 'wpcf7-redirect' ),
57
+ 'placeholder' => __( 'Select a page', 'wpcf7-redirect' ),
58
+ 'value' => $this->get( 'page_id' ),
59
+ 'class' => $this->get( 'use_external_url' ) ? 'field-hidden' : '',
60
+ ),
61
+ array(
62
+ 'name' => 'external_url',
63
+ 'type' => 'url',
64
+ 'label' => __( 'Use external URL', 'wpcf7-redirect' ),
65
+ 'placeholder' => __( 'Use external URL', 'wpcf7-redirect' ),
66
+ 'tooltip' => __( 'You can build a custom url like this https://example.com/[your-name]?[your-email]&[your-tel]', 'wpcf7-redirect' ),
67
+ 'footer' => '<div>' . $this->get_formatted_mail_tags() . '</div><div class="wpcf7-redirect-butify-wrap"></div>',
68
+ 'value' => $this->get( 'external_url' ),
69
+ 'class' => $this->get( 'use_external_url' ) ? '' : 'field-hidden',
70
+ ),
71
+ array(
72
+ 'name' => 'redirect_as_x_form_encoded_url',
73
+ 'type' => 'checkbox',
74
+ 'label' => __( 'Redirect as X-WWW-FORM-URLENCODED (Form Post)', 'wpcf7-redirect' ),
75
+ 'sub_title' => '',
76
+ 'placeholder' => '',
77
+ 'value' => $this->get( 'redirect_as_x_form_encoded_url' ),
78
+ ),
79
+ array(
80
+ 'name' => 'open_in_new_tab',
81
+ 'type' => 'checkbox',
82
+ 'label' => __( 'Open page in a new tab', 'wpcf7-redirect' ),
83
+ 'sub_title' => '',
84
+ 'placeholder' => '',
85
+ 'show_selector' => '.field-wrap-open_in_new_tab_notice',
86
+ 'value' => $this->get( 'open_in_new_tab' ),
87
+ ),
88
+ array(
89
+ 'name' => 'open_in_new_tab_notice',
90
+ 'type' => 'notice',
91
+ 'label' => '<strong>' . __( 'Notice!', 'wpcf7-redirect' ) . '</strong>',
92
+ 'sub_title' => __( 'This option might not work as expected, since browsers often block popup windows. This option depends on the browser settings.', 'wpcf7-redirect' ),
93
+ 'placeholder' => '',
94
+ 'class' => $this->get( 'open_in_new_tab' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
95
+ 'show_selector' => '',
96
+ ),
97
+ array(
98
+ 'name' => 'http_build_query',
99
+ 'type' => 'checkbox',
100
+ 'label' => __( 'Pass all the fields from the form as URL query parameters', 'wpcf7-redirect' ),
101
+ 'sub_title' => '',
102
+ 'placeholder' => '',
103
+ 'show_selector' => '.field-wrap-get_param_shortcode',
104
+ 'value' => $this->get( 'http_build_query' ),
105
+ ),
106
+ array(
107
+ 'name' => 'http_build_query_selectively',
108
+ 'type' => 'checkbox',
109
+ 'label' => __( 'Pass specific fields from the form as URL query parameters', 'wpcf7-redirect' ),
110
+ 'sub_title' => '',
111
+ 'placeholder' => '',
112
+ 'show_selector' => '.field-wrap-http_build_query_selectively_fields,.field-wrap-get_param_shortcode',
113
+ 'value' => $this->get( 'http_build_query_selectively' ),
114
+ ),
115
+ array(
116
+ 'name' => 'url_encode',
117
+ 'type' => 'checkbox',
118
+ 'label' => __( 'Encode passed query parameters', 'wpcf7-redirect' ),
119
+ 'sub_title' => '',
120
+ 'placeholder' => '',
121
+ 'value' => $this->get( 'url_encode' ),
122
+ ),
123
+ array(
124
+ 'name' => 'http_build_query_selectively_fields',
125
+ 'type' => 'text',
126
+ 'label' => __( 'Fields to pass as URL query parameters, separated by commas:', 'wpcf7-redirect' ),
127
+ 'footer' => '<div>' . $this->get_formatted_mail_tags( true ) . '</div><div class="wpcf7-redirect-butify-wrap"></div>',
128
+ 'placeholder' => '',
129
+ 'value' => $this->get( 'http_build_query_selectively_fields' ),
130
+ 'class' => $this->get( 'http_build_query_selectively' ) ? '' : 'field-hidden',
131
+ ),
132
+ array(
133
+ 'name' => 'get_param_shortcode',
134
+ 'type' => 'notice',
135
+ 'label' => '<strong>' . __( '[get_param]!', 'wpcf7-redirect' ) . '</strong>',
136
+ 'sub_title' => __( 'You can use this tag on the target page to collect the data transerred [get_param param="your-name"].', 'wpcf7-redirect' ),
137
+ 'placeholder' => '',
138
+ 'class' => $this->get( 'http_build_query_selectively' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
139
+ 'show_selector' => '',
140
+ ),
141
+ array(
142
+ 'name' => 'delay_redirect_seconds',
143
+ 'type' => 'number',
144
+ 'label' => __( 'How many seconds to delay', 'wpcf7-redirect' ),
145
+ 'placeholder' => __( 'Number of seconds', 'wpcf7-redirect' ),
146
+ 'value' => $this->get( 'delay_redirect_seconds' ),
147
+ 'class' => '',
148
+ ),
149
+ 'action_status' => array(
150
+ 'name' => 'action_status',
151
+ 'type' => 'checkbox',
152
+ 'label' => $this->get_action_status_label(),
153
+ 'sub_title' => __( 'if this is off the rule will not be applied', 'wpcf7-redirect' ),
154
+ 'placeholder' => '',
155
+ 'show_selector' => '.field-wrap-disable_default_email',
156
+ 'toggle-label' => json_encode(
157
+ array(
158
+ '.field-wrap-action_status .checkbox-label,.column-status a' => array(
159
+ __( 'Enabled', 'wpcf7-redirect' ),
160
+ __( 'Disabled', 'wpcf7-redirect' ),
161
+ ),
162
+ )
163
+ ),
164
+ 'value' => $this->get( 'action_status' ),
165
+ ),
166
+ 'disable_default_email' => array(
167
+ 'name' => 'disable_default_email',
168
+ 'type' => 'notice',
169
+ 'label' => __( '<strong>NOTICE!</strong><br/>', 'wpcf7-redirect' ),
170
+ 'sub_title' => __( 'Redirection will always be the last action regardless of the actions order.', 'wpcf7-redirect' ),
171
+ 'placeholder' => '',
172
+ 'class' => $this->get( 'action_status' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
173
+ 'show_selector' => '',
174
+ ),
175
+ ),
176
+ $parent_fields
177
+ );
178
+ }
179
+
180
+ /**
181
+ * Get an HTML of the
182
+ */
183
+ public function get_action_settings() {
184
+ $this->get_settings_template( 'html-action-redirect.php' );
185
+ }
186
+
187
+ /**
188
+ * Handle a simple redirect rule
189
+ *
190
+ * @param $submission
191
+ */
192
+ public function process( $submission ) {
193
+ $response = array();
194
+
195
+ $this->posted_data = $submission->get_posted_data();
196
+
197
+ foreach ( $this->posted_data as $posted_data_key => $posted_data_value ) {
198
+ if ( is_array( $posted_data_value ) ) {
199
+ $this->posted_data[ $posted_data_key ] = implode( ',', $posted_data_value );
200
+ } elseif ( $this->get( 'url_encode' ) ) {
201
+ $this->posted_data[ $posted_data_key ] = rawurlencode( $posted_data_value );
202
+ }
203
+ }
204
+
205
+ if ( $this->get( 'use_external_url' ) === 'on' && $this->get( 'external_url' ) ) {
206
+ $response = array(
207
+ 'type' => 'redirect',
208
+ 'redirect_url' => $this->replace_tags( $this->get( 'external_url' ) ),
209
+ 'delay' => $this->get( 'delay_redirect_seconds' ) ? (int) $this->get( 'delay_redirect_seconds' ) : 0,
210
+ );
211
+ } elseif ( $this->get( 'page_id' ) ) {
212
+ $response = array(
213
+ 'type' => 'redirect',
214
+ 'redirect_url' => get_permalink( $this->get( 'page_id' ) ),
215
+ 'delay' => $this->get( 'delay_redirect_seconds' ) ? (int) $this->get( 'delay_redirect_seconds' ) : 0,
216
+ );
217
+ }
218
+
219
+ if ( $this->get( 'redirect_as_x_form_encoded_url' ) && isset( $response['redirect_url'] ) && $response['redirect_url'] ) {
220
+
221
+ ob_start();
222
+
223
+ $params = parse_url( $response['redirect_url'] );
224
+
225
+ parse_str( $params['query'], $fields );
226
+
227
+ if ( isset( $fields['sum'] ) && isset( $fields['qty'] ) ) {
228
+ $fields['sum'] = $fields['sum'] * $fields['qty'];
229
+ }
230
+
231
+ if ( $this->get( 'http_build_query_selectively' ) === 'on' ) {
232
+ $fields_to_add = explode( ',', $this->get( 'http_build_query_selectively_fields' ) );
233
+
234
+ foreach ( $fields_to_add as $field_to_add ) {
235
+ $field_to_add = trim( $field_to_add );
236
+ $fields[ $field_to_add ] = isset( $this->posted_data[ $field_to_add ] ) ? $this->posted_data[ $field_to_add ] : '';
237
+ }
238
+ } elseif ( $this->get( 'http_build_query' ) === 'on' ) {
239
+ $fields = array_merge( $this->posted_data, $fields );
240
+ }
241
+
242
+ ?>
243
+ <form id="cf7r-result-form" action="<?php echo $response['redirect_url']; ?>" method="post">
244
+ <?php foreach ( $fields as $field_key => $field_value ) : ?>
245
+ <input type="hidden" name="<?php echo $field_key; ?>" value="<?php echo $field_value; ?>">
246
+ <?php endforeach; ?>
247
+ </form>
248
+ <?php
249
+ $response['form'] = ob_get_clean();
250
+
251
+ } elseif ( $this->get( 'http_build_query' ) === 'on' ) {
252
+
253
+ $response['http_build_query'] = true;
254
+
255
+ $response['redirect_url'] = add_query_arg( $this->posted_data, $response['redirect_url'] );
256
+
257
+ } elseif ( $this->get( 'http_build_query_selectively' ) === 'on' ) {
258
+
259
+ $fields_to_add = explode( ',', $this->get( 'http_build_query_selectively_fields' ) );
260
+ $fields_to_add_args = array();
261
+
262
+ foreach ( $fields_to_add as $field_to_add ) {
263
+ $field_to_add = trim( $field_to_add );
264
+ $fields_to_add_args[ $field_to_add ] = isset( $this->posted_data[ $field_to_add ] ) ? $this->posted_data[ $field_to_add ] : '';
265
+ }
266
+
267
+ $response['redirect_url'] = add_query_arg( $fields_to_add_args, $response['redirect_url'] );
268
+ }
269
+
270
+ if ( $this->get( 'after_sent_script' ) ) {
271
+ $response['after_sent_script'] = $this->get( 'after_sent_script' );
272
+ }
273
+
274
+ if ( $this->get( 'open_in_new_tab' ) === 'on' ) {
275
+ $response['type'] = 'new_tab';
276
+ }
277
+
278
+ return $response;
279
+ }
280
+ }
classes/actions/class-wpcf7r-action-save-lead.php CHANGED
@@ -1,168 +1,168 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Action_Save_Lead file - handles send send to api process
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- register_wpcf7r_actions( 'save_lead', __( 'Save Lead', 'wpcf7-redirect' ), 'WPCF7R_Action_Save_Lead', 3 );
9
-
10
- class WPCF7R_Action_Save_Lead extends WPCF7R_Action {
11
-
12
- /**
13
- * Init the parent action class
14
- */
15
- public function __construct( $post ) {
16
- parent::__construct( $post );
17
- $this->priority = 1;
18
- }
19
-
20
- /**
21
- * Get the action admin fields
22
- */
23
- public function get_action_fields() {
24
-
25
- $parent_fields = parent::get_default_fields();
26
-
27
- unset( $parent_fields['action_status'] );
28
-
29
- return array_merge(
30
- array(
31
- 'tags_map_mapping_section' => array(
32
- 'name' => 'tags_map_mapping_section',
33
- 'type' => 'section',
34
- 'title' => __( 'Tags mapping', 'wpcf7-redirect' ),
35
- 'fields' => array(
36
- array(
37
- 'name' => 'leads_map',
38
- 'type' => 'leads_map',
39
- 'label' => '',
40
- 'sub_title' => '',
41
- 'placeholder' => '',
42
- 'show_selector' => '',
43
- 'value' => maybe_unserialize( $this->get( 'leads_map' ) ),
44
- 'tags' => WPCF7R_Form::get_mail_tags(),
45
- ),
46
- ),
47
- ),
48
- 'action_status' => array(
49
- 'name' => 'action_status',
50
- 'type' => 'checkbox',
51
- 'label' => $this->get_action_status_label(),
52
- 'sub_title' => __( 'if this is off the rule will not be applied', 'wpcf7-redirect' ),
53
- 'placeholder' => '',
54
- 'show_selector' => '',
55
- 'toggle-label' => json_encode(
56
- array(
57
- '.field-wrap-action_status .checkbox-label,.column-status a' => array(
58
- __( 'Enabled', 'wpcf7-redirect' ),
59
- __( 'Disabled', 'wpcf7-redirect' ),
60
- ),
61
- )
62
- ),
63
- 'value' => $this->get( 'action_status' ),
64
- ),
65
- ),
66
- $parent_fields
67
- );
68
- }
69
-
70
- /**
71
- * Get an HTML of the
72
- */
73
- public function get_action_settings() {
74
-
75
- $this->get_settings_template( 'html-action-redirect.php' );
76
-
77
- }
78
-
79
- /**
80
- * Connected to manage_columns hooks.
81
- *
82
- * @param [string] $column - key of the column.
83
- * @param [int] $lead_id - the id of the relevant post.
84
- * @return void
85
- */
86
- public function display_action_column_content( $column, $lead_id ) {
87
- switch ( $column ) {
88
- case 'form':
89
- echo $this->get_cf7_link_html();
90
- break;
91
- case 'data_preview':
92
- echo $this->display_columns_values( $lead_id );
93
- break;
94
- }
95
- }
96
-
97
- /**
98
- * Display the values that were selected on the action.
99
- *
100
- * @return void
101
- */
102
- private function display_columns_values( $lead_id ) {
103
- $mapped_fields = maybe_unserialize( $this->get( 'leads_map' ) );
104
- $none_selected = true;
105
- if ( $mapped_fields ) {
106
- foreach ( $mapped_fields as $field_key => $mapped_field ) {
107
- if ( isset( $mapped_field['appear'] ) && $mapped_field['appear'] ) {
108
- $label = $mapped_field['tag'] ? $mapped_field['tag'] : $field_key;
109
-
110
- $string = $label . ': ' . get_post_meta( $lead_id, $field_key, true );
111
-
112
- echo sprintf( "<div class='preview-data'>%s</div>", $string );
113
-
114
- $none_selected = false;
115
- }
116
- }
117
- }
118
-
119
- if ( $none_selected ) {
120
- echo __( 'No preview defined', 'wpcf7-redirect' );
121
- }
122
- }
123
-
124
- /**
125
- * Handle a simple redirect rule
126
- *
127
- * @param $submission
128
- */
129
- public function process( $submission ) {
130
- $contact_form = $submission->get_contact_form();
131
-
132
- // insert the lead to the DB
133
- $files = $submission->uploaded_files();
134
-
135
- $submitted_files = array();
136
-
137
- $posted_values = $submission->get_posted_data();
138
-
139
- if ( $files ) {
140
- foreach ( $files as $file_key => $file_path ) {
141
-
142
- $type = pathinfo( $file_path, PATHINFO_EXTENSION );
143
-
144
- $submitted_files[ $file_key ] = array(
145
- 'type' => $type,
146
- 'name' => basename( $file_path ),
147
- 'base64_file' => wpcf7r_base_64_file( $file_path ),
148
- 'path' => $file_path,
149
- );
150
- unset( $posted_values[ $file_key ] );
151
- }
152
- }
153
-
154
- $lead = WPCF7R_Leads_Manager::insert_lead( $contact_form->id(), $posted_values, $submitted_files, 'contact', $this->get_id() );
155
-
156
- self::set_lead_id( $lead->post_id );
157
-
158
- $response = array(
159
- 'type' => 'save_lead',
160
- 'data' => array(
161
- 'lead_id' => $lead->post_id,
162
- ),
163
- );
164
-
165
- return $response;
166
- }
167
- }
168
-
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Action_Save_Lead file - handles send send to api process
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ register_wpcf7r_actions( 'save_lead', __( 'Save Lead', 'wpcf7-redirect' ), 'WPCF7R_Action_Save_Lead', 3 );
9
+
10
+ class WPCF7R_Action_Save_Lead extends WPCF7R_Action {
11
+
12
+ /**
13
+ * Init the parent action class
14
+ */
15
+ public function __construct( $post ) {
16
+ parent::__construct( $post );
17
+ $this->priority = 1;
18
+ }
19
+
20
+ /**
21
+ * Get the action admin fields
22
+ */
23
+ public function get_action_fields() {
24
+
25
+ $parent_fields = parent::get_default_fields();
26
+
27
+ unset( $parent_fields['action_status'] );
28
+
29
+ return array_merge(
30
+ array(
31
+ 'tags_map_mapping_section' => array(
32
+ 'name' => 'tags_map_mapping_section',
33
+ 'type' => 'section',
34
+ 'title' => __( 'Tags mapping', 'wpcf7-redirect' ),
35
+ 'fields' => array(
36
+ array(
37
+ 'name' => 'leads_map',
38
+ 'type' => 'leads_map',
39
+ 'label' => '',
40
+ 'sub_title' => '',
41
+ 'placeholder' => '',
42
+ 'show_selector' => '',
43
+ 'value' => maybe_unserialize( $this->get( 'leads_map' ) ),
44
+ 'tags' => WPCF7R_Form::get_mail_tags(),
45
+ ),
46
+ ),
47
+ ),
48
+ 'action_status' => array(
49
+ 'name' => 'action_status',
50
+ 'type' => 'checkbox',
51
+ 'label' => $this->get_action_status_label(),
52
+ 'sub_title' => __( 'if this is off the rule will not be applied', 'wpcf7-redirect' ),
53
+ 'placeholder' => '',
54
+ 'show_selector' => '',
55
+ 'toggle-label' => json_encode(
56
+ array(
57
+ '.field-wrap-action_status .checkbox-label,.column-status a' => array(
58
+ __( 'Enabled', 'wpcf7-redirect' ),
59
+ __( 'Disabled', 'wpcf7-redirect' ),
60
+ ),
61
+ )
62
+ ),
63
+ 'value' => $this->get( 'action_status' ),
64
+ ),
65
+ ),
66
+ $parent_fields
67
+ );
68
+ }
69
+
70
+ /**
71
+ * Get an HTML of the
72
+ */
73
+ public function get_action_settings() {
74
+
75
+ $this->get_settings_template( 'html-action-redirect.php' );
76
+
77
+ }
78
+
79
+ /**
80
+ * Connected to manage_columns hooks.
81
+ *
82
+ * @param [string] $column - key of the column.
83
+ * @param [int] $lead_id - the id of the relevant post.
84
+ * @return void
85
+ */
86
+ public function display_action_column_content( $column, $lead_id ) {
87
+ switch ( $column ) {
88
+ case 'form':
89
+ echo $this->get_cf7_link_html();
90
+ break;
91
+ case 'data_preview':
92
+ echo $this->display_columns_values( $lead_id );
93
+ break;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Display the values that were selected on the action.
99
+ *
100
+ * @return void
101
+ */
102
+ private function display_columns_values( $lead_id ) {
103
+ $mapped_fields = maybe_unserialize( $this->get( 'leads_map' ) );
104
+ $none_selected = true;
105
+ if ( $mapped_fields ) {
106
+ foreach ( $mapped_fields as $field_key => $mapped_field ) {
107
+ if ( isset( $mapped_field['appear'] ) && $mapped_field['appear'] ) {
108
+ $label = $mapped_field['tag'] ? $mapped_field['tag'] : $field_key;
109
+
110
+ $string = $label . ': ' . get_post_meta( $lead_id, $field_key, true );
111
+
112
+ echo sprintf( "<div class='preview-data'>%s</div>", $string );
113
+
114
+ $none_selected = false;
115
+ }
116
+ }
117
+ }
118
+
119
+ if ( $none_selected ) {
120
+ echo __( 'No preview defined', 'wpcf7-redirect' );
121
+ }
122
+ }
123
+
124
+ /**
125
+ * Handle a simple redirect rule
126
+ *
127
+ * @param $submission
128
+ */
129
+ public function process( $submission ) {
130
+ $contact_form = $submission->get_contact_form();
131
+
132
+ // insert the lead to the DB
133
+ $files = $submission->uploaded_files();
134
+
135
+ $submitted_files = array();
136
+
137
+ $posted_values = $submission->get_posted_data();
138
+
139
+ if ( $files ) {
140
+ foreach ( $files as $file_key => $file_path ) {
141
+
142
+ $type = pathinfo( $file_path, PATHINFO_EXTENSION );
143
+
144
+ $submitted_files[ $file_key ] = array(
145
+ 'type' => $type,
146
+ 'name' => basename( $file_path ),
147
+ 'base64_file' => wpcf7r_base_64_file( $file_path ),
148
+ 'path' => $file_path,
149
+ );
150
+ unset( $posted_values[ $file_key ] );
151
+ }
152
+ }
153
+
154
+ $lead = WPCF7R_Leads_Manager::insert_lead( $contact_form->id(), $posted_values, $submitted_files, 'contact', $this->get_id() );
155
+
156
+ self::set_lead_id( $lead->post_id );
157
+
158
+ $response = array(
159
+ 'type' => 'save_lead',
160
+ 'data' => array(
161
+ 'lead_id' => $lead->post_id,
162
+ ),
163
+ );
164
+
165
+ return $response;
166
+ }
167
+ }
168
+
classes/actions/class-wpcf7r-action-send-to-api.php CHANGED
@@ -1,409 +1,409 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Action_api_url_request file
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- class WPCF7R_Action_Send_To_Api extends WPCF7R_Action {
9
-
10
- public function __construct( $post ) {
11
- $this->action_id = $post->ID;
12
- }
13
-
14
- /**
15
- * The handler that will send the data to the api
16
- *
17
- * @param $args
18
- */
19
- public function qs_cf7_send_data_to_api( $args ) {
20
- $this->defaults = $args['tags_defaults'];
21
- $this->functions = $args['tags_functions'];
22
- $this->headers = $args['api_headers'];
23
- $this->headers = array_filter( $this->headers );
24
-
25
- $tags_map = $args['tags'];
26
- $record_type = $args['record_type'];
27
- $input_type = $args['input_type'];
28
- $base_url = $args['base_url'];
29
- $submission = isset( $args['submission'] ) ? $args['submission'] : '';
30
- $template = $args['request_template'];
31
-
32
- if ( 'xml' === $record_type ) {
33
- $this->headers['Content-Type'] = 'text/xml';
34
- } elseif ( 'json' === $record_type ) {
35
- $this->headers['Content-Type'] = 'application/json';
36
- }
37
-
38
- $submission = WPCF7_Submission::get_instance();
39
- $wpcf7 = $submission->get_contact_form();
40
-
41
- $this->post = $wpcf7;
42
- $this->clear_error_log( $this->post->id() );
43
-
44
- $submission_url = $submission->get_meta( 'url' );
45
-
46
- //always save last call results for debugging
47
-
48
- $record = $this->get_record( $submission, $tags_map, $record_type, $template );
49
- $record['url'] = $base_url;
50
-
51
- if ( isset( $record['url'] ) && $record['url'] ) {
52
- do_action( 'qs_cf7_api_before_sent_to_api', $record );
53
- $response = $this->send_lead( $record, true, $input_type, $record_type, $tags_map );
54
- do_action( 'qs_cf7_api_after_sent_to_api', $record, $response );
55
-
56
- } else {
57
- $this->log_result( __( 'Missing url' ), '' );
58
- }
59
-
60
- return array( $response, $record );
61
- }
62
-
63
- public function log_result( $record, $response ) {
64
- if ( isset( $record['url'] ) ) {
65
- update_post_meta( $this->action_id, 'api_debug_url', $record['url'] );
66
- }
67
-
68
- if ( is_wp_error( $response ) || is_wp_error( $record ) ) {
69
- update_post_meta( $this->action_id, 'api_debug_result', $response );
70
- update_post_meta( $this->action_id, 'api_debug_params', $record );
71
- } else {
72
- update_post_meta( $this->action_id, 'api_debug_params', $record );
73
- update_post_meta( $this->action_id, 'api_debug_result', $response );
74
- }
75
- }
76
-
77
- /**
78
- * Clear error log
79
- */
80
- function clear_error_log( $post_id ) {
81
- delete_post_meta( $post_id, 'api_errors' );
82
- }
83
-
84
- /**
85
- * Convert the form keys to the API keys according to the mapping instructions
86
- *
87
- * @param $submission
88
- * @param $tags_map
89
- * @param string $type
90
- * @param string $template
91
- */
92
- function get_record( $submission, $tags_map, $type = 'params', $template = '' ) {
93
- $submited_data = $submission->get_posted_data();
94
-
95
- if ( 'xml' === $type || 'json' === $type ) {
96
- $template = $this->replace_lead_id_tag( $template );
97
-
98
- foreach ( $tags_map as $form_key => $qs_cf7_form_key ) {
99
- if ( is_array( $qs_cf7_form_key ) ) {
100
-
101
- //arrange checkbox arrays
102
- if ( isset( $submited_data[ $form_key ] ) ) {
103
- $value = apply_filters( 'set_record_value', $submited_data[ $form_key ], $qs_cf7_form_key, $form_key );
104
- $value = is_array( $value ) ? implode( ',', $value ) : $value;
105
- }
106
- } else {
107
- $value = isset( $submited_data[ $form_key ] ) ? $submited_data[ $form_key ] : '';
108
- $value = apply_filters( 'set_record_value', $value, $qs_cf7_form_key, $form_key );
109
-
110
- //flattan radio
111
- if ( is_array( $value ) ) {
112
- $value = reset( $value );
113
- }
114
- }
115
-
116
- //set defaults
117
-
118
- if ( ! $value ) {
119
- if ( isset( $this->defaults[ $form_key ] ) ) {
120
- if ( is_array( $this->defaults[ $form_key ] ) ) {
121
- $value = array();
122
-
123
- foreach ( $this->defaults[ $form_key ] as $key => $sub_value ) {
124
- if ( isset( $this->functions[ $key ] ) && $this->functions[ $key ] ) {
125
- $sub_value = $this->run_function( $this->functions[ $key ], $sub_value );
126
- }
127
-
128
- if ( $sub_value ) {
129
- $value[] = $sub_value;
130
- }
131
-
132
- $template = str_replace( "[{$key}]", $sub_value, $template );
133
- }
134
-
135
- $value = implode( ',', $value );
136
-
137
- } else {
138
- $value = $this->defaults[ $form_key ];
139
- }
140
- }
141
- }
142
-
143
- if ( isset( $this->functions[ $form_key ] ) && $this->functions[ $form_key ] ) {
144
-
145
- //dont call the function again on arrays (checkvoxes)
146
-
147
- if ( ! is_array( $this->functions[ $form_key ] ) ) {
148
- $value = $this->run_function( $this->functions[ $form_key ], $value );
149
- }
150
- }
151
-
152
- $value = trim( preg_replace( '/(\r\n)|\n|\r/', '\\n', $value ) );
153
- $template = str_replace( "[{$form_key}]", $value, $template );
154
- }
155
-
156
- //replace special mail tags
157
-
158
- foreach ( WPCF7R_Form::get_special_mail_tags() as $mail_tag ) {
159
- $special = apply_filters( 'wpcf7_special_mail_tags', null, $mail_tag->field_name(), $template, $mail_tag );
160
- $template = str_replace( "[{$mail_tag->field_name()}]", $special, $template );
161
- }
162
-
163
- //clean unchanged tags
164
-
165
- $template = $this->replace_tags( $template );
166
- $record['fields'] = $template;
167
-
168
- } else {
169
- $record = $this->get_record_by_tag_map( $submited_data, $tags_map );
170
- $record = $this->set_defaults_and_run_functions( $record, $tags_map );
171
- }
172
-
173
- $record = apply_filters( 'cf7api_create_record', $record, $submited_data, $tags_map, $type, $template );
174
-
175
- return $record;
176
- }
177
-
178
- /**
179
- * Create a record object
180
- *
181
- * @param $submited_data
182
- * @param $tags_map
183
- */
184
- public function get_record_by_tag_map( $submited_data, $tags_map ) {
185
-
186
- $record = array();
187
-
188
- foreach ( $tags_map as $form_key => $qs_cf7_form_key ) {
189
- if ( $qs_cf7_form_key ) {
190
- if ( is_array( $qs_cf7_form_key ) ) {
191
-
192
- //arrange checkbox arrays
193
- foreach ( $submited_data[ $form_key ] as $value ) {
194
- if ( $value ) {
195
- if ( 'lead_id' === $form_key ) {
196
- $record['fields'][ $qs_cf7_form_key[ $value ] ] = apply_filters( 'set_record_value', self::get_lead_id(), $qs_cf7_form_key );
197
- } else {
198
- $record['fields'][ $qs_cf7_form_key[ $value ] ] = apply_filters( 'set_record_value', $value, $qs_cf7_form_key );
199
- }
200
- }
201
- }
202
- } else {
203
- $value = isset( $submited_data[ $form_key ] ) ? $submited_data[ $form_key ] : '';
204
-
205
- //flattan radio
206
- if ( is_array( $value ) && count( $value ) === 1 ) {
207
- $value = reset( $value );
208
- }
209
-
210
- if ( 'lead_id' === $form_key ) {
211
- $record['fields'][ $qs_cf7_form_key ] = apply_filters( 'set_record_value', self::get_lead_id(), $qs_cf7_form_key );
212
- } else {
213
- $record['fields'][ $qs_cf7_form_key ] = apply_filters( 'set_record_value', $value, $qs_cf7_form_key );
214
- }
215
- }
216
- }
217
- }
218
-
219
- return $record;
220
- }
221
-
222
- /**
223
- * Set the fields defaults
224
- */
225
- public function set_defaults_and_run_functions( $record, $tags_map ) {
226
-
227
- //set default values
228
-
229
- if ( $this->defaults && array_values( $this->defaults ) ) {
230
- foreach ( $this->defaults as $default_field_key => $default_value ) {
231
- if ( $default_value ) {
232
- $api_key = $tags_map[ $default_field_key ];
233
- $record['fields'][ $api_key ] = isset( $record['fields'][ $api_key ] ) && $record['fields'][ $api_key ] ? $record['fields'][ $api_key ] : $default_value;
234
- }
235
- }
236
- }
237
-
238
- //run functions on values
239
-
240
- if ( $this->functions && array_values( $this->functions ) ) {
241
- foreach ( $this->functions as $field_key => $function ) {
242
- $api_key = $tags_map[ $field_key ];
243
- $field_value = $record['fields'][ $api_key ];
244
-
245
- if ( $function && $field_value ) {
246
- $record['fields'][ $api_key ] = $this->run_function( $function, $field_value );
247
- }
248
- }
249
- }
250
-
251
- return $record;
252
- }
253
-
254
- /**
255
- * Run custom functions on user submission
256
- *
257
- * @param $function
258
- * @param $field_value
259
- */
260
- public function run_function( $function, $field_value ) {
261
-
262
- $function = WPCF7r_Utils::get_available_text_functions( $function, 'all' );
263
-
264
- if ( $function ) {
265
- $class = $function[0];
266
- $method = $function[1];
267
-
268
- return call_user_func( array( $class, $method ), $field_value );
269
- }
270
-
271
- return $field_value;
272
- }
273
-
274
- /**
275
- * Send the lead using wp_remote
276
- *
277
- * @param $record
278
- * @param boolean $debug
279
- * @param string $method
280
- * @param string $record_type
281
- */
282
- private function send_lead( $record, $debug = false, $method = 'GET', $record_type = 'params' ) {
283
-
284
- global $wp_version;
285
-
286
- $lead = $record['fields'];
287
- $url = $record['url'];
288
-
289
- if ( ( 'get' === $method || 'GET' === $method ) && ( 'params' === $record_type || 'json' === $record_type ) ) {
290
- $args = array(
291
- 'timeout' => 100,
292
- 'redirection' => 5,
293
- 'httpversion' => '1.0',
294
- 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url(),
295
- 'blocking' => true,
296
- 'headers' => $this->headers,
297
- 'cookies' => array(),
298
- 'body' => null,
299
- 'compress' => false,
300
- 'decompress' => true,
301
- 'sslverify' => true,
302
- 'stream' => false,
303
- 'filename' => null,
304
- );
305
-
306
- if ( 'xml' === $record_type ) {
307
- $xml = $this->get_xml( $lead );
308
- if ( is_wp_error( $xml ) ) {
309
- return $xml;
310
- }
311
-
312
- $args['body'] = $xml->asXML();
313
- } elseif ( 'json' === $record_type ) {
314
- $json = wp_json_encode( $lead );
315
- if ( is_wp_error( $json ) ) {
316
- return $json;
317
- } else {
318
- $args['body'] = $json;
319
- }
320
- } else {
321
- $lead_string = http_build_query( $lead );
322
- $url = strpos( '?', $url ) ? $url . '&' . $lead_string : $url . '?' . $lead_string;
323
- }
324
-
325
- $args = apply_filters( 'qs_cf7_api_get_args', $args );
326
- $url = apply_filters( 'qs_cf7_api_get_url', $url, $record );
327
- $url = $this->replace_tags( $url );
328
-
329
- $result = wp_remote_get( $url, $args );
330
- } else {
331
- $args = array(
332
- 'timeout' => 100,
333
- 'redirection' => 5,
334
- 'method' => strtoupper( $method ),
335
- 'httpversion' => '1.0',
336
- 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url(),
337
- 'blocking' => true,
338
- 'headers' => $this->headers,
339
- 'cookies' => array(),
340
- 'body' => $lead,
341
- 'compress' => false,
342
- 'decompress' => true,
343
- 'sslverify' => true,
344
- 'stream' => false,
345
- 'filename' => null,
346
- );
347
-
348
- if ( 'xml' === $record_type ) {
349
- $xml = $this->get_xml( $lead );
350
-
351
- if ( is_wp_error( $xml ) ) {
352
- return $xml;
353
- }
354
-
355
- $args['body'] = $xml->asXML();
356
- } elseif ( 'json' === $record_type ) {
357
- $json = wp_json_encode( json_decode( $lead ) );
358
- if ( is_wp_error( $json ) ) {
359
- return $json;
360
- } else {
361
- $args['body'] = $json;
362
- }
363
- }
364
-
365
- $args = apply_filters( 'qs_cf7_api_get_args', $args );
366
- $url = apply_filters( 'qs_cf7_api_post_url', $url );
367
- $url = $this->replace_tags( $url );
368
-
369
- $result = wp_remote_request( $url, $args );
370
- }
371
-
372
- $this->log_result( $args, $result );
373
-
374
- do_action( 'after_qs_cf7_api_send_lead', $result, $record, $args );
375
-
376
- if ( ! is_wp_error( $result ) ) {
377
- $results['response_raw'] = $result;
378
- $results['response'] = wp_remote_retrieve_body( $result );
379
- }
380
-
381
- return $result;
382
- }
383
-
384
- /**
385
- * Get XML
386
- *
387
- * @param $lead
388
- */
389
- private function get_xml( $lead ) {
390
-
391
- $xml = '';
392
-
393
- if ( function_exists( 'simplexml_load_string' ) ) {
394
- libxml_use_internal_errors( true );
395
- $xml = simplexml_load_string( $lead );
396
-
397
- if ( false === $xml ) {
398
- $xml = new WP_Error(
399
- 'xml',
400
- __( 'XML Structure is incorrect', 'wpcf7-redirect' )
401
- );
402
-
403
- }
404
- }
405
-
406
- return $xml;
407
- }
408
- }
409
-
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Action_api_url_request file
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ class WPCF7R_Action_Send_To_Api extends WPCF7R_Action {
9
+
10
+ public function __construct( $post ) {
11
+ $this->action_id = $post->ID;
12
+ }
13
+
14
+ /**
15
+ * The handler that will send the data to the api
16
+ *
17
+ * @param $args
18
+ */
19
+ public function qs_cf7_send_data_to_api( $args ) {
20
+ $this->defaults = $args['tags_defaults'];
21
+ $this->functions = $args['tags_functions'];
22
+ $this->headers = $args['api_headers'];
23
+ $this->headers = array_filter( $this->headers );
24
+
25
+ $tags_map = $args['tags'];
26
+ $record_type = $args['record_type'];
27
+ $input_type = $args['input_type'];
28
+ $base_url = $args['base_url'];
29
+ $submission = isset( $args['submission'] ) ? $args['submission'] : '';
30
+ $template = $args['request_template'];
31
+
32
+ if ( 'xml' === $record_type ) {
33
+ $this->headers['Content-Type'] = 'text/xml';
34
+ } elseif ( 'json' === $record_type ) {
35
+ $this->headers['Content-Type'] = 'application/json';
36
+ }
37
+
38
+ $submission = WPCF7_Submission::get_instance();
39
+ $wpcf7 = $submission->get_contact_form();
40
+
41
+ $this->post = $wpcf7;
42
+ $this->clear_error_log( $this->post->id() );
43
+
44
+ $submission_url = $submission->get_meta( 'url' );
45
+
46
+ //always save last call results for debugging
47
+
48
+ $record = $this->get_record( $submission, $tags_map, $record_type, $template );
49
+ $record['url'] = $base_url;
50
+
51
+ if ( isset( $record['url'] ) && $record['url'] ) {
52
+ do_action( 'qs_cf7_api_before_sent_to_api', $record );
53
+ $response = $this->send_lead( $record, true, $input_type, $record_type, $tags_map );
54
+ do_action( 'qs_cf7_api_after_sent_to_api', $record, $response );
55
+
56
+ } else {
57
+ $this->log_result( __( 'Missing url' ), '' );
58
+ }
59
+
60
+ return array( $response, $record );
61
+ }
62
+
63
+ public function log_result( $record, $response ) {
64
+ if ( isset( $record['url'] ) ) {
65
+ update_post_meta( $this->action_id, 'api_debug_url', $record['url'] );
66
+ }
67
+
68
+ if ( is_wp_error( $response ) || is_wp_error( $record ) ) {
69
+ update_post_meta( $this->action_id, 'api_debug_result', $response );
70
+ update_post_meta( $this->action_id, 'api_debug_params', $record );
71
+ } else {
72
+ update_post_meta( $this->action_id, 'api_debug_params', $record );
73
+ update_post_meta( $this->action_id, 'api_debug_result', $response );
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Clear error log
79
+ */
80
+ function clear_error_log( $post_id ) {
81
+ delete_post_meta( $post_id, 'api_errors' );
82
+ }
83
+
84
+ /**
85
+ * Convert the form keys to the API keys according to the mapping instructions
86
+ *
87
+ * @param $submission
88
+ * @param $tags_map
89
+ * @param string $type
90
+ * @param string $template
91
+ */
92
+ function get_record( $submission, $tags_map, $type = 'params', $template = '' ) {
93
+ $submited_data = $submission->get_posted_data();
94
+
95
+ if ( 'xml' === $type || 'json' === $type ) {
96
+ $template = $this->replace_lead_id_tag( $template );
97
+
98
+ foreach ( $tags_map as $form_key => $qs_cf7_form_key ) {
99
+ if ( is_array( $qs_cf7_form_key ) ) {
100
+
101
+ //arrange checkbox arrays
102
+ if ( isset( $submited_data[ $form_key ] ) ) {
103
+ $value = apply_filters( 'set_record_value', $submited_data[ $form_key ], $qs_cf7_form_key, $form_key );
104
+ $value = is_array( $value ) ? implode( ',', $value ) : $value;
105
+ }
106
+ } else {
107
+ $value = isset( $submited_data[ $form_key ] ) ? $submited_data[ $form_key ] : '';
108
+ $value = apply_filters( 'set_record_value', $value, $qs_cf7_form_key, $form_key );
109
+
110
+ //flattan radio
111
+ if ( is_array( $value ) ) {
112
+ $value = reset( $value );
113
+ }
114
+ }
115
+
116
+ //set defaults
117
+
118
+ if ( ! $value ) {
119
+ if ( isset( $this->defaults[ $form_key ] ) ) {
120
+ if ( is_array( $this->defaults[ $form_key ] ) ) {
121
+ $value = array();
122
+
123
+ foreach ( $this->defaults[ $form_key ] as $key => $sub_value ) {
124
+ if ( isset( $this->functions[ $key ] ) && $this->functions[ $key ] ) {
125
+ $sub_value = $this->run_function( $this->functions[ $key ], $sub_value );
126
+ }
127
+
128
+ if ( $sub_value ) {
129
+ $value[] = $sub_value;
130
+ }
131
+
132
+ $template = str_replace( "[{$key}]", $sub_value, $template );
133
+ }
134
+
135
+ $value = implode( ',', $value );
136
+
137
+ } else {
138
+ $value = $this->defaults[ $form_key ];
139
+ }
140
+ }
141
+ }
142
+
143
+ if ( isset( $this->functions[ $form_key ] ) && $this->functions[ $form_key ] ) {
144
+
145
+ //dont call the function again on arrays (checkvoxes)
146
+
147
+ if ( ! is_array( $this->functions[ $form_key ] ) ) {
148
+ $value = $this->run_function( $this->functions[ $form_key ], $value );
149
+ }
150
+ }
151
+
152
+ $value = trim( preg_replace( '/(\r\n)|\n|\r/', '\\n', $value ) );
153
+ $template = str_replace( "[{$form_key}]", $value, $template );
154
+ }
155
+
156
+ //replace special mail tags
157
+
158
+ foreach ( WPCF7R_Form::get_special_mail_tags() as $mail_tag ) {
159
+ $special = apply_filters( 'wpcf7_special_mail_tags', null, $mail_tag->field_name(), $template, $mail_tag );
160
+ $template = str_replace( "[{$mail_tag->field_name()}]", $special, $template );
161
+ }
162
+
163
+ //clean unchanged tags
164
+
165
+ $template = $this->replace_tags( $template );
166
+ $record['fields'] = $template;
167
+
168
+ } else {
169
+ $record = $this->get_record_by_tag_map( $submited_data, $tags_map );
170
+ $record = $this->set_defaults_and_run_functions( $record, $tags_map );
171
+ }
172
+
173
+ $record = apply_filters( 'cf7api_create_record', $record, $submited_data, $tags_map, $type, $template );
174
+
175
+ return $record;
176
+ }
177
+
178
+ /**
179
+ * Create a record object
180
+ *
181
+ * @param $submited_data
182
+ * @param $tags_map
183
+ */
184
+ public function get_record_by_tag_map( $submited_data, $tags_map ) {
185
+
186
+ $record = array();
187
+
188
+ foreach ( $tags_map as $form_key => $qs_cf7_form_key ) {
189
+ if ( $qs_cf7_form_key ) {
190
+ if ( is_array( $qs_cf7_form_key ) ) {
191
+
192
+ //arrange checkbox arrays
193
+ foreach ( $submited_data[ $form_key ] as $value ) {
194
+ if ( $value ) {
195
+ if ( 'lead_id' === $form_key ) {
196
+ $record['fields'][ $qs_cf7_form_key[ $value ] ] = apply_filters( 'set_record_value', self::get_lead_id(), $qs_cf7_form_key );
197
+ } else {
198
+ $record['fields'][ $qs_cf7_form_key[ $value ] ] = apply_filters( 'set_record_value', $value, $qs_cf7_form_key );
199
+ }
200
+ }
201
+ }
202
+ } else {
203
+ $value = isset( $submited_data[ $form_key ] ) ? $submited_data[ $form_key ] : '';
204
+
205
+ //flattan radio
206
+ if ( is_array( $value ) && count( $value ) === 1 ) {
207
+ $value = reset( $value );
208
+ }
209
+
210
+ if ( 'lead_id' === $form_key ) {
211
+ $record['fields'][ $qs_cf7_form_key ] = apply_filters( 'set_record_value', self::get_lead_id(), $qs_cf7_form_key );
212
+ } else {
213
+ $record['fields'][ $qs_cf7_form_key ] = apply_filters( 'set_record_value', $value, $qs_cf7_form_key );
214
+ }
215
+ }
216
+ }
217
+ }
218
+
219
+ return $record;
220
+ }
221
+
222
+ /**
223
+ * Set the fields defaults
224
+ */
225
+ public function set_defaults_and_run_functions( $record, $tags_map ) {
226
+
227
+ //set default values
228
+
229
+ if ( $this->defaults && array_values( $this->defaults ) ) {
230
+ foreach ( $this->defaults as $default_field_key => $default_value ) {
231
+ if ( $default_value ) {
232
+ $api_key = $tags_map[ $default_field_key ];
233
+ $record['fields'][ $api_key ] = isset( $record['fields'][ $api_key ] ) && $record['fields'][ $api_key ] ? $record['fields'][ $api_key ] : $default_value;
234
+ }
235
+ }
236
+ }
237
+
238
+ //run functions on values
239
+
240
+ if ( $this->functions && array_values( $this->functions ) ) {
241
+ foreach ( $this->functions as $field_key => $function ) {
242
+ $api_key = $tags_map[ $field_key ];
243
+ $field_value = $record['fields'][ $api_key ];
244
+
245
+ if ( $function && $field_value ) {
246
+ $record['fields'][ $api_key ] = $this->run_function( $function, $field_value );
247
+ }
248
+ }
249
+ }
250
+
251
+ return $record;
252
+ }
253
+
254
+ /**
255
+ * Run custom functions on user submission
256
+ *
257
+ * @param $function
258
+ * @param $field_value
259
+ */
260
+ public function run_function( $function, $field_value ) {
261
+
262
+ $function = WPCF7r_Utils::get_available_text_functions( $function, 'all' );
263
+
264
+ if ( $function ) {
265
+ $class = $function[0];
266
+ $method = $function[1];
267
+
268
+ return call_user_func( array( $class, $method ), $field_value );
269
+ }
270
+
271
+ return $field_value;
272
+ }
273
+
274
+ /**
275
+ * Send the lead using wp_remote
276
+ *
277
+ * @param $record
278
+ * @param boolean $debug
279
+ * @param string $method
280
+ * @param string $record_type
281
+ */
282
+ private function send_lead( $record, $debug = false, $method = 'GET', $record_type = 'params' ) {
283
+
284
+ global $wp_version;
285
+
286
+ $lead = $record['fields'];
287
+ $url = $record['url'];
288
+
289
+ if ( ( 'get' === $method || 'GET' === $method ) && ( 'params' === $record_type || 'json' === $record_type ) ) {
290
+ $args = array(
291
+ 'timeout' => 100,
292
+ 'redirection' => 5,
293
+ 'httpversion' => '1.0',
294
+ 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url(),
295
+ 'blocking' => true,
296
+ 'headers' => $this->headers,
297
+ 'cookies' => array(),
298
+ 'body' => null,
299
+ 'compress' => false,
300
+ 'decompress' => true,
301
+ 'sslverify' => true,
302
+ 'stream' => false,
303
+ 'filename' => null,
304
+ );
305
+
306
+ if ( 'xml' === $record_type ) {
307
+ $xml = $this->get_xml( $lead );
308
+ if ( is_wp_error( $xml ) ) {
309
+ return $xml;
310
+ }
311
+
312
+ $args['body'] = $xml->asXML();
313
+ } elseif ( 'json' === $record_type ) {
314
+ $json = wp_json_encode( $lead );
315
+ if ( is_wp_error( $json ) ) {
316
+ return $json;
317
+ } else {
318
+ $args['body'] = $json;
319
+ }
320
+ } else {
321
+ $lead_string = http_build_query( $lead );
322
+ $url = strpos( '?', $url ) ? $url . '&' . $lead_string : $url . '?' . $lead_string;
323
+ }
324
+
325
+ $args = apply_filters( 'qs_cf7_api_get_args', $args );
326
+ $url = apply_filters( 'qs_cf7_api_get_url', $url, $record );
327
+ $url = $this->replace_tags( $url );
328
+
329
+ $result = wp_remote_get( $url, $args );
330
+ } else {
331
+ $args = array(
332
+ 'timeout' => 100,
333
+ 'redirection' => 5,
334
+ 'method' => strtoupper( $method ),
335
+ 'httpversion' => '1.0',
336
+ 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url(),
337
+ 'blocking' => true,
338
+ 'headers' => $this->headers,
339
+ 'cookies' => array(),
340
+ 'body' => $lead,
341
+ 'compress' => false,
342
+ 'decompress' => true,
343
+ 'sslverify' => true,
344
+ 'stream' => false,
345
+ 'filename' => null,
346
+ );
347
+
348
+ if ( 'xml' === $record_type ) {
349
+ $xml = $this->get_xml( $lead );
350
+
351
+ if ( is_wp_error( $xml ) ) {
352
+ return $xml;
353
+ }
354
+
355
+ $args['body'] = $xml->asXML();
356
+ } elseif ( 'json' === $record_type ) {
357
+ $json = wp_json_encode( json_decode( $lead ) );
358
+ if ( is_wp_error( $json ) ) {
359
+ return $json;
360
+ } else {
361
+ $args['body'] = $json;
362
+ }
363
+ }
364
+
365
+ $args = apply_filters( 'qs_cf7_api_get_args', $args );
366
+ $url = apply_filters( 'qs_cf7_api_post_url', $url );
367
+ $url = $this->replace_tags( $url );
368
+
369
+ $result = wp_remote_request( $url, $args );
370
+ }
371
+
372
+ $this->log_result( $args, $result );
373
+
374
+ do_action( 'after_qs_cf7_api_send_lead', $result, $record, $args );
375
+
376
+ if ( ! is_wp_error( $result ) ) {
377
+ $results['response_raw'] = $result;
378
+ $results['response'] = wp_remote_retrieve_body( $result );
379
+ }
380
+
381
+ return $result;
382
+ }
383
+
384
+ /**
385
+ * Get XML
386
+ *
387
+ * @param $lead
388
+ */
389
+ private function get_xml( $lead ) {
390
+
391
+ $xml = '';
392
+
393
+ if ( function_exists( 'simplexml_load_string' ) ) {
394
+ libxml_use_internal_errors( true );
395
+ $xml = simplexml_load_string( $lead );
396
+
397
+ if ( false === $xml ) {
398
+ $xml = new WP_Error(
399
+ 'xml',
400
+ __( 'XML Structure is incorrect', 'wpcf7-redirect' )
401
+ );
402
+
403
+ }
404
+ }
405
+
406
+ return $xml;
407
+ }
408
+ }
409
+
classes/actions/class-wpcf7r-action-sendmail.php CHANGED
@@ -1,180 +1,180 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Action_SendMail file - handles send mail action
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- register_wpcf7r_actions(
9
- 'SendMail',
10
- __( 'Send Email', 'wpcf7-redirect' ),
11
- 'WPCF7R_Action_SendMail',
12
- 4
13
- );
14
-
15
- class WPCF7R_Action_SendMail extends WPCF7R_Action {
16
- public function __construct( $post ) {
17
- parent::__construct( $post );
18
- }
19
- /**
20
- * Get the fields relevant for this action
21
- */
22
- public function get_action_fields() {
23
- $parent_fields = parent::get_default_fields();
24
-
25
- unset( $parent_fields['action_status'] );
26
-
27
- $fields = array_merge(
28
- array(
29
- 'send_to_emails_values' => array(
30
- 'name' => 'send_to_emails_values',
31
- 'type' => 'text',
32
- 'label' => __( 'To:', 'wpcf7-redirect' ),
33
- 'placeholder' => __( 'Email addresses seperated by comma (,)', 'wpcf7-redirect' ),
34
- 'value' => $this->get( 'send_to_emails_values' ),
35
- ),
36
- 'email_sender' => array(
37
- 'name' => 'email_sender',
38
- 'type' => 'text',
39
- 'label' => __( 'From:', 'wpcf7-redirect' ),
40
- 'placeholder' => __( 'name <address>', 'wpcf7-redirect' ),
41
- 'value' => $this->get( 'email_sender' ),
42
- ),
43
- 'email_subject' => array(
44
- 'name' => 'email_subject',
45
- 'type' => 'text',
46
- 'label' => __( 'Subject:', 'wpcf7-redirect' ),
47
- 'value' => $this->get( 'email_subject' ),
48
- ),
49
- 'email_format' => array(
50
- 'name' => 'email_format',
51
- 'type' => 'editor',
52
- 'label' => __( 'Email Format (use the same structure used on Contact Form 7)', 'wpcf7-redirect' ),
53
- 'footer' => $this->get_formatted_mail_tags(),
54
- 'value' => $this->get( 'email_format' ),
55
- ),
56
- 'email_attachments' => array(
57
- 'name' => 'email_attachments',
58
- 'type' => 'text',
59
- 'label' => __( 'Add your form attachments shortcodes here', 'wpcf7-redirect' ),
60
- 'value' => $this->get( 'email_attachments' ),
61
- ),
62
- 'plain_text' => array(
63
- 'name' => 'plain_text',
64
- 'type' => 'checkbox',
65
- 'label' => __( 'Use plain text email', 'wpcf7-redirect' ),
66
- 'placeholder' => '',
67
- 'show_selector' => '.field-wrap-plain_text',
68
- 'value' => $this->get( 'plain_text' ),
69
- ),
70
- // 'disable_cf7_mail' => array(
71
- // 'name' => 'disable_cf7_mail',
72
- // 'type' => 'checkbox',
73
- // 'label' => __( 'Disable contact form 7 default email', 'wpcf7-redirect' ),
74
- // 'placeholder' => '',
75
- // 'value' => $this->get( 'disable_cf7_mail' ),
76
- // ),
77
- 'action_status' => array(
78
- 'name' => 'action_status',
79
- 'type' => 'checkbox',
80
- 'label' => $this->get_action_status_label(),
81
- 'sub_title' => __( 'if this is off the rule will not be applied', 'wpcf7-redirect' ),
82
- 'placeholder' => '',
83
- 'show_selector' => '.field-wrap-disable_default_email',
84
- 'toggle-label' => json_encode(
85
- array(
86
- '.field-wrap-action_status .checkbox-label,.column-status a' => array(
87
- __( 'Enabled', 'wpcf7-redirect' ),
88
- __( 'Disabled', 'wpcf7-redirect' ),
89
- ),
90
- )
91
- ),
92
- 'value' => $this->get( 'action_status' ),
93
- ),
94
- 'disable_default_email' => array(
95
- 'name' => 'disable_default_email',
96
- 'type' => 'notice',
97
- 'label' => '<strong>' . __( 'Notice!', 'wpcf7-redirect' ) . '</strong>',
98
- 'sub_title' => __( 'When email action is enabled the default Contact Form 7 mailing feature will be disabled.', 'wpcf7-redirect' ),
99
- 'placeholder' => '',
100
- 'class' => $this->get( 'action_status' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
101
- 'show_selector' => '',
102
- ),
103
- ),
104
- $parent_fields
105
- );
106
- return $fields;
107
- }
108
-
109
- /**
110
- * Get settings page
111
- */
112
- public function get_action_settings() {
113
- $this->get_settings_template( 'html-action-send-to-email.php' );
114
- }
115
-
116
- /**
117
- * Handle a simple redirect rule
118
- *
119
- * @param $rules
120
- * @param $response
121
- */
122
- public function process( $submission ) {
123
- $response = array();
124
- $email_to = $this->get( 'send_to_emails_values' );
125
- $email_sender = $this->get( 'email_sender' );
126
- $email_format = $this->get( 'email_format' );
127
- $email_subject = $this->get( 'email_subject' );
128
- $email_attachments = $this->get( 'email_attachments' );
129
- $plain_text = $this->get( 'plain_text' );
130
-
131
- // set the email address to recipient
132
- $mail_settings = $this->cf7r_form->cf7_post->get_properties( 'mail' );
133
-
134
- if ( $email_to ) {
135
- $mail_settings['mail']['recipient'] = $email_to;
136
- }
137
-
138
- if ( $email_sender ) {
139
- $mail_settings['mail']['sender'] = $email_sender;
140
- }
141
-
142
- if ( $email_format ) {
143
- $mail_settings['mail']['body'] = $email_format;
144
- }
145
-
146
- if ( $email_subject ) {
147
- $mail_settings['mail']['subject'] = $email_subject;
148
- }
149
-
150
- if ( $email_attachments ) {
151
- $mail_settings['mail']['attachments'] = $email_attachments;
152
- }
153
-
154
- $mail_settings['mail']['use_html'] = ! $plain_text;
155
-
156
- $result = $this->send_mail( $mail_settings['mail'] );
157
-
158
- return $result;
159
- }
160
-
161
- /**
162
- * Maybe perform actions before sending results to the user
163
- */
164
- public function maybe_perform_pre_result_action() {
165
- if ( $this->get( 'disable_cf7_mail' ) ) {
166
- add_filter( 'wpcf7_skip_mail', '__return_false' );
167
- }
168
- }
169
-
170
-
171
- /**
172
- * Use contact form 7 function to send the email
173
- *
174
- * @param $mail
175
- */
176
- public function send_mail( $mail ) {
177
- $result = WPCF7_Mail::send( $mail, 'mail' );
178
- return $result;
179
- }
180
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Action_SendMail file - handles send mail action
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ register_wpcf7r_actions(
9
+ 'SendMail',
10
+ __( 'Send Email', 'wpcf7-redirect' ),
11
+ 'WPCF7R_Action_SendMail',
12
+ 4
13
+ );
14
+
15
+ class WPCF7R_Action_SendMail extends WPCF7R_Action {
16
+ public function __construct( $post ) {
17
+ parent::__construct( $post );
18
+ }
19
+ /**
20
+ * Get the fields relevant for this action
21
+ */
22
+ public function get_action_fields() {
23
+ $parent_fields = parent::get_default_fields();
24
+
25
+ unset( $parent_fields['action_status'] );
26
+
27
+ $fields = array_merge(
28
+ array(
29
+ 'send_to_emails_values' => array(
30
+ 'name' => 'send_to_emails_values',
31
+ 'type' => 'text',
32
+ 'label' => __( 'To:', 'wpcf7-redirect' ),
33
+ 'placeholder' => __( 'Email addresses seperated by comma (,)', 'wpcf7-redirect' ),
34
+ 'value' => $this->get( 'send_to_emails_values' ),
35
+ ),
36
+ 'email_sender' => array(
37
+ 'name' => 'email_sender',
38
+ 'type' => 'text',
39
+ 'label' => __( 'From:', 'wpcf7-redirect' ),
40
+ 'placeholder' => __( 'name <address>', 'wpcf7-redirect' ),
41
+ 'value' => $this->get( 'email_sender' ),
42
+ ),
43
+ 'email_subject' => array(
44
+ 'name' => 'email_subject',
45
+ 'type' => 'text',
46
+ 'label' => __( 'Subject:', 'wpcf7-redirect' ),
47
+ 'value' => $this->get( 'email_subject' ),
48
+ ),
49
+ 'email_format' => array(
50
+ 'name' => 'email_format',
51
+ 'type' => 'editor',
52
+ 'label' => __( 'Email Format (use the same structure used on Contact Form 7)', 'wpcf7-redirect' ),
53
+ 'footer' => $this->get_formatted_mail_tags(),
54
+ 'value' => $this->get( 'email_format' ),
55
+ ),
56
+ 'email_attachments' => array(
57
+ 'name' => 'email_attachments',
58
+ 'type' => 'text',
59
+ 'label' => __( 'Add your form attachments shortcodes here', 'wpcf7-redirect' ),
60
+ 'value' => $this->get( 'email_attachments' ),
61
+ ),
62
+ 'plain_text' => array(
63
+ 'name' => 'plain_text',
64
+ 'type' => 'checkbox',
65
+ 'label' => __( 'Use plain text email', 'wpcf7-redirect' ),
66
+ 'placeholder' => '',
67
+ 'show_selector' => '.field-wrap-plain_text',
68
+ 'value' => $this->get( 'plain_text' ),
69
+ ),
70
+ // 'disable_cf7_mail' => array(
71
+ // 'name' => 'disable_cf7_mail',
72
+ // 'type' => 'checkbox',
73
+ // 'label' => __( 'Disable contact form 7 default email', 'wpcf7-redirect' ),
74
+ // 'placeholder' => '',
75
+ // 'value' => $this->get( 'disable_cf7_mail' ),
76
+ // ),
77
+ 'action_status' => array(
78
+ 'name' => 'action_status',
79
+ 'type' => 'checkbox',
80
+ 'label' => $this->get_action_status_label(),
81
+ 'sub_title' => __( 'if this is off the rule will not be applied', 'wpcf7-redirect' ),
82
+ 'placeholder' => '',
83
+ 'show_selector' => '.field-wrap-disable_default_email',
84
+ 'toggle-label' => json_encode(
85
+ array(
86
+ '.field-wrap-action_status .checkbox-label,.column-status a' => array(
87
+ __( 'Enabled', 'wpcf7-redirect' ),
88
+ __( 'Disabled', 'wpcf7-redirect' ),
89
+ ),
90
+ )
91
+ ),
92
+ 'value' => $this->get( 'action_status' ),
93
+ ),
94
+ 'disable_default_email' => array(
95
+ 'name' => 'disable_default_email',
96
+ 'type' => 'notice',
97
+ 'label' => '<strong>' . __( 'Notice!', 'wpcf7-redirect' ) . '</strong>',
98
+ 'sub_title' => __( 'When email action is enabled the default Contact Form 7 mailing feature will be disabled.', 'wpcf7-redirect' ),
99
+ 'placeholder' => '',
100
+ 'class' => $this->get( 'action_status' ) ? 'field-notice-alert' : 'field-hidden field-notice-alert',
101
+ 'show_selector' => '',
102
+ ),
103
+ ),
104
+ $parent_fields
105
+ );
106
+ return $fields;
107
+ }
108
+
109
+ /**
110
+ * Get settings page
111
+ */
112
+ public function get_action_settings() {
113
+ $this->get_settings_template( 'html-action-send-to-email.php' );
114
+ }
115
+
116
+ /**
117
+ * Handle a simple redirect rule
118
+ *
119
+ * @param $rules
120
+ * @param $response
121
+ */
122
+ public function process( $submission ) {
123
+ $response = array();
124
+ $email_to = $this->get( 'send_to_emails_values' );
125
+ $email_sender = $this->get( 'email_sender' );
126
+ $email_format = $this->get( 'email_format' );
127
+ $email_subject = $this->get( 'email_subject' );
128
+ $email_attachments = $this->get( 'email_attachments' );
129
+ $plain_text = $this->get( 'plain_text' );
130
+
131
+ // set the email address to recipient
132
+ $mail_settings = $this->cf7r_form->cf7_post->get_properties( 'mail' );
133
+
134
+ if ( $email_to ) {
135
+ $mail_settings['mail']['recipient'] = $email_to;
136
+ }
137
+
138
+ if ( $email_sender ) {
139
+ $mail_settings['mail']['sender'] = $email_sender;
140
+ }
141
+
142
+ if ( $email_format ) {
143
+ $mail_settings['mail']['body'] = $email_format;
144
+ }
145
+
146
+ if ( $email_subject ) {
147
+ $mail_settings['mail']['subject'] = $email_subject;
148
+ }
149
+
150
+ if ( $email_attachments ) {
151
+ $mail_settings['mail']['attachments'] = $email_attachments;
152
+ }
153
+
154
+ $mail_settings['mail']['use_html'] = ! $plain_text;
155
+
156
+ $result = $this->send_mail( $mail_settings['mail'] );
157
+
158
+ return $result;
159
+ }
160
+
161
+ /**
162
+ * Maybe perform actions before sending results to the user
163
+ */
164
+ public function maybe_perform_pre_result_action() {
165
+ if ( $this->get( 'disable_cf7_mail' ) ) {
166
+ add_filter( 'wpcf7_skip_mail', '__return_false' );
167
+ }
168
+ }
169
+
170
+
171
+ /**
172
+ * Use contact form 7 function to send the email
173
+ *
174
+ * @param $mail
175
+ */
176
+ public function send_mail( $mail ) {
177
+ $result = WPCF7_Mail::send( $mail, 'mail' );
178
+ return $result;
179
+ }
180
+ }
classes/actions/html/html-action-redirect.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- /**
3
- * HTML action redirect
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- /**
9
- * HTML itterator to display redirect actions fields.
10
- */
11
- foreach ( $this->get_action_fields() as $field ) {
12
- $this->render_field( $field, $prefix );
13
- }
1
+ <?php
2
+ /**
3
+ * HTML action redirect
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ /**
9
+ * HTML itterator to display redirect actions fields.
10
+ */
11
+ foreach ( $this->get_action_fields() as $field ) {
12
+ $this->render_field( $field, $prefix );
13
+ }
classes/actions/html/html-action-send-to-email.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- /**
3
- * html-action-send-to-email file.
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- /**
9
- * Send to mail action html fields
10
- */
11
- foreach ( $this->get_action_fields() as $field ) {
12
- $this->render_field( $field, $prefix );
13
- }
1
+ <?php
2
+ /**
3
+ * html-action-send-to-email file.
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ /**
9
+ * Send to mail action html fields
10
+ */
11
+ foreach ( $this->get_action_fields() as $field ) {
12
+ $this->render_field( $field, $prefix );
13
+ }
classes/actions/html/html-page-settings.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- /**
3
- * HTML action-send-to-email file.
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <section class="page-settings">
10
-
11
- <?php
12
- // Send to mail action html fields
13
- foreach ( $this->get_action_fields() as $field ) {
14
- $this->render_field( $field, $prefix );
15
- }
16
- ?>
17
-
18
- </section>
19
-
1
+ <?php
2
+ /**
3
+ * HTML action-send-to-email file.
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <section class="page-settings">
10
+
11
+ <?php
12
+ // Send to mail action html fields
13
+ foreach ( $this->get_action_fields() as $field ) {
14
+ $this->render_field( $field, $prefix );
15
+ }
16
+ ?>
17
+
18
+ </section>
19
+
classes/actions/html/index.php CHANGED
@@ -1,5 +1,5 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
classes/actions/html/rule-title.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- /**
3
- * rule-title.php file.
4
- *
5
- * @package cf7r
6
- */
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- /**
13
- * Display the block title
14
- *
15
- * @version 1.0.0
16
- */
17
- ?>
18
- <div class="field-wrap field-wrap-post-title">
19
- <label for="wpcf7-redirect-post-title">
20
- <strong><?php esc_html_e( 'Rule Title', 'wpcf7-redirect' );?></strong>
21
- </label>
22
- <input type="text" class="wpcf7-redirect-post-title-fields" placeholder="<?php esc_html_e( 'Rule title', 'wpcf7-redirect' );?>" name="wpcf7-redirect<?php echo $prefix;?>[post_title]" value="<?php echo $this->get_title();?>">
23
- </div>
1
+ <?php
2
+ /**
3
+ * rule-title.php file.
4
+ *
5
+ * @package cf7r
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Display the block title
14
+ *
15
+ * @version 1.0.0
16
+ */
17
+ ?>
18
+ <div class="field-wrap field-wrap-post-title">
19
+ <label for="wpcf7-redirect-post-title">
20
+ <strong><?php esc_html_e( 'Rule Title', 'wpcf7-redirect' );?></strong>
21
+ </label>
22
+ <input type="text" class="wpcf7-redirect-post-title-fields" placeholder="<?php esc_html_e( 'Rule title', 'wpcf7-redirect' );?>" name="wpcf7-redirect<?php echo $prefix;?>[post_title]" value="<?php echo $this->get_title();?>">
23
+ </div>
classes/aff/class-ext-accessibe.php CHANGED
@@ -1,627 +1,627 @@
1
- <?php
2
- /**
3
- * Accesibe Extension Class
4
- *
5
- * @category Ext_Accessibe
6
- * @package Ext_Accessibe
7
- * @author Author <info@querysol.com>
8
- * @license https://opensource.org/licenses/MIT MIT License
9
- * @link http://querysol.com/
10
- */
11
- class Ext_Accessibe extends WPCF7R_Action {
12
- public $ver = '1.0';
13
- private $api_url = ACCESSIBE_API_URI;
14
- private $ext_name = 'accessibe';
15
-
16
- /**
17
- * Class constructor
18
- */
19
- public function __construct() {
20
- if ( isset( $_GET['scan'] ) ) {
21
- $this->reset_scan_results();
22
- }
23
- if ( is_admin() ) {
24
- $this->admin_init();
25
- }
26
- }
27
-
28
- /**
29
- * Get the extension name
30
- */
31
- public function get_name() {
32
- $name = $this->ext_name;
33
- return $name;
34
- }
35
-
36
- /**
37
- * Get the option key that will store the widget settings
38
- */
39
- public function get_widget_option_key() {
40
- $key = 'accesibe_widget_options';
41
- if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
42
- $key .= '_' . ICL_LANGUAGE_CODE;
43
- }
44
- return $key;
45
- }
46
-
47
- /**
48
- * Initiate admin scripts
49
- */
50
- public function admin_init() {
51
- if ( isset( $_GET['page'] ) && qs_get_plugin_display_name() === $_GET['page'] ) {
52
- $response = $this->acctivate_acccesbe_menu();
53
- }
54
- if ( isset( $_REQUEST['start-free-trial'] ) && qs_get_plugin_display_name() === $_REQUEST['start-free-trial'] ) {
55
- $response = $this->mark_scan_completed();
56
- }
57
- if ( isset( $_POST['activate-accesibe'] ) && $_POST['activate-accesibe'] ) {
58
- $response = $this->activate();
59
- if ( is_wp_error( $response ) ) {
60
- WPCF7r_Utils::add_admin_notice( 'alert', $response->get_error_message() );
61
- } else {
62
- WPCF7r_Utils::add_admin_notice( 'notice', __( 'Successfully activated' ) );
63
- }
64
- }
65
- if ( isset( $_GET['deactivate'] ) && qs_get_plugin_display_name() === $_GET['deactivate'] ) {
66
- $this->deactivate();
67
- }
68
- if ( isset( $_REQUEST['save_ext_settings'] ) && qs_get_plugin_display_name() === $_REQUEST['save_ext_settings'] ) {
69
- $this->save();
70
- }
71
- $this->init();
72
- }
73
-
74
- /**
75
- * Save widget settings
76
- */
77
- private function save() {
78
- $name = $this->get_name();
79
- $key = $this->get_widget_option_key();
80
- if ( isset( $_REQUEST['wpcf7-redirect'][ $key ][ $name ] ) && $_REQUEST['wpcf7-redirect'][ $key ][ $name ] ) {
81
- $data = $_REQUEST['wpcf7-redirect'][ $key ][ $name ];
82
- update_option( $key, $data );
83
- } elseif ( isset( $_REQUEST['save_ext_settings'] ) ) {
84
- update_option( $key, array() );
85
- }
86
- $this->init();
87
- }
88
-
89
- /**
90
- * Get this extension settings page url
91
- */
92
- public function get_settings_url() {
93
- return admin_url( '/admin.php?page=' . qs_get_plugin_display_name() );
94
- }
95
-
96
- /**
97
- * The link will reset the scan data to allow a new scan to process
98
- */
99
- public function get_scan_link() {
100
- $url = $this->get_settings_url();
101
- $url = add_query_arg(
102
- array(
103
- 'scan' => true,
104
- )
105
- );
106
- return $url;
107
- }
108
-
109
- /**
110
- * Check if scan was commited and saved
111
- */
112
- public function get_scan_results() {
113
- return get_option( 'accesibe_scan_results' );
114
- }
115
-
116
- /**
117
- * Get the widget settings
118
- */
119
- public function get_widget_settings() {
120
- $key = $this->get_widget_option_key();
121
- return get_option( $key );
122
- }
123
-
124
- /**
125
- * Check if the plugin is active
126
- */
127
- public function is_active() {
128
- $settings = $this->get_settings();
129
- return $settings ? true : false;
130
- }
131
-
132
- /**
133
- * Check if the current screen is a registration form
134
- * @return boolean
135
- */
136
- public function is_registration_form() {
137
- return ! $this->is_scan() && ! $this->is_active();
138
- }
139
-
140
- /**
141
- * Check if the plugin is active
142
- *
143
- * @return boolean
144
- */
145
- public function is_scan() {
146
- $results = $this->get_scan_results();
147
- return $results ? false : true;
148
- }
149
-
150
- /**
151
- * Set a flag that a scan was completed
152
- */
153
- public function mark_scan_completed() {
154
- update_option( 'accesibe_scan_results', true );
155
- }
156
-
157
- /**
158
- * Allow the user to rescan the website
159
- */
160
- public function reset_scan_results() {
161
- delete_option( 'accesibe_scan_results' );
162
- }
163
-
164
- /**
165
- * Init extension
166
- */
167
- public function init() {
168
- if ( ! get_option( 'hide_accessibie_menu' ) && get_option( 'show_accessibie_menu' ) ) {
169
- add_action( 'admin_menu', array( $this, 'accessibie_menu' ) );
170
- }
171
- $this->accesibe_widget_options = $this->get_widget_settings();
172
- }
173
-
174
- /**
175
- * Deactivate the extension
176
- */
177
- public function deactivate() {
178
- delete_option( 'show_accessibie_menu' );
179
- delete_option( 'accesibe_options' );
180
- delete_option( 'accesibe_scan_results' );
181
- update_option( 'hide_accessibie_menu', true );
182
- }
183
-
184
- /**
185
- * Get the value of a specific field
186
- */
187
- public function get_field_value( $field ) {
188
- if ( $this->accesibe_widget_options ) {
189
- return isset( $this->accesibe_widget_options[ $field ] ) ? $this->accesibe_widget_options[ $field ] : '';
190
- }
191
- }
192
-
193
- /**
194
- * Get the template to display on the admin field
195
- *
196
- * @param $template
197
- */
198
- public function get_settings_template( $template ) {
199
- $name = $this->get_name();
200
- $prefix = "[accesibe_widget_options][{$name}]";
201
- include WPCF7_PRO_REDIRECT_ACTIONS_TEMPLATE_PATH . $template;
202
- }
203
-
204
- /**
205
- * General function to retrieve meta
206
- *
207
- * @param $key
208
- */
209
- public function get( $key ) {
210
- return isset( $this->accesibe_widget_options[ $key ] ) ? $this->accesibe_widget_options[ $key ] : '';
211
- }
212
-
213
- /**
214
- * Get the accessibe settings form
215
- */
216
- public function get_settings_form() {
217
- $this->get_settings_template( 'html-page-settings.php' );
218
- }
219
-
220
- /**
221
- * Display settings fields for active users
222
- */
223
- public function get_accesibe_settings() {
224
- $this->html = new WPCF7R_html( '' );
225
- include( WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'settings.php' );
226
- }
227
-
228
- /**
229
- * Get the fields relevant for this action
230
- */
231
- public function get_action_fields() {
232
- return
233
- array(
234
- array(
235
- 'name' => 'hideMobile',
236
- 'type' => 'checkbox',
237
- 'label' => __( 'Hide On Mobile', 'wpcf7-redirect' ),
238
- 'sub_title' => '',
239
- 'placeholder' => '',
240
- 'value' => $this->get( 'hideMobile' ),
241
- ),
242
- array(
243
- 'name' => 'hideTrigger',
244
- 'type' => 'checkbox',
245
- 'label' => __( 'Hide Trigger', 'wpcf7-redirect' ),
246
- 'sub_title' => '',
247
- 'placeholder' => '',
248
- 'value' => $this->get( 'hideTrigger' ),
249
- ),
250
- array(
251
- 'name' => 'leadColor',
252
- 'type' => 'text',
253
- 'input_class' => 'colorpicker',
254
- 'label' => __( 'Main Color', 'wpcf7-redirect' ),
255
- 'class' => 'qs-col qs-col-6',
256
- 'sub_title' => '',
257
- 'placeholder' => '',
258
- 'value' => $this->get( 'leadColor' ) ? $this->get( 'leadColor' ) : '#146FF8',
259
- ),
260
- array(
261
- 'name' => 'triggerColor',
262
- 'type' => 'text',
263
- 'input_class' => 'colorpicker',
264
- 'label' => __( 'Trigger Color', 'wpcf7-redirect' ),
265
- 'class' => 'qs-col qs-col-6',
266
- 'sub_title' => '',
267
- 'placeholder' => '',
268
- 'value' => $this->get( 'triggerColor' ) ? $this->get( 'triggerColor' ) : '#146FF8',
269
- ),
270
- array(
271
- 'name' => 'triggerIcon',
272
- 'type' => 'media',
273
- 'label' => __( 'Trigger Icon', 'wpcf7-redirect' ),
274
- 'class' => '',
275
- 'sub_title' => '',
276
- 'placeholder' => '',
277
- 'value' => $this->get( 'triggerIcon' ) ? $this->get( 'triggerIcon' ) : 'default',
278
- ),
279
- array(
280
- 'name' => 'triggerSize',
281
- 'type' => 'select',
282
- 'label' => __( 'Trigger Size', 'wpcf7-redirect' ),
283
- 'class' => '',
284
- 'sub_title' => '',
285
- 'placeholder' => '',
286
- 'options' => array(
287
- 'small' => __( 'Small' ),
288
- 'medium' => __( 'Medium' ),
289
- 'large' => __( 'Large' ),
290
- ),
291
- 'value' => $this->get( 'triggerSize' ) ? $this->get( 'triggerSize' ) : 'medium',
292
- ),
293
- array(
294
- 'name' => 'statementLink',
295
- 'type' => 'url',
296
- 'label' => __( 'Link To Statment', 'wpcf7-redirect' ),
297
- 'sub_title' => '',
298
- 'placeholder' => '',
299
- 'value' => $this->get( 'statementLink' ),
300
- ),
301
- array(
302
- 'name' => 'feedbackLink',
303
- 'type' => 'url',
304
- 'label' => __( 'Link To Feedback', 'wpcf7-redirect' ),
305
- 'sub_title' => '',
306
- 'placeholder' => '',
307
- 'value' => $this->get( 'feedbackLink' ),
308
- ),
309
- array(
310
- 'name' => 'language',
311
- 'type' => 'select',
312
- 'label' => __( 'Widget Language', 'wpcf7-redirect' ),
313
- 'class' => 'select2-field',
314
- 'sub_title' => '',
315
- 'placeholder' => '',
316
- 'options' => $this->get_available_languages(),
317
- 'value' => $this->get( 'language' ),
318
- ),
319
- array(
320
- 'name' => 'position',
321
- 'type' => 'select',
322
- 'label' => __( 'Widget Position', 'wpcf7-redirect' ),
323
- 'class' => '',
324
- 'options' => array(
325
- 'right' => __( 'Right' ),
326
- 'left' => __( 'Left' ),
327
- ),
328
- 'sub_title' => '',
329
- 'placeholder' => '',
330
- 'value' => $this->get( 'position' ),
331
- ),
332
- array(
333
- 'name' => 'triggerRadius',
334
- 'type' => 'number',
335
- 'label' => __( 'Trigger Border Radius (%)', 'wpcf7-redirect' ),
336
- 'class' => '',
337
- 'sub_title' => '',
338
- 'placeholder' => '',
339
- 'value' => $this->get( 'triggerRadius' ) ? $this->get( 'triggerRadius' ) : '50%',
340
- ),
341
- array(
342
- 'name' => 'triggerPositionX',
343
- 'type' => 'select',
344
- 'label' => __( 'Trigger Position (X)', 'wpcf7-redirect' ),
345
- 'class' => '',
346
- 'sub_title' => '',
347
- 'placeholder' => '',
348
- 'options' => array(
349
- 'right' => __( 'Right' ),
350
- 'left' => __( 'Left' ),
351
- ),
352
- 'value' => $this->get( 'triggerPositionX' ) ? $this->get( 'triggerPositionX' ) : 'left',
353
- ),
354
- array(
355
- 'name' => 'triggerOffsetX',
356
- 'type' => 'number',
357
- 'label' => __( 'Trigger Offset X (Pixels)', 'wpcf7-redirect' ),
358
- 'class' => '',
359
- 'sub_title' => '',
360
- 'placeholder' => '',
361
- 'value' => $this->get( 'triggerOffsetX' ) ? $this->get( 'triggerOffsetX' ) : 0,
362
- ),
363
- array(
364
- 'name' => 'triggerPositionY',
365
- 'type' => 'select',
366
- 'label' => __( 'Trigger Position (X)', 'wpcf7-redirect' ),
367
- 'class' => '',
368
- 'sub_title' => '',
369
- 'placeholder' => '',
370
- 'options' => array(
371
- 'top' => __( 'Top' ),
372
- 'bottom' => __( 'Bottom' ),
373
- ),
374
- 'value' => $this->get( 'triggerPositionY' ) ? $this->get( 'triggerPositionY' ) : 'bottom',
375
- ),
376
- array(
377
- 'name' => 'triggerOffsetY',
378
- 'type' => 'number',
379
- 'label' => __( 'Trigger Offset Y (Pixels)', 'wpcf7-redirect' ),
380
- 'class' => '',
381
- 'sub_title' => '',
382
- 'placeholder' => '',
383
- 'value' => $this->get( 'triggerOffsetY' ) ? $this->get( 'triggerOffsetY' ) : 0,
384
- ),
385
- array(
386
- 'name' => 'triggerSizeMobile',
387
- 'type' => 'select',
388
- 'label' => __( 'Trigger Size Mobile', 'wpcf7-redirect' ),
389
- 'class' => '',
390
- 'sub_title' => '',
391
- 'placeholder' => '',
392
- 'options' => array(
393
- 'small' => __( 'Small' ),
394
- 'medium' => __( 'Medium' ),
395
- 'large' => __( 'Large' ),
396
- ),
397
- 'value' => $this->get( 'triggerSizeMobile' ) ? $this->get( 'triggerSizeMobile' ) : 'medium',
398
- ),
399
- array(
400
- 'name' => 'triggerPositionXMobile',
401
- 'type' => 'select',
402
- 'label' => __( 'Trigger Position (X) Mobile', 'wpcf7-redirect' ),
403
- 'class' => '',
404
- 'sub_title' => '',
405
- 'placeholder' => '',
406
- 'options' => array(
407
- 'right' => __( 'Right' ),
408
- 'left' => __( 'Left' ),
409
- ),
410
- 'value' => $this->get( 'triggerPositionXMobile' ) ? $this->get( 'triggerPositionXMobile' ) : 'left',
411
- ),
412
- array(
413
- 'name' => 'triggerOffsetXMobile',
414
- 'type' => 'number',
415
- 'label' => __( 'Trigger Offset X (Pixels) Mobile', 'wpcf7-redirect' ),
416
- 'class' => '',
417
- 'sub_title' => '',
418
- 'placeholder' => '',
419
- 'value' => $this->get( 'triggerOffsetXMobile' ) ? $this->get( 'triggerOffsetXMobile' ) : 0,
420
- ),
421
- array(
422
- 'name' => 'triggerPositionYMobile',
423
- 'type' => 'select',
424
- 'label' => __( 'Trigger Position (X) Mobile', 'wpcf7-redirect' ),
425
- 'class' => '',
426
- 'sub_title' => '',
427
- 'placeholder' => '',
428
- 'options' => array(
429
- 'top' => __( 'Top' ),
430
- 'bottom' => __( 'Bottom' ),
431
- ),
432
- 'value' => $this->get( 'triggerPositionYMobile' ) ? $this->get( 'triggerPositionYMobile' ) : 'bottom',
433
- ),
434
- array(
435
- 'name' => 'triggerOffsetYMobile',
436
- 'type' => 'number',
437
- 'label' => __( 'Trigger Offset Y (Pixels)', 'wpcf7-redirect' ),
438
- 'class' => '',
439
- 'sub_title' => '',
440
- 'placeholder' => '',
441
- 'value' => $this->get( 'triggerOffsetYMobile' ) ? $this->get( 'triggerOffsetYMobile' ) : 0,
442
- ),
443
- array(
444
- 'name' => 'triggerRadiusMobile',
445
- 'type' => 'number',
446
- 'label' => __( 'Trigger Border Radius (%) Mobile', 'wpcf7-redirect' ),
447
- 'class' => '',
448
- 'sub_title' => '',
449
- 'placeholder' => '',
450
- 'value' => $this->get( 'triggerRadiusMobile' ) ? $this->get( 'triggerRadiusMobile' ) : '50%',
451
- ),
452
- array(
453
- 'name' => 'footerHtml',
454
- 'type' => 'editor',
455
- 'label' => __( 'Footer Html', 'wpcf7-redirect' ),
456
- 'sub_title' => '',
457
- 'placeholder' => '',
458
- 'value' => $this->get( 'footerHtml' ),
459
- ),
460
- );
461
- }
462
-
463
- /**
464
- * Get a list of available widget languages
465
- */
466
- public function get_available_languages() {
467
- return wpcf7_get_languages_list();
468
- }
469
-
470
- /**
471
- * Display accesibe menu
472
- */
473
- public function acctivate_acccesbe_menu() {
474
- update_option( 'show_accessibie_menu', true );
475
- delete_option( 'hide_accessibie_menu' );
476
- }
477
-
478
- /**
479
- * Activate the extension
480
- */
481
- public function activate() {
482
- $args = array(
483
- 'email' => sanitize_email( $_POST['email'] ),
484
- 'name' => sanitize_text_field( $_POST['fullname'] ),
485
- 'password' => sanitize_text_field( $_POST['password'] ),
486
- 'domain' => str_replace( array( 'http://', 'https://' ), '', home_url() ),
487
- 'ip_address' => $_SERVER['SERVER_ADDR'],
488
- 'contactCountry' => isset( $_POST['user-country'] ) ? sanitize_text_field( $_POST['user-country'] ) : '',
489
- 'contactPhone' => isset( $_POST['phone-number'] ) ? sanitize_text_field( $_POST['phone-number'] ) : '',
490
- );
491
- $post_args = array(
492
- 'method' => 'POST',
493
- 'timeout' => 45,
494
- 'redirection' => 5,
495
- 'httpversion' => '1.0',
496
- 'sslverify' => false,
497
- 'headers' => array(
498
- 'Content-Type' => 'application/json',
499
- ),
500
- 'body' => wp_json_encode( $args ),
501
- 'cookies' => array(),
502
- );
503
- $response = wp_remote_post( $this->api_url, $post_args );
504
-
505
- if ( ! is_wp_error( $response ) ) {
506
- $response = wp_remote_retrieve_body( $response );
507
- $response = (object) json_decode( $response, true );
508
- if ( 1 === $response->status ) {
509
- $options_args = array(
510
- 'accessibe_plugin_active' => $this->ver,
511
- 'accessibe_plugin_domain' => $args['domain'],
512
- 'accessibe_plugin_dativation_date' => current_time( 'Ymd' ),
513
- );
514
- update_option( 'accesibe_options', $options_args );
515
- } else {
516
- $options_args = array(
517
- 'accessibe_plugin_active' => $this->ver,
518
- 'accessibe_plugin_domain' => $args['domain'],
519
- 'accessibe_plugin_dativation_date' => current_time( 'Ymd' ),
520
- );
521
- update_option( 'accesibe_options', $options_args );
522
- $response = new WP_Error( 'activate', __( 'This Domain Is Already Registered' ) );
523
- }
524
- }
525
- return $response;
526
- }
527
-
528
- /**
529
- * Get accesibe options
530
- */
531
- public function get_settings() {
532
- return get_option( 'accesibe_options' );
533
- }
534
-
535
- /**
536
- * Create Accesibie Menu
537
- */
538
- public function accessibie_menu() {
539
- // Add the menu item and page!
540
- $page_title = qs_get_plugin_display_name();
541
- $capability = 'manage_options';
542
- $callback = array( $this, 'accesibie_settings_page_content' );
543
- $icon = WPCF7_PRO_REDIRECT_BUILD_PATH . '/images/accesibie-logo.png';
544
- add_menu_page(
545
- $page_title,
546
- $page_title,
547
- $capability,
548
- $page_title,
549
- $callback,
550
- $icon
551
- );
552
- }
553
-
554
- /**
555
- * Extension page Content
556
- */
557
- public function accesibie_settings_page_content() {
558
- do_action( 'before_settings_fields' );
559
- ?>
560
-
561
- <div class="wrap wrap-accesibe">
562
- <div class="postbox">
563
- <div class="padbox">
564
- <div class="content">
565
- <?php include 'templates/accesibie-content.php'; ?>
566
- </div>
567
- </div>
568
- </div>
569
- </div>
570
- <?php
571
- }
572
-
573
- /**
574
- * Echo the script in the footer
575
- */
576
- public function footer_script() {
577
- $params = array(
578
- 'statementLink' => $this->get( 'statementLink' ),
579
- 'feedbackLink' => $this->get( 'feedbackLink' ),
580
- 'footerHtml' => $this->get( 'footerHtml' ),
581
- 'hideMobile' => $this->get( 'hideMobile' ),
582
- 'hideTrigger' => $this->get( 'hideTrigger' ),
583
- 'language' => $this->get( 'language' ) ? $this->get( 'language' ) : 'en',
584
- 'position' => $this->get( 'position' ) ? $this->get( 'position' ) : 'right',
585
- 'leadColor' => $this->get( 'leadColor' ) ? $this->get( 'leadColor' ) : '#146FF8',
586
- 'triggerColor' => $this->get( 'triggerColor' ) ? $this->get( 'triggerColor' ) : '#146FF8',
587
- 'triggerRadius' => $this->get( 'triggerRadius' ) ? $this->get( 'triggerRadius' ) : '50%',
588
- 'triggerPositionX' => $this->get( 'triggerPositionX' ) ? $this->get( 'triggerPositionX' ) : 'right',
589
- 'triggerPositionY' => $this->get( 'triggerPositionY' ) ? $this->get( 'triggerPositionY' ) : 'bottom',
590
- 'triggerIcon' => $this->get( 'triggerIcon' ) ? $this->get( 'triggerIcon' ) : 'default',
591
- 'triggerSize' => $this->get( 'triggerSize' ) ? $this->get( 'triggerSize' ) : 'medium',
592
- 'triggerOffsetX' => $this->get( 'triggerOffsetX' ) ? $this->get( 'triggerOffsetX' ) : 20,
593
- 'triggerOffsetY' => $this->get( 'triggerOffsetY' ) ? $this->get( 'triggerOffsetY' ) : 20,
594
- 'mobile' => (object) array(
595
- 'triggerSize' => $this->get( 'triggerSizeMobile' ) ? $this->get( 'triggerSizeMobile' ) : 'small',
596
- 'triggerPositionX' => $this->get( 'triggerPositionXMobile' ) ? $this->get( 'triggerPositionXMobile' ) : 'right',
597
- 'triggerPositionY' => $this->get( 'triggerPositionYMobile' ) ? $this->get( 'triggerPositionYMobile' ) : 'center',
598
- 'triggerOffsetX' => $this->get( 'triggerOffsetXMobile' ) ? $this->get( 'triggerOffsetXMobile' ) : 0,
599
- 'triggerOffsetY' => $this->get( 'triggerOffsetYMobile' ) ? $this->get( 'triggerOffsetYMobile' ) : 0,
600
- 'triggerRadius' => $this->get( 'triggerRadiusMobile' ) ? $this->get( 'triggerRadiusMobile' ) : '50%',
601
- ),
602
- );
603
- $options = json_encode( $params, JSON_UNESCAPED_UNICODE );
604
- ?>
605
- <script>(function(){var s = document.createElement('script'),e = ! document.body ? document.querySelector('head') : document.body;s.src = 'https://acsbapp.com/apps/app/assets/js/acsb.js';s.async = s.defer = true;s.onload = function(){acsbJS.init(<?php echo $options; ?>);};e.appendChild(s);}());</script>
606
- <?php
607
- }
608
-
609
- /**
610
- * Enqueue script if the plugin is active
611
- */
612
- public static function enqueue_script() {
613
- if ( ! is_admin() ) {
614
- $instance = new self();
615
- $instance->init();
616
- if ( $instance->is_active() ) {
617
- add_action( 'wp_footer', array( $instance, 'footer_script' ) );
618
- }
619
- }
620
- }
621
- }
622
-
623
- function qs_get_plugin_display_name() {
624
- return apply_filters( 'qs_get_plugin_display_name', 'Accessibility' );
625
- }
626
-
627
- Ext_Accessibe::enqueue_script();
1
+ <?php
2
+ /**
3
+ * Accesibe Extension Class
4
+ *
5
+ * @category Ext_Accessibe
6
+ * @package Ext_Accessibe
7
+ * @author Author <info@querysol.com>
8
+ * @license https://opensource.org/licenses/MIT MIT License
9
+ * @link http://querysol.com/
10
+ */
11
+ class Ext_Accessibe extends WPCF7R_Action {
12
+ public $ver = '1.0';
13
+ private $api_url = ACCESSIBE_API_URI;
14
+ private $ext_name = 'accessibe';
15
+
16
+ /**
17
+ * Class constructor
18
+ */
19
+ public function __construct() {
20
+ if ( isset( $_GET['scan'] ) ) {
21
+ $this->reset_scan_results();
22
+ }
23
+ if ( is_admin() ) {
24
+ $this->admin_init();
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Get the extension name
30
+ */
31
+ public function get_name() {
32
+ $name = $this->ext_name;
33
+ return $name;
34
+ }
35
+
36
+ /**
37
+ * Get the option key that will store the widget settings
38
+ */
39
+ public function get_widget_option_key() {
40
+ $key = 'accesibe_widget_options';
41
+ if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
42
+ $key .= '_' . ICL_LANGUAGE_CODE;
43
+ }
44
+ return $key;
45
+ }
46
+
47
+ /**
48
+ * Initiate admin scripts
49
+ */
50
+ public function admin_init() {
51
+ if ( isset( $_GET['page'] ) && qs_get_plugin_display_name() === $_GET['page'] ) {
52
+ $response = $this->acctivate_acccesbe_menu();
53
+ }
54
+ if ( isset( $_REQUEST['start-free-trial'] ) && qs_get_plugin_display_name() === $_REQUEST['start-free-trial'] ) {
55
+ $response = $this->mark_scan_completed();
56
+ }
57
+ if ( isset( $_POST['activate-accesibe'] ) && $_POST['activate-accesibe'] ) {
58
+ $response = $this->activate();
59
+ if ( is_wp_error( $response ) ) {
60
+ WPCF7r_Utils::add_admin_notice( 'alert', $response->get_error_message() );
61
+ } else {
62
+ WPCF7r_Utils::add_admin_notice( 'notice', __( 'Successfully activated' ) );
63
+ }
64
+ }
65
+ if ( isset( $_GET['deactivate'] ) && qs_get_plugin_display_name() === $_GET['deactivate'] ) {
66
+ $this->deactivate();
67
+ }
68
+ if ( isset( $_REQUEST['save_ext_settings'] ) && qs_get_plugin_display_name() === $_REQUEST['save_ext_settings'] ) {
69
+ $this->save();
70
+ }
71
+ $this->init();
72
+ }
73
+
74
+ /**
75
+ * Save widget settings
76
+ */
77
+ private function save() {
78
+ $name = $this->get_name();
79
+ $key = $this->get_widget_option_key();
80
+ if ( isset( $_REQUEST['wpcf7-redirect'][ $key ][ $name ] ) && $_REQUEST['wpcf7-redirect'][ $key ][ $name ] ) {
81
+ $data = $_REQUEST['wpcf7-redirect'][ $key ][ $name ];
82
+ update_option( $key, $data );
83
+ } elseif ( isset( $_REQUEST['save_ext_settings'] ) ) {
84
+ update_option( $key, array() );
85
+ }
86
+ $this->init();
87
+ }
88
+
89
+ /**
90
+ * Get this extension settings page url
91
+ */
92
+ public function get_settings_url() {
93
+ return admin_url( '/admin.php?page=' . qs_get_plugin_display_name() );
94
+ }
95
+
96
+ /**
97
+ * The link will reset the scan data to allow a new scan to process
98
+ */
99
+ public function get_scan_link() {
100
+ $url = $this->get_settings_url();
101
+ $url = add_query_arg(
102
+ array(
103
+ 'scan' => true,
104
+ )
105
+ );
106
+ return $url;
107
+ }
108
+
109
+ /**
110
+ * Check if scan was commited and saved
111
+ */
112
+ public function get_scan_results() {
113
+ return get_option( 'accesibe_scan_results' );
114
+ }
115
+
116
+ /**
117
+ * Get the widget settings
118
+ */
119
+ public function get_widget_settings() {
120
+ $key = $this->get_widget_option_key();
121
+ return get_option( $key );
122
+ }
123
+
124
+ /**
125
+ * Check if the plugin is active
126
+ */
127
+ public function is_active() {
128
+ $settings = $this->get_settings();
129
+ return $settings ? true : false;
130
+ }
131
+
132
+ /**
133
+ * Check if the current screen is a registration form
134
+ * @return boolean
135
+ */
136
+ public function is_registration_form() {
137
+ return ! $this->is_scan() && ! $this->is_active();
138
+ }
139
+
140
+ /**
141
+ * Check if the plugin is active
142
+ *
143
+ * @return boolean
144
+ */
145
+ public function is_scan() {
146
+ $results = $this->get_scan_results();
147
+ return $results ? false : true;
148
+ }
149
+
150
+ /**
151
+ * Set a flag that a scan was completed
152
+ */
153
+ public function mark_scan_completed() {
154
+ update_option( 'accesibe_scan_results', true );
155
+ }
156
+
157
+ /**
158
+ * Allow the user to rescan the website
159
+ */
160
+ public function reset_scan_results() {
161
+ delete_option( 'accesibe_scan_results' );
162
+ }
163
+
164
+ /**
165
+ * Init extension
166
+ */
167
+ public function init() {
168
+ if ( ! get_option( 'hide_accessibie_menu' ) && get_option( 'show_accessibie_menu' ) ) {
169
+ add_action( 'admin_menu', array( $this, 'accessibie_menu' ) );
170
+ }
171
+ $this->accesibe_widget_options = $this->get_widget_settings();
172
+ }
173
+
174
+ /**
175
+ * Deactivate the extension
176
+ */
177
+ public function deactivate() {
178
+ delete_option( 'show_accessibie_menu' );
179
+ delete_option( 'accesibe_options' );
180
+ delete_option( 'accesibe_scan_results' );
181
+ update_option( 'hide_accessibie_menu', true );
182
+ }
183
+
184
+ /**
185
+ * Get the value of a specific field
186
+ */
187
+ public function get_field_value( $field ) {
188
+ if ( $this->accesibe_widget_options ) {
189
+ return isset( $this->accesibe_widget_options[ $field ] ) ? $this->accesibe_widget_options[ $field ] : '';
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Get the template to display on the admin field
195
+ *
196
+ * @param $template
197
+ */
198
+ public function get_settings_template( $template ) {
199
+ $name = $this->get_name();
200
+ $prefix = "[accesibe_widget_options][{$name}]";
201
+ include WPCF7_PRO_REDIRECT_ACTIONS_TEMPLATE_PATH . $template;
202
+ }
203
+
204
+ /**
205
+ * General function to retrieve meta
206
+ *
207
+ * @param $key
208
+ */
209
+ public function get( $key ) {
210
+ return isset( $this->accesibe_widget_options[ $key ] ) ? $this->accesibe_widget_options[ $key ] : '';
211
+ }
212
+
213
+ /**
214
+ * Get the accessibe settings form
215
+ */
216
+ public function get_settings_form() {
217
+ $this->get_settings_template( 'html-page-settings.php' );
218
+ }
219
+
220
+ /**
221
+ * Display settings fields for active users
222
+ */
223
+ public function get_accesibe_settings() {
224
+ $this->html = new WPCF7R_html( '' );
225
+ include( WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'settings.php' );
226
+ }
227
+
228
+ /**
229
+ * Get the fields relevant for this action
230
+ */
231
+ public function get_action_fields() {
232
+ return
233
+ array(
234
+ array(
235
+ 'name' => 'hideMobile',
236
+ 'type' => 'checkbox',
237
+ 'label' => __( 'Hide On Mobile', 'wpcf7-redirect' ),
238
+ 'sub_title' => '',
239
+ 'placeholder' => '',
240
+ 'value' => $this->get( 'hideMobile' ),
241
+ ),
242
+ array(
243
+ 'name' => 'hideTrigger',
244
+ 'type' => 'checkbox',
245
+ 'label' => __( 'Hide Trigger', 'wpcf7-redirect' ),
246
+ 'sub_title' => '',
247
+ 'placeholder' => '',
248
+ 'value' => $this->get( 'hideTrigger' ),
249
+ ),
250
+ array(
251
+ 'name' => 'leadColor',
252
+ 'type' => 'text',
253
+ 'input_class' => 'colorpicker',
254
+ 'label' => __( 'Main Color', 'wpcf7-redirect' ),
255
+ 'class' => 'qs-col qs-col-6',
256
+ 'sub_title' => '',
257
+ 'placeholder' => '',
258
+ 'value' => $this->get( 'leadColor' ) ? $this->get( 'leadColor' ) : '#146FF8',
259
+ ),
260
+ array(
261
+ 'name' => 'triggerColor',
262
+ 'type' => 'text',
263
+ 'input_class' => 'colorpicker',
264
+ 'label' => __( 'Trigger Color', 'wpcf7-redirect' ),
265
+ 'class' => 'qs-col qs-col-6',
266
+ 'sub_title' => '',
267
+ 'placeholder' => '',
268
+ 'value' => $this->get( 'triggerColor' ) ? $this->get( 'triggerColor' ) : '#146FF8',
269
+ ),
270
+ array(
271
+ 'name' => 'triggerIcon',
272
+ 'type' => 'media',
273
+ 'label' => __( 'Trigger Icon', 'wpcf7-redirect' ),
274
+ 'class' => '',
275
+ 'sub_title' => '',
276
+ 'placeholder' => '',
277
+ 'value' => $this->get( 'triggerIcon' ) ? $this->get( 'triggerIcon' ) : 'default',
278
+ ),
279
+ array(
280
+ 'name' => 'triggerSize',
281
+ 'type' => 'select',
282
+ 'label' => __( 'Trigger Size', 'wpcf7-redirect' ),
283
+ 'class' => '',
284
+ 'sub_title' => '',
285
+ 'placeholder' => '',
286
+ 'options' => array(
287
+ 'small' => __( 'Small' ),
288
+ 'medium' => __( 'Medium' ),
289
+ 'large' => __( 'Large' ),
290
+ ),
291
+ 'value' => $this->get( 'triggerSize' ) ? $this->get( 'triggerSize' ) : 'medium',
292
+ ),
293
+ array(
294
+ 'name' => 'statementLink',
295
+ 'type' => 'url',
296
+ 'label' => __( 'Link To Statment', 'wpcf7-redirect' ),
297
+ 'sub_title' => '',
298
+ 'placeholder' => '',
299
+ 'value' => $this->get( 'statementLink' ),
300
+ ),
301
+ array(
302
+ 'name' => 'feedbackLink',
303
+ 'type' => 'url',
304
+ 'label' => __( 'Link To Feedback', 'wpcf7-redirect' ),
305
+ 'sub_title' => '',
306
+ 'placeholder' => '',
307
+ 'value' => $this->get( 'feedbackLink' ),
308
+ ),
309
+ array(
310
+ 'name' => 'language',
311
+ 'type' => 'select',
312
+ 'label' => __( 'Widget Language', 'wpcf7-redirect' ),
313
+ 'class' => 'select2-field',
314
+ 'sub_title' => '',
315
+ 'placeholder' => '',
316
+ 'options' => $this->get_available_languages(),
317
+ 'value' => $this->get( 'language' ),
318
+ ),
319
+ array(
320
+ 'name' => 'position',
321
+ 'type' => 'select',
322
+ 'label' => __( 'Widget Position', 'wpcf7-redirect' ),
323
+ 'class' => '',
324
+ 'options' => array(
325
+ 'right' => __( 'Right' ),
326
+ 'left' => __( 'Left' ),
327
+ ),
328
+ 'sub_title' => '',
329
+ 'placeholder' => '',
330
+ 'value' => $this->get( 'position' ),
331
+ ),
332
+ array(
333
+ 'name' => 'triggerRadius',
334
+ 'type' => 'number',
335
+ 'label' => __( 'Trigger Border Radius (%)', 'wpcf7-redirect' ),
336
+ 'class' => '',
337
+ 'sub_title' => '',
338
+ 'placeholder' => '',
339
+ 'value' => $this->get( 'triggerRadius' ) ? $this->get( 'triggerRadius' ) : '50%',
340
+ ),
341
+ array(
342
+ 'name' => 'triggerPositionX',
343
+ 'type' => 'select',
344
+ 'label' => __( 'Trigger Position (X)', 'wpcf7-redirect' ),
345
+ 'class' => '',
346
+ 'sub_title' => '',
347
+ 'placeholder' => '',
348
+ 'options' => array(
349
+ 'right' => __( 'Right' ),
350
+ 'left' => __( 'Left' ),
351
+ ),
352
+ 'value' => $this->get( 'triggerPositionX' ) ? $this->get( 'triggerPositionX' ) : 'left',
353
+ ),
354
+ array(
355
+ 'name' => 'triggerOffsetX',
356
+ 'type' => 'number',
357
+ 'label' => __( 'Trigger Offset X (Pixels)', 'wpcf7-redirect' ),
358
+ 'class' => '',
359
+ 'sub_title' => '',
360
+ 'placeholder' => '',
361
+ 'value' => $this->get( 'triggerOffsetX' ) ? $this->get( 'triggerOffsetX' ) : 0,
362
+ ),
363
+ array(
364
+ 'name' => 'triggerPositionY',
365
+ 'type' => 'select',
366
+ 'label' => __( 'Trigger Position (X)', 'wpcf7-redirect' ),
367
+ 'class' => '',
368
+ 'sub_title' => '',
369
+ 'placeholder' => '',
370
+ 'options' => array(
371
+ 'top' => __( 'Top' ),
372
+ 'bottom' => __( 'Bottom' ),
373
+ ),
374
+ 'value' => $this->get( 'triggerPositionY' ) ? $this->get( 'triggerPositionY' ) : 'bottom',
375
+ ),
376
+ array(
377
+ 'name' => 'triggerOffsetY',
378
+ 'type' => 'number',
379
+ 'label' => __( 'Trigger Offset Y (Pixels)', 'wpcf7-redirect' ),
380
+ 'class' => '',
381
+ 'sub_title' => '',
382
+ 'placeholder' => '',
383
+ 'value' => $this->get( 'triggerOffsetY' ) ? $this->get( 'triggerOffsetY' ) : 0,
384
+ ),
385
+ array(
386
+ 'name' => 'triggerSizeMobile',
387
+ 'type' => 'select',
388
+ 'label' => __( 'Trigger Size Mobile', 'wpcf7-redirect' ),
389
+ 'class' => '',
390
+ 'sub_title' => '',
391
+ 'placeholder' => '',
392
+ 'options' => array(
393
+ 'small' => __( 'Small' ),
394
+ 'medium' => __( 'Medium' ),
395
+ 'large' => __( 'Large' ),
396
+ ),
397
+ 'value' => $this->get( 'triggerSizeMobile' ) ? $this->get( 'triggerSizeMobile' ) : 'medium',
398
+ ),
399
+ array(
400
+ 'name' => 'triggerPositionXMobile',
401
+ 'type' => 'select',
402
+ 'label' => __( 'Trigger Position (X) Mobile', 'wpcf7-redirect' ),
403
+ 'class' => '',
404
+ 'sub_title' => '',
405
+ 'placeholder' => '',
406
+ 'options' => array(
407
+ 'right' => __( 'Right' ),
408
+ 'left' => __( 'Left' ),
409
+ ),
410
+ 'value' => $this->get( 'triggerPositionXMobile' ) ? $this->get( 'triggerPositionXMobile' ) : 'left',
411
+ ),
412
+ array(
413
+ 'name' => 'triggerOffsetXMobile',
414
+ 'type' => 'number',
415
+ 'label' => __( 'Trigger Offset X (Pixels) Mobile', 'wpcf7-redirect' ),
416
+ 'class' => '',
417
+ 'sub_title' => '',
418
+ 'placeholder' => '',
419
+ 'value' => $this->get( 'triggerOffsetXMobile' ) ? $this->get( 'triggerOffsetXMobile' ) : 0,
420
+ ),
421
+ array(
422
+ 'name' => 'triggerPositionYMobile',
423
+ 'type' => 'select',
424
+ 'label' => __( 'Trigger Position (X) Mobile', 'wpcf7-redirect' ),
425
+ 'class' => '',
426
+ 'sub_title' => '',
427
+ 'placeholder' => '',
428
+ 'options' => array(
429
+ 'top' => __( 'Top' ),
430
+ 'bottom' => __( 'Bottom' ),
431
+ ),
432
+ 'value' => $this->get( 'triggerPositionYMobile' ) ? $this->get( 'triggerPositionYMobile' ) : 'bottom',
433
+ ),
434
+ array(
435
+ 'name' => 'triggerOffsetYMobile',
436
+ 'type' => 'number',
437
+ 'label' => __( 'Trigger Offset Y (Pixels)', 'wpcf7-redirect' ),
438
+ 'class' => '',
439
+ 'sub_title' => '',
440
+ 'placeholder' => '',
441
+ 'value' => $this->get( 'triggerOffsetYMobile' ) ? $this->get( 'triggerOffsetYMobile' ) : 0,
442
+ ),
443
+ array(
444
+ 'name' => 'triggerRadiusMobile',
445
+ 'type' => 'number',
446
+ 'label' => __( 'Trigger Border Radius (%) Mobile', 'wpcf7-redirect' ),
447
+ 'class' => '',
448
+ 'sub_title' => '',
449
+ 'placeholder' => '',
450
+ 'value' => $this->get( 'triggerRadiusMobile' ) ? $this->get( 'triggerRadiusMobile' ) : '50%',
451
+ ),
452
+ array(
453
+ 'name' => 'footerHtml',
454
+ 'type' => 'editor',
455
+ 'label' => __( 'Footer Html', 'wpcf7-redirect' ),
456
+ 'sub_title' => '',
457
+ 'placeholder' => '',
458
+ 'value' => $this->get( 'footerHtml' ),
459
+ ),
460
+ );
461
+ }
462
+
463
+ /**
464
+ * Get a list of available widget languages
465
+ */
466
+ public function get_available_languages() {
467
+ return wpcf7_get_languages_list();
468
+ }
469
+
470
+ /**
471
+ * Display accesibe menu
472
+ */
473
+ public function acctivate_acccesbe_menu() {
474
+ update_option( 'show_accessibie_menu', true );
475
+ delete_option( 'hide_accessibie_menu' );
476
+ }
477
+
478
+ /**
479
+ * Activate the extension
480
+ */
481
+ public function activate() {
482
+ $args = array(
483
+ 'email' => sanitize_email( $_POST['email'] ),
484
+ 'name' => sanitize_text_field( $_POST['fullname'] ),
485
+ 'password' => sanitize_text_field( $_POST['password'] ),
486
+ 'domain' => str_replace( array( 'http://', 'https://' ), '', home_url() ),
487
+ 'ip_address' => $_SERVER['SERVER_ADDR'],
488
+ 'contactCountry' => isset( $_POST['user-country'] ) ? sanitize_text_field( $_POST['user-country'] ) : '',
489
+ 'contactPhone' => isset( $_POST['phone-number'] ) ? sanitize_text_field( $_POST['phone-number'] ) : '',
490
+ );
491
+ $post_args = array(
492
+ 'method' => 'POST',
493
+ 'timeout' => 45,
494
+ 'redirection' => 5,
495
+ 'httpversion' => '1.0',
496
+ 'sslverify' => false,
497
+ 'headers' => array(
498
+ 'Content-Type' => 'application/json',
499
+ ),
500
+ 'body' => wp_json_encode( $args ),
501
+ 'cookies' => array(),
502
+ );
503
+ $response = wp_remote_post( $this->api_url, $post_args );
504
+
505
+ if ( ! is_wp_error( $response ) ) {
506
+ $response = wp_remote_retrieve_body( $response );
507
+ $response = (object) json_decode( $response, true );
508
+ if ( 1 === $response->status ) {
509
+ $options_args = array(
510
+ 'accessibe_plugin_active' => $this->ver,
511
+ 'accessibe_plugin_domain' => $args['domain'],
512
+ 'accessibe_plugin_dativation_date' => current_time( 'Ymd' ),
513
+ );
514
+ update_option( 'accesibe_options', $options_args );
515
+ } else {
516
+ $options_args = array(
517
+ 'accessibe_plugin_active' => $this->ver,
518
+ 'accessibe_plugin_domain' => $args['domain'],
519
+ 'accessibe_plugin_dativation_date' => current_time( 'Ymd' ),
520
+ );
521
+ update_option( 'accesibe_options', $options_args );
522
+ $response = new WP_Error( 'activate', __( 'This Domain Is Already Registered' ) );
523
+ }
524
+ }
525
+ return $response;
526
+ }
527
+
528
+ /**
529
+ * Get accesibe options
530
+ */
531
+ public function get_settings() {
532
+ return get_option( 'accesibe_options' );
533
+ }
534
+
535
+ /**
536
+ * Create Accesibie Menu
537
+ */
538
+ public function accessibie_menu() {
539
+ // Add the menu item and page!
540
+ $page_title = qs_get_plugin_display_name();
541
+ $capability = 'manage_options';
542
+ $callback = array( $this, 'accesibie_settings_page_content' );
543
+ $icon = WPCF7_PRO_REDIRECT_BUILD_PATH . '/images/accesibie-logo.png';
544
+ add_menu_page(
545
+ $page_title,
546
+ $page_title,
547
+ $capability,
548
+ $page_title,
549
+ $callback,
550
+ $icon
551
+ );
552
+ }
553
+
554
+ /**
555
+ * Extension page Content
556
+ */
557
+ public function accesibie_settings_page_content() {
558
+ do_action( 'before_settings_fields' );
559
+ ?>
560
+
561
+ <div class="wrap wrap-accesibe">
562
+ <div class="postbox">
563
+ <div class="padbox">
564
+ <div class="content">
565
+ <?php include 'templates/accesibie-content.php'; ?>
566
+ </div>
567
+ </div>
568
+ </div>
569
+ </div>
570
+ <?php
571
+ }
572
+
573
+ /**
574
+ * Echo the script in the footer
575
+ */
576
+ public function footer_script() {
577
+ $params = array(
578
+ 'statementLink' => $this->get( 'statementLink' ),
579
+ 'feedbackLink' => $this->get( 'feedbackLink' ),
580
+ 'footerHtml' => $this->get( 'footerHtml' ),
581
+ 'hideMobile' => $this->get( 'hideMobile' ),
582
+ 'hideTrigger' => $this->get( 'hideTrigger' ),
583
+ 'language' => $this->get( 'language' ) ? $this->get( 'language' ) : 'en',
584
+ 'position' => $this->get( 'position' ) ? $this->get( 'position' ) : 'right',
585
+ 'leadColor' => $this->get( 'leadColor' ) ? $this->get( 'leadColor' ) : '#146FF8',
586
+ 'triggerColor' => $this->get( 'triggerColor' ) ? $this->get( 'triggerColor' ) : '#146FF8',
587
+ 'triggerRadius' => $this->get( 'triggerRadius' ) ? $this->get( 'triggerRadius' ) : '50%',
588
+ 'triggerPositionX' => $this->get( 'triggerPositionX' ) ? $this->get( 'triggerPositionX' ) : 'right',
589
+ 'triggerPositionY' => $this->get( 'triggerPositionY' ) ? $this->get( 'triggerPositionY' ) : 'bottom',
590
+ 'triggerIcon' => $this->get( 'triggerIcon' ) ? $this->get( 'triggerIcon' ) : 'default',
591
+ 'triggerSize' => $this->get( 'triggerSize' ) ? $this->get( 'triggerSize' ) : 'medium',
592
+ 'triggerOffsetX' => $this->get( 'triggerOffsetX' ) ? $this->get( 'triggerOffsetX' ) : 20,
593
+ 'triggerOffsetY' => $this->get( 'triggerOffsetY' ) ? $this->get( 'triggerOffsetY' ) : 20,
594
+ 'mobile' => (object) array(
595
+ 'triggerSize' => $this->get( 'triggerSizeMobile' ) ? $this->get( 'triggerSizeMobile' ) : 'small',
596
+ 'triggerPositionX' => $this->get( 'triggerPositionXMobile' ) ? $this->get( 'triggerPositionXMobile' ) : 'right',
597
+ 'triggerPositionY' => $this->get( 'triggerPositionYMobile' ) ? $this->get( 'triggerPositionYMobile' ) : 'center',
598
+ 'triggerOffsetX' => $this->get( 'triggerOffsetXMobile' ) ? $this->get( 'triggerOffsetXMobile' ) : 0,
599
+ 'triggerOffsetY' => $this->get( 'triggerOffsetYMobile' ) ? $this->get( 'triggerOffsetYMobile' ) : 0,
600
+ 'triggerRadius' => $this->get( 'triggerRadiusMobile' ) ? $this->get( 'triggerRadiusMobile' ) : '50%',
601
+ ),
602
+ );
603
+ $options = json_encode( $params, JSON_UNESCAPED_UNICODE );
604
+ ?>
605
+ <script>(function(){var s = document.createElement('script'),e = ! document.body ? document.querySelector('head') : document.body;s.src = 'https://acsbapp.com/apps/app/assets/js/acsb.js';s.async = s.defer = true;s.onload = function(){acsbJS.init(<?php echo $options; ?>);};e.appendChild(s);}());</script>
606
+ <?php
607
+ }
608
+
609
+ /**
610
+ * Enqueue script if the plugin is active
611
+ */
612
+ public static function enqueue_script() {
613
+ if ( ! is_admin() ) {
614
+ $instance = new self();
615
+ $instance->init();
616
+ if ( $instance->is_active() ) {
617
+ add_action( 'wp_footer', array( $instance, 'footer_script' ) );
618
+ }
619
+ }
620
+ }
621
+ }
622
+
623
+ function qs_get_plugin_display_name() {
624
+ return apply_filters( 'qs_get_plugin_display_name', 'Accessibility' );
625
+ }
626
+
627
+ Ext_Accessibe::enqueue_script();
classes/aff/index.php DELETED
File without changes
classes/aff/templates/accesibie-content.php CHANGED
@@ -1,165 +1,165 @@
1
- <?php defined( 'ABSPATH' ) || exit; ?>
2
-
3
- <?php $user = wp_get_current_user(); ?>
4
-
5
- <section class="home-hero hero-standard hero-standard-full">
6
- <div class="wrapper flex <?php echo ! $this->is_scan() && ! $this->is_active() ? 'reg-form' : ''; ?> ">
7
- <?php if ( ! $this->is_registration_form() ) : ?>
8
- <div class="logo-row flex top-logo">
9
- <div class="accessibe-logo">
10
- <img class="hero-cover-image" data-lazyload-ignore="true" src="<?php echo WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/accessibe-full-logo.svg'; ?>" alt="Blind person hero image">
11
- </div>
12
- <?php if ( $this->is_scan() ) : ?>
13
- <form action="<?php echo $this->get_settings_url(); ?>" method="post" class="accesibe-settings-form">
14
- <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
15
- <span class="align-middle">
16
- <?php _e( 'Create a Free Account!', 'wpcf7-redirect' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span>
17
- </span>
18
- </button>
19
- <input type="hidden" name="start-free-trial" value="<?php echo qs_get_plugin_display_name(); ?>" />
20
- </form>
21
- <?php endif; ?>
22
- </div>
23
- <?php endif; ?>
24
- <?php
25
- if ( $this->is_registration_form() ) :
26
- ?>
27
- <div class="main-form-wrap">
28
- <div class="home-hero-content hero-left">
29
- <div class="hero-left-inner">
30
- <h3 class="home-hero-title">The #1 <em>Fully</em> <em>Automated</em> <br> Web Accessibility Solution <br> for ADA &amp; WCAG Compliance</h3>
31
- <ul class="home-hero-checkmarks">
32
- <li class="home-hero-checkmark">
33
- <i class="icon icon-checkmark icon-pack-icomoon ">
34
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
35
- <title>checkmark</title>
36
- <path d="M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"></path>
37
- </svg>
38
- </i>
39
- <strong>Affordable.</strong> $49/month, free trial, no credit card required
40
- </li>
41
- <li class="home-hero-checkmark">
42
- <i class="icon icon-checkmark icon-pack-icomoon ">
43
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
44
- <title>checkmark</title>
45
- <path d="M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"></path>
46
- </svg>
47
- </i>
48
- <strong>Effortless.</strong> Add a single line of code for 24/7 automated compliance
49
- </li>
50
- <li class="home-hero-checkmark">
51
- <i class="icon icon-checkmark icon-pack-icomoon ">
52
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
53
- <title>checkmark</title>
54
- <path d="M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"></path>
55
- </svg>
56
- </i>
57
- <strong>Compliant.</strong> Accessibility statement and certificate of performance
58
- </li>
59
- </ul>
60
- </div>
61
- </div>
62
- <div class="hero-right">
63
- <div class="hero-right-inner">
64
- <div class="accessibe-logo">
65
- <img class="hero-cover-image" data-lazyload-ignore="true" src="<?php echo WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/accessibe-full-logo.svg'; ?>" alt="Blind person hero image">
66
- </div>
67
- <h4>Create A 30-Day Trial Account</h4>
68
- <form name="accesibe-registration" action="" method="post" class="accesibe-registration-form-fields">
69
- <div class="home-hero-cta">
70
- <div class="field-wrap">
71
- <label for="email"><?php _e( 'Your Email Address', 'wpcf7-redirect' ); ?></label>
72
- <input type="email" name="email" value="<?php echo get_option( 'admin_email' ); ?>" required placeholder="example@example.com"/>
73
- </div>
74
- <div class="field-wrap">
75
- <label for="fullname"><?php _e( 'Your Full Name', 'wpcf7-redirect' ); ?></label>
76
- <input type="text" name="fullname" minlength="3" value="<?php echo $user->first_name . ' ' . $user->last_name; ?>" required placeholder="John Smith"/>
77
- </div>
78
- <div class="field-wrap">
79
- <label for="password"><?php _e( 'Your Password', 'wpcf7-redirect' ); ?></label>
80
- <input type="password" name="password" minlength="8" value="" required placeholder="<?php _e( '8+ Charachters', 'wpcf7-redirect' ); ?>"/>
81
- </div>
82
-
83
- <span class="loader-spinner-container spinner-light" data-loader="spinner">
84
- <span class="loader-spinner"></span></span>
85
- </button>
86
- </div>
87
- <div class="agreement">
88
- <div class="highlight">
89
- <input type="checkbox" name="tos" id="tos" checked="" data-activate-on-check="signup-button" required>
90
- <label for="tos"><?php _e( 'By signing up you agree to our', 'wpcf7-redirect' ); ?> <a href="https://accessibe.com/terms-of-service" target="_blank"><?php _e( 'Terms of Service', 'wpcf7-redirect' ); ?></a></label>
91
- </div>
92
- </div>
93
- <div class="field-wrap">
94
- <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
95
- <span class="align-middle">
96
- <?php _e( 'Create a Free Account!', 'wpcf7-redirect' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span>
97
- </span>
98
- </button>
99
- </div>
100
- <input type="hidden" name="activate-accesibe" value="1" />
101
- <div class="footer-wrap">
102
- <a class=" align-middle" href="<?php echo admin_url( '?deactivate=' . qs_get_plugin_display_name() ); ?>">
103
- <?php _e( 'Hide this special offer', 'wpcf7-redirect' ); ?>
104
- </a>
105
- <a href="<?php echo $this->get_scan_link(); ?>" class="scan-again"><?php _e( 'Scan my website again.', 'wpcf7-redirect' ); ?></a>
106
- </div>
107
- </form>
108
- </div>
109
- </div>
110
-
111
- </div>
112
- </form>
113
- <?php elseif ( $this->is_scan() ) : ?>
114
- <div class="qs-row">
115
- <div class="qs-col">
116
- <div class="scanning">
117
- Please wait a few seconds while we process your website accessibility report.
118
- </div>
119
- <div class="scanning-tip">
120
- <strong>Results guide:</strong> <strong>Compliant</strong> - You're all good. <strong>Semi/Not Compliant</strong> - We recommend you to install accessiBe
121
- </div>
122
- </div>
123
- </div>
124
- <?php $url = add_query_arg( 'accesibedomainscan', str_replace( 'http:', 'https:', home_url() ), 'https://querysol.com/scan' ); ?>
125
- <iframe src="<?php echo $url; ?>" scrolling="no" style=" width: 100%; height: 100vh; overflow: hidden;" ></iframe>
126
- <form action="<?php echo $this->get_settings_url(); ?>" method="post" class="accesibe-settings-form-footer">
127
- <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
128
- <span class="align-middle">
129
- <?php _e( 'Create a Free Account!', 'wpcf7-redirect' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span>
130
- </span>
131
- </button>
132
- <input type="hidden" name="start-free-trial" value="<?php echo qs_get_plugin_display_name(); ?>" />
133
- </form>
134
- <div class="footer-wrap">
135
- <a class=" align-middle" href="<?php echo admin_url( '?deactivate=' . qs_get_plugin_display_name() ); ?>">
136
- <?php _e( 'Hide This Special Offer', 'wpcf7-redirect' ); ?>
137
- </a>
138
- </div>
139
- <?php else : ?>
140
- <form name="accesibe-registration" action="<?php echo $this->get_settings_url(); ?>" method="post" class="accesibe-settings-form">
141
- <div class="success-message">
142
- <h3>
143
- Thank you for installing accessibe!
144
- </h3>
145
- <div class="success-message-subtitle">
146
- The plugin is now active on your website.
147
- </div>
148
- <div class="success-content">
149
- If you want to customize the widget settings you can do it here: <br/>
150
- To deactivate the plugin you can <a class=" align-middle" href="<?php echo admin_url( '?deactivate=' . qs_get_plugin_display_name() ); ?>">Click Here.</a>
151
- </div>
152
- </div>
153
- <?php $this->get_settings_form(); ?>
154
-
155
- <div class="qs-row">
156
- <div class="qs-col">
157
- <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
158
- <span class="align-middle"><?php _e( 'Save', 'wpcf7-redirect' ); ?></span>
159
- </button>
160
- </div>
161
- </div>
162
- <input type="hidden" name="save_ext_settings" value="<?php echo qs_get_plugin_display_name(); ?>" />
163
- </form>
164
- <?php endif; ?>
165
- </section>
1
+ <?php defined( 'ABSPATH' ) || exit; ?>
2
+
3
+ <?php $user = wp_get_current_user(); ?>
4
+
5
+ <section class="home-hero hero-standard hero-standard-full">
6
+ <div class="wrapper flex <?php echo ! $this->is_scan() && ! $this->is_active() ? 'reg-form' : ''; ?> ">
7
+ <?php if ( ! $this->is_registration_form() ) : ?>
8
+ <div class="logo-row flex top-logo">
9
+ <div class="accessibe-logo">
10
+ <img class="hero-cover-image" data-lazyload-ignore="true" src="<?php echo WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/accessibe-full-logo.svg'; ?>" alt="Blind person hero image">
11
+ </div>
12
+ <?php if ( $this->is_scan() ) : ?>
13
+ <form action="<?php echo $this->get_settings_url(); ?>" method="post" class="accesibe-settings-form">
14
+ <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
15
+ <span class="align-middle">
16
+ <?php _e( 'Create a Free Account!', 'wpcf7-redirect' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span>
17
+ </span>
18
+ </button>
19
+ <input type="hidden" name="start-free-trial" value="<?php echo qs_get_plugin_display_name(); ?>" />
20
+ </form>
21
+ <?php endif; ?>
22
+ </div>
23
+ <?php endif; ?>
24
+ <?php
25
+ if ( $this->is_registration_form() ) :
26
+ ?>
27
+ <div class="main-form-wrap">
28
+ <div class="home-hero-content hero-left">
29
+ <div class="hero-left-inner">
30
+ <h3 class="home-hero-title">The #1 <em>Fully</em> <em>Automated</em> <br> Web Accessibility Solution <br> for ADA &amp; WCAG Compliance</h3>
31
+ <ul class="home-hero-checkmarks">
32
+ <li class="home-hero-checkmark">
33
+ <i class="icon icon-checkmark icon-pack-icomoon ">
34
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
35
+ <title>checkmark</title>
36
+ <path d="M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"></path>
37
+ </svg>
38
+ </i>
39
+ <strong>Affordable.</strong> $49/month, free trial, no credit card required
40
+ </li>
41
+ <li class="home-hero-checkmark">
42
+ <i class="icon icon-checkmark icon-pack-icomoon ">
43
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
44
+ <title>checkmark</title>
45
+ <path d="M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"></path>
46
+ </svg>
47
+ </i>
48
+ <strong>Effortless.</strong> Add a single line of code for 24/7 automated compliance
49
+ </li>
50
+ <li class="home-hero-checkmark">
51
+ <i class="icon icon-checkmark icon-pack-icomoon ">
52
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
53
+ <title>checkmark</title>
54
+ <path d="M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z"></path>
55
+ </svg>
56
+ </i>
57
+ <strong>Compliant.</strong> Accessibility statement and certificate of performance
58
+ </li>
59
+ </ul>
60
+ </div>
61
+ </div>
62
+ <div class="hero-right">
63
+ <div class="hero-right-inner">
64
+ <div class="accessibe-logo">
65
+ <img class="hero-cover-image" data-lazyload-ignore="true" src="<?php echo WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/accessibe-full-logo.svg'; ?>" alt="Blind person hero image">
66
+ </div>
67
+ <h4>Create A 30-Day Trial Account</h4>
68
+ <form name="accesibe-registration" action="" method="post" class="accesibe-registration-form-fields">
69
+ <div class="home-hero-cta">
70
+ <div class="field-wrap">
71
+ <label for="email"><?php _e( 'Your Email Address', 'wpcf7-redirect' ); ?></label>
72
+ <input type="email" name="email" value="<?php echo get_option( 'admin_email' ); ?>" required placeholder="example@example.com"/>
73
+ </div>
74
+ <div class="field-wrap">
75
+ <label for="fullname"><?php _e( 'Your Full Name', 'wpcf7-redirect' ); ?></label>
76
+ <input type="text" name="fullname" minlength="3" value="<?php echo $user->first_name . ' ' . $user->last_name; ?>" required placeholder="John Smith"/>
77
+ </div>
78
+ <div class="field-wrap">
79
+ <label for="password"><?php _e( 'Your Password', 'wpcf7-redirect' ); ?></label>
80
+ <input type="password" name="password" minlength="8" value="" required placeholder="<?php _e( '8+ Charachters', 'wpcf7-redirect' ); ?>"/>
81
+ </div>
82
+
83
+ <span class="loader-spinner-container spinner-light" data-loader="spinner">
84
+ <span class="loader-spinner"></span></span>
85
+ </button>
86
+ </div>
87
+ <div class="agreement">
88
+ <div class="highlight">
89
+ <input type="checkbox" name="tos" id="tos" checked="" data-activate-on-check="signup-button" required>
90
+ <label for="tos"><?php _e( 'By signing up you agree to our', 'wpcf7-redirect' ); ?> <a href="https://accessibe.com/terms-of-service" target="_blank"><?php _e( 'Terms of Service', 'wpcf7-redirect' ); ?></a></label>
91
+ </div>
92
+ </div>
93
+ <div class="field-wrap">
94
+ <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
95
+ <span class="align-middle">
96
+ <?php _e( 'Create a Free Account!', 'wpcf7-redirect' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span>
97
+ </span>
98
+ </button>
99
+ </div>
100
+ <input type="hidden" name="activate-accesibe" value="1" />
101
+ <div class="footer-wrap">
102
+ <a class=" align-middle" href="<?php echo admin_url( '?deactivate=' . qs_get_plugin_display_name() ); ?>">
103
+ <?php _e( 'Hide this special offer', 'wpcf7-redirect' ); ?>
104
+ </a>
105
+ <a href="<?php echo $this->get_scan_link(); ?>" class="scan-again"><?php _e( 'Scan my website again.', 'wpcf7-redirect' ); ?></a>
106
+ </div>
107
+ </form>
108
+ </div>
109
+ </div>
110
+
111
+ </div>
112
+ </form>
113
+ <?php elseif ( $this->is_scan() ) : ?>
114
+ <div class="qs-row">
115
+ <div class="qs-col">
116
+ <div class="scanning">
117
+ Please wait a few seconds while we process your website accessibility report.
118
+ </div>
119
+ <div class="scanning-tip">
120
+ <strong>Results guide:</strong> <strong>Compliant</strong> - You're all good. <strong>Semi/Not Compliant</strong> - We recommend you to install accessiBe
121
+ </div>
122
+ </div>
123
+ </div>
124
+ <?php $url = add_query_arg( 'accesibedomainscan', str_replace( 'http:', 'https:', home_url() ), 'https://querysol.com/scan' ); ?>
125
+ <iframe src="<?php echo $url; ?>" scrolling="no" style=" width: 100%; height: 100vh; overflow: hidden;" ></iframe>
126
+ <form action="<?php echo $this->get_settings_url(); ?>" method="post" class="accesibe-settings-form-footer">
127
+ <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
128
+ <span class="align-middle">
129
+ <?php _e( 'Create a Free Account!', 'wpcf7-redirect' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span>
130
+ </span>
131
+ </button>
132
+ <input type="hidden" name="start-free-trial" value="<?php echo qs_get_plugin_display_name(); ?>" />
133
+ </form>
134
+ <div class="footer-wrap">
135
+ <a class=" align-middle" href="<?php echo admin_url( '?deactivate=' . qs_get_plugin_display_name() ); ?>">
136
+ <?php _e( 'Hide This Special Offer', 'wpcf7-redirect' ); ?>
137
+ </a>
138
+ </div>
139
+ <?php else : ?>
140
+ <form name="accesibe-registration" action="<?php echo $this->get_settings_url(); ?>" method="post" class="accesibe-settings-form">
141
+ <div class="success-message">
142
+ <h3>
143
+ Thank you for installing accessibe!
144
+ </h3>
145
+ <div class="success-message-subtitle">
146
+ The plugin is now active on your website.
147
+ </div>
148
+ <div class="success-content">
149
+ If you want to customize the widget settings you can do it here: <br/>
150
+ To deactivate the plugin you can <a class=" align-middle" href="<?php echo admin_url( '?deactivate=' . qs_get_plugin_display_name() ); ?>">Click Here.</a>
151
+ </div>
152
+ </div>
153
+ <?php $this->get_settings_form(); ?>
154
+
155
+ <div class="qs-row">
156
+ <div class="qs-col">
157
+ <button type="submit" class="site-button js-active site-button-animate site-button-right-icon site-button-full" data-element="signup-button">
158
+ <span class="align-middle"><?php _e( 'Save', 'wpcf7-redirect' ); ?></span>
159
+ </button>
160
+ </div>
161
+ </div>
162
+ <input type="hidden" name="save_ext_settings" value="<?php echo qs_get_plugin_display_name(); ?>" />
163
+ </form>
164
+ <?php endif; ?>
165
+ </section>
classes/aff/templates/index.php DELETED
File without changes
classes/class-qs-api.php CHANGED
@@ -268,9 +268,9 @@ class Qs_Api {
268
 
269
  public function get_extension_file( $activation_data, $sku ) {
270
 
271
- $results = $this->get_extension_download_url( $activation_data, $sku );
272
 
273
- if ( ! is_wp_error( $results ) ) {
274
  $results = download_url( $download_link, 1000 );
275
  }
276
 
268
 
269
  public function get_extension_file( $activation_data, $sku ) {
270
 
271
+ $download_link = $this->get_extension_download_url( $activation_data, $sku );
272
 
273
+ if ( ! is_wp_error( $download_link ) ) {
274
  $results = download_url( $download_link, 1000 );
275
  }
276
 
classes/class-wpcf7r-action.php CHANGED
@@ -346,7 +346,20 @@ class WPCF7R_Action {
346
  * @param $post_id
347
  */
348
  public static function get_action_type( $post_id ) {
349
- return get_post_meta( $post_id, 'action_type', true );
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  }
351
 
352
  /**
@@ -503,8 +516,8 @@ class WPCF7R_Action {
503
  foreach ( $fields as $field ) {
504
  delete_post_meta( $this->action_post_id, $field['name'] );
505
 
506
- if( isset( $field['fields'] ) && $field['fields'] ){
507
- foreach( $field['fields'] as $sub_field_key => $sub_field ){
508
  delete_post_meta( $this->action_post_id, $sub_field_key );
509
  }
510
  }
346
  * @param $post_id
347
  */
348
  public static function get_action_type( $post_id ) {
349
+ $action_type = get_post_meta( $post_id, 'action_type', true );
350
+
351
+ $migration_list = array(
352
+ 'send_mail' => 'SendMail',
353
+ 'fire_script' => 'FireScript',
354
+ );
355
+
356
+ if ( isset( $migration_list[ $action_type ] ) ) {
357
+ update_post_meta( $post_id, 'action_type', $migration_list[ $action_type ] );
358
+
359
+ $action_type = $migration_list[ $action_type ];
360
+ }
361
+
362
+ return $action_type;
363
  }
364
 
365
  /**
516
  foreach ( $fields as $field ) {
517
  delete_post_meta( $this->action_post_id, $field['name'] );
518
 
519
+ if ( isset( $field['fields'] ) && $field['fields'] ) {
520
+ foreach ( $field['fields'] as $sub_field_key => $sub_field ) {
521
  delete_post_meta( $this->action_post_id, $sub_field_key );
522
  }
523
  }
classes/class-wpcf7r-actions-list.php CHANGED
@@ -1,102 +1,102 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
-
4
- class Wpcf7r_Actions_List {
5
- public static $action_posts;
6
-
7
- public function __construct( $actions_posts = '' ) {
8
-
9
- self::$action_posts = $actions_posts;
10
-
11
- parent::__construct(
12
- array(
13
- 'singular' => __( 'Action', 'wpcf7-redirect' ), // singular name of the listed records
14
- 'plural' => __( 'Actions', 'wpcf7-redirect' ), // plural name of the listed records
15
- 'ajax' => false, // should this table support ajax?
16
- )
17
- );
18
- }
19
-
20
- public function record_count() {
21
- return count( self::$action_posts );
22
- }
23
-
24
- /**
25
- * Text diwpcf7-redirect layed when no customer data is available
26
- */
27
- public function no_items() {
28
- _e( 'No Actions Avaliable.', 'wpcf7-redirect' );
29
- }
30
-
31
- /**
32
- * Return an associative array containing the bulk action
33
- *
34
- * @return array
35
- */
36
- public function get_bulk_actions() {
37
- $actions = array(
38
- 'bulk-delete' => 'Delete',
39
- );
40
-
41
- return $actions;
42
- }
43
-
44
- /**
45
- * Handles data query and filter, sorting, and pagination.
46
- */
47
- public function prepare_items() {
48
- $this->_column_headers = $this->get_column_info();
49
-
50
- /** Process bulk action */
51
- $this->process_bulk_action();
52
-
53
- $per_page = 10;
54
- $current_page = $this->get_pagenum();
55
- $total_items = $this->record_count();
56
-
57
- $this->set_pagination_args(
58
- array(
59
- 'total_items' => $total_items, //WE have to calculate the total number of items
60
- 'per_page' => $per_page, //WE have to determine how many items to show on a page
61
- )
62
- );
63
-
64
- $this->items = self::$action_posts;
65
- }
66
-
67
- public function process_bulk_action() {
68
-
69
- //Detect when a bulk action is being triggered...
70
- if ( 'delete' === $this->current_action() ) {
71
-
72
- // In our file that handles the request, verify the nonce.
73
- $nonce = esc_attr( $_REQUEST['_wpnonce'] );
74
-
75
- if ( ! wp_verify_nonce( $nonce, 'sp_delete_customer' ) ) {
76
- die( 'Go get a life script kiddies' );
77
- } else {
78
- self::delete_customer( absint( $_GET['customer'] ) );
79
-
80
- wp_redirect( esc_url( add_query_arg() ) );
81
- exit;
82
- }
83
- }
84
-
85
- // If the delete bulk action is triggered
86
- if ( ( isset( $_POST['action'] ) && 'bulk-delete' === $_POST['action'] )
87
- || ( isset( $_POST['action2'] ) && 'bulk-delete' === $_POST['action2'] )
88
- ) {
89
-
90
- $delete_ids = esc_sql( $_POST['bulk-delete'] );
91
-
92
- // loop over the array of record IDs and delete them
93
- foreach ( $delete_ids as $id ) {
94
- self::delete_customer( $id );
95
-
96
- }
97
-
98
- wp_redirect( esc_url( add_query_arg() ) );
99
- exit;
100
- }
101
- }
102
- }
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit;
3
+
4
+ class Wpcf7r_Actions_List {
5
+ public static $action_posts;
6
+
7
+ public function __construct( $actions_posts = '' ) {
8
+
9
+ self::$action_posts = $actions_posts;
10
+
11
+ parent::__construct(
12
+ array(
13
+ 'singular' => __( 'Action', 'wpcf7-redirect' ), // singular name of the listed records
14
+ 'plural' => __( 'Actions', 'wpcf7-redirect' ), // plural name of the listed records
15
+ 'ajax' => false, // should this table support ajax?
16
+ )
17
+ );
18
+ }
19
+
20
+ public function record_count() {
21
+ return count( self::$action_posts );
22
+ }
23
+
24
+ /**
25
+ * Text diwpcf7-redirect layed when no customer data is available
26
+ */
27
+ public function no_items() {
28
+ _e( 'No Actions Avaliable.', 'wpcf7-redirect' );
29
+ }
30
+
31
+ /**
32
+ * Return an associative array containing the bulk action
33
+ *
34
+ * @return array
35
+ */
36
+ public function get_bulk_actions() {
37
+ $actions = array(
38
+ 'bulk-delete' => 'Delete',
39
+ );
40
+
41
+ return $actions;
42
+ }
43
+
44
+ /**
45
+ * Handles data query and filter, sorting, and pagination.
46
+ */
47
+ public function prepare_items() {
48
+ $this->_column_headers = $this->get_column_info();
49
+
50
+ /** Process bulk action */
51
+ $this->process_bulk_action();
52
+
53
+ $per_page = 10;
54
+ $current_page = $this->get_pagenum();
55
+ $total_items = $this->record_count();
56
+
57
+ $this->set_pagination_args(
58
+ array(
59
+ 'total_items' => $total_items, //WE have to calculate the total number of items
60
+ 'per_page' => $per_page, //WE have to determine how many items to show on a page
61
+ )
62
+ );
63
+
64
+ $this->items = self::$action_posts;
65
+ }
66
+
67
+ public function process_bulk_action() {
68
+
69
+ //Detect when a bulk action is being triggered...
70
+ if ( 'delete' === $this->current_action() ) {
71
+
72
+ // In our file that handles the request, verify the nonce.
73
+ $nonce = esc_attr( $_REQUEST['_wpnonce'] );
74
+
75
+ if ( ! wp_verify_nonce( $nonce, 'sp_delete_customer' ) ) {
76
+ die( 'Go get a life script kiddies' );
77
+ } else {
78
+ self::delete_customer( absint( $_GET['customer'] ) );
79
+
80
+ wp_redirect( esc_url( add_query_arg() ) );
81
+ exit;
82
+ }
83
+ }
84
+
85
+ // If the delete bulk action is triggered
86
+ if ( ( isset( $_POST['action'] ) && 'bulk-delete' === $_POST['action'] )
87
+ || ( isset( $_POST['action2'] ) && 'bulk-delete' === $_POST['action2'] )
88
+ ) {
89
+
90
+ $delete_ids = esc_sql( $_POST['bulk-delete'] );
91
+
92
+ // loop over the array of record IDs and delete them
93
+ foreach ( $delete_ids as $id ) {
94
+ self::delete_customer( $id );
95
+
96
+ }
97
+
98
+ wp_redirect( esc_url( add_query_arg() ) );
99
+ exit;
100
+ }
101
+ }
102
+ }
classes/class-wpcf7r-base.php CHANGED
@@ -236,13 +236,10 @@ class WPCF7R_Base {
236
  add_action( 'wp_ajax_wpcf7r_set_action_menu_order', array( $this->wpcf7_utils, 'set_action_menu_order' ) );
237
  // make an api test.
238
  add_action( 'wp_ajax_wpcf7r_make_api_test', array( $this->wpcf7_utils, 'make_api_test' ) );
239
- // get mailchimp lists.
240
- add_action( 'wp_ajax_wpcf7r_get_mailchimp_lists', array( $this->wpcf7_utils, 'get_mailchimp_lists' ) );
241
  // get popup template.
242
  add_action( 'wp_ajax_wpcf7r_get_action_template', array( $this->wpcf7_utils, 'get_action_template' ) );
243
 
244
- // alert conflicts.
245
- add_action( 'admin_init', array( $this, 'alert_conflicts' ) );
246
  // run the migration process.
247
  add_action( 'wp_ajax_wpcf7r_migrate_all_forms', array( $this, 'migrate_all_forms' ) );
248
  // reset plugin settings
@@ -268,17 +265,6 @@ class WPCF7R_Base {
268
  wp_send_json_success( array( 'nonce' => $nonce ) );
269
  }
270
 
271
- /**
272
- * Alert the user of a conflict between free and premium plugin
273
- */
274
- public function alert_conflicts() {
275
- if ( class_exists( 'Mailchimp' ) ) {
276
- $reflector = new ReflectionClass( 'Mailchimp' );
277
- /* Translators: the file location */
278
- WPCF7r_Utils::add_admin_notice( 'alert', sprintf( __( 'There might be a conflict that causing mailchimp action not to function properly, disable any mailchimp plugin to avoid problems, mailchimp is already defined on %s', 'wpcf7-redirect' ), $reflector->getFileName() ) );
279
- }
280
- }
281
-
282
  /**
283
  * Get files required to run the plugin
284
  */
@@ -301,15 +287,10 @@ class WPCF7R_Base {
301
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-updates.php';
302
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-action.php';
303
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-user.php';
304
- require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-mailchimp-helper.php';
305
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-extensions.php';
306
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-extension.php';
307
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-module.php';
308
 
309
- if ( ! class_exists( 'Mailchimp' ) ) {
310
- require_once WPCF7_PRO_REDIRECT_BASE_PATH . 'vendor/autoload.php';
311
- }
312
-
313
  // Load all actions.
314
  foreach ( glob( WPCF7_PRO_REDIRECT_CLASSES_PATH . 'actions/*.php' ) as $filename ) {
315
  require_once $filename;
236
  add_action( 'wp_ajax_wpcf7r_set_action_menu_order', array( $this->wpcf7_utils, 'set_action_menu_order' ) );
237
  // make an api test.
238
  add_action( 'wp_ajax_wpcf7r_make_api_test', array( $this->wpcf7_utils, 'make_api_test' ) );
239
+
 
240
  // get popup template.
241
  add_action( 'wp_ajax_wpcf7r_get_action_template', array( $this->wpcf7_utils, 'get_action_template' ) );
242
 
 
 
243
  // run the migration process.
244
  add_action( 'wp_ajax_wpcf7r_migrate_all_forms', array( $this, 'migrate_all_forms' ) );
245
  // reset plugin settings
265
  wp_send_json_success( array( 'nonce' => $nonce ) );
266
  }
267
 
 
 
 
 
 
 
 
 
 
 
 
268
  /**
269
  * Get files required to run the plugin
270
  */
287
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-updates.php';
288
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-action.php';
289
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-user.php';
 
290
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-extensions.php';
291
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-extension.php';
292
  require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-module.php';
293
 
 
 
 
 
294
  // Load all actions.
295
  foreach ( glob( WPCF7_PRO_REDIRECT_CLASSES_PATH . 'actions/*.php' ) as $filename ) {
296
  require_once $filename;
classes/class-wpcf7r-extension.php CHANGED
@@ -268,7 +268,7 @@ class WPCF7R_Extension {
268
  }
269
 
270
  deactivate_plugins( $this->get_extension_relative_path() );
271
-
272
  $response = $this->save_extension_file();
273
 
274
  if ( ! isset( $response['error'] ) ) {
268
  }
269
 
270
  deactivate_plugins( $this->get_extension_relative_path() );
271
+
272
  $response = $this->save_extension_file();
273
 
274
  if ( ! isset( $response['error'] ) ) {
classes/class-wpcf7r-form-helper.php CHANGED
@@ -76,7 +76,7 @@ class WPCF7r_Form_Helper {
76
 
77
  $extension = new WPCF7R_Extension( $extension_details );
78
 
79
- if ( $arg->slug === $extension->get_slug() ) {
80
  $action_plugin = $extension->get_sku();
81
  break;
82
  }
76
 
77
  $extension = new WPCF7R_Extension( $extension_details );
78
 
79
+ if ( isset( $arg->slug ) && $arg->slug === $extension->get_slug() ) {
80
  $action_plugin = $extension->get_sku();
81
  break;
82
  }
classes/class-wpcf7r-form.php CHANGED
@@ -1,651 +1,651 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Form - Container class that wraps the CF7 form object and adds functionality
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- class WPCF7R_Form {
9
- // Refrence to the mail tags
10
- public static $mail_tags;
11
-
12
- // Refrence to the current contact form 7 form
13
- public static $cf7_form;
14
-
15
- // Save refrence to the current instance
16
- public static $instance;
17
- public static $action_to_submit;
18
-
19
- // holds an array of items remove from $_POST for security reasons
20
- public static $removed_data;
21
-
22
- // Save proceesed actions from validation stage
23
- public static $processed_actions;
24
-
25
- // Refrence to the current submitted torm validation obj
26
- public static $wpcf_validation_obj;
27
-
28
- // Reference to the current submitted form
29
- public static $submission;
30
-
31
- /**
32
- * Main class Constructor
33
- *
34
- * @param $cf7
35
- * @param $submission
36
- * @param $validation_obj
37
- */
38
- public function __construct( $cf7, $submission = '', $validation_obj = '' ) {
39
- if ( is_int( $cf7 ) ) {
40
- $this->post_id = $cf7;
41
- $cf7 = WPCF7_ContactForm::get_instance( $this->post_id );
42
- } elseif ( $cf7 ) {
43
- $this->post_id = $cf7->id();
44
- } else {
45
- return;
46
- }
47
-
48
- // Keep refrences.
49
- if ( $cf7 ) {
50
- self::$cf7_form = $cf7;
51
- }
52
- if ( $validation_obj ) {
53
- self::$wpcf_validation_obj = $validation_obj;
54
- }
55
- if ( $submission ) {
56
- self::$submission = $submission;
57
- }
58
-
59
- $this->redirect_actions = new WPCF7R_Actions( $this->post_id, $this );
60
- $this->cf7_post = $cf7;
61
-
62
- // Avoid creating 2 instances of the same form.
63
- if ( self::$instance && self::$instance->post_id === $this->post_id ) {
64
- return self::$instance;
65
- }
66
-
67
- add_action( 'admin_footer', array( $this->redirect_actions, 'html_fregments' ) );
68
- }
69
-
70
- /**
71
- * Get submission refrerence
72
- */
73
- public function get_submission() {
74
- return self::$submission;
75
- }
76
-
77
- /**
78
- * Get the form submission status
79
- */
80
- public function get_submission_status() {
81
- return self::get_submission()->get_status();
82
- }
83
-
84
- /**
85
- * Disable all form actions except the requested one
86
- *
87
- * @param $action_id
88
- */
89
- public function enable_action( $action_id ) {
90
- self::$action_to_submit = $action_id;
91
- }
92
-
93
- /**
94
- * In case a specific action was required (used for testing)
95
- */
96
- public function get_action_to_submit() {
97
- return self::$action_to_submit;
98
- }
99
-
100
- /**
101
- * Get an instance of wpcf7 object
102
- */
103
- public function get_cf7_form_instance() {
104
- return $this->cf7_post;
105
- }
106
-
107
- /**
108
- * Get old redirection plugin rules
109
- */
110
- public function get_cf7_redirection_settings() {
111
- $custom_data = get_post_custom( $this->post_id );
112
- $old_settings = array();
113
- if ( isset( $custom_data['_wpcf7_redirect_redirect_type'] ) ) {
114
- $old_settings['_wpcf7_redirect_redirect_type'] = maybe_unserialize( $custom_data['_wpcf7_redirect_redirect_type'][0] );
115
- }
116
- if ( isset( $custom_data['_wpcf7_redirect_page_id'] ) ) {
117
- $old_settings['page_id'] = maybe_unserialize( $custom_data['_wpcf7_redirect_page_id'][0] );
118
- }
119
- if ( isset( $custom_data['_wpcf7_redirect_external_url'] ) ) {
120
- $old_settings['external_url'] = maybe_unserialize( $custom_data['_wpcf7_redirect_external_url'][0] );
121
- }
122
- if ( isset( $custom_data['_wpcf7_redirect_use_external_url'] ) ) {
123
- $old_settings['use_external_url'] = maybe_unserialize( $custom_data['_wpcf7_redirect_use_external_url'][0] );
124
- }
125
- if ( isset( $custom_data['_wpcf7_redirect_open_in_new_tab'] ) ) {
126
- $old_settings['open_in_new_tab'] = maybe_unserialize( $custom_data['_wpcf7_redirect_open_in_new_tab'][0] );
127
- }
128
- if ( isset( $custom_data['_wpcf7_redirect_http_build_query'] ) ) {
129
- $old_settings['http_build_query'] = maybe_unserialize( $custom_data['_wpcf7_redirect_http_build_query'][0] );
130
- }
131
- if ( isset( $custom_data['_wpcf7_redirect_http_build_query_selectively'] ) ) {
132
- $old_settings['http_build_query_selectively'] = maybe_unserialize( $custom_data['_wpcf7_redirect_http_build_query_selectively'][0] );
133
- }
134
- if ( isset( $custom_data['_wpcf7_redirect_http_build_query_selectively_fields'] ) ) {
135
- $old_settings['http_build_query_selectively_fields'] = maybe_unserialize( $custom_data['_wpcf7_redirect_http_build_query_selectively_fields'][0] );
136
- }
137
- if ( isset( $custom_data['_wpcf7_redirect_after_sent_script'] ) ) {
138
- $old_settings['fire_sctipt'] = maybe_unserialize( $custom_data['_wpcf7_redirect_after_sent_script'][0] );
139
- }
140
-
141
- if ( isset( $custom_data['_wpcf7_redirect_delay_redirect'] ) && (int) $custom_data['_wpcf7_redirect_delay_redirect'] > 0 ) {
142
- $old_settings['delay_redirect_seconds'] = $custom_data['_wpcf7_redirect_delay_redirect'][0] / 1000;
143
- }
144
-
145
- return $old_settings;
146
- }
147
-
148
- /**
149
- * Get the old contact form 7 to api settings
150
- */
151
- public function get_cf7_api_settings() {
152
- $custom_data = get_post_custom( $this->post_id );
153
- $old_settings = array();
154
- if ( isset( $custom_data['_wpcf7_api_data'] ) ) {
155
- $old_settings['_wpcf7_api_data'] = maybe_unserialize( $custom_data['_wpcf7_api_data'][0] );
156
- }
157
- if ( isset( $custom_data['_wpcf7_api_data_map'] ) ) {
158
- $old_settings['_wpcf7_api_data_map'] = maybe_unserialize( $custom_data['_wpcf7_api_data_map'][0] );
159
- }
160
- if ( isset( $custom_data['_template'] ) ) {
161
- $old_settings['_template'] = maybe_unserialize( $custom_data['_template'][0] );
162
- }
163
- if ( isset( $custom_data['_json_template'] ) ) {
164
- $old_settings['_json_template'] = maybe_unserialize( $custom_data['_json_template'][0] );
165
- }
166
- return $old_settings;
167
- }
168
-
169
- /**
170
- * Check if a form has a specific action type
171
- *
172
- * @param $type
173
- * @return boolean
174
- */
175
- public function has_action( $type ) {
176
- $args = array();
177
- $meta_query = array(
178
- array(
179
- 'key' => 'action_type',
180
- 'value' => $type,
181
- ),
182
- );
183
-
184
- $args['meta_query'] = $meta_query;
185
- $actions = $this->get_actions( 'default', 1, true, $args );
186
-
187
- return $actions ? $actions : false;
188
- }
189
-
190
- /**
191
- * Update the plugin has migrated
192
- *
193
- * @param $migration_type
194
- */
195
- public function update_migration( $migration_type ) {
196
- update_post_meta( $this->post_id, $migration_type, true );
197
- }
198
-
199
- /**
200
- * Check if a form was migrated from old version
201
- *
202
- * @param $migration_type
203
- * @return boolean
204
- */
205
- public function has_migrated( $migration_type ) {
206
- return get_post_meta( $this->post_id, $migration_type, true );
207
- }
208
-
209
- /**
210
- * Check if there is old data on the DB
211
- *
212
- * @param $type
213
- * @return boolean
214
- */
215
- public function has_old_data( $type ) {
216
- if ( 'migrate_from_cf7_api' === $type ) {
217
- return $this->get_cf7_api_settings();
218
- } else {
219
- return $this->get_cf7_redirection_settings();
220
- }
221
- }
222
-
223
- /**
224
- * Get a singelton
225
- *
226
- * @param string $post_id
227
- */
228
- public static function get_instance( $post_id = '' ) {
229
- if ( null === self::$instance || ( self::$cf7_form->id() !== $post_id && $post_id ) ) {
230
- self::$instance = new self( $post_id );
231
- }
232
- return self::$instance;
233
- }
234
-
235
- public function is_new_form() {
236
- return isset( $this->post_id ) && $this->post_id ? false : true;
237
- }
238
-
239
- /**
240
- * Initialize form
241
- */
242
- public function init() {
243
- // Check if this is a new form
244
- if ( $this->is_new_form() ) {
245
- self::$mail_tags = __( 'You need to save your form', 'wpcf7-redirect' );
246
- include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'save-form.php';
247
- } else {
248
- self::$mail_tags = $this->get_cf7_fields();
249
- $fields = $this->get_fields_values();
250
- $redirect_type = isset( $fields['redirect_type'] ) && $fields['redirect_type'] ? $fields['redirect_type'] : '';
251
- $active_tab_title = 'active';
252
- $active_tab = 'active';
253
- $this->html = new WPCF7R_html( self::$mail_tags );
254
- include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'settings.php';
255
- }
256
- }
257
-
258
- /**
259
- * Get all posts relevant to this contact form
260
- * returns posts object
261
- *
262
- * @param $rule
263
- */
264
- public function get_action_posts( $rule ) {
265
- return $this->redirect_actions->get_action_posts( $rule );
266
- }
267
-
268
- /**
269
- * Get all actions relevant for this contact form
270
- * Returns action classes
271
- *
272
- * @param $rule
273
- * @param integer $count
274
- * @param boolean $is_active
275
- * @param array $args
276
- */
277
- public function get_actions( $rule, $count = -1, $is_active = false, $args = array() ) {
278
- $action_id = $this->get_action_to_submit();
279
-
280
- if ( $action_id ) {
281
- $args['post__in'] = array( $action_id );
282
- }
283
-
284
- $actions = isset( $this->redirect_actions ) && $this->redirect_actions ? $this->redirect_actions->get_actions( $rule, -1, $is_active, $args ) : array();
285
-
286
- $this->actions = $actions;
287
-
288
- return $actions;
289
- }
290
-
291
- /**
292
- * Get all active actions
293
- */
294
- public function get_active_actions() {
295
- return $this->get_actions( 'default', -1, true );
296
- }
297
-
298
- /**
299
- * Save reference for the items removed from the $_POST data
300
- *
301
- * @param $removed_data
302
- */
303
- public function set_removed_posted_data( $removed_data ) {
304
- if ( isset( self::$removed_data ) ) {
305
- self::$removed_data = array_merge( $removed_data, self::$removed_data );
306
- } else {
307
- self::$removed_data = $removed_data;
308
- }
309
- }
310
-
311
- /**
312
- * Get all params removed from the $_POST
313
- */
314
- public function get_removed_form_params() {
315
- return isset( self::$removed_data ) ? self::$removed_data : '';
316
- }
317
-
318
- /**
319
- * Validate and store meta data
320
- */
321
- public function store_meta() {
322
- if ( ! isset( $_POST ) || empty( $_POST['wpcf7-redirect'] ) ) {
323
- return;
324
- } else {
325
- if ( ! wp_verify_nonce( $_POST['wpcf7_redirect_page_metaboxes_nonce'], 'wpcf7_redirect_page_metaboxes' ) ) {
326
- return;
327
- }
328
- $form_id = $this->post_id;
329
- $fields = $this->get_plugin_fields( $form_id );
330
- $data = $_POST['wpcf7-redirect'];
331
- $this->save_meta_fields( $form_id, $fields, $data );
332
- if ( isset( $data['actions'] ) && $data['actions'] ) {
333
- $this->save_actions( $data['actions'] );
334
- }
335
- }
336
- }
337
-
338
- /**
339
- * Save all actions and actions data
340
- *
341
- * @param $actions
342
- */
343
- public function save_actions( $actions ) {
344
- foreach ( $actions as $post_id => $action_fields ) {
345
- $action = WPCF7R_Action::get_action( $post_id );
346
- if ( $action ) {
347
- $action->delete_all_fields();
348
- foreach ( $action_fields as $action_field_key => $action_field_value ) {
349
- update_post_meta( $post_id, $action_field_key, $action_field_value );
350
- }
351
- if ( isset( $action_fields['post_title'] ) ) {
352
- $update_post = array(
353
- 'ID' => $post_id,
354
- 'post_title' => $action_fields['post_title'],
355
- );
356
- wp_update_post( $update_post );
357
- }
358
- }
359
- }
360
- }
361
-
362
- /**
363
- * Save meta fields to cf7 post
364
- * Save each action to its relevant action post
365
- *
366
- * @param $post_id
367
- * @param $fields
368
- * @param $data
369
- */
370
- public function save_meta_fields( $post_id, $fields, $data ) {
371
- unset( $data['actions'] );
372
- if ( $data ) {
373
- foreach ( $fields as $field ) {
374
- $value = isset( $data[ $field['name'] ] ) ? $data[ $field['name'] ] : '';
375
- switch ( $field['type'] ) {
376
- case 'password':
377
- case 'text':
378
- case 'checkbox':
379
- $value = sanitize_text_field( $value );
380
- break;
381
- case 'textarea':
382
- $value = htmlspecialchars( $value );
383
- break;
384
- case 'number':
385
- $value = intval( $value );
386
- break;
387
- case 'url':
388
- $value = esc_url_raw( $value );
389
- break;
390
- }
391
- update_post_meta( $post_id, '_wpcf7_redirect_' . $field['name'], $value );
392
- }
393
- }
394
- }
395
-
396
- /**
397
- * Check if the form has active actions
398
- */
399
- public function has_actions() {
400
- $rule = 'default';
401
- $count = 1;
402
- $is_active = true;
403
- $args = array();
404
- $actions = $this->get_actions( $rule, $count, $is_active, $args ) ? true : false;
405
-
406
- return $actions;
407
- }
408
-
409
- /**
410
- * Get specific form fields
411
- *
412
- * @param $fields
413
- */
414
- public function get_form_fields( $fields ) {
415
- $forms = array();
416
- foreach ( $fields as $field ) {
417
- $forms[ $this->post_id ][ $field['name'] ] = get_post_meta( $this->post_id, '_wpcf7_redirect_' . $field['name'], true );
418
- if ( 'textarea' === $field['type'] ) {
419
- $forms[ $this->post_id ][ $field['name'] ] = $forms[ $this->post_id ][ $field['name'] ];
420
- }
421
- }
422
-
423
- // Thank you page URL is a little bit different...
424
- $forms[ $this->post_id ]['thankyou_page_url'] = $forms[ $this->post_id ]['page_id'] ? get_permalink( $forms[ $this->post_id ]['page_id'] ) : '';
425
- return reset( $forms );
426
- }
427
-
428
- /**
429
- * Get rules for a specific contact form
430
- */
431
- public function get_redirect_rules() {
432
- return get_post_meta( $this->post_id, '_wpcf7_redirect_' . $field['name'], true );
433
- }
434
-
435
- /**
436
- * Get all fields values
437
- */
438
- public function get_fields_values() {
439
- $fields = $this->get_plugin_fields();
440
- foreach ( $fields as $field ) {
441
- $values[ $field['name'] ] = get_post_meta( $this->post_id, '_wpcf7_redirect_' . $field['name'], true );
442
- }
443
- return $values;
444
- }
445
-
446
- /**
447
- * Create plugin fields
448
- */
449
- public function get_plugin_fields() {
450
- $fields = array_merge(
451
- WPCF7r_Form_Helper::get_plugin_default_fields(),
452
- array(
453
- array(
454
- 'name' => 'blocks',
455
- 'type' => 'blocks',
456
- ),
457
- )
458
- );
459
- return $fields;
460
- }
461
-
462
- /**
463
- * Get the contact form id
464
- */
465
- public function get_id() {
466
- return $this->post_id;
467
- }
468
-
469
- /**
470
- * Get the form fields for usage on the selectors
471
- */
472
- public function get_cf7_fields() {
473
- $tags = self::get_mail_tags();
474
- return $tags;
475
- }
476
-
477
- /**
478
- * Get special mail tags
479
- */
480
- static function get_special_mail_tags() {
481
- $mailtags = array();
482
- $special_mail_tags = array(
483
- '_remote_ip',
484
- '_user_agent',
485
- '_url',
486
- '_date',
487
- '_time',
488
- '_post_id',
489
- '_post_name',
490
- '_post_title',
491
- '_post_url',
492
- '_post_author',
493
- '_post_author_email',
494
- '_site_title',
495
- '_site_description',
496
- '_site_url',
497
- '_site_admin_email',
498
- 'user_login',
499
- 'user_email',
500
- 'user_url',
501
- );
502
-
503
- foreach ( $special_mail_tags as $special_mail_tag ) {
504
- $tag = new WPCF7_MailTag( $special_mail_tag, $special_mail_tag, array() );
505
- $mailtags[] = $tag;
506
- }
507
-
508
- return $mailtags;
509
- }
510
-
511
- /**
512
- * Collect the mail tags from the form
513
- */
514
- static function get_mail_tags() {
515
- // If this is a new form there are no tags yet
516
- if ( ! isset( self::$cf7_form ) || ! self::$cf7_form ) {
517
- return;
518
- }
519
-
520
- $tags = apply_filters( 'wpcf7r_collect_mail_tags', self::$cf7_form->scan_form_tags() );
521
-
522
- foreach ( (array) $tags as $tag ) {
523
- $type = trim( $tag['type'], ' *' );
524
- if ( empty( $type ) || empty( $tag['name'] ) ) {
525
- continue;
526
- } elseif ( ! empty( $args['include'] ) ) {
527
- if ( ! in_array( $type, $args['include'], true ) ) {
528
- continue;
529
- }
530
- } elseif ( ! empty( $args['exclude'] ) ) {
531
- if ( in_array( $type, $args['exclude'], true ) ) {
532
- continue;
533
- }
534
- }
535
- $mailtags[] = $tag;
536
- }
537
-
538
- // create an instance to get the current form instance
539
- $instance = self::get_instance( self::$cf7_form );
540
-
541
- // add a save lead tag in case save lead action is on
542
- if ( $instance->has_action( 'save_lead' ) ) {
543
- $scanned_tag = array(
544
- 'type' => 'lead_id',
545
- 'basetype' => trim( '[lead_id]', '*' ),
546
- 'name' => 'lead_id',
547
- 'options' => array(),
548
- 'raw_values' => array(),
549
- 'values' => array(
550
- WPCF7R_Action::get_lead_id(),
551
- ),
552
- 'pipes' => null,
553
- 'labels' => array(),
554
- 'attr' => '',
555
- 'content' => '',
556
- );
557
- $mailtags[] = new WPCF7_FormTag( $scanned_tag );
558
- }
559
-
560
- return $mailtags;
561
- }
562
-
563
- /**
564
- * Process actions that are relevant for validation process
565
- */
566
- public function process_validation_actions() {
567
- $actions = $this->get_active_actions();
568
- $results = array();
569
-
570
- if ( $actions ) {
571
- foreach ( $actions as $action ) {
572
- $action_result = $action->process_validation( self::get_submission() );
573
- if ( $action_result ) {
574
- $results[ $action->get_type() ][] = $action_result;
575
- }
576
- }
577
- }
578
- return $results;
579
- }
580
-
581
- /**
582
- * Get validation object
583
- */
584
- public static function get_validation_obj() {
585
- return self::$wpcf_validation_obj;
586
- }
587
-
588
- /**
589
- * Get validation object $tags
590
- */
591
- public static function get_validation_obj_tags() {
592
- $validation_obj = self::get_validation_obj();
593
- return isset( $validation_obj->tags ) ? $validation_obj->tags : '';
594
- }
595
-
596
- /**
597
- * Save a referrence to the validaiont object
598
- * This will enable invalidating tags later on
599
- *
600
- * @param object $wpcf_validation_obj
601
- */
602
- public function set_validation_obj( $wpcf_validation_obj ) {
603
- self::$wpcf_validation_obj = $wpcf_validation_obj;
604
- }
605
-
606
- /**
607
- * Handles submission actions
608
- */
609
- public function process_actions() {
610
- // get all active actions
611
- $actions = $this->get_active_actions();
612
- // prepeare the results array
613
- $results = array();
614
- // get removed fom data
615
- self::$submission->removed_posted_data = $this->get_removed_form_params();
616
-
617
- if ( $actions ) {// loop through actions and process
618
- foreach ( $actions as $action ) {
619
- // save the validation object in case this action manipulates validations
620
- // do the action
621
- $action_result = $action->process_action( $this );
622
- // add the action to the results array
623
- $results[ $action->get_type() ][] = $action_result;
624
- self::$processed_actions[] = $action;
625
- }
626
- } else {
627
- return false;
628
- }
629
-
630
- return $results;
631
- }
632
-
633
- /**
634
- * Get all processed actions
635
- */
636
- public function get_processed_actions() {
637
- return isset( self::$processed_actions ) && self::$processed_actions ? self::$processed_actions : '';
638
- }
639
-
640
- /**
641
- * Check if actions hold one last thing to do before returning result to the user
642
- */
643
- public function maybe_perform_pre_result_action() {
644
- $actions = $this->get_processed_actions();
645
- if ( $actions ) {
646
- foreach ( $actions as $action ) {
647
- $action->maybe_perform_pre_result_action();
648
- }
649
- }
650
- }
651
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Form - Container class that wraps the CF7 form object and adds functionality
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ class WPCF7R_Form {
9
+ // Refrence to the mail tags
10
+ public static $mail_tags;
11
+
12
+ // Refrence to the current contact form 7 form
13
+ public static $cf7_form;
14
+
15
+ // Save refrence to the current instance
16
+ public static $instance;
17
+ public static $action_to_submit;
18
+
19
+ // holds an array of items remove from $_POST for security reasons
20
+ public static $removed_data;
21
+
22
+ // Save proceesed actions from validation stage
23
+ public static $processed_actions;
24
+
25
+ // Refrence to the current submitted torm validation obj
26
+ public static $wpcf_validation_obj;
27
+
28
+ // Reference to the current submitted form
29
+ public static $submission;
30
+
31
+ /**
32
+ * Main class Constructor
33
+ *
34
+ * @param $cf7
35
+ * @param $submission
36
+ * @param $validation_obj
37
+ */
38
+ public function __construct( $cf7, $submission = '', $validation_obj = '' ) {
39
+ if ( is_int( $cf7 ) ) {
40
+ $this->post_id = $cf7;
41
+ $cf7 = WPCF7_ContactForm::get_instance( $this->post_id );
42
+ } elseif ( $cf7 ) {
43
+ $this->post_id = $cf7->id();
44
+ } else {
45
+ return;
46
+ }
47
+
48
+ // Keep refrences.
49
+ if ( $cf7 ) {
50
+ self::$cf7_form = $cf7;
51
+ }
52
+ if ( $validation_obj ) {
53
+ self::$wpcf_validation_obj = $validation_obj;
54
+ }
55
+ if ( $submission ) {
56
+ self::$submission = $submission;
57
+ }
58
+
59
+ $this->redirect_actions = new WPCF7R_Actions( $this->post_id, $this );
60
+ $this->cf7_post = $cf7;
61
+
62
+ // Avoid creating 2 instances of the same form.
63
+ if ( self::$instance && self::$instance->post_id === $this->post_id ) {
64
+ return self::$instance;
65
+ }
66
+
67
+ add_action( 'admin_footer', array( $this->redirect_actions, 'html_fregments' ) );
68
+ }
69
+
70
+ /**
71
+ * Get submission refrerence
72
+ */
73
+ public function get_submission() {
74
+ return self::$submission;
75
+ }
76
+
77
+ /**
78
+ * Get the form submission status
79
+ */
80
+ public function get_submission_status() {
81
+ return self::get_submission()->get_status();
82
+ }
83
+
84
+ /**
85
+ * Disable all form actions except the requested one
86
+ *
87
+ * @param $action_id
88
+ */
89
+ public function enable_action( $action_id ) {
90
+ self::$action_to_submit = $action_id;
91
+ }
92
+
93
+ /**
94
+ * In case a specific action was required (used for testing)
95
+ */
96
+ public function get_action_to_submit() {
97
+ return self::$action_to_submit;
98
+ }
99
+
100
+ /**
101
+ * Get an instance of wpcf7 object
102
+ */
103
+ public function get_cf7_form_instance() {
104
+ return $this->cf7_post;
105
+ }
106
+
107
+ /**
108
+ * Get old redirection plugin rules
109
+ */
110
+ public function get_cf7_redirection_settings() {
111
+ $custom_data = get_post_custom( $this->post_id );
112
+ $old_settings = array();
113
+ if ( isset( $custom_data['_wpcf7_redirect_redirect_type'] ) ) {
114
+ $old_settings['_wpcf7_redirect_redirect_type'] = maybe_unserialize( $custom_data['_wpcf7_redirect_redirect_type'][0] );
115
+ }
116
+ if ( isset( $custom_data['_wpcf7_redirect_page_id'] ) ) {
117
+ $old_settings['page_id'] = maybe_unserialize( $custom_data['_wpcf7_redirect_page_id'][0] );
118
+ }
119
+ if ( isset( $custom_data['_wpcf7_redirect_external_url'] ) ) {
120
+ $old_settings['external_url'] = maybe_unserialize( $custom_data['_wpcf7_redirect_external_url'][0] );
121
+ }
122
+ if ( isset( $custom_data['_wpcf7_redirect_use_external_url'] ) ) {
123
+ $old_settings['use_external_url'] = maybe_unserialize( $custom_data['_wpcf7_redirect_use_external_url'][0] );
124
+ }
125
+ if ( isset( $custom_data['_wpcf7_redirect_open_in_new_tab'] ) ) {
126
+ $old_settings['open_in_new_tab'] = maybe_unserialize( $custom_data['_wpcf7_redirect_open_in_new_tab'][0] );
127
+ }
128
+ if ( isset( $custom_data['_wpcf7_redirect_http_build_query'] ) ) {
129
+ $old_settings['http_build_query'] = maybe_unserialize( $custom_data['_wpcf7_redirect_http_build_query'][0] );
130
+ }
131
+ if ( isset( $custom_data['_wpcf7_redirect_http_build_query_selectively'] ) ) {
132
+ $old_settings['http_build_query_selectively'] = maybe_unserialize( $custom_data['_wpcf7_redirect_http_build_query_selectively'][0] );
133
+ }
134
+ if ( isset( $custom_data['_wpcf7_redirect_http_build_query_selectively_fields'] ) ) {
135
+ $old_settings['http_build_query_selectively_fields'] = maybe_unserialize( $custom_data['_wpcf7_redirect_http_build_query_selectively_fields'][0] );
136
+ }
137
+ if ( isset( $custom_data['_wpcf7_redirect_after_sent_script'] ) ) {
138
+ $old_settings['fire_sctipt'] = maybe_unserialize( $custom_data['_wpcf7_redirect_after_sent_script'][0] );
139
+ }
140
+
141
+ if ( isset( $custom_data['_wpcf7_redirect_delay_redirect'] ) && (int) $custom_data['_wpcf7_redirect_delay_redirect'] > 0 ) {
142
+ $old_settings['delay_redirect_seconds'] = $custom_data['_wpcf7_redirect_delay_redirect'][0] / 1000;
143
+ }
144
+
145
+ return $old_settings;
146
+ }
147
+
148
+ /**
149
+ * Get the old contact form 7 to api settings
150
+ */
151
+ public function get_cf7_api_settings() {
152
+ $custom_data = get_post_custom( $this->post_id );
153
+ $old_settings = array();
154
+ if ( isset( $custom_data['_wpcf7_api_data'] ) ) {
155
+ $old_settings['_wpcf7_api_data'] = maybe_unserialize( $custom_data['_wpcf7_api_data'][0] );
156
+ }
157
+ if ( isset( $custom_data['_wpcf7_api_data_map'] ) ) {
158
+ $old_settings['_wpcf7_api_data_map'] = maybe_unserialize( $custom_data['_wpcf7_api_data_map'][0] );
159
+ }
160
+ if ( isset( $custom_data['_template'] ) ) {
161
+ $old_settings['_template'] = maybe_unserialize( $custom_data['_template'][0] );
162
+ }
163
+ if ( isset( $custom_data['_json_template'] ) ) {
164
+ $old_settings['_json_template'] = maybe_unserialize( $custom_data['_json_template'][0] );
165
+ }
166
+ return $old_settings;
167
+ }
168
+
169
+ /**
170
+ * Check if a form has a specific action type
171
+ *
172
+ * @param $type
173
+ * @return boolean
174
+ */
175
+ public function has_action( $type ) {
176
+ $args = array();
177
+ $meta_query = array(
178
+ array(
179
+ 'key' => 'action_type',
180
+ 'value' => $type,
181
+ ),
182
+ );
183
+
184
+ $args['meta_query'] = $meta_query;
185
+ $actions = $this->get_actions( 'default', 1, true, $args );
186
+
187
+ return $actions ? $actions : false;
188
+ }
189
+
190
+ /**
191
+ * Update the plugin has migrated
192
+ *
193
+ * @param $migration_type
194
+ */
195
+ public function update_migration( $migration_type ) {
196
+ update_post_meta( $this->post_id, $migration_type, true );
197
+ }
198
+
199
+ /**
200
+ * Check if a form was migrated from old version
201
+ *
202
+ * @param $migration_type
203
+ * @return boolean
204
+ */
205
+ public function has_migrated( $migration_type ) {
206
+ return get_post_meta( $this->post_id, $migration_type, true );
207
+ }
208
+
209
+ /**
210
+ * Check if there is old data on the DB
211
+ *
212
+ * @param $type
213
+ * @return boolean
214
+ */
215
+ public function has_old_data( $type ) {
216
+ if ( 'migrate_from_cf7_api' === $type ) {
217
+ return $this->get_cf7_api_settings();
218
+ } else {
219
+ return $this->get_cf7_redirection_settings();
220
+ }
221
+ }
222
+
223
+ /**
224
+ * Get a singelton
225
+ *
226
+ * @param string $post_id
227
+ */
228
+ public static function get_instance( $post_id = '' ) {
229
+ if ( null === self::$instance || ( self::$cf7_form->id() !== $post_id && $post_id ) ) {
230
+ self::$instance = new self( $post_id );
231
+ }
232
+ return self::$instance;
233
+ }
234
+
235
+ public function is_new_form() {
236
+ return isset( $this->post_id ) && $this->post_id ? false : true;
237
+ }
238
+
239
+ /**
240
+ * Initialize form
241
+ */
242
+ public function init() {
243
+ // Check if this is a new form
244
+ if ( $this->is_new_form() ) {
245
+ self::$mail_tags = __( 'You need to save your form', 'wpcf7-redirect' );
246
+ include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'save-form.php';
247
+ } else {
248
+ self::$mail_tags = $this->get_cf7_fields();
249
+ $fields = $this->get_fields_values();
250
+ $redirect_type = isset( $fields['redirect_type'] ) && $fields['redirect_type'] ? $fields['redirect_type'] : '';
251
+ $active_tab_title = 'active';
252
+ $active_tab = 'active';
253
+ $this->html = new WPCF7R_html( self::$mail_tags );
254
+ include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'settings.php';
255
+ }
256
+ }
257
+
258
+ /**
259
+ * Get all posts relevant to this contact form
260
+ * returns posts object
261
+ *
262
+ * @param $rule
263
+ */
264
+ public function get_action_posts( $rule ) {
265
+ return $this->redirect_actions->get_action_posts( $rule );
266
+ }
267
+
268
+ /**
269
+ * Get all actions relevant for this contact form
270
+ * Returns action classes
271
+ *
272
+ * @param $rule
273
+ * @param integer $count
274
+ * @param boolean $is_active
275
+ * @param array $args
276
+ */
277
+ public function get_actions( $rule, $count = -1, $is_active = false, $args = array() ) {
278
+ $action_id = $this->get_action_to_submit();
279
+
280
+ if ( $action_id ) {
281
+ $args['post__in'] = array( $action_id );
282
+ }
283
+
284
+ $actions = isset( $this->redirect_actions ) && $this->redirect_actions ? $this->redirect_actions->get_actions( $rule, -1, $is_active, $args ) : array();
285
+
286
+ $this->actions = $actions;
287
+
288
+ return $actions;
289
+ }
290
+
291
+ /**
292
+ * Get all active actions
293
+ */
294
+ public function get_active_actions() {
295
+ return $this->get_actions( 'default', -1, true );
296
+ }
297
+
298
+ /**
299
+ * Save reference for the items removed from the $_POST data
300
+ *
301
+ * @param $removed_data
302
+ */
303
+ public function set_removed_posted_data( $removed_data ) {
304
+ if ( isset( self::$removed_data ) ) {
305
+ self::$removed_data = array_merge( $removed_data, self::$removed_data );
306
+ } else {
307
+ self::$removed_data = $removed_data;
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Get all params removed from the $_POST
313
+ */
314
+ public function get_removed_form_params() {
315
+ return isset( self::$removed_data ) ? self::$removed_data : '';
316
+ }
317
+
318
+ /**
319
+ * Validate and store meta data
320
+ */
321
+ public function store_meta() {
322
+ if ( ! isset( $_POST ) || empty( $_POST['wpcf7-redirect'] ) ) {
323
+ return;
324
+ } else {
325
+ if ( ! wp_verify_nonce( $_POST['wpcf7_redirect_page_metaboxes_nonce'], 'wpcf7_redirect_page_metaboxes' ) ) {
326
+ return;
327
+ }
328
+ $form_id = $this->post_id;
329
+ $fields = $this->get_plugin_fields( $form_id );
330
+ $data = $_POST['wpcf7-redirect'];
331
+ $this->save_meta_fields( $form_id, $fields, $data );
332
+ if ( isset( $data['actions'] ) && $data['actions'] ) {
333
+ $this->save_actions( $data['actions'] );
334
+ }
335
+ }
336
+ }
337
+
338
+ /**
339
+ * Save all actions and actions data
340
+ *
341
+ * @param $actions
342
+ */
343
+ public function save_actions( $actions ) {
344
+ foreach ( $actions as $post_id => $action_fields ) {
345
+ $action = WPCF7R_Action::get_action( $post_id );
346
+ if ( $action ) {
347
+ $action->delete_all_fields();
348
+ foreach ( $action_fields as $action_field_key => $action_field_value ) {
349
+ update_post_meta( $post_id, $action_field_key, $action_field_value );
350
+ }
351
+ if ( isset( $action_fields['post_title'] ) ) {
352
+ $update_post = array(
353
+ 'ID' => $post_id,
354
+ 'post_title' => $action_fields['post_title'],
355
+ );
356
+ wp_update_post( $update_post );
357
+ }
358
+ }
359
+ }
360
+ }
361
+
362
+ /**
363
+ * Save meta fields to cf7 post
364
+ * Save each action to its relevant action post
365
+ *
366
+ * @param $post_id
367
+ * @param $fields
368
+ * @param $data
369
+ */
370
+ public function save_meta_fields( $post_id, $fields, $data ) {
371
+ unset( $data['actions'] );
372
+ if ( $data ) {
373
+ foreach ( $fields as $field ) {
374
+ $value = isset( $data[ $field['name'] ] ) ? $data[ $field['name'] ] : '';
375
+ switch ( $field['type'] ) {
376
+ case 'password':
377
+ case 'text':
378
+ case 'checkbox':
379
+ $value = sanitize_text_field( $value );
380
+ break;
381
+ case 'textarea':
382
+ $value = htmlspecialchars( $value );
383
+ break;
384
+ case 'number':
385
+ $value = intval( $value );
386
+ break;
387
+ case 'url':
388
+ $value = esc_url_raw( $value );
389
+ break;
390
+ }
391
+ update_post_meta( $post_id, '_wpcf7_redirect_' . $field['name'], $value );
392
+ }
393
+ }
394
+ }
395
+
396
+ /**
397
+ * Check if the form has active actions
398
+ */
399
+ public function has_actions() {
400
+ $rule = 'default';
401
+ $count = 1;
402
+ $is_active = true;
403
+ $args = array();
404
+ $actions = $this->get_actions( $rule, $count, $is_active, $args ) ? true : false;
405
+
406
+ return $actions;
407
+ }
408
+
409
+ /**
410
+ * Get specific form fields
411
+ *
412
+ * @param $fields
413
+ */
414
+ public function get_form_fields( $fields ) {
415
+ $forms = array();
416
+ foreach ( $fields as $field ) {
417
+ $forms[ $this->post_id ][ $field['name'] ] = get_post_meta( $this->post_id, '_wpcf7_redirect_' . $field['name'], true );
418
+ if ( 'textarea' === $field['type'] ) {
419
+ $forms[ $this->post_id ][ $field['name'] ] = $forms[ $this->post_id ][ $field['name'] ];
420
+ }
421
+ }
422
+
423
+ // Thank you page URL is a little bit different...
424
+ $forms[ $this->post_id ]['thankyou_page_url'] = $forms[ $this->post_id ]['page_id'] ? get_permalink( $forms[ $this->post_id ]['page_id'] ) : '';
425
+ return reset( $forms );
426
+ }
427
+
428
+ /**
429
+ * Get rules for a specific contact form
430
+ */
431
+ public function get_redirect_rules() {
432
+ return get_post_meta( $this->post_id, '_wpcf7_redirect_' . $field['name'], true );
433
+ }
434
+
435
+ /**
436
+ * Get all fields values
437
+ */
438
+ public function get_fields_values() {
439
+ $fields = $this->get_plugin_fields();
440
+ foreach ( $fields as $field ) {
441
+ $values[ $field['name'] ] = get_post_meta( $this->post_id, '_wpcf7_redirect_' . $field['name'], true );
442
+ }
443
+ return $values;
444
+ }
445
+
446
+ /**
447
+ * Create plugin fields
448
+ */
449
+ public function get_plugin_fields() {
450
+ $fields = array_merge(
451
+ WPCF7r_Form_Helper::get_plugin_default_fields(),
452
+ array(
453
+ array(
454
+ 'name' => 'blocks',
455
+ 'type' => 'blocks',
456
+ ),
457
+ )
458
+ );
459
+ return $fields;
460
+ }
461
+
462
+ /**
463
+ * Get the contact form id
464
+ */
465
+ public function get_id() {
466
+ return $this->post_id;
467
+ }
468
+
469
+ /**
470
+ * Get the form fields for usage on the selectors
471
+ */
472
+ public function get_cf7_fields() {
473
+ $tags = self::get_mail_tags();
474
+ return $tags;
475
+ }
476
+
477
+ /**
478
+ * Get special mail tags
479
+ */
480
+ static function get_special_mail_tags() {
481
+ $mailtags = array();
482
+ $special_mail_tags = array(
483
+ '_remote_ip',
484
+ '_user_agent',
485
+ '_url',
486
+ '_date',
487
+ '_time',
488
+ '_post_id',
489
+ '_post_name',
490
+ '_post_title',
491
+ '_post_url',
492
+ '_post_author',
493
+ '_post_author_email',
494
+ '_site_title',
495
+ '_site_description',
496
+ '_site_url',
497
+ '_site_admin_email',
498
+ 'user_login',
499
+ 'user_email',
500
+ 'user_url',
501
+ );
502
+
503
+ foreach ( $special_mail_tags as $special_mail_tag ) {
504
+ $tag = new WPCF7_MailTag( $special_mail_tag, $special_mail_tag, array() );
505
+ $mailtags[] = $tag;
506
+ }
507
+
508
+ return $mailtags;
509
+ }
510
+
511
+ /**
512
+ * Collect the mail tags from the form
513
+ */
514
+ static function get_mail_tags() {
515
+ // If this is a new form there are no tags yet
516
+ if ( ! isset( self::$cf7_form ) || ! self::$cf7_form ) {
517
+ return;
518
+ }
519
+
520
+ $tags = apply_filters( 'wpcf7r_collect_mail_tags', self::$cf7_form->scan_form_tags() );
521
+
522
+ foreach ( (array) $tags as $tag ) {
523
+ $type = trim( $tag['type'], ' *' );
524
+ if ( empty( $type ) || empty( $tag['name'] ) ) {
525
+ continue;
526
+ } elseif ( ! empty( $args['include'] ) ) {
527
+ if ( ! in_array( $type, $args['include'], true ) ) {
528
+ continue;
529
+ }
530
+ } elseif ( ! empty( $args['exclude'] ) ) {
531
+ if ( in_array( $type, $args['exclude'], true ) ) {
532
+ continue;
533
+ }
534
+ }
535
+ $mailtags[] = $tag;
536
+ }
537
+
538
+ // create an instance to get the current form instance
539
+ $instance = self::get_instance( self::$cf7_form );
540
+
541
+ // add a save lead tag in case save lead action is on
542
+ if ( $instance->has_action( 'save_lead' ) ) {
543
+ $scanned_tag = array(
544
+ 'type' => 'lead_id',
545
+ 'basetype' => trim( '[lead_id]', '*' ),
546
+ 'name' => 'lead_id',
547
+ 'options' => array(),
548
+ 'raw_values' => array(),
549
+ 'values' => array(
550
+ WPCF7R_Action::get_lead_id(),
551
+ ),
552
+ 'pipes' => null,
553
+ 'labels' => array(),
554
+ 'attr' => '',
555
+ 'content' => '',
556
+ );
557
+ $mailtags[] = new WPCF7_FormTag( $scanned_tag );
558
+ }
559
+
560
+ return $mailtags;
561
+ }
562
+
563
+ /**
564
+ * Process actions that are relevant for validation process
565
+ */
566
+ public function process_validation_actions() {
567
+ $actions = $this->get_active_actions();
568
+ $results = array();
569
+
570
+ if ( $actions ) {
571
+ foreach ( $actions as $action ) {
572
+ $action_result = $action->process_validation( self::get_submission() );
573
+ if ( $action_result ) {
574
+ $results[ $action->get_type() ][] = $action_result;
575
+ }
576
+ }
577
+ }
578
+ return $results;
579
+ }
580
+
581
+ /**
582
+ * Get validation object
583
+ */
584
+ public static function get_validation_obj() {
585
+ return self::$wpcf_validation_obj;
586
+ }
587
+
588
+ /**
589
+ * Get validation object $tags
590
+ */
591
+ public static function get_validation_obj_tags() {
592
+ $validation_obj = self::get_validation_obj();
593
+ return isset( $validation_obj->tags ) ? $validation_obj->tags : '';
594
+ }
595
+
596
+ /**
597
+ * Save a referrence to the validaiont object
598
+ * This will enable invalidating tags later on
599
+ *
600
+ * @param object $wpcf_validation_obj
601
+ */
602
+ public function set_validation_obj( $wpcf_validation_obj ) {
603
+ self::$wpcf_validation_obj = $wpcf_validation_obj;
604
+ }
605
+
606
+ /**
607
+ * Handles submission actions
608
+ */
609
+ public function process_actions() {
610
+ // get all active actions
611
+ $actions = $this->get_active_actions();
612
+ // prepeare the results array
613
+ $results = array();
614
+ // get removed fom data
615
+ self::$submission->removed_posted_data = $this->get_removed_form_params();
616
+
617
+ if ( $actions ) {// loop through actions and process
618
+ foreach ( $actions as $action ) {
619
+ // save the validation object in case this action manipulates validations
620
+ // do the action
621
+ $action_result = $action->process_action( $this );
622
+ // add the action to the results array
623
+ $results[ $action->get_type() ][] = $action_result;
624
+ self::$processed_actions[] = $action;
625
+ }
626
+ } else {
627
+ return false;
628
+ }
629
+
630
+ return $results;
631
+ }
632
+
633
+ /**
634
+ * Get all processed actions
635
+ */
636
+ public function get_processed_actions() {
637
+ return isset( self::$processed_actions ) && self::$processed_actions ? self::$processed_actions : '';
638
+ }
639
+
640
+ /**
641
+ * Check if actions hold one last thing to do before returning result to the user
642
+ */
643
+ public function maybe_perform_pre_result_action() {
644
+ $actions = $this->get_processed_actions();
645
+ if ( $actions ) {
646
+ foreach ( $actions as $action ) {
647
+ $action->maybe_perform_pre_result_action();
648
+ }
649
+ }
650
+ }
651
+ }
classes/class-wpcf7r-lead.php CHANGED
@@ -1,197 +1,197 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Lead - Container class that handles lead
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- class WPCF7R_Lead {
9
-
10
- /**
11
- * Create an instance
12
- * Save the post id and post reference
13
- *
14
- * @param string $post_id
15
- */
16
- public function __construct( $post_id = '' ) {
17
- if ( is_object( $post_id ) ) {
18
- $this->post_id = $post_id->ID;
19
- $this->post = $post_id;
20
- } else {
21
- $this->post_id = $post_id;
22
- $this->post = $post_id;
23
- }
24
- }
25
-
26
- /**
27
- * Update submitted form data
28
- *
29
- * @param array $args
30
- */
31
- public function update_lead_data( $args = array() ) {
32
- if ( $args ) {
33
- foreach ( $args as $meta_key => $meta_value ) {
34
- update_post_meta( $this->post_id, $meta_key, $meta_value );
35
- }
36
- }
37
- }
38
-
39
- /**
40
- * Return the lead ID
41
- */
42
- public function get_id() {
43
- return $this->post_id;
44
- }
45
-
46
- /**
47
- * Get the post title
48
- */
49
- public function get_title() {
50
- return get_the_title( $this->get_id() );
51
- }
52
-
53
- /**
54
- * Update the type of lead
55
- *
56
- * @param $lead_type
57
- */
58
- public function update_lead_type( $lead_type ) {
59
- update_post_meta( $this->post_id, 'lead_type', $lead_type );
60
- }
61
-
62
- /**
63
- * Save the action reference and results
64
- * @param $action_id
65
- * @param $action_type
66
- * @param $action_results
67
- */
68
- public function add_action_debug( $action_id, $action_type, $action_results ) {
69
- $action_details = array(
70
- 'action_id' => $action_id,
71
- 'results' => $action_results,
72
- );
73
- add_post_meta( $this->post_id, $action_type, $action_details );
74
- }
75
-
76
- /**
77
- * Get the creation post of the lead
78
- */
79
- public function get_date() {
80
- return get_the_date( get_option( 'date_format' ), $this->post_id );
81
- }
82
-
83
- /**
84
- * Get the creation post of the lead
85
- */
86
- public function get_time() {
87
- return get_the_date( get_option( 'time_format' ), $this->post_id );
88
- }
89
-
90
- /**
91
- * Get the lead type
92
- */
93
- public function get_lead_type() {
94
- return get_post_meta( $this->post_id, 'lead_type', true );
95
- }
96
-
97
- /**
98
- * Save the user submitted files
99
- *
100
- * @return void
101
- */
102
- public function update_lead_files( $files ) {
103
- update_post_meta( $this->post_id, 'files', $files );
104
- }
105
-
106
- /**
107
- * Get lead fields
108
- */
109
- public function get_lead_fields() {
110
- $action_id = get_post_meta( $this->post_id, 'cf7_action_id', true );
111
-
112
- $custom_meta_fields = get_post_custom( $this->post_id );
113
- $lead_fields = array();
114
-
115
- $action = WPCF7R_Action::get_action( (int) $action_id );
116
-
117
- if ( $action_id && $action ) {
118
-
119
- $fields = maybe_unserialize( $action->get( 'leads_map' ) );
120
-
121
- foreach ( $fields as $field_key => $field_value ) {
122
- if ( 'lead_id' === $field_key ) {
123
- continue;
124
- } else {
125
- if ( isset( $custom_meta_fields[ $field_key ] ) ) {
126
- $value = maybe_unserialize( $custom_meta_fields[ $field_key ][0] );
127
- } elseif ( isset( $custom_meta_fields['files'] ) && $custom_meta_fields['files'] ) {
128
- $value = maybe_unserialize( $custom_meta_fields['files'][0] );
129
- $value = isset( $value[ $field_key ] ) && $value[ $field_key ] ? $value[ $field_key ] : '';
130
- }
131
- }
132
-
133
- if ( is_array( $value ) ) {
134
- if ( isset( $value['path'] ) ) {
135
- $lead_fields[ $field_key ] = array(
136
- 'type' => 'download',
137
- 'placeholder' => '',
138
- 'value' => $value['base64_file'],
139
- 'filetype' => $value['type'],
140
- 'filename' => $value['name'],
141
- 'label' => isset( $field_value['tag'] ) && $field_value['tag'] ? $field_value['tag'] : __( 'File', 'wpcf7-redirect' ),
142
- 'name' => $field_key,
143
- 'prefix' => '',
144
- );
145
- } else {
146
- foreach ( $value as $value_field_key => $value_field_value ) {
147
- $lead_fields[ $field_key . '-' . $value_field_key ] = array(
148
- 'type' => 'text',
149
- 'placeholder' => '',
150
- 'label' => isset( $field_value['tag'] ) && $field_value['tag'] ? $field_value['tag'] : $field_key,
151
- 'name' => $field_key,
152
- 'value' => maybe_unserialize( $value_field_value ),
153
- 'prefix' => '',
154
- );
155
- }
156
- }
157
- } else {
158
- $lead_fields[ $field_key ] = array(
159
- 'type' => 'text',
160
- 'placeholder' => '',
161
- 'value' => $value,
162
- 'label' => isset( $field_value['tag'] ) && $field_value['tag'] ? $field_value['tag'] : $field_key,
163
- 'name' => $field_key,
164
- 'prefix' => '',
165
- );
166
- }
167
- }
168
- } else {
169
- foreach ( $custom_meta_fields as $field_key => $field_value ) {
170
- $value = maybe_unserialize( $field_value[0] );
171
- if ( is_array( $value ) ) {
172
- foreach ( $value as $value_field_key => $value_field_value ) {
173
- $lead_fields[ $field_key . '-' . $value_field_key ] = array(
174
- 'type' => 'text',
175
- 'placeholder' => '',
176
- 'label' => $field_key,
177
- 'name' => $field_key,
178
- 'value' => maybe_unserialize( $value_field_value ),
179
- 'prefix' => '',
180
- );
181
- }
182
- } else {
183
- $lead_fields[ $field_key ] = array(
184
- 'type' => 'text',
185
- 'placeholder' => '',
186
- 'value' => $value,
187
- 'label' => $field_key,
188
- 'name' => $field_key,
189
- 'prefix' => '',
190
- );
191
- }
192
- }
193
- }
194
-
195
- return apply_filters( 'wpcf7r_fields' , $lead_fields );
196
- }
197
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Lead - Container class that handles lead
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ class WPCF7R_Lead {
9
+
10
+ /**
11
+ * Create an instance
12
+ * Save the post id and post reference
13
+ *
14
+ * @param string $post_id
15
+ */
16
+ public function __construct( $post_id = '' ) {
17
+ if ( is_object( $post_id ) ) {
18
+ $this->post_id = $post_id->ID;
19
+ $this->post = $post_id;
20
+ } else {
21
+ $this->post_id = $post_id;
22
+ $this->post = $post_id;
23
+ }
24
+ }
25
+
26
+ /**
27
+ * Update submitted form data
28
+ *
29
+ * @param array $args
30
+ */
31
+ public function update_lead_data( $args = array() ) {
32
+ if ( $args ) {
33
+ foreach ( $args as $meta_key => $meta_value ) {
34
+ update_post_meta( $this->post_id, $meta_key, $meta_value );
35
+ }
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Return the lead ID
41
+ */
42
+ public function get_id() {
43
+ return $this->post_id;
44
+ }
45
+
46
+ /**
47
+ * Get the post title
48
+ */
49
+ public function get_title() {
50
+ return get_the_title( $this->get_id() );
51
+ }
52
+
53
+ /**
54
+ * Update the type of lead
55
+ *
56
+ * @param $lead_type
57
+ */
58
+ public function update_lead_type( $lead_type ) {
59
+ update_post_meta( $this->post_id, 'lead_type', $lead_type );
60
+ }
61
+
62
+ /**
63
+ * Save the action reference and results
64
+ * @param $action_id
65
+ * @param $action_type
66
+ * @param $action_results
67
+ */
68
+ public function add_action_debug( $action_id, $action_type, $action_results ) {
69
+ $action_details = array(
70
+ 'action_id' => $action_id,
71
+ 'results' => $action_results,
72
+ );
73
+ add_post_meta( $this->post_id, $action_type, $action_details );
74
+ }
75
+
76
+ /**
77
+ * Get the creation post of the lead
78
+ */
79
+ public function get_date() {
80
+ return get_the_date( get_option( 'date_format' ), $this->post_id );
81
+ }
82
+
83
+ /**
84
+ * Get the creation post of the lead
85
+ */
86
+ public function get_time() {
87
+ return get_the_date( get_option( 'time_format' ), $this->post_id );
88
+ }
89
+
90
+ /**
91
+ * Get the lead type
92
+ */
93
+ public function get_lead_type() {
94
+ return get_post_meta( $this->post_id, 'lead_type', true );
95
+ }
96
+
97
+ /**
98
+ * Save the user submitted files
99
+ *
100
+ * @return void
101
+ */
102
+ public function update_lead_files( $files ) {
103
+ update_post_meta( $this->post_id, 'files', $files );
104
+ }
105
+
106
+ /**
107
+ * Get lead fields
108
+ */
109
+ public function get_lead_fields() {
110
+ $action_id = get_post_meta( $this->post_id, 'cf7_action_id', true );
111
+
112
+ $custom_meta_fields = get_post_custom( $this->post_id );
113
+ $lead_fields = array();
114
+
115
+ $action = WPCF7R_Action::get_action( (int) $action_id );
116
+
117
+ if ( $action_id && $action ) {
118
+
119
+ $fields = maybe_unserialize( $action->get( 'leads_map' ) );
120
+
121
+ foreach ( $fields as $field_key => $field_value ) {
122
+ if ( 'lead_id' === $field_key ) {
123
+ continue;
124
+ } else {
125
+ if ( isset( $custom_meta_fields[ $field_key ] ) ) {
126
+ $value = maybe_unserialize( $custom_meta_fields[ $field_key ][0] );
127
+ } elseif ( isset( $custom_meta_fields['files'] ) && $custom_meta_fields['files'] ) {
128
+ $value = maybe_unserialize( $custom_meta_fields['files'][0] );
129
+ $value = isset( $value[ $field_key ] ) && $value[ $field_key ] ? $value[ $field_key ] : '';
130
+ }
131
+ }
132
+
133
+ if ( is_array( $value ) ) {
134
+ if ( isset( $value['path'] ) ) {
135
+ $lead_fields[ $field_key ] = array(
136
+ 'type' => 'download',
137
+ 'placeholder' => '',
138
+ 'value' => $value['base64_file'],
139
+ 'filetype' => $value['type'],
140
+ 'filename' => $value['name'],
141
+ 'label' => isset( $field_value['tag'] ) && $field_value['tag'] ? $field_value['tag'] : __( 'File', 'wpcf7-redirect' ),
142
+ 'name' => $field_key,
143
+ 'prefix' => '',
144
+ );
145
+ } else {
146
+ foreach ( $value as $value_field_key => $value_field_value ) {
147
+ $lead_fields[ $field_key . '-' . $value_field_key ] = array(
148
+ 'type' => 'text',
149
+ 'placeholder' => '',
150
+ 'label' => isset( $field_value['tag'] ) && $field_value['tag'] ? $field_value['tag'] : $field_key,
151
+ 'name' => $field_key,
152
+ 'value' => maybe_unserialize( $value_field_value ),
153
+ 'prefix' => '',
154
+ );
155
+ }
156
+ }
157
+ } else {
158
+ $lead_fields[ $field_key ] = array(
159
+ 'type' => 'text',
160
+ 'placeholder' => '',
161
+ 'value' => $value,
162
+ 'label' => isset( $field_value['tag'] ) && $field_value['tag'] ? $field_value['tag'] : $field_key,
163
+ 'name' => $field_key,
164
+ 'prefix' => '',
165
+ );
166
+ }
167
+ }
168
+ } else {
169
+ foreach ( $custom_meta_fields as $field_key => $field_value ) {
170
+ $value = maybe_unserialize( $field_value[0] );
171
+ if ( is_array( $value ) ) {
172
+ foreach ( $value as $value_field_key => $value_field_value ) {
173
+ $lead_fields[ $field_key . '-' . $value_field_key ] = array(
174
+ 'type' => 'text',
175
+ 'placeholder' => '',
176
+ 'label' => $field_key,
177
+ 'name' => $field_key,
178
+ 'value' => maybe_unserialize( $value_field_value ),
179
+ 'prefix' => '',
180
+ );
181
+ }
182
+ } else {
183
+ $lead_fields[ $field_key ] = array(
184
+ 'type' => 'text',
185
+ 'placeholder' => '',
186
+ 'value' => $value,
187
+ 'label' => $field_key,
188
+ 'name' => $field_key,
189
+ 'prefix' => '',
190
+ );
191
+ }
192
+ }
193
+ }
194
+
195
+ return apply_filters( 'wpcf7r_fields' , $lead_fields );
196
+ }
197
+ }
classes/class-wpcf7r-leads-manager.php CHANGED
@@ -1,422 +1,422 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Leads_Manager - Container class that handles leads management
4
- */
5
- defined( 'ABSPATH' ) || exit;
6
-
7
- class WPCF7R_Leads_Manager {
8
- /**
9
- * Save a reference to the last lead inserted to the DB
10
- */
11
- public static $new_lead_id;
12
-
13
- /**
14
- * Define the leads post type
15
- *
16
- * @var string $cf7_id - contact form id.
17
- */
18
- public static $post_type = 'wpcf7r_leads';
19
-
20
- /**
21
- * Main leads manager initializaition.
22
- *
23
- * @param [string] $cf7_id - contact form id.
24
- */
25
- public function __construct( $cf7_id ) {
26
- $this->cf7_id = $cf7_id;
27
-
28
- $this->leads = array();
29
-
30
- }
31
-
32
- /**
33
- * Admin init hook.
34
- *
35
- * @return void
36
- */
37
- public static function admin_init_scripts() {
38
- add_filter( 'manage_wpcf7r_leads_posts_columns', array( 'WPCF7R_Leads_Manager', 'set_custom_edit_wpcf7r_leads_columns' ) );
39
- add_action( 'manage_wpcf7r_leads_posts_custom_column', array( 'WPCF7R_Leads_Manager', 'custom_wpcf7r_leads_column' ), 10, 2 );
40
- add_action( 'manage_posts_extra_tablenav', array( 'WPCF7R_Leads_Manager', 'display_export_button' ), 10, 2 );
41
- }
42
-
43
- /**
44
- * Display custom post type columns on edit list.
45
- *
46
- * @param [type] $column - the key of the column.
47
- * @param [int] $post_id - the lead id.
48
- * @return void
49
- */
50
- public static function custom_wpcf7r_leads_column( $column, $lead_id ) {
51
- $action_id = get_post_meta( $lead_id, 'cf7_action_id', true );
52
-
53
- $action = WPCF7R_Action::get_action( (int) $action_id );
54
-
55
- if ( $action ) {
56
- $action->display_action_column_content( $column, $lead_id );
57
- } else {
58
- switch ( $column ) {
59
- case 'data_preview':
60
- echo __( 'Preview is not available: action does not exist', 'wpcf7-redirect' );
61
- break;
62
- case 'form':
63
- $form_id = get_post_meta( $lead_id, 'cf7_form', true );
64
- echo WPCF7r_Form_Helper::get_cf7_link_html( $form_id );
65
- break;
66
- }
67
- }
68
- }
69
-
70
- /**
71
- * Adds an export button on the edit post list.
72
- *
73
- * @param [type] $which
74
- * @return void
75
- */
76
- public static function display_export_button( $which ) {
77
- global $typenow;
78
-
79
- if ( self::get_post_type() === $typenow && 'top' === $which ) {
80
- ?>
81
- <input type="submit" name="export_leads" class="button button-primary" value="<?php _e( 'Export' ); ?>" />
82
- <?php
83
- }
84
- }
85
-
86
- /**
87
- * Export the current filtered list.
88
- *
89
- * @return void
90
- */
91
- public static function export_current_filtered_view() {
92
-
93
- if ( isset( $_GET['export_leads'] ) ) {
94
- $meta_query = array();
95
-
96
- $args = array(
97
- 'post_type' => self::get_post_type(),
98
- 'post_status' => 'any',
99
- 'posts_per_page' => -1,
100
- );
101
-
102
- if ( isset( $_GET['cf7_form'] ) && $_GET['cf7_form'] ) {
103
- $meta_query[] = array(
104
- 'key' => 'cf7_form',
105
- 'value' => (int) $_GET['cf7_form'],
106
- );
107
- }
108
-
109
- if ( isset( $_GET['m'] ) && $_GET['m'] ) {
110
-
111
- $month = substr( $_GET['m'], 4, 2 );
112
- $year = substr( $_GET['m'], 0, 4 );
113
-
114
- $args['date_query'] = array(
115
- array(
116
- 'year' => $year,
117
- 'month' => $month,
118
- ),
119
- );
120
- }
121
-
122
- if ( $meta_query ) {
123
- $args['meta_query'] = $meta_query;
124
- }
125
-
126
- $arr_post = get_posts( $args );
127
-
128
- $forms = array();
129
-
130
- /**
131
- * Order leads by form.
132
- * Because the forms are dynamic we create diffrent headers for each form.
133
- */
134
- foreach ( $arr_post as $lead ) {
135
- $form_id = get_post_meta( $lead->ID, 'cf7_form', true );
136
-
137
- $custom_fields = get_post_custom( $lead->ID );
138
-
139
- foreach ( $custom_fields as $custom_field_key => $custom_field_value ) {
140
- $value = maybe_unserialize( reset( $custom_field_value ) );
141
-
142
- if ( ! is_array( $value ) && '_' !== substr( $custom_field_key, 0, 1 ) ) {
143
- $forms[ $form_id ]['leads'][ $lead->ID ][ $custom_field_key ] = $value;
144
- $forms[ $form_id ]['headers'][ $custom_field_key ] = $custom_field_key;
145
- }
146
- }
147
-
148
- $forms[ $form_id ]['leads'][ $lead->ID ]['form_name'] = get_the_title( $form_id ) ? get_the_title( $form_id ) : __( 'Form does not exist', 'wpcf7-redirect' );
149
- $forms[ $form_id ]['leads'][ $lead->ID ]['form_id'] = $form_id;
150
- $forms[ $form_id ]['leads'][ $lead->ID ]['record_date'] = get_the_date( 'Y-m-d H:i', $lead->ID );
151
- }
152
-
153
- if ( $forms ) {
154
-
155
- header( 'Content-type: text/csv' );
156
- header( 'Content-Disposition: attachment; filename="wp-leads.csv"' );
157
- header( 'Pragma: no-cache' );
158
- header( 'Expires: 0' );
159
-
160
- $file = fopen( 'php://output', 'w' );
161
-
162
- // Print UTF8 encoding.
163
- fprintf( $file, chr( 0xEF ) . chr( 0xBB ) . chr( 0xBF ) );
164
-
165
- foreach ( $forms as $form_id => $form ) {
166
- // Add default headers.
167
- $form['headers']['form_name'] = 'form_name';
168
- $form['headers']['form_id'] = 'form_id';
169
- $form['headers']['record_date'] = 'record_date';
170
-
171
- // Print headers.
172
- fputcsv( $file, $form['headers'] );
173
-
174
- foreach ( $form['leads'] as $lead ) {
175
- $values_to_print = array();
176
-
177
- foreach ( $form['headers'] as $header_key ) {
178
- $values_to_print[ $header_key ] = isset( $lead[ $header_key ] ) ? $lead[ $header_key ] : '';
179
- }
180
-
181
- fputcsv( $file, $values_to_print );
182
- }
183
-
184
- fputcsv( $file, array() );
185
- }
186
-
187
- exit();
188
- }
189
- }
190
- }
191
-
192
-
193
- /**
194
- * Undocumented function
195
- *
196
- * @param [array] $columns - list of columns.
197
- * @return [array] - the key of the column.
198
- */
199
- public static function set_custom_edit_wpcf7r_leads_columns( $columns ) {
200
-
201
- $columns['form'] = __( 'Form', 'wpcf7-redirect' );
202
- $columns['data_preview'] = __( 'Preview', 'wpcf7-redirect' );
203
-
204
- return $columns;
205
- }
206
- /**
207
- * Get the leads post type
208
- */
209
- public static function get_post_type() {
210
- return self::$post_type;
211
- }
212
-
213
- /**
214
- * Add A select filter on edit.php screen to filter records by form
215
- */
216
- public static function add_form_filter() {
217
-
218
- $post_type = isset( $_GET['post_type'] ) ? sanitize_text_field( $_GET['post_type'] ) : '';
219
-
220
- if ( $post_type && self::get_post_type() === $post_type ) {
221
- $values = array();
222
-
223
- $forms = get_posts(
224
- array(
225
- 'post_status' => 'any',
226
- 'posts_per_page' => -1,
227
- 'post_type' => 'wpcf7_contact_form',
228
- )
229
- );
230
-
231
- foreach ( $forms as $form ) :
232
- $values[ $form->post_title ] = $form->ID;
233
- endforeach;
234
-
235
- ?>
236
-
237
- <select name="cf7_form">
238
- <option value=""><?php _e( 'Form', 'wpcf7-redirect' ); ?></option>
239
- <?php
240
- $current_v = isset( $_GET['cf7_form'] ) ? (int) $_GET['cf7_form'] : '';
241
-
242
- foreach ( $values as $label => $value ) {
243
- printf(
244
- '<option value="%s"%s>%s</option>',
245
- $value,
246
- $value === $current_v ? ' selected="selected"' : '',
247
- $label
248
- );
249
- }
250
- ?>
251
- </select>
252
- <?php
253
- }
254
- }
255
-
256
- /**
257
- * Search by filters
258
- *
259
- * @param [object] $query - WP_Query object.
260
- * @return [object] - WP_Query.
261
- */
262
- public static function filter_request_query( $query ) {
263
- // modify the query only if it admin and main query.
264
- if ( ! ( is_admin() && $query->is_main_query() ) ) {
265
- return $query;
266
- }
267
-
268
- // we want to modify the query for the targeted custom post and filter option.
269
- if ( ! isset( $query->query['post_type'] ) || ( ! ( self::get_post_type() === $query->query['post_type'] && isset( $_REQUEST['cf7_form'] ) ) ) ) {
270
- return $query;
271
- }
272
-
273
- // for the default value of our filter no modification is required.
274
- if ( 0 === (int) $_REQUEST['cf7_form'] ) {
275
- return $query;
276
- }
277
-
278
- // modify the query_vars.
279
- $posted_value = isset( $_REQUEST['cf7_form'] ) && (int) $_REQUEST['cf7_form'] ? (int) $_REQUEST['cf7_form'] : '';
280
-
281
- $meta_query = $query->get( 'meta_query' );
282
-
283
- if ( ! $meta_query ) {
284
- $meta_query = array();
285
- }
286
-
287
- $meta_query[] = array(
288
- array(
289
- 'key' => 'cf7_form',
290
- 'value' => $posted_value,
291
- 'compare' => '=',
292
- ),
293
- );
294
-
295
- $query->set( 'meta_query', $meta_query );
296
-
297
- return $query;
298
- }
299
-
300
- /**
301
- * Initialize leads table tab
302
- */
303
- public function init() {
304
- include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'leads . php';
305
- }
306
-
307
- /**
308
- * Get the url to the admin post type list
309
- * Auto filter by selected action
310
- *
311
- * @param [int] $form_id - the contact form id.
312
- * @return [string] - the new url.
313
- */
314
- public static function get_admin_url( $form_id ) {
315
- $url = admin_url( 'edit.php?post_type=' . self::get_post_type() );
316
-
317
- return add_query_arg( 'cf7_form', $form_id, $url );
318
- }
319
-
320
- /**
321
- * Get leads
322
- */
323
- public function get_leads() {
324
- $args = array(
325
- 'post_type' => self::get_post_type(),
326
- 'post_status' => 'private',
327
- 'posts_per_page' => 20,
328
- 'meta_query' => array(
329
- array(
330
- 'key' => 'cf7_form',
331
- 'value' => $this->cf7_id,
332
- ),
333
- ),
334
- );
335
-
336
- $leads_posts = get_posts( $args );
337
-
338
- if ( $leads_posts ) {
339
- foreach ( $leads_posts as $leads_post ) {
340
- $lead = new WPCF7R_Lead( $leads_post );
341
-
342
- $this->leads[] = $lead;
343
- }
344
- }
345
-
346
- return $this->leads;
347
- }
348
-
349
- /**
350
- * Insert new lead
351
- */
352
- public static function insert_lead( $cf7_form_id, $args, $files = array(), $lead_type, $action_id ) {
353
- $args['cf7_form'] = $cf7_form_id;
354
- $args['cf7_action_id'] = $action_id;
355
-
356
- $contact_form_title = get_the_title( $cf7_form_id );
357
-
358
- $new_post = array(
359
- 'post_type' => self::get_post_type(),
360
- 'post_status' => 'private',
361
- 'post_title' => __( 'Lead from contact form: ', 'wpcf7-redirect' ) . $contact_form_title,
362
- );
363
-
364
- self::$new_lead_id = wp_insert_post( $new_post );
365
-
366
- $lead = new WPCF7R_Lead( self::$new_lead_id );
367
-
368
- $lead->update_lead_data( $args );
369
-
370
- $lead->update_lead_files( $files );
371
-
372
- $lead->update_lead_type( $lead_type );
373
-
374
- return $lead;
375
- }
376
-
377
- /**
378
- * Save the action to the db lead
379
- *
380
- * @param $lead_id
381
- * @param $action_name
382
- * @param $details
383
- */
384
- public static function save_action( $lead_id, $action_name, $details ) {
385
- add_post_meta( $lead_id, 'action - ' . $action_name, $details );
386
- }
387
-
388
- /**
389
- * Get a single action row
390
- */
391
- public function get_lead_row( $lead ) {
392
- ob_start();
393
- do_action( 'before_wpcf7r_lead_row', $this );
394
- ?>
395
-
396
- <tr class="primary" data-postid="<?php echo $lead->get_id(); ?>">
397
- <td class="manage-column column-primary sortable desc edit column-id">
398
- <?php echo $lead->get_id(); ?>
399
- <div class="row-actions">
400
- <span class="edit">
401
- <a href="<?php echo get_edit_post_link( $lead->get_id() ); ?>" data-id="<?php echo $lead->get_id(); ?>" aria-label="<?php _e( 'View', 'wpcf7-redirect' ); ?>" target="_blank"><?php _e( 'View', 'wpcf7-redirect' ); ?></a> |
402
- </span>
403
- <span class="trash">
404
- <a href="#" class="submitdelete" data-id="<?php echo $lead->get_id(); ?>" aria-label="<?php _e( 'Move to trash', 'wpcf7-redirect' ); ?>"><?php _e( 'Move to trash', 'wpcf7-redirect' ); ?></a> |
405
- </span>
406
- <?php do_action( 'wpcf7r_after_lead_links', $lead ); ?>
407
- </div>
408
- </td>
409
- <td class="manage-column column-primary sortable desc edit column-date">
410
- <?php echo $lead->get_date(); ?>
411
- </td>
412
- <td class="manage-column column-primary sortable desc edit column-time"><?php echo $lead->get_time(); ?></td>
413
- <td class="manage-column column-primary sortable desc edit column-type"><?php echo $lead->get_lead_type(); ?></td>
414
- <td></td>
415
- </tr>
416
-
417
- <?php
418
- do_action( 'after_wpcf7r_lead_row', $this );
419
-
420
- return apply_filters( 'wpcf7r_get_lead_row', ob_get_clean(), $this );
421
- }
422
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Leads_Manager - Container class that handles leads management
4
+ */
5
+ defined( 'ABSPATH' ) || exit;
6
+
7
+ class WPCF7R_Leads_Manager {
8
+ /**
9
+ * Save a reference to the last lead inserted to the DB
10
+ */
11
+ public static $new_lead_id;
12
+
13
+ /**
14
+ * Define the leads post type
15
+ *
16
+ * @var string $cf7_id - contact form id.
17
+ */
18
+ public static $post_type = 'wpcf7r_leads';
19
+
20
+ /**
21
+ * Main leads manager initializaition.
22
+ *
23
+ * @param [string] $cf7_id - contact form id.
24
+ */
25
+ public function __construct( $cf7_id ) {
26
+ $this->cf7_id = $cf7_id;
27
+
28
+ $this->leads = array();
29
+
30
+ }
31
+
32
+ /**
33
+ * Admin init hook.
34
+ *
35
+ * @return void
36
+ */
37
+ public static function admin_init_scripts() {
38
+ add_filter( 'manage_wpcf7r_leads_posts_columns', array( 'WPCF7R_Leads_Manager', 'set_custom_edit_wpcf7r_leads_columns' ) );
39
+ add_action( 'manage_wpcf7r_leads_posts_custom_column', array( 'WPCF7R_Leads_Manager', 'custom_wpcf7r_leads_column' ), 10, 2 );
40
+ add_action( 'manage_posts_extra_tablenav', array( 'WPCF7R_Leads_Manager', 'display_export_button' ), 10, 2 );
41
+ }
42
+
43
+ /**
44
+ * Display custom post type columns on edit list.
45
+ *
46
+ * @param [type] $column - the key of the column.
47
+ * @param [int] $post_id - the lead id.
48
+ * @return void
49
+ */
50
+ public static function custom_wpcf7r_leads_column( $column, $lead_id ) {
51
+ $action_id = get_post_meta( $lead_id, 'cf7_action_id', true );
52
+
53
+ $action = WPCF7R_Action::get_action( (int) $action_id );
54
+
55
+ if ( $action ) {
56
+ $action->display_action_column_content( $column, $lead_id );
57
+ } else {
58
+ switch ( $column ) {
59
+ case 'data_preview':
60
+ echo __( 'Preview is not available: action does not exist', 'wpcf7-redirect' );
61
+ break;
62
+ case 'form':
63
+ $form_id = get_post_meta( $lead_id, 'cf7_form', true );
64
+ echo WPCF7r_Form_Helper::get_cf7_link_html( $form_id );
65
+ break;
66
+ }
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Adds an export button on the edit post list.
72
+ *
73
+ * @param [type] $which
74
+ * @return void
75
+ */
76
+ public static function display_export_button( $which ) {
77
+ global $typenow;
78
+
79
+ if ( self::get_post_type() === $typenow && 'top' === $which ) {
80
+ ?>
81
+ <input type="submit" name="export_leads" class="button button-primary" value="<?php _e( 'Export' ); ?>" />
82
+ <?php
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Export the current filtered list.
88
+ *
89
+ * @return void
90
+ */
91
+ public static function export_current_filtered_view() {
92
+
93
+ if ( isset( $_GET['export_leads'] ) ) {
94
+ $meta_query = array();
95
+
96
+ $args = array(
97
+ 'post_type' => self::get_post_type(),
98
+ 'post_status' => 'any',
99
+ 'posts_per_page' => -1,
100
+ );
101
+
102
+ if ( isset( $_GET['cf7_form'] ) && $_GET['cf7_form'] ) {
103
+ $meta_query[] = array(
104
+ 'key' => 'cf7_form',
105
+ 'value' => (int) $_GET['cf7_form'],
106
+ );
107
+ }
108
+
109
+ if ( isset( $_GET['m'] ) && $_GET['m'] ) {
110
+
111
+ $month = substr( $_GET['m'], 4, 2 );
112
+ $year = substr( $_GET['m'], 0, 4 );
113
+
114
+ $args['date_query'] = array(
115
+ array(
116
+ 'year' => $year,
117
+ 'month' => $month,
118
+ ),
119
+ );
120
+ }
121
+
122
+ if ( $meta_query ) {
123
+ $args['meta_query'] = $meta_query;
124
+ }
125
+
126
+ $arr_post = get_posts( $args );
127
+
128
+ $forms = array();
129
+
130
+ /**
131
+ * Order leads by form.
132
+ * Because the forms are dynamic we create diffrent headers for each form.
133
+ */
134
+ foreach ( $arr_post as $lead ) {
135
+ $form_id = get_post_meta( $lead->ID, 'cf7_form', true );
136
+
137
+ $custom_fields = get_post_custom( $lead->ID );
138
+
139
+ foreach ( $custom_fields as $custom_field_key => $custom_field_value ) {
140
+ $value = maybe_unserialize( reset( $custom_field_value ) );
141
+
142
+ if ( ! is_array( $value ) && '_' !== substr( $custom_field_key, 0, 1 ) ) {
143
+ $forms[ $form_id ]['leads'][ $lead->ID ][ $custom_field_key ] = $value;
144
+ $forms[ $form_id ]['headers'][ $custom_field_key ] = $custom_field_key;
145
+ }
146
+ }
147
+
148
+ $forms[ $form_id ]['leads'][ $lead->ID ]['form_name'] = get_the_title( $form_id ) ? get_the_title( $form_id ) : __( 'Form does not exist', 'wpcf7-redirect' );
149
+ $forms[ $form_id ]['leads'][ $lead->ID ]['form_id'] = $form_id;
150
+ $forms[ $form_id ]['leads'][ $lead->ID ]['record_date'] = get_the_date( 'Y-m-d H:i', $lead->ID );
151
+ }
152
+
153
+ if ( $forms ) {
154
+
155
+ header( 'Content-type: text/csv' );
156
+ header( 'Content-Disposition: attachment; filename="wp-leads.csv"' );
157
+ header( 'Pragma: no-cache' );
158
+ header( 'Expires: 0' );
159
+
160
+ $file = fopen( 'php://output', 'w' );
161
+
162
+ // Print UTF8 encoding.
163
+ fprintf( $file, chr( 0xEF ) . chr( 0xBB ) . chr( 0xBF ) );
164
+
165
+ foreach ( $forms as $form_id => $form ) {
166
+ // Add default headers.
167
+ $form['headers']['form_name'] = 'form_name';
168
+ $form['headers']['form_id'] = 'form_id';
169
+ $form['headers']['record_date'] = 'record_date';
170
+
171
+ // Print headers.
172
+ fputcsv( $file, $form['headers'] );
173
+
174
+ foreach ( $form['leads'] as $lead ) {
175
+ $values_to_print = array();
176
+
177
+ foreach ( $form['headers'] as $header_key ) {
178
+ $values_to_print[ $header_key ] = isset( $lead[ $header_key ] ) ? $lead[ $header_key ] : '';
179
+ }
180
+
181
+ fputcsv( $file, $values_to_print );
182
+ }
183
+
184
+ fputcsv( $file, array() );
185
+ }
186
+
187
+ exit();
188
+ }
189
+ }
190
+ }
191
+
192
+
193
+ /**
194
+ * Undocumented function
195
+ *
196
+ * @param [array] $columns - list of columns.
197
+ * @return [array] - the key of the column.
198
+ */
199
+ public static function set_custom_edit_wpcf7r_leads_columns( $columns ) {
200
+
201
+ $columns['form'] = __( 'Form', 'wpcf7-redirect' );
202
+ $columns['data_preview'] = __( 'Preview', 'wpcf7-redirect' );
203
+
204
+ return $columns;
205
+ }
206
+ /**
207
+ * Get the leads post type
208
+ */
209
+ public static function get_post_type() {
210
+ return self::$post_type;
211
+ }
212
+
213
+ /**
214
+ * Add A select filter on edit.php screen to filter records by form
215
+ */
216
+ public static function add_form_filter() {
217
+
218
+ $post_type = isset( $_GET['post_type'] ) ? sanitize_text_field( $_GET['post_type'] ) : '';
219
+
220
+ if ( $post_type && self::get_post_type() === $post_type ) {
221
+ $values = array();
222
+
223
+ $forms = get_posts(
224
+ array(
225
+ 'post_status' => 'any',
226
+ 'posts_per_page' => -1,
227
+ 'post_type' => 'wpcf7_contact_form',
228
+ )
229
+ );
230
+
231
+ foreach ( $forms as $form ) :
232
+ $values[ $form->post_title ] = $form->ID;
233
+ endforeach;
234
+
235
+ ?>
236
+
237
+ <select name="cf7_form">
238
+ <option value=""><?php _e( 'Form', 'wpcf7-redirect' ); ?></option>
239
+ <?php
240
+ $current_v = isset( $_GET['cf7_form'] ) ? (int) $_GET['cf7_form'] : '';
241
+
242
+ foreach ( $values as $label => $value ) {
243
+ printf(
244
+ '<option value="%s"%s>%s</option>',
245
+ $value,
246
+ $value === $current_v ? ' selected="selected"' : '',
247
+ $label
248
+ );
249
+ }
250
+ ?>
251
+ </select>
252
+ <?php
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Search by filters
258
+ *
259
+ * @param [object] $query - WP_Query object.
260
+ * @return [object] - WP_Query.
261
+ */
262
+ public static function filter_request_query( $query ) {
263
+ // modify the query only if it admin and main query.
264
+ if ( ! ( is_admin() && $query->is_main_query() ) ) {
265
+ return $query;
266
+ }
267
+
268
+ // we want to modify the query for the targeted custom post and filter option.
269
+ if ( ! isset( $query->query['post_type'] ) || ( ! ( self::get_post_type() === $query->query['post_type'] && isset( $_REQUEST['cf7_form'] ) ) ) ) {
270
+ return $query;
271
+ }
272
+
273
+ // for the default value of our filter no modification is required.
274
+ if ( 0 === (int) $_REQUEST['cf7_form'] ) {
275
+ return $query;
276
+ }
277
+
278
+ // modify the query_vars.
279
+ $posted_value = isset( $_REQUEST['cf7_form'] ) && (int) $_REQUEST['cf7_form'] ? (int) $_REQUEST['cf7_form'] : '';
280
+
281
+ $meta_query = $query->get( 'meta_query' );
282
+
283
+ if ( ! $meta_query ) {
284
+ $meta_query = array();
285
+ }
286
+
287
+ $meta_query[] = array(
288
+ array(
289
+ 'key' => 'cf7_form',
290
+ 'value' => $posted_value,
291
+ 'compare' => '=',
292
+ ),
293
+ );
294
+
295
+ $query->set( 'meta_query', $meta_query );
296
+
297
+ return $query;
298
+ }
299
+
300
+ /**
301
+ * Initialize leads table tab
302
+ */
303
+ public function init() {
304
+ include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'leads . php';
305
+ }
306
+
307
+ /**
308
+ * Get the url to the admin post type list
309
+ * Auto filter by selected action
310
+ *
311
+ * @param [int] $form_id - the contact form id.
312
+ * @return [string] - the new url.
313
+ */
314
+ public static function get_admin_url( $form_id ) {
315
+ $url = admin_url( 'edit.php?post_type=' . self::get_post_type() );
316
+
317
+ return add_query_arg( 'cf7_form', $form_id, $url );
318
+ }
319
+
320
+ /**
321
+ * Get leads
322
+ */
323
+ public function get_leads() {
324
+ $args = array(
325
+ 'post_type' => self::get_post_type(),
326
+ 'post_status' => 'private',
327
+ 'posts_per_page' => 20,
328
+ 'meta_query' => array(
329
+ array(
330
+ 'key' => 'cf7_form',
331
+ 'value' => $this->cf7_id,
332
+ ),
333
+ ),
334
+ );
335
+
336
+ $leads_posts = get_posts( $args );
337
+
338
+ if ( $leads_posts ) {
339
+ foreach ( $leads_posts as $leads_post ) {
340
+ $lead = new WPCF7R_Lead( $leads_post );
341
+
342
+ $this->leads[] = $lead;
343
+ }
344
+ }
345
+
346
+ return $this->leads;
347
+ }
348
+
349
+ /**
350
+ * Insert new lead
351
+ */
352
+ public static function insert_lead( $cf7_form_id, $args, $files = array(), $lead_type, $action_id ) {
353
+ $args['cf7_form'] = $cf7_form_id;
354
+ $args['cf7_action_id'] = $action_id;
355
+
356
+ $contact_form_title = get_the_title( $cf7_form_id );
357
+
358
+ $new_post = array(
359
+ 'post_type' => self::get_post_type(),
360
+ 'post_status' => 'private',
361
+ 'post_title' => __( 'Lead from contact form: ', 'wpcf7-redirect' ) . $contact_form_title,
362
+ );
363
+
364
+ self::$new_lead_id = wp_insert_post( $new_post );
365
+
366
+ $lead = new WPCF7R_Lead( self::$new_lead_id );
367
+
368
+ $lead->update_lead_data( $args );
369
+
370
+ $lead->update_lead_files( $files );
371
+
372
+ $lead->update_lead_type( $lead_type );
373
+
374
+ return $lead;
375
+ }
376
+
377
+ /**
378
+ * Save the action to the db lead
379
+ *
380
+ * @param $lead_id
381
+ * @param $action_name
382
+ * @param $details
383
+ */
384
+ public static function save_action( $lead_id, $action_name, $details ) {
385
+ add_post_meta( $lead_id, 'action - ' . $action_name, $details );
386
+ }
387
+
388
+ /**
389
+ * Get a single action row
390
+ */
391
+ public function get_lead_row( $lead ) {
392
+ ob_start();
393
+ do_action( 'before_wpcf7r_lead_row', $this );
394
+ ?>
395
+
396
+ <tr class="primary" data-postid="<?php echo $lead->get_id(); ?>">
397
+ <td class="manage-column column-primary sortable desc edit column-id">
398
+ <?php echo $lead->get_id(); ?>
399
+ <div class="row-actions">
400
+ <span class="edit">
401
+ <a href="<?php echo get_edit_post_link( $lead->get_id() ); ?>" data-id="<?php echo $lead->get_id(); ?>" aria-label="<?php _e( 'View', 'wpcf7-redirect' ); ?>" target="_blank"><?php _e( 'View', 'wpcf7-redirect' ); ?></a> |
402
+ </span>
403
+ <span class="trash">
404
+ <a href="#" class="submitdelete" data-id="<?php echo $lead->get_id(); ?>" aria-label="<?php _e( 'Move to trash', 'wpcf7-redirect' ); ?>"><?php _e( 'Move to trash', 'wpcf7-redirect' ); ?></a> |
405
+ </span>
406
+ <?php do_action( 'wpcf7r_after_lead_links', $lead ); ?>
407
+ </div>
408
+ </td>
409
+ <td class="manage-column column-primary sortable desc edit column-date">
410
+ <?php echo $lead->get_date(); ?>
411
+ </td>
412
+ <td class="manage-column column-primary sortable desc edit column-time"><?php echo $lead->get_time(); ?></td>
413
+ <td class="manage-column column-primary sortable desc edit column-type"><?php echo $lead->get_lead_type(); ?></td>
414
+ <td></td>
415
+ </tr>
416
+
417
+ <?php
418
+ do_action( 'after_wpcf7r_lead_row', $this );
419
+
420
+ return apply_filters( 'wpcf7r_get_lead_row', ob_get_clean(), $this );
421
+ }
422
+ }
classes/class-wpcf7r-list-table.php CHANGED
@@ -1,133 +1,133 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
-
4
- if ( class_exists( 'WP_List_Table' ) ) {
5
- class WPCF7R_List_Table extends WP_List_Table {
6
-
7
- public $list_data = array();
8
- /**
9
- * Constructor will create the menu item
10
- */
11
- public function __construct( $columns, $data ) {
12
-
13
- parent::__construct();
14
-
15
- $this->list_data = $data;
16
-
17
- $this->columns = $columns;
18
-
19
- }
20
-
21
- /**
22
- * Display the list table page
23
- */
24
- public function list_table_page() {
25
-
26
- $this->prepare_items();
27
-
28
- $this->display();
29
- }
30
-
31
- /**
32
- * Prepare the items for the table to process
33
- */
34
- public function prepare_items() {
35
- $columns = $this->get_columns();
36
- $hidden = $this->get_hidden_columns();
37
- $sortable = $this->get_sortable_columns();
38
- $data = $this->list_data;
39
- $per_page = 2;
40
- $current_page = $this->get_pagenum();
41
-
42
- usort( $data, array( &$this, 'sort_data' ) );
43
- $total_items = count( $data );
44
-
45
- $this->set_pagination_args(
46
- array(
47
- 'total_items' => $total_items,
48
- 'per_page' => $per_page,
49
- )
50
- );
51
-
52
- $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
53
-
54
- $this->_column_headers = array( $columns, $hidden, $sortable );
55
- $this->items = $data;
56
-
57
- }
58
-
59
- /**
60
- * Override the parent columns method. Defines the columns to use in your listing table
61
- */
62
- public function get_columns() {
63
- return $this->columns;
64
- }
65
-
66
- /**
67
- * Define which columns are hidden
68
- */
69
- public function get_hidden_columns() {
70
- return array();
71
- }
72
-
73
- /**
74
- * Define the sortable columns
75
- */
76
- public function get_sortable_columns() {
77
- return array( 'title' => array( 'title', false ) );
78
- }
79
-
80
- /**
81
- * Define what data to show on each column of the table
82
- *
83
- * @param $item
84
- * @param $column_name
85
- */
86
- public function column_default( $item, $column_name ) {
87
-
88
- switch ( $column_name ) {
89
- case 'id':
90
- case 'title':
91
- case 'description':
92
- case 'year':
93
- case 'director':
94
- case 'rating':
95
- return $item[ $column_name ];
96
-
97
- default:
98
- return print_r( $item, true );
99
- }
100
- }
101
-
102
- /**
103
- * Allows you to sort the data by the variables set in the $_GET
104
- *
105
- * @param $a
106
- * @param $b
107
- */
108
- private function sort_data( $a, $b ) {
109
- // Set defaults
110
- $orderby = 'title';
111
- $order = 'asc';
112
-
113
- // If orderby is set, use this as the sort column
114
- if ( ! empty( $_GET['orderby'] ) ) {
115
- $orderby = $_GET['orderby'];
116
- }
117
-
118
- // If order is set use this as the order
119
- if ( ! empty( $_GET['order'] ) ) {
120
- $order = $_GET['order'];
121
- }
122
-
123
- $result = strcmp( $a[ $orderby ], $b[ $orderby ] );
124
-
125
- if ( 'asc' === $order ) {
126
- return $result;
127
- }
128
-
129
- return -$result;
130
- }
131
- }
132
- }
133
-
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit;
3
+
4
+ if ( class_exists( 'WP_List_Table' ) ) {
5
+ class WPCF7R_List_Table extends WP_List_Table {
6
+
7
+ public $list_data = array();
8
+ /**
9
+ * Constructor will create the menu item
10
+ */
11
+ public function __construct( $columns, $data ) {
12
+
13
+ parent::__construct();
14
+
15
+ $this->list_data = $data;
16
+
17
+ $this->columns = $columns;
18
+
19
+ }
20
+
21
+ /**
22
+ * Display the list table page
23
+ */
24
+ public function list_table_page() {
25
+
26
+ $this->prepare_items();
27
+
28
+ $this->display();
29
+ }
30
+
31
+ /**
32
+ * Prepare the items for the table to process
33
+ */
34
+ public function prepare_items() {
35
+ $columns = $this->get_columns();
36
+ $hidden = $this->get_hidden_columns();
37
+ $sortable = $this->get_sortable_columns();
38
+ $data = $this->list_data;
39
+ $per_page = 2;
40
+ $current_page = $this->get_pagenum();
41
+
42
+ usort( $data, array( &$this, 'sort_data' ) );
43
+ $total_items = count( $data );
44
+
45
+ $this->set_pagination_args(
46
+ array(
47
+ 'total_items' => $total_items,
48
+ 'per_page' => $per_page,
49
+ )
50
+ );
51
+
52
+ $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
53
+
54
+ $this->_column_headers = array( $columns, $hidden, $sortable );
55
+ $this->items = $data;
56
+
57
+ }
58
+
59
+ /**
60
+ * Override the parent columns method. Defines the columns to use in your listing table
61
+ */
62
+ public function get_columns() {
63
+ return $this->columns;
64
+ }
65
+
66
+ /**
67
+ * Define which columns are hidden
68
+ */
69
+ public function get_hidden_columns() {
70
+ return array();
71
+ }
72
+
73
+ /**
74
+ * Define the sortable columns
75
+ */
76
+ public function get_sortable_columns() {
77
+ return array( 'title' => array( 'title', false ) );
78
+ }
79
+
80
+ /**
81
+ * Define what data to show on each column of the table
82
+ *
83
+ * @param $item
84
+ * @param $column_name
85
+ */
86
+ public function column_default( $item, $column_name ) {
87
+
88
+ switch ( $column_name ) {
89
+ case 'id':
90
+ case 'title':
91
+ case 'description':
92
+ case 'year':
93
+ case 'director':
94
+ case 'rating':
95
+ return $item[ $column_name ];
96
+
97
+ default:
98
+ return print_r( $item, true );
99
+ }
100
+ }
101
+
102
+ /**
103
+ * Allows you to sort the data by the variables set in the $_GET
104
+ *
105
+ * @param $a
106
+ * @param $b
107
+ */
108
+ private function sort_data( $a, $b ) {
109
+ // Set defaults
110
+ $orderby = 'title';
111
+ $order = 'asc';
112
+
113
+ // If orderby is set, use this as the sort column
114
+ if ( ! empty( $_GET['orderby'] ) ) {
115
+ $orderby = $_GET['orderby'];
116
+ }
117
+
118
+ // If order is set use this as the order
119
+ if ( ! empty( $_GET['order'] ) ) {
120
+ $order = $_GET['order'];
121
+ }
122
+
123
+ $result = strcmp( $a[ $orderby ], $b[ $orderby ] );
124
+
125
+ if ( 'asc' === $order ) {
126
+ return $result;
127
+ }
128
+
129
+ return -$result;
130
+ }
131
+ }
132
+ }
133
+
classes/class-wpcf7r-module.php CHANGED
@@ -1,77 +1,77 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Module - parent class for all wpcf7r Modules
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- class WPCF7R_Module {
9
-
10
- /**
11
- * Hold the active modules
12
- *
13
- * @var [type]
14
- */
15
- private static $registered_modules;
16
-
17
- /**
18
- * General init function for all child modules
19
- *
20
- * @return void
21
- */
22
- public function init( $module ) {
23
- $this->name = $module['name'];
24
- $this->title = $module['title'];
25
-
26
- //register global modules actions
27
- if ( method_exists( get_class( $this ), 'add_panel' ) ) {
28
- add_action( 'wpcf7_editor_panels', array( $this, 'add_panel' ) );
29
- }
30
- //enqueue required admin scripts or styles
31
- if ( method_exists( get_class( $this ), 'enqueue_admin_scripts' ) ) {
32
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
33
- }
34
- }
35
-
36
- /**
37
- * Add a new module
38
- *
39
- * @param [string] $name the module name
40
- * @param [string] $title the module title
41
- * @param [string] $class the name of the module main class
42
- * @return void
43
- */
44
- public static function register_module( $name, $title, $class ) {
45
- self::$registered_modules[ $name ] = array(
46
- 'name' => $name,
47
- 'title' => $title,
48
- 'class' => $class,
49
- );
50
- }
51
-
52
- /**
53
- * Initialize all registered modules
54
- *
55
- * @return void
56
- */
57
- public static function init_modules() {
58
- if ( self::get_active_modules() ) {
59
- foreach ( self::get_active_modules() as $module ) {
60
- $class_name = $module['class'];
61
- $module_object = new $class_name;
62
-
63
- //create an instance of the loaded module
64
- $module_object->init( $module );
65
- }
66
- }
67
- }
68
-
69
- /**
70
- * Return the registered modules array
71
- *
72
- * @return void
73
- */
74
- public static function get_active_modules() {
75
- return self::$registered_modules;
76
- }
77
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Module - parent class for all wpcf7r Modules
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ class WPCF7R_Module {
9
+
10
+ /**
11
+ * Hold the active modules
12
+ *
13
+ * @var [type]
14
+ */
15
+ private static $registered_modules;
16
+
17
+ /**
18
+ * General init function for all child modules
19
+ *
20
+ * @return void
21
+ */
22
+ public function init( $module ) {
23
+ $this->name = $module['name'];
24
+ $this->title = $module['title'];
25
+
26
+ //register global modules actions
27
+ if ( method_exists( get_class( $this ), 'add_panel' ) ) {
28
+ add_action( 'wpcf7_editor_panels', array( $this, 'add_panel' ) );
29
+ }
30
+ //enqueue required admin scripts or styles
31
+ if ( method_exists( get_class( $this ), 'enqueue_admin_scripts' ) ) {
32
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
33
+ }
34
+ }
35
+
36
+ /**
37
+ * Add a new module
38
+ *
39
+ * @param [string] $name the module name
40
+ * @param [string] $title the module title
41
+ * @param [string] $class the name of the module main class
42
+ * @return void
43
+ */
44
+ public static function register_module( $name, $title, $class ) {
45
+ self::$registered_modules[ $name ] = array(
46
+ 'name' => $name,
47
+ 'title' => $title,
48
+ 'class' => $class,
49
+ );
50
+ }
51
+
52
+ /**
53
+ * Initialize all registered modules
54
+ *
55
+ * @return void
56
+ */
57
+ public static function init_modules() {
58
+ if ( self::get_active_modules() ) {
59
+ foreach ( self::get_active_modules() as $module ) {
60
+ $class_name = $module['class'];
61
+ $module_object = new $class_name;
62
+
63
+ //create an instance of the loaded module
64
+ $module_object->init( $module );
65
+ }
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Return the registered modules array
71
+ *
72
+ * @return void
73
+ */
74
+ public static function get_active_modules() {
75
+ return self::$registered_modules;
76
+ }
77
+ }
classes/class-wpcf7r-post-types.php CHANGED
@@ -1,221 +1,221 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_Post_Types
4
- * Create a post type that will act as a container for the form actions
5
- * This post type is invisible to all users and displayed only under Contact Form 7 tab
6
- */
7
-
8
- defined( 'ABSPATH' ) || exit;
9
-
10
- class WPCF7R_Post_Types {
11
-
12
- public function __construct() {
13
- add_action( 'init', array( $this, 'wpcf7r_post_type' ) );
14
- add_action( 'add_meta_boxes', array( $this, 'wporg_add_custom_box' ) );
15
- add_action( 'save_post', array( $this, 'save_changes' ) );
16
- add_action( 'init', array( $this, 'wpcf7r_leads_post_type' ) );
17
- }
18
-
19
- /**
20
- * Register leads post type
21
- */
22
- public function wpcf7r_leads_post_type() {
23
-
24
- if ( class_exists( 'WPCF7R_Leads_Manager' ) && class_exists( 'WPCF7R_Action_Save_Lead' ) ) {
25
- $labels = array(
26
- 'name' => _x( 'wpcf7r_lead', 'Post Type General Name', 'wpcf7-redirect' ),
27
- 'singular_name' => _x( 'wpcf7r_lead', 'Post Type Singular Name', 'wpcf7-redirect' ),
28
- 'menu_name' => __( 'Leads', 'wpcf7-redirect' ),
29
- 'name_admin_bar' => __( 'Post Type', 'wpcf7-redirect' ),
30
- 'archives' => __( 'Item Archives', 'wpcf7-redirect' ),
31
- 'attributes' => __( 'Item Attributes', 'wpcf7-redirect' ),
32
- 'parent_item_colon' => __( 'Parent Item:', 'wpcf7-redirect' ),
33
- 'all_items' => __( 'All Items', 'wpcf7-redirect' ),
34
- 'add_new_item' => __( 'Add New Item', 'wpcf7-redirect' ),
35
- 'add_new' => __( 'Add New', 'wpcf7-redirect' ),
36
- 'new_item' => __( 'New Item', 'wpcf7-redirect' ),
37
- 'edit_item' => __( 'Edit Item', 'wpcf7-redirect' ),
38
- 'update_item' => __( 'Update Item', 'wpcf7-redirect' ),
39
- 'view_item' => __( 'View Item', 'wpcf7-redirect' ),
40
- 'view_items' => __( 'View Items', 'wpcf7-redirect' ),
41
- 'search_items' => __( 'Search Item', 'wpcf7-redirect' ),
42
- 'not_found' => __( 'Not found', 'wpcf7-redirect' ),
43
- 'not_found_in_trash' => __( 'Not found in Trash', 'wpcf7-redirect' ),
44
- 'featured_image' => __( 'Featured Image', 'wpcf7-redirect' ),
45
- 'set_featured_image' => __( 'Set featured image', 'wpcf7-redirect' ),
46
- 'remove_featured_image' => __( 'Remove featured image', 'wpcf7-redirect' ),
47
- 'use_featured_image' => __( 'Use as featured image', 'wpcf7-redirect' ),
48
- 'insert_into_item' => __( 'Insert into item', 'wpcf7-redirect' ),
49
- 'uploaded_to_this_item' => __( 'Uploaded to this item', 'wpcf7-redirect' ),
50
- 'items_list' => __( 'Items list', 'wpcf7-redirect' ),
51
- 'items_list_navigation' => __( 'Items list navigation', 'wpcf7-redirect' ),
52
- 'filter_items_list' => __( 'Filter items list', 'wpcf7-redirect' ),
53
- );
54
- $args = array(
55
- 'label' => __( 'wpcf7r_leads', 'wpcf7-redirect' ),
56
- 'description' => __( 'wpcf7r_leads', 'wpcf7-redirect' ),
57
- 'labels' => $labels,
58
- 'supports' => array( 'title' ),
59
- 'hierarchical' => false,
60
- 'public' => false,
61
- 'show_ui' => true,
62
- 'show_in_menu' => 'admin.php?page=wpcf7',
63
- 'menu_position' => 5,
64
- 'show_in_admin_bar' => false,
65
- 'show_in_nav_menus' => false,
66
- 'can_export' => true,
67
- 'has_archive' => false,
68
- 'exclude_from_search' => false,
69
- 'publicly_queryable' => false,
70
- 'rewrite' => false,
71
- 'capability_type' => 'page',
72
- 'show_in_rest' => false,
73
- );
74
- register_post_type( 'wpcf7r_leads', $args );
75
-
76
- if ( defined( 'CF7_REDIRECT_DEBUG' ) && CF7_REDIRECT_DEBUG ) {
77
- add_post_type_support( 'wpcf7r_leads', 'custom-fields' );
78
- }
79
-
80
- add_action( 'admin_menu', 'my_admin_menu' );
81
- }
82
-
83
- function my_admin_menu() {
84
- add_submenu_page( 'wpcf7', 'Leads', 'Leads', 'manage_options', 'edit.php?post_type=wpcf7r_leads' );
85
- //add_submenu_page( 'wpcf7', 'New lead', 'New lead', 'manage_options', 'post-new.php?post_type=wpcf7r_leads' );
86
- }
87
- }
88
-
89
- // Register Custom Post Type
90
- function wpcf7r_post_type() {
91
- $labels = array(
92
- 'name' => _x( 'wpcf7r_actions', 'Post Type General Name', 'wpcf7-redirect' ),
93
- 'singular_name' => _x( 'wpcf7r_action', 'Post Type Singular Name', 'wpcf7-redirect' ),
94
- 'menu_name' => __( 'wpcf7r_actions', 'wpcf7-redirect' ),
95
- 'name_admin_bar' => __( 'Post Type', 'wpcf7-redirect' ),
96
- 'archives' => __( 'Item Archives', 'wpcf7-redirect' ),
97
- 'attributes' => __( 'Item Attributes', 'wpcf7-redirect' ),
98
- 'parent_item_colon' => __( 'Parent Item:', 'wpcf7-redirect' ),
99
- 'all_items' => __( 'All Items', 'wpcf7-redirect' ),
100
- 'add_new_item' => __( 'Add New Item', 'wpcf7-redirect' ),
101
- 'add_new' => __( 'Add New', 'wpcf7-redirect' ),
102
- 'new_item' => __( 'New Item', 'wpcf7-redirect' ),
103
- 'edit_item' => __( 'Edit Item', 'wpcf7-redirect' ),
104
- 'update_item' => __( 'Update Item', 'wpcf7-redirect' ),
105
- 'view_item' => __( 'View Item', 'wpcf7-redirect' ),
106
- 'view_items' => __( 'View Items', 'wpcf7-redirect' ),
107
- 'search_items' => __( 'Search Item', 'wpcf7-redirect' ),
108
- 'not_found' => __( 'Not found', 'wpcf7-redirect' ),
109
- 'not_found_in_trash' => __( 'Not found in Trash', 'wpcf7-redirect' ),
110
- 'featured_image' => __( 'Featured Image', 'wpcf7-redirect' ),
111
- 'set_featured_image' => __( 'Set featured image', 'wpcf7-redirect' ),
112
- 'remove_featured_image' => __( 'Remove featured image', 'wpcf7-redirect' ),
113
- 'use_featured_image' => __( 'Use as featured image', 'wpcf7-redirect' ),
114
- 'insert_into_item' => __( 'Insert into item', 'wpcf7-redirect' ),
115
- 'uploaded_to_this_item' => __( 'Uploaded to this item', 'wpcf7-redirect' ),
116
- 'items_list' => __( 'Items list', 'wpcf7-redirect' ),
117
- 'items_list_navigation' => __( 'Items list navigation', 'wpcf7-redirect' ),
118
- 'filter_items_list' => __( 'Filter items list', 'wpcf7-redirect' ),
119
- );
120
-
121
- $args = array(
122
- 'label' => __( 'Redirection For Contact Form 7 Actions', 'wpcf7-redirect' ),
123
- 'description' => __( 'wpcf7r_actions', 'wpcf7-redirect' ),
124
- 'labels' => $labels,
125
- 'supports' => array( 'title', 'custom_fields', 'custom-fields' ),
126
- 'hierarchical' => true,
127
- 'public' => CF7_REDIRECT_DEBUG,
128
- 'show_ui' => CF7_REDIRECT_DEBUG,
129
- 'show_in_menu' => 'admin.php?page=wpcf7',
130
- 'menu_position' => 5,
131
- 'show_in_admin_bar' => CF7_REDIRECT_DEBUG,
132
- 'show_in_nav_menus' => CF7_REDIRECT_DEBUG,
133
- 'can_export' => CF7_REDIRECT_DEBUG,
134
- 'has_archive' => CF7_REDIRECT_DEBUG,
135
- 'exclude_from_search' => CF7_REDIRECT_DEBUG,
136
- 'publicly_queryable' => CF7_REDIRECT_DEBUG,
137
- 'rewrite' => CF7_REDIRECT_DEBUG,
138
- 'capability_type' => 'page',
139
- 'show_in_rest' => CF7_REDIRECT_DEBUG,
140
- );
141
-
142
- register_post_type( 'wpcf7r_action', $args );
143
- add_post_type_support( 'wpcf7r_action', 'custom-fields' );
144
-
145
- if ( defined( 'CF7_REDIRECT_DEBUG' ) && CF7_REDIRECT_DEBUG ) {
146
- add_action( 'admin_menu', 'add_actions_menu' );
147
-
148
- function add_actions_menu() {
149
- add_submenu_page( 'wpcf7', __( 'Actions List', 'wpcf7-redirect' ), __( 'Actions List', 'wpcf7-redirect' ), 'manage_options', 'edit.php?post_type=wpcf7r_action' );
150
- }
151
- }
152
-
153
- }
154
-
155
- function wporg_add_custom_box() {
156
- $screens = array( 'wpcf7r_action' );
157
- if ( is_wpcf7r_debug() ) {
158
- $screens[] = 'wpcf7r_leads';
159
- }
160
-
161
- foreach ( $screens as $screen ) {
162
- add_meta_box(
163
- 'wpcf7r_action_meta',
164
- __( 'Action Meta', 'wpcf7-redirect' ),
165
- array( $this, 'debug_helper' ),
166
- $screen
167
- );
168
- }
169
-
170
- add_meta_box(
171
- 'wpcf7r_leads',
172
- __( 'Lead Details', 'wpcf7-redirect' ),
173
- array( $this, 'lead_fields_html' ),
174
- 'wpcf7r_leads'
175
- );
176
- }
177
-
178
- /**
179
- * Get the meta html
180
- *
181
- * @param $post
182
- */
183
- function lead_fields_html( $post ) {
184
- $lead = new WPCF7R_Lead( $post->ID );
185
-
186
- $fields = $lead->get_lead_fields();
187
-
188
- foreach ( $fields as $field ) {
189
- switch ( $field['name'] ) {
190
- case 'action-save_lead':
191
- $field['value'] = $field['value']['data']['lead_id'];
192
- break;
193
- case 'action-mailchimp':
194
- if ( is_wp_error( $field['value'] ) ) {
195
- $field['value'] = $field['value']->get_error_message();
196
- }
197
- break;
198
- }
199
-
200
- WPCF7R_Html::render_field( $field, $field['prefix'] );
201
- }
202
- }
203
-
204
- public function save_changes( $post_id ) {
205
- $post_type = get_post_type( $post_id );
206
-
207
- if ( 'wpcf7r_leads' === $post_type ) {
208
- if ( isset( $_POST['wpcf7-redirect'] ) ) {
209
- foreach ( $_POST['wpcf7-redirect'] as $meta_key => $meta_value ) {
210
- update_post_meta( $post_id, $meta_key, $meta_value );
211
- }
212
- }
213
- }
214
- }
215
-
216
- function debug_helper() {
217
- echo '<pre>';
218
- print_r( get_post_custom() );
219
- echo '</pre>';
220
- }
221
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_Post_Types
4
+ * Create a post type that will act as a container for the form actions
5
+ * This post type is invisible to all users and displayed only under Contact Form 7 tab
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ class WPCF7R_Post_Types {
11
+
12
+ public function __construct() {
13
+ add_action( 'init', array( $this, 'wpcf7r_post_type' ) );
14
+ add_action( 'add_meta_boxes', array( $this, 'wporg_add_custom_box' ) );
15
+ add_action( 'save_post', array( $this, 'save_changes' ) );
16
+ add_action( 'init', array( $this, 'wpcf7r_leads_post_type' ) );
17
+ }
18
+
19
+ /**
20
+ * Register leads post type
21
+ */
22
+ public function wpcf7r_leads_post_type() {
23
+
24
+ if ( class_exists( 'WPCF7R_Leads_Manager' ) && class_exists( 'WPCF7R_Action_Save_Lead' ) ) {
25
+ $labels = array(
26
+ 'name' => _x( 'Leads', 'Post Type General Name', 'wpcf7-redirect' ),
27
+ 'singular_name' => _x( 'Lead', 'Post Type Singular Name', 'wpcf7-redirect' ),
28
+ 'menu_name' => __( 'Leads', 'wpcf7-redirect' ),
29
+ 'name_admin_bar' => __( 'Post Type', 'wpcf7-redirect' ),
30
+ 'archives' => __( 'Item Archives', 'wpcf7-redirect' ),
31
+ 'attributes' => __( 'Item Attributes', 'wpcf7-redirect' ),
32
+ 'parent_item_colon' => __( 'Parent Item:', 'wpcf7-redirect' ),
33
+ 'all_items' => __( 'All Items', 'wpcf7-redirect' ),
34
+ 'add_new_item' => __( 'Add New Item', 'wpcf7-redirect' ),
35
+ 'add_new' => __( 'Add New', 'wpcf7-redirect' ),
36
+ 'new_item' => __( 'New Item', 'wpcf7-redirect' ),
37
+ 'edit_item' => __( 'Edit Item', 'wpcf7-redirect' ),
38
+ 'update_item' => __( 'Update Item', 'wpcf7-redirect' ),
39
+ 'view_item' => __( 'View Item', 'wpcf7-redirect' ),
40
+ 'view_items' => __( 'View Items', 'wpcf7-redirect' ),
41
+ 'search_items' => __( 'Search Item', 'wpcf7-redirect' ),
42
+ 'not_found' => __( 'Not found', 'wpcf7-redirect' ),
43
+ 'not_found_in_trash' => __( 'Not found in Trash', 'wpcf7-redirect' ),
44
+ 'featured_image' => __( 'Featured Image', 'wpcf7-redirect' ),
45
+ 'set_featured_image' => __( 'Set featured image', 'wpcf7-redirect' ),
46
+ 'remove_featured_image' => __( 'Remove featured image', 'wpcf7-redirect' ),
47
+ 'use_featured_image' => __( 'Use as featured image', 'wpcf7-redirect' ),
48
+ 'insert_into_item' => __( 'Insert into item', 'wpcf7-redirect' ),
49
+ 'uploaded_to_this_item' => __( 'Uploaded to this item', 'wpcf7-redirect' ),
50
+ 'items_list' => __( 'Items list', 'wpcf7-redirect' ),
51
+ 'items_list_navigation' => __( 'Items list navigation', 'wpcf7-redirect' ),
52
+ 'filter_items_list' => __( 'Filter items list', 'wpcf7-redirect' ),
53
+ );
54
+ $args = array(
55
+ 'label' => __( 'Leads', 'wpcf7-redirect' ),
56
+ 'description' => __( 'Leads', 'wpcf7-redirect' ),
57
+ 'labels' => $labels,
58
+ 'supports' => array( 'title' ),
59
+ 'hierarchical' => false,
60
+ 'public' => false,
61
+ 'show_ui' => true,
62
+ 'show_in_menu' => 'admin.php?page=wpcf7',
63
+ 'menu_position' => 5,
64
+ 'show_in_admin_bar' => false,
65
+ 'show_in_nav_menus' => false,
66
+ 'can_export' => true,
67
+ 'has_archive' => false,
68
+ 'exclude_from_search' => false,
69
+ 'publicly_queryable' => false,
70
+ 'rewrite' => false,
71
+ 'capability_type' => 'page',
72
+ 'show_in_rest' => false,
73
+ );
74
+ register_post_type( 'wpcf7r_leads', $args );
75
+
76
+ if ( defined( 'CF7_REDIRECT_DEBUG' ) && CF7_REDIRECT_DEBUG ) {
77
+ add_post_type_support( 'wpcf7r_leads', 'custom-fields' );
78
+ }
79
+
80
+ add_action( 'admin_menu', 'my_admin_menu' );
81
+ }
82
+
83
+ function my_admin_menu() {
84
+ add_submenu_page( 'wpcf7', 'Leads', 'Leads', 'manage_options', 'edit.php?post_type=wpcf7r_leads' );
85
+ //add_submenu_page( 'wpcf7', 'New lead', 'New lead', 'manage_options', 'post-new.php?post_type=wpcf7r_leads' );
86
+ }
87
+ }
88
+
89
+ // Register Custom Post Type
90
+ function wpcf7r_post_type() {
91
+ $labels = array(
92
+ 'name' => _x( 'Actions', 'Post Type General Name', 'wpcf7-redirect' ),
93
+ 'singular_name' => _x( 'Action', 'Post Type Singular Name', 'wpcf7-redirect' ),
94
+ 'menu_name' => __( 'Actions', 'wpcf7-redirect' ),
95
+ 'name_admin_bar' => __( 'Post Type', 'wpcf7-redirect' ),
96
+ 'archives' => __( 'Item Archives', 'wpcf7-redirect' ),
97
+ 'attributes' => __( 'Item Attributes', 'wpcf7-redirect' ),
98
+ 'parent_item_colon' => __( 'Parent Item:', 'wpcf7-redirect' ),
99
+ 'all_items' => __( 'All Items', 'wpcf7-redirect' ),
100
+ 'add_new_item' => __( 'Add New Item', 'wpcf7-redirect' ),
101
+ 'add_new' => __( 'Add New', 'wpcf7-redirect' ),
102
+ 'new_item' => __( 'New Item', 'wpcf7-redirect' ),
103
+ 'edit_item' => __( 'Edit Item', 'wpcf7-redirect' ),
104
+ 'update_item' => __( 'Update Item', 'wpcf7-redirect' ),
105
+ 'view_item' => __( 'View Item', 'wpcf7-redirect' ),
106
+ 'view_items' => __( 'View Items', 'wpcf7-redirect' ),
107
+ 'search_items' => __( 'Search Item', 'wpcf7-redirect' ),
108
+ 'not_found' => __( 'Not found', 'wpcf7-redirect' ),
109
+ 'not_found_in_trash' => __( 'Not found in Trash', 'wpcf7-redirect' ),
110
+ 'featured_image' => __( 'Featured Image', 'wpcf7-redirect' ),
111
+ 'set_featured_image' => __( 'Set featured image', 'wpcf7-redirect' ),
112
+ 'remove_featured_image' => __( 'Remove featured image', 'wpcf7-redirect' ),
113
+ 'use_featured_image' => __( 'Use as featured image', 'wpcf7-redirect' ),
114
+ 'insert_into_item' => __( 'Insert into item', 'wpcf7-redirect' ),
115
+ 'uploaded_to_this_item' => __( 'Uploaded to this item', 'wpcf7-redirect' ),
116
+ 'items_list' => __( 'Items list', 'wpcf7-redirect' ),
117
+ 'items_list_navigation' => __( 'Items list navigation', 'wpcf7-redirect' ),
118
+ 'filter_items_list' => __( 'Filter items list', 'wpcf7-redirect' ),
119
+ );
120
+
121
+ $args = array(
122
+ 'label' => __( 'Redirection For Contact Form 7 Actions', 'wpcf7-redirect' ),
123
+ 'description' => __( 'Actions', 'wpcf7-redirect' ),
124
+ 'labels' => $labels,
125
+ 'supports' => array( 'title', 'custom_fields', 'custom-fields' ),
126
+ 'hierarchical' => true,
127
+ 'public' => CF7_REDIRECT_DEBUG,
128
+ 'show_ui' => CF7_REDIRECT_DEBUG,
129
+ 'show_in_menu' => 'admin.php?page=wpcf7',
130
+ 'menu_position' => 5,
131
+ 'show_in_admin_bar' => CF7_REDIRECT_DEBUG,
132
+ 'show_in_nav_menus' => CF7_REDIRECT_DEBUG,
133
+ 'can_export' => CF7_REDIRECT_DEBUG,
134
+ 'has_archive' => CF7_REDIRECT_DEBUG,
135
+ 'exclude_from_search' => CF7_REDIRECT_DEBUG,
136
+ 'publicly_queryable' => CF7_REDIRECT_DEBUG,
137
+ 'rewrite' => CF7_REDIRECT_DEBUG,
138
+ 'capability_type' => 'page',
139
+ 'show_in_rest' => CF7_REDIRECT_DEBUG,
140
+ );
141
+
142
+ register_post_type( 'wpcf7r_action', $args );
143
+ add_post_type_support( 'wpcf7r_action', 'custom-fields' );
144
+
145
+ if ( defined( 'CF7_REDIRECT_DEBUG' ) && CF7_REDIRECT_DEBUG ) {
146
+ add_action( 'admin_menu', 'add_actions_menu' );
147
+
148
+ function add_actions_menu() {
149
+ add_submenu_page( 'wpcf7', __( 'Actions List', 'wpcf7-redirect' ), __( 'Actions List', 'wpcf7-redirect' ), 'manage_options', 'edit.php?post_type=wpcf7r_action' );
150
+ }
151
+ }
152
+
153
+ }
154
+
155
+ function wporg_add_custom_box() {
156
+ $screens = array( 'wpcf7r_action' );
157
+ if ( is_wpcf7r_debug() ) {
158
+ $screens[] = 'wpcf7r_leads';
159
+ }
160
+
161
+ foreach ( $screens as $screen ) {
162
+ add_meta_box(
163
+ 'wpcf7r_action_meta',
164
+ __( 'Action Meta', 'wpcf7-redirect' ),
165
+ array( $this, 'debug_helper' ),
166
+ $screen
167
+ );
168
+ }
169
+
170
+ add_meta_box(
171
+ 'wpcf7r_leads',
172
+ __( 'Lead Details', 'wpcf7-redirect' ),
173
+ array( $this, 'lead_fields_html' ),
174
+ 'wpcf7r_leads'
175
+ );
176
+ }
177
+
178
+ /**
179
+ * Get the meta html
180
+ *
181
+ * @param $post
182
+ */
183
+ function lead_fields_html( $post ) {
184
+ $lead = new WPCF7R_Lead( $post->ID );
185
+
186
+ $fields = $lead->get_lead_fields();
187
+
188
+ foreach ( $fields as $field ) {
189
+ switch ( $field['name'] ) {
190
+ case 'action-save_lead':
191
+ $field['value'] = $field['value']['data']['lead_id'];
192
+ break;
193
+ case 'action-mailchimp':
194
+ if ( is_wp_error( $field['value'] ) ) {
195
+ $field['value'] = $field['value']->get_error_message();
196
+ }
197
+ break;
198
+ }
199
+
200
+ WPCF7R_Html::render_field( $field, $field['prefix'] );
201
+ }
202
+ }
203
+
204
+ public function save_changes( $post_id ) {
205
+ $post_type = get_post_type( $post_id );
206
+
207
+ if ( 'wpcf7r_leads' === $post_type ) {
208
+ if ( isset( $_POST['wpcf7-redirect'] ) ) {
209
+ foreach ( $_POST['wpcf7-redirect'] as $meta_key => $meta_value ) {
210
+ update_post_meta( $post_id, $meta_key, $meta_value );
211
+ }
212
+ }
213
+ }
214
+ }
215
+
216
+ function debug_helper() {
217
+ echo '<pre>';
218
+ print_r( get_post_custom() );
219
+ echo '</pre>';
220
+ }
221
+ }
classes/class-wpcf7r-settings.php CHANGED
@@ -1,303 +1,303 @@
1
- <?php
2
- /**
3
- * Class WPCF7r_Settings file.
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- /**
9
- * Contact form 7 Redirect Settings panel
10
- */
11
- class WPCF7r_Settings {
12
- public $product_url = WPCF7_PRO_REDIRECT_PLUGIN_PAGE_URL;
13
-
14
- public function __construct() {
15
- $this->page_slug = 'wpc7_redirect';
16
- $this->api = new Qs_Api();
17
-
18
- add_action( 'admin_menu', array( $this, 'create_plugin_settings_page' ) );
19
- add_action( 'admin_init', array( $this, 'wpcf7r_register_options' ) );
20
- add_filter( 'plugin_row_meta', array( $this, 'register_plugin_links' ), 10, 2 );
21
-
22
- }
23
-
24
- /**
25
- * Deactivate the license - Disabled on v2.0
26
- */
27
- public function deactivate_license() {
28
- $serial = WPCF7r_Utils::get_serial_key();
29
- $activation_id = WPCF7r_Utils::get_activation_id();
30
-
31
- $this->api->deactivate_liscense( $activation_id, $serial );
32
- $this->reset_activation();
33
-
34
- wp_redirect( WPCF7r_Utils::get_plugin_settings_page_url() );
35
- }
36
-
37
- /**
38
- * Register plugin options
39
- */
40
- public function wpcf7r_register_options() {
41
- $this->fields = array();
42
- // $this->add_license_section();
43
- $this->add_settings_section();
44
-
45
- foreach ( $this->fields as $field ) {
46
- $args = array();
47
- add_settings_field( $field['uid'], $field['label'], array( $this, 'field_callback' ), $this->page_slug, $field['section'], $field );
48
- // $args['sanitize_callback'] = array($this, 'validate_serial_key');
49
- register_setting( $this->page_slug, $field['uid'], $args );
50
- }
51
- }
52
-
53
- public function add_settings_section() {
54
-
55
- add_settings_section( 'settings_section', __( 'Global Settings', 'wpcf7-redirect' ), array( $this, 'section_callback' ), $this->page_slug );
56
-
57
- $this->fields = array_merge(
58
- $this->fields,
59
- array(
60
- array(
61
- 'uid' => 'wpcf_debug',
62
- 'label' => 'Debug',
63
- 'section' => 'settings_section',
64
- 'type' => 'checkbox',
65
- 'options' => false,
66
- 'placeholder' => '',
67
- 'helper' => '',
68
- 'supplemental' => __( 'This will open the actions post type and display debug feature.', 'wpcf7-redirect' ),
69
- 'default' => '',
70
- ),
71
- )
72
- );
73
- }
74
-
75
- /**
76
- * add_license_section - Deprecated
77
- */
78
- public function add_license_section() {
79
- add_settings_section( 'serial_section', __( 'License Information', 'wpcf7-redirect' ), array( $this, 'section_callback' ), $this->page_slug );
80
-
81
- $this->fields = array_merge(
82
- $this->fields,
83
- array(
84
- array(
85
- 'uid' => 'wpcf7r_serial_number',
86
- 'label' => 'Serial Number',
87
- 'section' => 'serial_section',
88
- 'type' => 'text',
89
- 'options' => false,
90
- 'placeholder' => 'Type your serial here',
91
- 'helper' => '',
92
- 'supplemental' => __( 'This process will send your serial/domain to a 3rd party validation server to validate the key authenticity', 'wpcf7-redirect' ),
93
- 'default' => '',
94
- ),
95
- )
96
- );
97
-
98
- return $fields;
99
- }
100
-
101
- /**
102
- * Validate serial key process
103
- *
104
- * @param $serial
105
- */
106
- public function validate_serial_key( $serial ) {
107
- if ( ! $serial ) {
108
- return;
109
- }
110
-
111
- $activation_id = WPCF7r_Utils::get_activation_id();
112
-
113
- if ( ! $activation_id ) {
114
- $is_valid = $this->api->activate_serial( $serial );
115
- } else {
116
- $is_valid = $this->api->validate_serial( $activation_id, $serial );
117
- }
118
-
119
- // serial was not valid
120
- if ( is_wp_error( $is_valid ) ) {
121
- $message = $is_valid->get_error_message();
122
- if ( is_object( $message ) && isset( $message->license_key ) ) {
123
- $message = $message->license_key[0];
124
- }
125
- add_settings_error(
126
- 'wpcf7r_serial_number',
127
- 'not-valid-serial',
128
- $message,
129
- 'error'
130
- );
131
- $this->reset_activation();
132
- return false;
133
- } elseif ( ! $activation_id ) {
134
- // serial was valid, update the activation key for future validation
135
- $this->set_activation( $is_valid->data );
136
- }
137
-
138
- if ( isset( $_GET['deactivate'] ) ) {
139
- return '';
140
- }
141
-
142
- return $serial;
143
- }
144
-
145
- /**
146
- * Delete all activation data - use in case activation validation or activation returns an error
147
- */
148
- public function reset_activation() {
149
- delete_option( 'wpcf7r_activation_id' );
150
- delete_option( 'wpcf7r_activation_expiration' );
151
- delete_option( 'wpcf7r_activation_data' );
152
-
153
- WPCF7r_Utils::delete_serial_key();
154
- }
155
-
156
- /**
157
- * Set all data related with the plugin activation
158
- *
159
- * @param $validation_data
160
- */
161
- public function set_activation( $validation_data ) {
162
- update_option( 'wpcf7r_activation_id', $validation_data->activation_id );
163
- update_option( 'wpcf7r_activation_expiration', $validation_data->expire );
164
- update_option( 'wpcf7r_activation_data', $validation_data );
165
- }
166
-
167
- /**
168
- * A function for displaying a field on the admin settings page
169
- */
170
- public function field_callback( $arguments ) {
171
- $value = get_option( $arguments['uid'] ); // Get the current value, if there is one
172
- if ( ! $value ) { // If no value exists
173
- $value = $arguments['default']; // Set to our default
174
- }
175
- // Check which type of field we want
176
- switch ( $arguments['type'] ) {
177
- case 'text': // If it is a text field
178
- case 'password':
179
- printf( '<input name="%1$s" id="%1$s" type="%2$s" placeholder="%3$s" value="%4$s" class="widefat" />', $arguments['uid'], $arguments['type'], $arguments['placeholder'], $value );
180
- break;
181
- case 'checkbox': // If it is a text field
182
- $checked = checked( $value, '1', false );
183
- printf( '<input name="%1$s" id="%1$s" type="%2$s" placeholder="%3$s" value="%4$s" class="widefat" %5$s/>', $arguments['uid'], $arguments['type'], $arguments['placeholder'], '1', $checked );
184
- break;
185
- }
186
-
187
- $helper = $arguments['helper'];
188
- $supplimental = $arguments['supplemental'];
189
-
190
- // If there is help text
191
- if ( $helper ) {
192
- printf( '<span class="helper"> %s</span>', $helper ); // Show it
193
- }
194
-
195
- // If there is supplemental text
196
- if ( $supplimental ) {
197
- printf( '<p class="description">%s</p>', $supplimental ); // Show it
198
- }
199
- }
200
-
201
- /**
202
- * Main call for creating the settings page
203
- */
204
- public function create_plugin_settings_page() {
205
- // Add the menu item and page
206
- $page_title = 'Extensions';
207
- $menu_title = 'Extensions';
208
- $capability = 'manage_options';
209
- $callback = array( $this, 'plugin_settings_page_content' );
210
- $icon = 'dashicons-admin-plugins';
211
- $position = 100;
212
-
213
- add_submenu_page(
214
- 'wpcf7',
215
- $page_title,
216
- $page_title,
217
- $capability,
218
- $this->page_slug,
219
- $callback
220
- );
221
- }
222
-
223
- /**
224
- * The setting page template HTML
225
- */
226
- public function plugin_settings_page_content() {
227
- $wpcf7_extensions = new WPCF7R_Extensions();
228
- ?>
229
- <section class="padbox">
230
- <div class="wrap wrap-wpcf7redirect">
231
- <h2>
232
- <span>
233
- <?php _e( 'Redirection For Contact Form 7', 'wpcf7-redirect' ); ?>
234
- </span>
235
- </h2>
236
- <div class="user-message">
237
- <ul>
238
- <li>The new and improved Submission Action System is how redirection for Contact Form 7 processes submission data.</li>
239
- <li>Submission Actions are like modules which can be added to each form.</li>
240
- <li>You can add multiple actions to a single form or a single action can be added to any form.</li>
241
- <li>Create custom login/registration forms, manage your conversion pixels, set conditional rules and much more.</li>
242
- </ul>
243
- <form method="post">
244
- <br/>
245
- <input type="submit" value="Check For Updates" class="button-primary" name="extensions-updates-check"/>
246
- <br/><br/>
247
- <lable>
248
- <input type="checkbox" checked="checked" name="update-banner" value="1">
249
- <?php _e( 'Get available deals and sales (no spam of any kind).' ); ?>
250
- </label>
251
- </form>
252
- </div>
253
- <div class="postbox extensions-list-wrap">
254
- <div class="padbox">
255
- <?php $wpcf7_extensions->display(); ?>
256
- </div>
257
- </div>
258
- <div class="postbox">
259
- <div class="padbox">
260
- <form method="POST" action="options.php" name="wpcfr7_settings">
261
- <?php
262
- do_action( 'before_settings_fields' );
263
- settings_fields( $this->page_slug );
264
- do_settings_sections( $this->page_slug );
265
- submit_button();
266
- ?>
267
- </form>
268
- <?php if ( is_wpcf7r_debug() ) : ?>
269
- <input type="button" name="migrate_again" value="<?php _e( 'Migrate Again from Old Settings', 'wpcf7-redirect' ); ?>" class="migrate_again button button-secondary" />
270
- <input type="button" name="reset_all" value="<?php _e( 'Reset all Settings - BE CAREFUL! this will delete all Redirection for Contact Form 7 data.', 'wpcf7-redirect' ); ?>" class="cf7-redirect-reset button button-secondary" />
271
-
272
- <h3><?php _e( 'Recreate from Debug', 'wpcf7-redirect' ); ?></h3>
273
- <textarea id="debug-info" style="width:100%;"></textarea>
274
- <button class="reacreate-from-debug button button-primary"><?php _e( 'Recreate From Debug', 'wpcf7-redirect' ); ?></button>
275
- <?php endif; ?>
276
- </div>
277
- </div>
278
- </div>
279
- </section>
280
- <?php
281
- }
282
-
283
- /**
284
- * Create a section on the admin settings page
285
- */
286
- public function section_callback( $arguments ) {
287
- switch ( $arguments['id'] ) {
288
- case 'serial_section':
289
- echo sprintf( "In order to gain access to plugin updates, please enter your license key below. If you don't have a licence key, please <a href='%s' target='_blank'>click Here</a>.", $this->product_url );
290
- break;
291
- }
292
- }
293
-
294
- /**
295
- * Add a link to the options page to the plugin description block.
296
- */
297
- function register_plugin_links( $links, $file ) {
298
- if ( WPCF7_PRO_REDIRECT_BASE_NAME === $file ) {
299
- $links[] = WPCF7r_Utils::get_settings_link();
300
- }
301
- return $links;
302
- }
303
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7r_Settings file.
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ /**
9
+ * Contact form 7 Redirect Settings panel
10
+ */
11
+ class WPCF7r_Settings {
12
+ public $product_url = WPCF7_PRO_REDIRECT_PLUGIN_PAGE_URL;
13
+
14
+ public function __construct() {
15
+ $this->page_slug = 'wpc7_redirect';
16
+ $this->api = new Qs_Api();
17
+
18
+ add_action( 'admin_menu', array( $this, 'create_plugin_settings_page' ) );
19
+ add_action( 'admin_init', array( $this, 'wpcf7r_register_options' ) );
20
+ add_filter( 'plugin_row_meta', array( $this, 'register_plugin_links' ), 10, 2 );
21
+
22
+ }
23
+
24
+ /**
25
+ * Deactivate the license - Disabled on v2.0
26
+ */
27
+ public function deactivate_license() {
28
+ $serial = WPCF7r_Utils::get_serial_key();
29
+ $activation_id = WPCF7r_Utils::get_activation_id();
30
+
31
+ $this->api->deactivate_liscense( $activation_id, $serial );
32
+ $this->reset_activation();
33
+
34
+ wp_redirect( WPCF7r_Utils::get_plugin_settings_page_url() );
35
+ }
36
+
37
+ /**
38
+ * Register plugin options
39
+ */
40
+ public function wpcf7r_register_options() {
41
+ $this->fields = array();
42
+ // $this->add_license_section();
43
+ $this->add_settings_section();
44
+
45
+ foreach ( $this->fields as $field ) {
46
+ $args = array();
47
+ add_settings_field( $field['uid'], $field['label'], array( $this, 'field_callback' ), $this->page_slug, $field['section'], $field );
48
+ // $args['sanitize_callback'] = array($this, 'validate_serial_key');
49
+ register_setting( $this->page_slug, $field['uid'], $args );
50
+ }
51
+ }
52
+
53
+ public function add_settings_section() {
54
+
55
+ add_settings_section( 'settings_section', __( 'Global Settings', 'wpcf7-redirect' ), array( $this, 'section_callback' ), $this->page_slug );
56
+
57
+ $this->fields = array_merge(
58
+ $this->fields,
59
+ array(
60
+ array(
61
+ 'uid' => 'wpcf_debug',
62
+ 'label' => 'Debug',
63
+ 'section' => 'settings_section',
64
+ 'type' => 'checkbox',
65
+ 'options' => false,
66
+ 'placeholder' => '',
67
+ 'helper' => '',
68
+ 'supplemental' => __( 'This will open the actions post type and display debug feature.', 'wpcf7-redirect' ),
69
+ 'default' => '',
70
+ ),
71
+ )
72
+ );
73
+ }
74
+
75
+ /**
76
+ * add_license_section - Deprecated
77
+ */
78
+ public function add_license_section() {
79
+ add_settings_section( 'serial_section', __( 'License Information', 'wpcf7-redirect' ), array( $this, 'section_callback' ), $this->page_slug );
80
+
81
+ $this->fields = array_merge(
82
+ $this->fields,
83
+ array(
84
+ array(
85
+ 'uid' => 'wpcf7r_serial_number',
86
+ 'label' => 'Serial Number',
87
+ 'section' => 'serial_section',
88
+ 'type' => 'text',
89
+ 'options' => false,
90
+ 'placeholder' => 'Type your serial here',
91
+ 'helper' => '',
92
+ 'supplemental' => __( 'This process will send your serial/domain to a 3rd party validation server to validate the key authenticity', 'wpcf7-redirect' ),
93
+ 'default' => '',
94
+ ),
95
+ )
96
+ );
97
+
98
+ return $fields;
99
+ }
100
+
101
+ /**
102
+ * Validate serial key process
103
+ *
104
+ * @param $serial
105
+ */
106
+ public function validate_serial_key( $serial ) {
107
+ if ( ! $serial ) {
108
+ return;
109
+ }
110
+
111
+ $activation_id = WPCF7r_Utils::get_activation_id();
112
+
113
+ if ( ! $activation_id ) {
114
+ $is_valid = $this->api->activate_serial( $serial );
115
+ } else {
116
+ $is_valid = $this->api->validate_serial( $activation_id, $serial );
117
+ }
118
+
119
+ // serial was not valid
120
+ if ( is_wp_error( $is_valid ) ) {
121
+ $message = $is_valid->get_error_message();
122
+ if ( is_object( $message ) && isset( $message->license_key ) ) {
123
+ $message = $message->license_key[0];
124
+ }
125
+ add_settings_error(
126
+ 'wpcf7r_serial_number',
127
+ 'not-valid-serial',
128
+ $message,
129
+ 'error'
130
+ );
131
+ $this->reset_activation();
132
+ return false;
133
+ } elseif ( ! $activation_id ) {
134
+ // serial was valid, update the activation key for future validation
135
+ $this->set_activation( $is_valid->data );
136
+ }
137
+
138
+ if ( isset( $_GET['deactivate'] ) ) {
139
+ return '';
140
+ }
141
+
142
+ return $serial;
143
+ }
144
+
145
+ /**
146
+ * Delete all activation data - use in case activation validation or activation returns an error
147
+ */
148
+ public function reset_activation() {
149
+ delete_option( 'wpcf7r_activation_id' );
150
+ delete_option( 'wpcf7r_activation_expiration' );
151
+ delete_option( 'wpcf7r_activation_data' );
152
+
153
+ WPCF7r_Utils::delete_serial_key();
154
+ }
155
+
156
+ /**
157
+ * Set all data related with the plugin activation
158
+ *
159
+ * @param $validation_data
160
+ */
161
+ public function set_activation( $validation_data ) {
162
+ update_option( 'wpcf7r_activation_id', $validation_data->activation_id );
163
+ update_option( 'wpcf7r_activation_expiration', $validation_data->expire );
164
+ update_option( 'wpcf7r_activation_data', $validation_data );
165
+ }
166
+
167
+ /**
168
+ * A function for displaying a field on the admin settings page
169
+ */
170
+ public function field_callback( $arguments ) {
171
+ $value = get_option( $arguments['uid'] ); // Get the current value, if there is one
172
+ if ( ! $value ) { // If no value exists
173
+ $value = $arguments['default']; // Set to our default
174
+ }
175
+ // Check which type of field we want
176
+ switch ( $arguments['type'] ) {
177
+ case 'text': // If it is a text field
178
+ case 'password':
179
+ printf( '<input name="%1$s" id="%1$s" type="%2$s" placeholder="%3$s" value="%4$s" class="widefat" />', $arguments['uid'], $arguments['type'], $arguments['placeholder'], $value );
180
+ break;
181
+ case 'checkbox': // If it is a text field
182
+ $checked = checked( $value, '1', false );
183
+ printf( '<input name="%1$s" id="%1$s" type="%2$s" placeholder="%3$s" value="%4$s" class="widefat" %5$s/>', $arguments['uid'], $arguments['type'], $arguments['placeholder'], '1', $checked );
184
+ break;
185
+ }
186
+
187
+ $helper = $arguments['helper'];
188
+ $supplimental = $arguments['supplemental'];
189
+
190
+ // If there is help text
191
+ if ( $helper ) {
192
+ printf( '<span class="helper"> %s</span>', $helper ); // Show it
193
+ }
194
+
195
+ // If there is supplemental text
196
+ if ( $supplimental ) {
197
+ printf( '<p class="description">%s</p>', $supplimental ); // Show it
198
+ }
199
+ }
200
+
201
+ /**
202
+ * Main call for creating the settings page
203
+ */
204
+ public function create_plugin_settings_page() {
205
+ // Add the menu item and page
206
+ $page_title = 'Extensions';
207
+ $menu_title = 'Extensions';
208
+ $capability = 'manage_options';
209
+ $callback = array( $this, 'plugin_settings_page_content' );
210
+ $icon = 'dashicons-admin-plugins';
211
+ $position = 100;
212
+
213
+ add_submenu_page(
214
+ 'wpcf7',
215
+ $page_title,
216
+ $page_title,
217
+ $capability,
218
+ $this->page_slug,
219
+ $callback
220
+ );
221
+ }
222
+
223
+ /**
224
+ * The setting page template HTML
225
+ */
226
+ public function plugin_settings_page_content() {
227
+ $wpcf7_extensions = new WPCF7R_Extensions();
228
+ ?>
229
+ <section class="padbox">
230
+ <div class="wrap wrap-wpcf7redirect">
231
+ <h2>
232
+ <span>
233
+ <?php _e( 'Redirection For Contact Form 7', 'wpcf7-redirect' ); ?>
234
+ </span>
235
+ </h2>
236
+ <div class="user-message">
237
+ <ul>
238
+ <li>The new and improved Submission Action System is how redirection for Contact Form 7 processes submission data.</li>
239
+ <li>Submission Actions are like modules which can be added to each form.</li>
240
+ <li>You can add multiple actions to a single form or a single action can be added to any form.</li>
241
+ <li>Create custom login/registration forms, manage your conversion pixels, set conditional rules and much more.</li>
242
+ </ul>
243
+ <form method="post">
244
+ <br/>
245
+ <input type="submit" value="Check For Updates" class="button-primary" name="extensions-updates-check"/>
246
+ <br/><br/>
247
+ <lable>
248
+ <input type="checkbox" checked="checked" name="update-banner" value="1">
249
+ <?php _e( 'Get available deals and sales (no spam of any kind).' ); ?>
250
+ </label>
251
+ </form>
252
+ </div>
253
+ <div class="postbox extensions-list-wrap">
254
+ <div class="padbox">
255
+ <?php $wpcf7_extensions->display(); ?>
256
+ </div>
257
+ </div>
258
+ <div class="postbox">
259
+ <div class="padbox">
260
+ <form method="POST" action="options.php" name="wpcfr7_settings">
261
+ <?php
262
+ do_action( 'before_settings_fields' );
263
+ settings_fields( $this->page_slug );
264
+ do_settings_sections( $this->page_slug );
265
+ submit_button();
266
+ ?>
267
+ </form>
268
+ <?php if ( is_wpcf7r_debug() ) : ?>
269
+ <input type="button" name="migrate_again" value="<?php _e( 'Migrate Again from Old Settings', 'wpcf7-redirect' ); ?>" class="migrate_again button button-secondary" />
270
+ <input type="button" name="reset_all" value="<?php _e( 'Reset all Settings - BE CAREFUL! this will delete all Redirection for Contact Form 7 data.', 'wpcf7-redirect' ); ?>" class="cf7-redirect-reset button button-secondary" />
271
+
272
+ <h3><?php _e( 'Recreate from Debug', 'wpcf7-redirect' ); ?></h3>
273
+ <textarea id="debug-info" style="width:100%;"></textarea>
274
+ <button class="reacreate-from-debug button button-primary"><?php _e( 'Recreate From Debug', 'wpcf7-redirect' ); ?></button>
275
+ <?php endif; ?>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ </section>
280
+ <?php
281
+ }
282
+
283
+ /**
284
+ * Create a section on the admin settings page
285
+ */
286
+ public function section_callback( $arguments ) {
287
+ switch ( $arguments['id'] ) {
288
+ case 'serial_section':
289
+ echo sprintf( "In order to gain access to plugin updates, please enter your license key below. If you don't have a licence key, please <a href='%s' target='_blank'>click Here</a>.", $this->product_url );
290
+ break;
291
+ }
292
+ }
293
+
294
+ /**
295
+ * Add a link to the options page to the plugin description block.
296
+ */
297
+ function register_plugin_links( $links, $file ) {
298
+ if ( WPCF7_PRO_REDIRECT_BASE_NAME === $file ) {
299
+ $links[] = WPCF7r_Utils::get_settings_link();
300
+ }
301
+ return $links;
302
+ }
303
+ }
classes/class-wpcf7r-submission.php CHANGED
@@ -200,7 +200,7 @@ class WPCF7r_Submission {
200
  $wpcf7_form = get_cf7r_form( $cf7_form, $submission, $wpcf_validation_obj );
201
 
202
  $new_validation_obj = $wpcf_validation_obj;
203
-
204
  // Check if the form has validation actions.
205
  if ( $submission && $wpcf7_form->has_actions() ) {
206
  // process all actions.
200
  $wpcf7_form = get_cf7r_form( $cf7_form, $submission, $wpcf_validation_obj );
201
 
202
  $new_validation_obj = $wpcf_validation_obj;
203
+
204
  // Check if the form has validation actions.
205
  if ( $submission && $wpcf7_form->has_actions() ) {
206
  // process all actions.
classes/class-wpcf7r-updates.php CHANGED
@@ -1,146 +1,146 @@
1
- <?php
2
- /**
3
- * Class Wpcf7r_Updates
4
- * A class used for updating the plugin using th QS API
5
- */
6
-
7
- defined( 'ABSPATH' ) || exit;
8
-
9
- class Wpcf7r_Updates {
10
- // Plugin current version
11
- private $current_version;
12
-
13
- // Plugin remote update path
14
- private $update_url;
15
-
16
- // Plugin Slug (plugin_directory/plugin_file.php)
17
- private $plugin_slug;
18
-
19
- // Plugin name (plugin_file)
20
- private $slug;
21
-
22
- /**
23
- * Initialize a new instance of the WordPress Auto-Update class
24
- *
25
- * @param $current_version
26
- * @param $plugin_slug
27
- */
28
- public function __construct( $current_version, $plugin_slug ) {
29
- // Set the class public variables
30
- $this->current_version = $current_version;
31
- $this->update_url = add_query_arg( 'update', '', WPCF7_PRO_REDIRECT_PLUGIN_UPDATES );
32
-
33
- // Set the Plugin Slug
34
- $this->plugin_slug = $plugin_slug;
35
- list ($t1, $t2) = explode( '/', $plugin_slug );
36
- $this->slug = str_replace( '.php', '', $t2 );
37
-
38
- $this->activation_id = WPCF7r_Utils::get_activation_id();
39
- $this->serial = WPCF7r_Utils::get_serial_key();
40
- $this->domain = $_SERVER['HTTP_HOST'];
41
- // define the alternative API for updating checking
42
- add_filter( 'pre_set_site_transient_update_plugins', array( &$this, 'check_update' ) );
43
-
44
- // Define the alternative response for information checking
45
- add_filter( 'plugins_api', array( &$this, 'check_info' ), 10, 3 );
46
- }
47
-
48
- /**
49
- * Add our self-hosted autoupdate plugin to the filter transient
50
- *
51
- * @param $transient
52
- * @return 'self-hosted' autoupdate plugin to the filter transient
53
- */
54
- public function check_update( $transient ) {
55
-
56
- if ( empty( $transient->checked ) ) {
57
- return $transient;
58
- }
59
-
60
- // Get the remote version
61
- $remote_version = $this->get_remote( 'version' );
62
-
63
- if ( $remote_version && ! is_wp_error( $remote_version ) ) {
64
- // If a newer version is available, add the update
65
- if ( version_compare( $this->current_version, $remote_version->new_version, '<' ) ) {
66
- $obj = new stdClass();
67
- $obj->slug = $this->slug;
68
- $obj->new_version = $remote_version->new_version;
69
- $obj->url = $remote_version->url;
70
- $obj->requires = $remote_version->requires;
71
- $obj->plugin = $this->plugin_slug;
72
- $obj->package = $remote_version->package;
73
- $obj->tested = $remote_version->tested;
74
- $transient->response[ $this->plugin_slug ] = $obj;
75
- }
76
- }
77
-
78
- return $transient;
79
- }
80
-
81
- /**
82
- * Add our self-hosted description to the filter
83
- *
84
- * @param $false
85
- * @param $action
86
- * @param $arg
87
- * @return bool|object
88
- */
89
- public function check_info( $false, $action, $arg ) {
90
- if ( ( 'query_plugins' === $action || 'plugin_information' === $action ) &&
91
- isset( $arg->slug ) && $arg->slug === $this->slug ) {
92
-
93
- $information = $this->get_remote( 'info' );
94
-
95
- $information->sections = (array) $information->sections;
96
- $information->banners = (array) $information->banners;
97
-
98
- $array_pattern = array(
99
- '/^([\*\s])*(\d\d\.\d\d\.\d\d\d\d[^\n]*)/m',
100
- '/^\n+|^[\t\s]*\n+/m',
101
- '/\n/',
102
- );
103
- $array_replace = array(
104
- '<h4>$2</h4>',
105
- '</div><div>',
106
- '</div><div>',
107
- );
108
-
109
- $information->sections['changelog'] = '<div>' . preg_replace( $array_pattern, $array_replace, $information->sections['changelog'] ) . '</div>';
110
-
111
- return $information;
112
- }
113
-
114
- return $false;
115
- }
116
-
117
- /**
118
- * Return the remote version
119
- *
120
- * @param $action
121
- * @return string $remote_version
122
- */
123
- public function get_remote( $action = '' ) {
124
-
125
- $params = array(
126
- 'body' => array(
127
- 'action' => $action,
128
- 'activation_id' => $this->activation_id,
129
- 'serial' => $this->serial,
130
- 'plugin' => $this->plugin_slug,
131
- 'domain' => $this->domain,
132
- ),
133
- );
134
-
135
- // Make the POST request
136
- $response = wp_remote_post( $this->update_url, $params );
137
-
138
- // Check if response is valid
139
- if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
140
- $response = json_decode( wp_remote_retrieve_body( $response ) );
141
-
142
- }
143
-
144
- return $response;
145
- }
146
- }
1
+ <?php
2
+ /**
3
+ * Class Wpcf7r_Updates
4
+ * A class used for updating the plugin using th QS API
5
+ */
6
+
7
+ defined( 'ABSPATH' ) || exit;
8
+
9
+ class Wpcf7r_Updates {
10
+ // Plugin current version
11
+ private $current_version;
12
+
13
+ // Plugin remote update path
14
+ private $update_url;
15
+
16
+ // Plugin Slug (plugin_directory/plugin_file.php)
17
+ private $plugin_slug;
18
+
19
+ // Plugin name (plugin_file)
20
+ private $slug;
21
+
22
+ /**
23
+ * Initialize a new instance of the WordPress Auto-Update class
24
+ *
25
+ * @param $current_version
26
+ * @param $plugin_slug
27
+ */
28
+ public function __construct( $current_version, $plugin_slug ) {
29
+ // Set the class public variables
30
+ $this->current_version = $current_version;
31
+ $this->update_url = add_query_arg( 'update', '', WPCF7_PRO_REDIRECT_PLUGIN_UPDATES );
32
+
33
+ // Set the Plugin Slug
34
+ $this->plugin_slug = $plugin_slug;
35
+ list ($t1, $t2) = explode( '/', $plugin_slug );
36
+ $this->slug = str_replace( '.php', '', $t2 );
37
+
38
+ $this->activation_id = WPCF7r_Utils::get_activation_id();
39
+ $this->serial = WPCF7r_Utils::get_serial_key();
40
+ $this->domain = $_SERVER['HTTP_HOST'];
41
+ // define the alternative API for updating checking
42
+ add_filter( 'pre_set_site_transient_update_plugins', array( &$this, 'check_update' ) );
43
+
44
+ // Define the alternative response for information checking
45
+ add_filter( 'plugins_api', array( &$this, 'check_info' ), 10, 3 );
46
+ }
47
+
48
+ /**
49
+ * Add our self-hosted autoupdate plugin to the filter transient
50
+ *
51
+ * @param $transient
52
+ * @return 'self-hosted' autoupdate plugin to the filter transient
53
+ */
54
+ public function check_update( $transient ) {
55
+
56
+ if ( empty( $transient->checked ) ) {
57
+ return $transient;
58
+ }
59
+
60
+ // Get the remote version
61
+ $remote_version = $this->get_remote( 'version' );
62
+
63
+ if ( $remote_version && ! is_wp_error( $remote_version ) ) {
64
+ // If a newer version is available, add the update
65
+ if ( version_compare( $this->current_version, $remote_version->new_version, '<' ) ) {
66
+ $obj = new stdClass();
67
+ $obj->slug = $this->slug;
68
+ $obj->new_version = $remote_version->new_version;
69
+ $obj->url = $remote_version->url;
70
+ $obj->requires = $remote_version->requires;
71
+ $obj->plugin = $this->plugin_slug;
72
+ $obj->package = $remote_version->package;
73
+ $obj->tested = $remote_version->tested;
74
+ $transient->response[ $this->plugin_slug ] = $obj;
75
+ }
76
+ }
77
+
78
+ return $transient;
79
+ }
80
+
81
+ /**
82
+ * Add our self-hosted description to the filter
83
+ *
84
+ * @param $false
85
+ * @param $action
86
+ * @param $arg
87
+ * @return bool|object
88
+ */
89
+ public function check_info( $false, $action, $arg ) {
90
+ if ( ( 'query_plugins' === $action || 'plugin_information' === $action ) &&
91
+ isset( $arg->slug ) && $arg->slug === $this->slug ) {
92
+
93
+ $information = $this->get_remote( 'info' );
94
+
95
+ $information->sections = (array) $information->sections;
96
+ $information->banners = (array) $information->banners;
97
+
98
+ $array_pattern = array(
99
+ '/^([\*\s])*(\d\d\.\d\d\.\d\d\d\d[^\n]*)/m',
100
+ '/^\n+|^[\t\s]*\n+/m',
101
+ '/\n/',
102
+ );
103
+ $array_replace = array(
104
+ '<h4>$2</h4>',
105
+ '</div><div>',
106
+ '</div><div>',
107
+ );
108
+
109
+ $information->sections['changelog'] = '<div>' . preg_replace( $array_pattern, $array_replace, $information->sections['changelog'] ) . '</div>';
110
+
111
+ return $information;
112
+ }
113
+
114
+ return $false;
115
+ }
116
+
117
+ /**
118
+ * Return the remote version
119
+ *
120
+ * @param $action
121
+ * @return string $remote_version
122
+ */
123
+ public function get_remote( $action = '' ) {
124
+
125
+ $params = array(
126
+ 'body' => array(
127
+ 'action' => $action,
128
+ 'activation_id' => $this->activation_id,
129
+ 'serial' => $this->serial,
130
+ 'plugin' => $this->plugin_slug,
131
+ 'domain' => $this->domain,
132
+ ),
133
+ );
134
+
135
+ // Make the POST request
136
+ $response = wp_remote_post( $this->update_url, $params );
137
+
138
+ // Check if response is valid
139
+ if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) {
140
+ $response = json_decode( wp_remote_retrieve_body( $response ) );
141
+
142
+ }
143
+
144
+ return $response;
145
+ }
146
+ }
classes/class-wpcf7r-user.php CHANGED
@@ -1,117 +1,117 @@
1
- <?php
2
- /**
3
- * Class WPCF7R_user - Parent class that handles all redirect actions.
4
- */
5
- defined( 'ABSPATH' ) || exit;
6
-
7
- class WPCF7R_User {
8
-
9
- public function __construct() {
10
- add_action( 'show_user_profile', array( $this, 'additional_profile_fields' ) );
11
- add_action( 'edit_user_profile', array( $this, 'additional_profile_fields' ) );
12
-
13
- add_action( 'personal_options_update', array( $this, 'save_custom_user_fields' ) );
14
- add_action( 'edit_user_profile_update', array( $this, 'save_custom_user_fields' ) );
15
-
16
- }
17
-
18
- private function get_all_forms_fields() {
19
- $this->fields = array();
20
-
21
- $cf7_forms = $this->get_cf7_forms();
22
-
23
- if ( $cf7_forms ) {
24
- foreach ( $cf7_forms as $cf7_form ) {
25
- $wpcf7r_form = get_cf7r_form( $cf7_form->ID );
26
-
27
- $actions = $wpcf7r_form->get_actions( 'default' );
28
-
29
- foreach ( $actions as $action ) {
30
- $action_type = $action->get( 'action_type' );
31
- if ( 'register' === $action_type ) {
32
-
33
- $fields_mapping = maybe_unserialize( $action->get( 'user_fields' ) );
34
-
35
- if ( $fields_mapping ) {
36
- $this->fields = array_merge( $fields_mapping, $this->fields );
37
- }
38
- }
39
- }
40
- }
41
- }
42
-
43
- return $this->fields;
44
- }
45
-
46
- private function get_cf7_forms() {
47
- $args = array(
48
- 'post_type' => 'wpcf7_contact_form',
49
- 'posts_per_page' => -1,
50
- );
51
-
52
- $cf7_forms = get_posts( $args );
53
-
54
- return $cf7_forms;
55
- }
56
-
57
- /**
58
- * Add new fields above 'Update' button.
59
- *
60
- * @param $user_id
61
- */
62
- public function save_custom_user_fields( $user_id ) {
63
-
64
- if ( ! current_user_can( 'edit_user', $user_id ) ) {
65
- return false;
66
- }
67
-
68
- $fields = $this->get_all_forms_fields();
69
-
70
- if ( ! $fields ) {
71
- return;
72
- }
73
-
74
- foreach ( $fields as $field ) {
75
- $value = isset( $_POST[ $field['user_field_key'] ] ) ? $_POST[ $field['user_field_key'] ] : '';
76
- update_user_meta( $user_id, $field['user_field_key'], $value );
77
- }
78
- }
79
-
80
- /**
81
- * Add new fields above 'Update' button.
82
- *
83
- * @param WP_User $user User object.
84
- */
85
- public function additional_profile_fields( $user ) {
86
-
87
- $fields = $this->get_all_forms_fields();
88
-
89
- if ( ! $fields ) {
90
- return;
91
- }
92
-
93
- ?>
94
-
95
- <h3><?php _e( 'Extra profile information', 'wpcf7-redirect' ); ?></h3>
96
-
97
- <table class="form-table">
98
- <?php foreach ( $fields as $field ) : ?>
99
- <?php
100
- if ( ! $field['user_field_key'] ) {
101
- continue;}
102
- ?>
103
- <?php $value = get_user_meta( $user->ID, $field['user_field_key'], true ); ?>
104
- <tr>
105
- <th>
106
- <label for="<?php echo $field['user_field_key']; ?>"><?php echo $field['user_field_key']; ?></label>
107
- </th>
108
- <td>
109
- <input type="text" name="<?php echo $field['user_field_key']; ?>" value="<?php echo $value; ?>">
110
- </td>
111
- </tr>
112
- <?php endforeach; ?>
113
- </table>
114
- <?php
115
- }
116
-
117
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7R_user - Parent class that handles all redirect actions.
4
+ */
5
+ defined( 'ABSPATH' ) || exit;
6
+
7
+ class WPCF7R_User {
8
+
9
+ public function __construct() {
10
+ add_action( 'show_user_profile', array( $this, 'additional_profile_fields' ) );
11
+ add_action( 'edit_user_profile', array( $this, 'additional_profile_fields' ) );
12
+
13
+ add_action( 'personal_options_update', array( $this, 'save_custom_user_fields' ) );
14
+ add_action( 'edit_user_profile_update', array( $this, 'save_custom_user_fields' ) );
15
+
16
+ }
17
+
18
+ private function get_all_forms_fields() {
19
+ $this->fields = array();
20
+
21
+ $cf7_forms = $this->get_cf7_forms();
22
+
23
+ if ( $cf7_forms ) {
24
+ foreach ( $cf7_forms as $cf7_form ) {
25
+ $wpcf7r_form = get_cf7r_form( $cf7_form->ID );
26
+
27
+ $actions = $wpcf7r_form->get_actions( 'default' );
28
+
29
+ foreach ( $actions as $action ) {
30
+ $action_type = $action->get( 'action_type' );
31
+ if ( 'register' === $action_type ) {
32
+
33
+ $fields_mapping = maybe_unserialize( $action->get( 'user_fields' ) );
34
+
35
+ if ( $fields_mapping ) {
36
+ $this->fields = array_merge( $fields_mapping, $this->fields );
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ return $this->fields;
44
+ }
45
+
46
+ private function get_cf7_forms() {
47
+ $args = array(
48
+ 'post_type' => 'wpcf7_contact_form',
49
+ 'posts_per_page' => -1,
50
+ );
51
+
52
+ $cf7_forms = get_posts( $args );
53
+
54
+ return $cf7_forms;
55
+ }
56
+
57
+ /**
58
+ * Add new fields above 'Update' button.
59
+ *
60
+ * @param $user_id
61
+ */
62
+ public function save_custom_user_fields( $user_id ) {
63
+
64
+ if ( ! current_user_can( 'edit_user', $user_id ) ) {
65
+ return false;
66
+ }
67
+
68
+ $fields = $this->get_all_forms_fields();
69
+
70
+ if ( ! $fields ) {
71
+ return;
72
+ }
73
+
74
+ foreach ( $fields as $field ) {
75
+ $value = isset( $_POST[ $field['user_field_key'] ] ) ? $_POST[ $field['user_field_key'] ] : '';
76
+ update_user_meta( $user_id, $field['user_field_key'], $value );
77
+ }
78
+ }
79
+
80
+ /**
81
+ * Add new fields above 'Update' button.
82
+ *
83
+ * @param WP_User $user User object.
84
+ */
85
+ public function additional_profile_fields( $user ) {
86
+
87
+ $fields = $this->get_all_forms_fields();
88
+
89
+ if ( ! $fields ) {
90
+ return;
91
+ }
92
+
93
+ ?>
94
+
95
+ <h3><?php _e( 'Extra profile information', 'wpcf7-redirect' ); ?></h3>
96
+
97
+ <table class="form-table">
98
+ <?php foreach ( $fields as $field ) : ?>
99
+ <?php
100
+ if ( ! $field['user_field_key'] ) {
101
+ continue;}
102
+ ?>
103
+ <?php $value = get_user_meta( $user->ID, $field['user_field_key'], true ); ?>
104
+ <tr>
105
+ <th>
106
+ <label for="<?php echo $field['user_field_key']; ?>"><?php echo $field['user_field_key']; ?></label>
107
+ </th>
108
+ <td>
109
+ <input type="text" name="<?php echo $field['user_field_key']; ?>" value="<?php echo $value; ?>">
110
+ </td>
111
+ </tr>
112
+ <?php endforeach; ?>
113
+ </table>
114
+ <?php
115
+ }
116
+
117
+ }
classes/class-wpcf7r-utils.php CHANGED
@@ -1,1080 +1,1040 @@
1
- <?php
2
- /**
3
- * Class WPCF7r_Utils file.
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- /**
9
- * Contact form 7 redirect utilities
10
- */
11
- class WPCF7r_Utils {
12
- public $banner_version = 1.01;
13
- public static $instance;
14
- public static $actions_list = array();
15
- public static $rendered_elements = array();
16
-
17
- public function __construct() {
18
- self::$instance = $this;
19
-
20
- $this->api = new Qs_Api();
21
- }
22
-
23
- /**
24
- * Add a message to the session collector
25
- *
26
- * @param $type
27
- * @param $message
28
- */
29
- public static function add_admin_notice( $type, $message ) {
30
- $_SESSION['wpcf7r_admin_notices'][ $type ] = $message;
31
- }
32
-
33
- /**
34
- * Register a new type of action
35
- *
36
- * @param $name
37
- * @param $title
38
- * @param $class
39
- */
40
- public static function register_wpcf7r_actions( $name, $title, $class, $order ) {
41
- self::$actions_list[ $name ] = array(
42
- 'label' => $title,
43
- 'attr' => '',
44
- 'handler' => $class,
45
- 'order' => $order,
46
- );
47
- }
48
-
49
- /**
50
- * Get action name
51
- *
52
- * @param $action_type
53
- */
54
- public static function get_action_name( $action_type ) {
55
- return isset( self::$actions_list[ $action_type ] ) ? self::$actions_list[ $action_type ]['label'] : $action_type;
56
- }
57
-
58
- /**
59
- * Get the available actions
60
- */
61
- public static function get_wpcf7r_actions() {
62
- return self::$actions_list;
63
- }
64
-
65
- /**
66
- * Duplicate all action posts and connect it to the new created form
67
- *
68
- * @param $new_cf7
69
- */
70
- public function duplicate_form_support( $new_cf7 ) {
71
-
72
- if ( isset( $_POST['wpcf7-copy'] ) && 'Duplicate' === $_POST['wpcf7-copy'] || ( isset( $_GET['action'] ) && 'copy' === $_GET['action'] ) ) {
73
-
74
- $original_post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : (int) $_GET['post'];
75
-
76
- $original_cf7 = get_cf7r_form( $original_post_id );
77
-
78
- $original_action_posts = $original_cf7->get_actions( 'default' );
79
-
80
- if ( $original_action_posts ) {
81
- foreach ( $original_action_posts as $original_action_post ) {
82
- $new_post_id = $this->duplicate_post( $original_action_post->action_post );
83
-
84
- update_post_meta( $new_post_id, 'wpcf7_id', $new_cf7->id() );
85
- }
86
- }
87
- }
88
- }
89
-
90
- /**
91
- * After form deletion delete all its actions
92
- *
93
- * @param int $post_id
94
- */
95
- public function delete_all_form_actions( $post_id ) {
96
- global $post_type;
97
-
98
- if ( get_post_type( $post_id ) === 'wpcf7_contact_form' ) {
99
-
100
- $wpcf7r = get_cf7r_form( $post_id );
101
-
102
- $action_posts = $wpcf7r->get_actions( 'default' );
103
-
104
- if ( $action_posts ) {
105
- foreach ( $action_posts as $action_post ) {
106
- wp_delete_post( $action_post->get_id() );
107
- }
108
- }
109
- };
110
-
111
- }
112
-
113
- /**
114
- * Dupplicate contact form and all its actions
115
- *
116
- * @param $action
117
- */
118
- public function duplicate_post( $action ) {
119
- global $wpdb;
120
-
121
- // if you don't want current user to be the new post author,
122
- // then change next couple of lines to this: $new_post_author = $post->post_author;
123
- $current_user = wp_get_current_user();
124
- $new_post_author = $current_user->ID;
125
- $post_id = $action->ID;
126
-
127
- // if post data exists, create the post duplicate
128
- if ( isset( $action ) && null !== $action ) {
129
- // new post data array
130
- $args = array(
131
- 'comment_status' => $action->comment_status,
132
- 'ping_status' => $action->ping_status,
133
- 'post_author' => $new_post_author,
134
- 'post_content' => $action->post_content,
135
- 'post_excerpt' => $action->post_excerpt,
136
- 'post_name' => $action->post_name,
137
- 'post_parent' => $action->post_parent,
138
- 'post_password' => $action->post_password,
139
- 'post_status' => 'private',
140
- 'post_title' => $action->post_title,
141
- 'post_type' => $action->post_type,
142
- 'to_ping' => $action->to_ping,
143
- 'menu_order' => $action->menu_order,
144
- );
145
-
146
- // insert the post by wp_insert_post() function
147
- $new_post_id = wp_insert_post( $args );
148
-
149
- // get all current post terms ad set them to the new post draft
150
- $taxonomies = get_object_taxonomies( $action->post_type );
151
-
152
- // returns array of taxonomy names for post type, ex array("category", "post_tag");
153
- if ( $taxonomies ) {
154
- foreach ( $taxonomies as $taxonomy ) {
155
- $post_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'slugs' ) );
156
- wp_set_object_terms( $new_post_id, $post_terms, $taxonomy, false );
157
- }
158
- }
159
-
160
- // duplicate all post meta just in two SQL queries
161
- $sql = $wpdb->prepare( "SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id='%s'", $post_id );
162
-
163
- $post_meta_infos = $wpdb->get_results( $sql );
164
-
165
- if ( count( $post_meta_infos ) !== 0 ) {
166
- $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
167
-
168
- foreach ( $post_meta_infos as $meta_info ) {
169
- $meta_key = $meta_info->meta_key;
170
- if ( '_wp_old_slug' === $meta_key ) {
171
- continue;
172
- }
173
- $meta_value = addslashes( $meta_info->meta_value );
174
- $sql_query_sel[] = "SELECT $new_post_id, '$meta_key', '$meta_value'";
175
- }
176
-
177
- $sql_query .= implode( ' UNION ALL ', $sql_query_sel );
178
-
179
- $wpdb->query( $sql_query );
180
- }
181
-
182
- return $new_post_id;
183
- }
184
- }
185
-
186
- /**
187
- * Set actions order
188
- */
189
- public function set_action_menu_order() {
190
- global $wpdb;
191
-
192
- parse_str( $_POST['data']['order'], $data );
193
-
194
- if ( ! is_array( $data ) ) {
195
- return false;
196
- }
197
-
198
- // get objects per now page
199
- $id_arr = array();
200
- foreach ( $data as $key => $values ) {
201
- foreach ( $values as $position => $id ) {
202
- $id_arr[] = $id;
203
- }
204
- }
205
-
206
- foreach ( $id_arr as $key => $post_id ) {
207
- $menu_order = $key + 1;
208
- $wpdb->update( $wpdb->posts, array( 'menu_order' => $menu_order ), array( 'ID' => intval( $post_id ) ) );
209
- }
210
- }
211
-
212
- /**
213
- * Render elements required by actions
214
- *
215
- * @return void
216
- */
217
- public function render_actions_elements( $properties, $form ) {
218
-
219
- $action_posts = wpcf7r_get_actions( 'wpcf7r_action', -1, $form->id(), 'default', array(), true );
220
-
221
- if ( $action_posts ) {
222
- foreach ( $action_posts as $action_post ) {
223
- $action = WPCF7R_Action::get_action( $action_post );
224
-
225
- if ( ! isset( self::$rendered_elements[ $action_post->ID ] ) ) {
226
- // these actions will run once.
227
- if ( is_object( $action ) && ! is_wp_error( $action ) && method_exists( $action, 'render_callback_once' ) ) {
228
- $properties = $action->render_callback_once( $properties, $form );
229
- }
230
-
231
- self::$rendered_elements[ $action_post->ID ] = $action_post->ID;
232
- }
233
-
234
- // Render_callback will be called several times because of the way contact form 7 uses these properties.
235
- // use state and db on the action to limit it to run only once.
236
- if ( is_object( $action ) && ! is_wp_error( $action ) && method_exists( $action, 'render_callback' ) ) {
237
- $properties = $action->render_callback( $properties, $form );
238
- }
239
- }
240
- }
241
-
242
- return $properties;
243
- }
244
- /**
245
- * Delete an action
246
- */
247
- public function delete_action_post() {
248
- $data = isset( $_POST['data'] ) ? $_POST['data'] : '';
249
-
250
- $response['status'] = 'failed';
251
-
252
- if ( $data ) {
253
- foreach ( $data as $post_to_delete ) {
254
- if ( $post_to_delete ) {
255
- wp_trash_post( $post_to_delete['post_id'] );
256
- $response['status'] = 'deleted';
257
- }
258
- }
259
- }
260
-
261
- wp_send_json( $response );
262
- }
263
-
264
- /**
265
- * Show notices on admin panel
266
- */
267
- public function show_admin_notices() {
268
- global $wp_sessions;
269
-
270
- if ( ! isset( $_SESSION['wpcf7r_admin_notices'] ) ) {
271
- return;
272
- }
273
-
274
- foreach ( $_SESSION['wpcf7r_admin_notices'] as $notice_type => $notice ) :
275
- ?>
276
-
277
- <div class="notice notice-error is-dismissible <?php echo $notice_type; ?>">
278
- <p><?php echo $notice; ?></p>
279
- </div>
280
-
281
- <?php
282
- endforeach;
283
- }
284
-
285
- /**
286
- * Send debug data to querysol support api
287
- *
288
- * @return void
289
- */
290
- public function send_debug_info() {
291
- $data = isset( $_POST['data'] ) ? $_POST['data'] : '';
292
-
293
- if ( $data['form_id'] ) {
294
- $debug_data = WPCF7r_Form_Helper::get_debug_data( $data['form_id'] );
295
-
296
- $api = new Qs_Api();
297
-
298
- $args = array(
299
- 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
300
- );
301
-
302
- $url = add_query_arg( 'site_url', home_url(), WPCF7_PRO_REDIRECT_DEBUG_URL );
303
-
304
- $api->api_call( $url, json_encode( array( 'debug_data' => $debug_data ) ), $args );
305
- }
306
-
307
- wp_send_json_success();
308
- }
309
- /**
310
- * Auto function to migrate old plugin to the new one
311
- *
312
- * @param $migration_action migrate_from_cf7_redirect/migrate_from_cf7_api
313
- * @param boolean $force
314
- */
315
- public static function auto_migrate( $migration_action, $force = false ) {
316
-
317
- $instance = self::get_instance();
318
-
319
- $cf7_forms = self::get_all_cf7_forms();
320
-
321
- foreach ( $cf7_forms as $cf7_form_id ) {
322
-
323
- $cf7r_form = new WPCF7R_Form( $cf7_form_id );
324
-
325
- $instance->delete_all_form_actions( $cf7_form_id );
326
-
327
- if ( ! $cf7r_form->has_migrated( $migration_action ) || $force ) {
328
- $instance->convert_to_action( $cf7r_form, $migration_action, $cf7_form_id, 'default' );
329
-
330
- $cf7r_form->update_migration( $migration_action );
331
- }
332
- }
333
- }
334
-
335
- /**
336
- * Create form and actions based on debug info
337
- *
338
- * @return void
339
- */
340
- public function import_from_debug() {
341
- $data = isset( $_POST['data'] ) && $_POST['data'] ? $_POST['data'] : '';
342
-
343
- if ( $data ) {
344
- $formdata = unserialize( base64_decode( $data['debug_info'] ) );
345
-
346
- $this->install_plugins( json_decode( $formdata['plugins'] ) );
347
-
348
- $form_id = $this->import_form( $formdata );
349
-
350
- $this->import_actions( $form_id, $formdata['actions'] );
351
-
352
- }
353
- }
354
-
355
- /**
356
- * Import actions to post
357
- *
358
- * @return void
359
- */
360
- private function import_actions( $form_id, $actions ) {
361
- foreach ( $actions as $action ) {
362
- $post = (array) $action->action_post;
363
- unset( $post['ID'] );
364
-
365
- $post_id = wp_insert_post( $post );
366
-
367
- foreach ( $action->fields_values as $meta_key => $meta_values ) {
368
- if ( 'wpcf7_id' === $meta_key ) {
369
- continue;
370
- }
371
- foreach ( $meta_values as $meta_value ) {
372
- add_post_meta( $post_id, $meta_key, maybe_unserialize( $meta_value ) );
373
- }
374
- }
375
-
376
- update_post_meta( $post_id, 'wpcf7_id', $form_id );
377
-
378
- }
379
- }
380
- /**
381
- * Import form from debug info
382
- *
383
- * @return void
384
- */
385
- private function import_form( $formdata ) {
386
-
387
- $new_form_post = (array) $formdata['form_post'];
388
-
389
- unset( $new_form_post['ID'] );
390
-
391
- $form_id = wp_insert_post( $new_form_post );
392
-
393
- foreach ( $formdata['form_meta'] as $meta_key => $meta_values ) {
394
- foreach ( $meta_values as $meta_value ) {
395
- add_post_meta( $form_id, $meta_key, maybe_unserialize( $meta_value ) );
396
- }
397
- }
398
-
399
- return $form_id;
400
- }
401
- /**
402
- * Install a list of plugins
403
- *
404
- * @return void
405
- */
406
- private function install_plugins( $plugins ) {
407
-
408
- include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
409
- include_once ABSPATH . 'wp-admin/includes/file.php';
410
- include_once ABSPATH . 'wp-admin/includes/misc.php';
411
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
412
-
413
- $results = array();
414
-
415
- foreach ( $plugins as $slug => $plugin ) {
416
-
417
- if ( ! is_plugin_active( $slug ) ) {
418
- $results[ $slug ] = $this->install_plugin( $slug );
419
- }
420
- }
421
-
422
- return $results;
423
- }
424
-
425
- /**
426
- * Install and activate a plugin
427
- *
428
- * @return void
429
- */
430
- public function install_plugin( $plugin_slug ) {
431
-
432
- $api = plugins_api(
433
- 'plugin_information',
434
- array(
435
- 'slug' => basename( $plugin_slug, '.php' ),
436
- 'fields' => array(
437
- 'short_description' => false,
438
- 'sections' => false,
439
- 'requires' => false,
440
- 'rating' => false,
441
- 'ratings' => false,
442
- 'downloaded' => false,
443
- 'last_updated' => false,
444
- 'added' => false,
445
- 'tags' => false,
446
- 'compatibility' => false,
447
- 'homepage' => false,
448
- 'donate_link' => false,
449
- ),
450
- )
451
- );
452
-
453
- if ( ! is_wp_error( $api ) ) {
454
- $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
455
-
456
- $upgrader->install( $api->download_link );
457
-
458
- if ( ! is_wp_error( $upgrader->skin->api ) ) {
459
- return activate_plugin( $plugin_slug );
460
- } else {
461
- return $upgrader->skin->api;
462
- }
463
- } else {
464
- return $api;
465
- }
466
-
467
- }
468
-
469
- /**
470
- * Get all Contact Forms 7 forms
471
- */
472
- public static function get_all_cf7_forms() {
473
- $args = array(
474
- 'post_type' => 'wpcf7_contact_form',
475
- 'posts_per_page' => -1,
476
- 'fields' => 'ids',
477
- 'suppress_filters' => true,
478
- );
479
-
480
- $cf7_forms = get_posts( $args );
481
-
482
- return $cf7_forms;
483
- }
484
-
485
- /**
486
- * Duplicate an existing action and connect it with the form.
487
- *
488
- * @return void
489
- */
490
- public function duplicate_action() {
491
- $results['action_row'] = '';
492
-
493
- if ( isset( $_POST['data'] ) ) {
494
- $action_data = $_POST['data'];
495
-
496
- $action_post_id = $action_data['post_id'];
497
-
498
- $action_post = get_post( $action_post_id );
499
-
500
- $new_action_post_id = $this->duplicate_post( $action_post );
501
-
502
- update_post_meta( $new_action_post_id, 'wpcf7_id', $action_data['form_id'] );
503
-
504
- $action = WPCF7R_Action::get_action( $new_action_post_id );
505
-
506
- $results['action_row'] = $action->get_action_row();
507
- }
508
-
509
- wp_send_json( $results );
510
- }
511
- /**
512
- * Create a new action post
513
- */
514
- public function add_action_post() {
515
- $results['action_row'] = '';
516
-
517
- $post_id = isset( $_POST['data']['post_id'] ) ? (int) sanitize_text_field( $_POST['data']['post_id'] ) : '';
518
- $rule_id = isset( $_POST['data']['rule_id'] ) ? sanitize_text_field( $_POST['data']['rule_id'] ) : '';
519
- $action_type = isset( $_POST['data']['action_type'] ) ? sanitize_text_field( $_POST['data']['action_type'] ) : '';
520
-
521
- $rule_name = __( 'New Action', 'wpcf7-redirect' );
522
-
523
- $this->cf7r_form = get_cf7r_form( $post_id );
524
-
525
- $actions = array();
526
-
527
- // migrate from old api plugin
528
- if ( 'migrate_from_cf7_api' === $action_type || 'migrate_from_cf7_redirect' === $action_type ) {
529
- if ( ! $this->cf7r_form->has_migrated( $action_type ) ) {
530
- $actions = $this->convert_to_action( $action_type, $post_id, $rule_name, $rule_id );
531
- $this->cf7r_form->update_migration( $action_type );
532
- }
533
- } else {
534
- $actions[] = $this->create_action( $post_id, $rule_name, $rule_id, $action_type );
535
- }
536
-
537
- if ( $actions ) {
538
- foreach ( $actions as $action ) {
539
- if ( ! is_wp_error( $action ) ) {
540
- $results['action_row'] .= $action->get_action_row();
541
- } else {
542
- wp_send_json( $results );
543
- }
544
- }
545
- } else {
546
- $results['action_row'] = '';
547
- }
548
-
549
- wp_send_json( $results );
550
- }
551
-
552
- /**
553
- * Convert old plugin data to new structure
554
- *
555
- * @param $required_conversion
556
- * @param $post_id
557
- * @param $rule_name
558
- * @param $rule_id
559
- * @return Actions
560
- *
561
- * @version 1.2
562
- */
563
-
564
- private function convert_to_action( $cf7r_form, $required_conversion, $post_id, $rule_id ) {
565
- $actions = array();
566
-
567
- if ( 'migrate_from_cf7_redirect' === $required_conversion ) {
568
- $old_api_action = $cf7r_form->get_cf7_redirection_settings();
569
-
570
- if ( $old_api_action ) {
571
- // CREATE JAVSCRIPT ACTION.
572
- if ( $old_api_action['fire_sctipt'] ) {
573
- $javscript_action = $this->create_action( $post_id, __( 'Migrated Javascript Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'FireScript' );
574
-
575
- $javscript_action->set( 'script', $old_api_action['fire_sctipt'] );
576
- $javscript_action->set( 'action_status', 'on' );
577
-
578
- unset( $old_api_action['fire_sctipt'] );
579
-
580
- $actions[] = $javscript_action;
581
- }
582
-
583
- // CREATE REDIRECT ACTION.
584
- $action = $this->create_action( $post_id, __( 'Migrated Redirect Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'redirect' );
585
-
586
- $action->set( 'action_status', 'on' );
587
-
588
- foreach ( $old_api_action as $key => $value ) {
589
- $action->set( $key, $value );
590
- }
591
-
592
- $actions[] = $action;
593
-
594
- }
595
- } elseif ( 'migrate_from_cf7_api' === $required_conversion ) {
596
- $old_api_action = $cf7r_form->get_cf7_api_settings();
597
-
598
- if ( $old_api_action ) {
599
-
600
- $old_api__wpcf7_api_data = $old_api_action['_wpcf7_api_data'];
601
- $old_tags_map = $old_api_action['_wpcf7_api_data_map'];
602
-
603
- if ( 'params' === $old_api__wpcf7_api_data['input_type'] ) {
604
- $action_type = 'api_url_request';
605
- } elseif ( 'xml' === $old_api__wpcf7_api_data['input_type'] || 'json' === $old_api__wpcf7_api_data['input_type'] ) {
606
- $action_type = 'api_json_xml_request';
607
- }
608
-
609
- $action = $this->create_action( $post_id, __( 'Migrated Data from Old Plugin', 'wpcf7-redirect' ), $rule_id, $action_type );
610
-
611
- if ( ! is_wp_error( $action ) ) {
612
- $action->set( 'base_url', $old_api__wpcf7_api_data['base_url'] );
613
- $action->set( 'input_type', strtolower( $old_api__wpcf7_api_data['method'] ) );
614
- $action->set( 'record_type', strtolower( $old_api__wpcf7_api_data['input_type'] ) );
615
- $action->set( 'show_debug', '' );
616
- $action->set( 'action_status', $old_api__wpcf7_api_data['send_to_api'] );
617
-
618
- $tags_map = array();
619
-
620
- if ( $old_tags_map ) {
621
- foreach ( $old_tags_map as $tag_key => $tag_api_key ) {
622
- $tags_map[ $tag_key ] = $tag_api_key;
623
- }
624
-
625
- $action->set( 'tags_map', $tags_map );
626
- }
627
-
628
- if ( isset( $old_api_action['_template'] ) && $old_api_action['_template'] ) {
629
- $action->set( 'request_template', $old_api_action['_template'] );
630
- } elseif ( isset( $old_api_action['_json_template'] ) && $old_api_action['_json_template'] ) {
631
- $action->set( 'request_template', $old_api_action['_json_template'] );
632
- }
633
-
634
- $actions[] = $action;
635
- }
636
- }
637
- }
638
-
639
- return $actions;
640
- }
641
-
642
- /**
643
- * Create new post that will hold the action
644
- *
645
- * @param $rule_name
646
- * @param $rule_id
647
- * @param $action_type
648
- * @return Actions
649
- */
650
- public function create_action( $post_id, $rule_name, $rule_id, $action_type ) {
651
- $new_action_post = array(
652
- 'post_type' => 'wpcf7r_action',
653
- 'post_title' => $rule_name,
654
- 'post_status' => 'private',
655
- 'menu_order' => 1,
656
- 'meta_input' => array(
657
- 'wpcf7_id' => $post_id,
658
- 'wpcf7_rule_id' => $rule_id,
659
- 'action_type' => $action_type,
660
- 'action_status' => 'on',
661
- ),
662
- );
663
-
664
- $new_action_id = wp_insert_post( $new_action_post );
665
-
666
- return WPCF7R_Action::get_action( $new_action_id, $post_id );
667
- }
668
-
669
- /**
670
- * Get instance
671
- */
672
- public static function get_instance() {
673
- if ( null === self::$instance ) {
674
- self::$instance = new self();
675
- }
676
- return self::$instance;
677
- }
678
-
679
- /**
680
- * Get the banner template
681
- */
682
- public function get_banner() {
683
- if ( $this->get_option( 'last_banner_displayed' ) === $this->banner_version ) {
684
- return;
685
- }
686
- ob_start();
687
-
688
- include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'banner.php';
689
-
690
- $banner_html = ob_get_clean();
691
-
692
- echo $banner_html;
693
- }
694
-
695
- /**
696
- * Show a message containing the license details
697
- */
698
- public function license_details_message() {
699
- if ( ! self::get_activation_id() ) {
700
- printf(
701
- '<tr class="plugin-update-tr active" id="wpcf7-redirect-pro-update" data-slug="wpcf7-redirect-pro" data-plugin="contact-form-7-redirection-pro/wpcf7-redirect-pro.php"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p><strong>%s</strong> %s</p></div></td></tr>',
702
- __( 'Please activate plugin license for updates', 'wpcf7-redirect' ),
703
- self::get_settings_link()
704
- );
705
-
706
- }
707
-
708
- }
709
-
710
- /**
711
- * Get all data related with plugin activation
712
- */
713
- public static function get_activation_data() {
714
- return get_option( 'wpcf7r_activation_data' );
715
- }
716
-
717
- /**
718
- * Get date of plugin license expiration
719
- */
720
- public static function get_activation_expiration() {
721
- return get_option( 'wpcf7r_activation_expiration' );
722
- }
723
-
724
- /**
725
- * A validation function to test the serial key
726
- */
727
- public static function validate_serial_key() {
728
- $instance = self::get_instance();
729
-
730
- $serial = self::get_serial_key();
731
- $activation_id = self::get_activation_id();
732
-
733
- return $instance->api->validate_serial( $activation_id, $serial );
734
- }
735
-
736
- /**
737
- * Get the used serial key
738
- */
739
- public static function get_serial_key() {
740
- return get_option( 'wpcf7r_serial_number' );
741
- }
742
-
743
- /**
744
- * Delete the used setial key
745
- */
746
- public static function delete_serial_key() {
747
- return delete_option( 'wpcf7r_serial_number' );
748
- }
749
-
750
- /**
751
- * Get a url to deactivate plugin license
752
- */
753
- public static function get_deactivation_link() {
754
- $url = self::get_plugin_settings_page_url();
755
-
756
- $url = add_query_arg( 'wpcf7r_deactivate_license', '', $url );
757
-
758
- return $url;
759
- }
760
-
761
- /**
762
- * Get the plugin settings link
763
- */
764
- public static function get_plugin_settings_page_url() {
765
- return get_admin_url( null, 'options-general.php?page=wpc7_redirect' );
766
- }
767
-
768
- /**
769
- * Get the activation id
770
- */
771
- public static function get_activation_id() {
772
- return get_option( 'wpcf7r_activation_id' );
773
- }
774
-
775
- /**
776
- * Get a link to the admin settings panel
777
- */
778
- public static function get_settings_link() {
779
- return '<a href="' . self::get_plugin_settings_page_url() . '">' . __( 'Settings', 'wpcf7-redirect' ) . '</a>';
780
- }
781
-
782
- /**
783
- * Close banner
784
- */
785
- public function close_banner() {
786
- $this->update_option( 'last_banner_displayed', $this->banner_version );
787
- }
788
-
789
- /**
790
- * Get specific option by key
791
- */
792
- public function get_option( $key ) {
793
- $options = $this->get_wpcf7_options();
794
-
795
- return isset( $options[ $key ] ) ? $options[ $key ] : '';
796
- }
797
-
798
- /**
799
- * Update specific option
800
- *
801
- * @param $key
802
- * @param $value
803
- */
804
- public function update_option( $key, $value ) {
805
- $options = $this->get_wpcf7_options();
806
-
807
- $options[ $key ] = $value;
808
-
809
- $this->save_wpcf7_options( $options );
810
-
811
- }
812
-
813
- /**
814
- * Get the plugin options
815
- */
816
- public function get_wpcf7_options() {
817
- return get_option( 'wpcf_redirect_options' );
818
- }
819
-
820
- /**
821
- * Save the plugin options
822
- *
823
- * @param $options
824
- */
825
- public function save_wpcf7_options( $options ) {
826
- update_option( 'wpcf_redirect_options', $options );
827
- }
828
-
829
- /**
830
- * Get a list of avaiable text functions and callbacks
831
- *
832
- * @param string $func
833
- * @param string $field_type
834
- */
835
- public static function get_available_text_functions( $func = '', $field_type = '' ) {
836
- $functions = array(
837
- 'md5' => array( 'WPCF7r_Utils', 'func_md5' ),
838
- 'base64_encode' => array( 'WPCF7r_Utils', 'func_base64_encode' ),
839
- 'utf8_encode' => array( 'WPCF7r_Utils', 'func_utf8_encode' ),
840
- 'urlencode' => array( 'WPCF7r_Utils', 'func_urlencode' ),
841
- 'json_encode' => array( 'WPCF7r_Utils', 'func_json_encode' ),
842
- 'esc_html' => array( 'WPCF7r_Utils', 'func_esc_html' ),
843
- 'esc_attr' => array( 'WPCF7r_Utils', 'func_esc_attr' ),
844
- );
845
-
846
- if ( 'checkbox' === $field_type || 'checkbox*' === $field_type || 'all' === $field_type ) {
847
- $functions['implode'] = array( 'WPCF7r_Utils', 'func_implode' );
848
- }
849
-
850
- $functions = apply_filters( 'get_available_text_functions', $functions );
851
-
852
- if ( $func ) {
853
- return isset( $functions[ $func ] ) ? $functions[ $func ] : '';
854
- }
855
-
856
- return $functions;
857
- }
858
-
859
- /**
860
- * [func_utf8_encode description]
861
- *
862
- * @param $value
863
- */
864
- public static function func_utf8_encode( $value ) {
865
- return apply_filters( 'func_utf8_encode', utf8_encode( $value ), $value );
866
- }
867
-
868
- /**
869
- * [func_base64_encode description]
870
- *
871
- * @param $value
872
- */
873
- public static function func_base64_encode( $value ) {
874
- return apply_filters( 'func_base64_encode', base64_encode( $value ), $value );
875
- }
876
-
877
- /**
878
- * [func_base64_encode description]
879
- *
880
- * @param $value
881
- */
882
- public static function func_urlencode( $value ) {
883
- return apply_filters( 'func_urlencode', urlencode( $value ), $value );
884
- }
885
-
886
- /**
887
- * Esc html callback
888
- *
889
- * @param $value
890
- */
891
- public function func_esc_html( $value ) {
892
- return apply_filters( 'func_esc_html', esc_html( $value ), $value );
893
- }
894
-
895
- /**
896
- * Esc Attr callback
897
- *
898
- * @param $value
899
- */
900
- public function func_esc_attr( $value ) {
901
- return apply_filters( 'func_esc_attr', esc_attr( $value ), $value );
902
- }
903
-
904
- /**
905
- * Json Encode callback
906
- *
907
- * @param $value
908
- */
909
- public function func_json_encode( $value ) {
910
- return apply_filters( 'func_json_encode', wp_json_encode( $value ), $value );
911
- }
912
- /**
913
- * [func_base64_encode description]
914
- *
915
- * @param $value
916
- */
917
- public static function func_implode( $value ) {
918
-
919
- if ( is_array( $value ) ) {
920
- $value = apply_filters( 'func_implode', implode( ',', $value ), $value );
921
- }
922
-
923
- return $value;
924
- }
925
-
926
- /**
927
- * md5 function
928
- *
929
- * @param $value
930
- */
931
- public static function func_md5( $value ) {
932
- return apply_filters( 'func_md5', md5( $value ), $value );
933
- }
934
-
935
- public function make_api_test() {
936
- parse_str( $_POST['data']['data'], $data );
937
-
938
- if ( ! is_array( $data ) ) {
939
- die( '-1' );
940
- }
941
-
942
- $action_id = isset( $_POST['data']['action_id'] ) ? (int) sanitize_text_field( $_POST['data']['action_id'] ) : '';
943
- $cf7_id = isset( $_POST['data']['cf7_id'] ) ? (int) sanitize_text_field( $_POST['data']['cf7_id'] ) : '';
944
- $rule_id = isset( $_POST['data']['rule_id'] ) ? $_POST['data']['rule_id'] : '';
945
-
946
- add_filter( 'after_qs_cf7_api_send_lead', array( $this, 'after_fake_submission' ), 10, 3 );
947
-
948
- if ( isset( $data['wpcf7-redirect']['actions'] ) ) {
949
- $response = array();
950
-
951
- $posted_action = reset( $data['wpcf7-redirect']['actions'] );
952
- $posted_action = $posted_action['test_values'];
953
- $_POST = $posted_action;
954
- // this will create a fake form submission
955
- $this->cf7r_form = get_cf7r_form( $cf7_id );
956
- $this->cf7r_form->enable_action( $action_id );
957
-
958
- $cf7_form = $this->cf7r_form->get_cf7_form_instance();
959
- $submission = WPCF7_Submission::get_instance( $cf7_form );
960
-
961
- if ( $submission->get_status() === 'validation_failed' ) {
962
- $invalid_fields = $submission->get_invalid_fields();
963
- $response['status'] = 'failed';
964
- $response['invalid_fields'] = $invalid_fields;
965
- } else {
966
- $response['status'] = 'success';
967
- $response['html'] = $this->get_test_api_results_html();
968
- }
969
-
970
- wp_send_json( $response );
971
- }
972
- }
973
- /**
974
- * Store the results from the API
975
- *
976
- * @param $result
977
- * @param $record
978
- */
979
- public function after_fake_submission( $result, $record, $args ) {
980
- $this->results = $result;
981
- $this->record = $record;
982
- $this->request = $args;
983
-
984
- return $result;
985
- }
986
-
987
- /**
988
- * Show A preview for the action
989
- */
990
- public function show_action_preview() {
991
- if ( isset( $_GET['wpcf7r-preview'] ) ) {
992
- $action_id = (int) $_GET['wpcf7r-preview'];
993
-
994
- $action = WPCF7R_Action::get_action( $action_id );
995
-
996
- $action->dynamic_params['popup-template'] = isset( $_GET['template'] ) ? sanitize_text_field( $_GET['template'] ) : '';
997
-
998
- $action->preview();
999
- }
1000
- }
1001
-
1002
- /**
1003
- * Get action template in case field are dynamicaly changed
1004
- */
1005
- public function get_action_template() {
1006
- $data = isset( $_POST['data'] ) ? $_POST['data'] : '';
1007
-
1008
- $response = array();
1009
-
1010
- if ( isset( $data['action_id'] ) ) {
1011
- $action_id = (int) $data['action_id'];
1012
- $popup_template = sanitize_text_field( $data['template'] );
1013
-
1014
- $action = WPCF7R_Action::get_action( $action_id );
1015
-
1016
- ob_start();
1017
-
1018
- $params = array(
1019
- 'popup-template' => $popup_template,
1020
- );
1021
-
1022
- $action->get_action_settings( $params );
1023
-
1024
- $response['action_content'] = ob_get_clean();
1025
- }
1026
-
1027
- wp_send_json_success( $response );
1028
- }
1029
-
1030
- /**
1031
- * Get the popup html
1032
- */
1033
- public function get_test_api_results_html() {
1034
- ob_start();
1035
-
1036
- include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'popup-api-test.php';
1037
-
1038
- return ob_get_clean();
1039
- }
1040
-
1041
- /**
1042
- * Get lists, maybe create new list
1043
- */
1044
- public function get_mailchimp_lists() {
1045
- $data = $_POST['data'];
1046
-
1047
- $results = array();
1048
-
1049
- if ( ! is_array( $data ) ) {
1050
- die( '-1' );
1051
- }
1052
-
1053
- $api_key = $data['mailchimp_api_key'];
1054
-
1055
- // A request to create a list
1056
- if ( isset( $data['list_name'] ) && $data['list_name'] ) {
1057
- $new_list_results = WPCF7R_Mailchimp_Helper::create_list( $api_key, $data['list_name'] );
1058
-
1059
- if ( is_wp_error( $new_list_results ) ) {
1060
- $results['error'] = $new_list_results->get_error_message();
1061
- }
1062
- }
1063
-
1064
- // In the end return the lists
1065
- if ( ! isset( $results['error'] ) ) {
1066
- $lists = WPCF7R_Mailchimp_Helper::get_lists_clean( $api_key );
1067
-
1068
- update_post_meta( $data['action_id'], 'mailchimp_lists', $lists );
1069
-
1070
- if ( is_wp_error( $lists ) ) {
1071
- $results['error'] = $lists->get_error_message();
1072
- } else {
1073
- $results['lists'] = $lists;
1074
- }
1075
- }
1076
-
1077
- wp_send_json( $results );
1078
- }
1079
-
1080
- }
1
+ <?php
2
+ /**
3
+ * Class WPCF7r_Utils file.
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ /**
9
+ * Contact form 7 redirect utilities
10
+ */
11
+ class WPCF7r_Utils {
12
+ public $banner_version = 1.01;
13
+ public static $instance;
14
+ public static $actions_list = array();
15
+ public static $rendered_elements = array();
16
+
17
+ public function __construct() {
18
+ self::$instance = $this;
19
+
20
+ $this->api = new Qs_Api();
21
+ }
22
+
23
+ /**
24
+ * Add a message to the session collector
25
+ *
26
+ * @param $type
27
+ * @param $message
28
+ */
29
+ public static function add_admin_notice( $type, $message ) {
30
+ $_SESSION['wpcf7r_admin_notices'][ $type ] = $message;
31
+ }
32
+
33
+ /**
34
+ * Register a new type of action
35
+ *
36
+ * @param $name
37
+ * @param $title
38
+ * @param $class
39
+ */
40
+ public static function register_wpcf7r_actions( $name, $title, $class, $order ) {
41
+ self::$actions_list[ $name ] = array(
42
+ 'label' => $title,
43
+ 'attr' => '',
44
+ 'handler' => $class,
45
+ 'order' => $order,
46
+ );
47
+ }
48
+
49
+ /**
50
+ * Get action name
51
+ *
52
+ * @param $action_type
53
+ */
54
+ public static function get_action_name( $action_type ) {
55
+ return isset( self::$actions_list[ $action_type ] ) ? self::$actions_list[ $action_type ]['label'] : $action_type;
56
+ }
57
+
58
+ /**
59
+ * Get the available actions
60
+ */
61
+ public static function get_wpcf7r_actions() {
62
+ return self::$actions_list;
63
+ }
64
+
65
+ /**
66
+ * Duplicate all action posts and connect it to the new created form
67
+ *
68
+ * @param $new_cf7
69
+ */
70
+ public function duplicate_form_support( $new_cf7 ) {
71
+
72
+ if ( isset( $_POST['wpcf7-copy'] ) && 'Duplicate' === $_POST['wpcf7-copy'] || ( isset( $_GET['action'] ) && 'copy' === $_GET['action'] ) ) {
73
+
74
+ $original_post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : (int) $_GET['post'];
75
+
76
+ $original_cf7 = get_cf7r_form( $original_post_id );
77
+
78
+ $original_action_posts = $original_cf7->get_actions( 'default' );
79
+
80
+ if ( $original_action_posts ) {
81
+ foreach ( $original_action_posts as $original_action_post ) {
82
+ $new_post_id = $this->duplicate_post( $original_action_post->action_post );
83
+
84
+ update_post_meta( $new_post_id, 'wpcf7_id', $new_cf7->id() );
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ /**
91
+ * After form deletion delete all its actions
92
+ *
93
+ * @param int $post_id
94
+ */
95
+ public function delete_all_form_actions( $post_id ) {
96
+ global $post_type;
97
+
98
+ if ( get_post_type( $post_id ) === 'wpcf7_contact_form' ) {
99
+
100
+ $wpcf7r = get_cf7r_form( $post_id );
101
+
102
+ $action_posts = $wpcf7r->get_actions( 'default' );
103
+
104
+ if ( $action_posts ) {
105
+ foreach ( $action_posts as $action_post ) {
106
+ wp_delete_post( $action_post->get_id() );
107
+ }
108
+ }
109
+ };
110
+
111
+ }
112
+
113
+ /**
114
+ * Dupplicate contact form and all its actions
115
+ *
116
+ * @param $action
117
+ */
118
+ public function duplicate_post( $action ) {
119
+ global $wpdb;
120
+
121
+ // if you don't want current user to be the new post author,
122
+ // then change next couple of lines to this: $new_post_author = $post->post_author;
123
+ $current_user = wp_get_current_user();
124
+ $new_post_author = $current_user->ID;
125
+ $post_id = $action->ID;
126
+
127
+ // if post data exists, create the post duplicate
128
+ if ( isset( $action ) && null !== $action ) {
129
+ // new post data array
130
+ $args = array(
131
+ 'comment_status' => $action->comment_status,
132
+ 'ping_status' => $action->ping_status,
133
+ 'post_author' => $new_post_author,
134
+ 'post_content' => $action->post_content,
135
+ 'post_excerpt' => $action->post_excerpt,
136
+ 'post_name' => $action->post_name,
137
+ 'post_parent' => $action->post_parent,
138
+ 'post_password' => $action->post_password,
139
+ 'post_status' => 'private',
140
+ 'post_title' => $action->post_title,
141
+ 'post_type' => $action->post_type,
142
+ 'to_ping' => $action->to_ping,
143
+ 'menu_order' => $action->menu_order,
144
+ );
145
+
146
+ // insert the post by wp_insert_post() function
147
+ $new_post_id = wp_insert_post( $args );
148
+
149
+ // get all current post terms ad set them to the new post draft
150
+ $taxonomies = get_object_taxonomies( $action->post_type );
151
+
152
+ // returns array of taxonomy names for post type, ex array("category", "post_tag");
153
+ if ( $taxonomies ) {
154
+ foreach ( $taxonomies as $taxonomy ) {
155
+ $post_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'slugs' ) );
156
+ wp_set_object_terms( $new_post_id, $post_terms, $taxonomy, false );
157
+ }
158
+ }
159
+
160
+ // duplicate all post meta just in two SQL queries
161
+ $sql = $wpdb->prepare( "SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id='%s'", $post_id );
162
+
163
+ $post_meta_infos = $wpdb->get_results( $sql );
164
+
165
+ if ( count( $post_meta_infos ) !== 0 ) {
166
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
167
+
168
+ foreach ( $post_meta_infos as $meta_info ) {
169
+ $meta_key = $meta_info->meta_key;
170
+ if ( '_wp_old_slug' === $meta_key ) {
171
+ continue;
172
+ }
173
+ $meta_value = addslashes( $meta_info->meta_value );
174
+ $sql_query_sel[] = "SELECT $new_post_id, '$meta_key', '$meta_value'";
175
+ }
176
+
177
+ $sql_query .= implode( ' UNION ALL ', $sql_query_sel );
178
+
179
+ $wpdb->query( $sql_query );
180
+ }
181
+
182
+ return $new_post_id;
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Set actions order
188
+ */
189
+ public function set_action_menu_order() {
190
+ global $wpdb;
191
+
192
+ parse_str( $_POST['data']['order'], $data );
193
+
194
+ if ( ! is_array( $data ) ) {
195
+ return false;
196
+ }
197
+
198
+ // get objects per now page
199
+ $id_arr = array();
200
+ foreach ( $data as $key => $values ) {
201
+ foreach ( $values as $position => $id ) {
202
+ $id_arr[] = $id;
203
+ }
204
+ }
205
+
206
+ foreach ( $id_arr as $key => $post_id ) {
207
+ $menu_order = $key + 1;
208
+ $wpdb->update( $wpdb->posts, array( 'menu_order' => $menu_order ), array( 'ID' => intval( $post_id ) ) );
209
+ }
210
+ }
211
+
212
+ /**
213
+ * Render elements required by actions
214
+ *
215
+ * @return void
216
+ */
217
+ public function render_actions_elements( $properties, $form ) {
218
+
219
+ $action_posts = wpcf7r_get_actions( 'wpcf7r_action', -1, $form->id(), 'default', array(), true );
220
+
221
+ if ( $action_posts ) {
222
+ foreach ( $action_posts as $action_post ) {
223
+ $action = WPCF7R_Action::get_action( $action_post );
224
+
225
+ if ( ! isset( self::$rendered_elements[ $action_post->ID ] ) ) {
226
+ // these actions will run once.
227
+ if ( is_object( $action ) && ! is_wp_error( $action ) && method_exists( $action, 'render_callback_once' ) ) {
228
+ $properties = $action->render_callback_once( $properties, $form );
229
+ }
230
+
231
+ self::$rendered_elements[ $action_post->ID ] = $action_post->ID;
232
+ }
233
+
234
+ // Render_callback will be called several times because of the way contact form 7 uses these properties.
235
+ // use state and db on the action to limit it to run only once.
236
+ if ( is_object( $action ) && ! is_wp_error( $action ) && method_exists( $action, 'render_callback' ) ) {
237
+ $properties = $action->render_callback( $properties, $form );
238
+ }
239
+ }
240
+ }
241
+
242
+ return $properties;
243
+ }
244
+ /**
245
+ * Delete an action
246
+ */
247
+ public function delete_action_post() {
248
+ $data = isset( $_POST['data'] ) ? $_POST['data'] : '';
249
+
250
+ $response['status'] = 'failed';
251
+
252
+ if ( $data ) {
253
+ foreach ( $data as $post_to_delete ) {
254
+ if ( $post_to_delete ) {
255
+ wp_trash_post( $post_to_delete['post_id'] );
256
+ $response['status'] = 'deleted';
257
+ }
258
+ }
259
+ }
260
+
261
+ wp_send_json( $response );
262
+ }
263
+
264
+ /**
265
+ * Show notices on admin panel
266
+ */
267
+ public function show_admin_notices() {
268
+ global $wp_sessions;
269
+
270
+ if ( ! isset( $_SESSION['wpcf7r_admin_notices'] ) ) {
271
+ return;
272
+ }
273
+
274
+ foreach ( $_SESSION['wpcf7r_admin_notices'] as $notice_type => $notice ) :
275
+ ?>
276
+
277
+ <div class="notice notice-error is-dismissible <?php echo $notice_type; ?>">
278
+ <p><?php echo $notice; ?></p>
279
+ </div>
280
+
281
+ <?php
282
+ endforeach;
283
+ }
284
+
285
+ /**
286
+ * Send debug data to querysol support api
287
+ *
288
+ * @return void
289
+ */
290
+ public function send_debug_info() {
291
+ $data = isset( $_POST['data'] ) ? $_POST['data'] : '';
292
+
293
+ if ( $data['form_id'] ) {
294
+ $debug_data = WPCF7r_Form_Helper::get_debug_data( $data['form_id'] );
295
+
296
+ $api = new Qs_Api();
297
+
298
+ $args = array(
299
+ 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
300
+ );
301
+
302
+ $url = add_query_arg( 'site_url', home_url(), WPCF7_PRO_REDIRECT_DEBUG_URL );
303
+
304
+ $api->api_call( $url, json_encode( array( 'debug_data' => $debug_data ) ), $args );
305
+ }
306
+
307
+ wp_send_json_success();
308
+ }
309
+ /**
310
+ * Auto function to migrate old plugin to the new one
311
+ *
312
+ * @param $migration_action migrate_from_cf7_redirect/migrate_from_cf7_api
313
+ * @param boolean $force
314
+ */
315
+ public static function auto_migrate( $migration_action, $force = false ) {
316
+
317
+ $instance = self::get_instance();
318
+
319
+ $cf7_forms = self::get_all_cf7_forms();
320
+
321
+ foreach ( $cf7_forms as $cf7_form_id ) {
322
+
323
+ $cf7r_form = new WPCF7R_Form( $cf7_form_id );
324
+
325
+ $instance->delete_all_form_actions( $cf7_form_id );
326
+
327
+ if ( ! $cf7r_form->has_migrated( $migration_action ) || $force ) {
328
+ $instance->convert_to_action( $cf7r_form, $migration_action, $cf7_form_id, 'default' );
329
+
330
+ $cf7r_form->update_migration( $migration_action );
331
+ }
332
+ }
333
+ }
334
+
335
+ /**
336
+ * Create form and actions based on debug info
337
+ *
338
+ * @return void
339
+ */
340
+ public function import_from_debug() {
341
+ $data = isset( $_POST['data'] ) && $_POST['data'] ? $_POST['data'] : '';
342
+
343
+ if ( $data ) {
344
+ $formdata = unserialize( base64_decode( $data['debug_info'] ) );
345
+
346
+ $this->install_plugins( json_decode( $formdata['plugins'] ) );
347
+
348
+ $form_id = $this->import_form( $formdata );
349
+
350
+ $this->import_actions( $form_id, $formdata['actions'] );
351
+
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Import actions to post
357
+ *
358
+ * @return void
359
+ */
360
+ private function import_actions( $form_id, $actions ) {
361
+ foreach ( $actions as $action ) {
362
+ $post = (array) $action->action_post;
363
+ unset( $post['ID'] );
364
+
365
+ $post_id = wp_insert_post( $post );
366
+
367
+ foreach ( $action->fields_values as $meta_key => $meta_values ) {
368
+ if ( 'wpcf7_id' === $meta_key ) {
369
+ continue;
370
+ }
371
+ foreach ( $meta_values as $meta_value ) {
372
+ add_post_meta( $post_id, $meta_key, maybe_unserialize( $meta_value ) );
373
+ }
374
+ }
375
+
376
+ update_post_meta( $post_id, 'wpcf7_id', $form_id );
377
+
378
+ }
379
+ }
380
+ /**
381
+ * Import form from debug info
382
+ *
383
+ * @return void
384
+ */
385
+ private function import_form( $formdata ) {
386
+
387
+ $new_form_post = (array) $formdata['form_post'];
388
+
389
+ unset( $new_form_post['ID'] );
390
+
391
+ $form_id = wp_insert_post( $new_form_post );
392
+
393
+ foreach ( $formdata['form_meta'] as $meta_key => $meta_values ) {
394
+ foreach ( $meta_values as $meta_value ) {
395
+ add_post_meta( $form_id, $meta_key, maybe_unserialize( $meta_value ) );
396
+ }
397
+ }
398
+
399
+ return $form_id;
400
+ }
401
+ /**
402
+ * Install a list of plugins
403
+ *
404
+ * @return void
405
+ */
406
+ private function install_plugins( $plugins ) {
407
+
408
+ include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
409
+ include_once ABSPATH . 'wp-admin/includes/file.php';
410
+ include_once ABSPATH . 'wp-admin/includes/misc.php';
411
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
412
+
413
+ $results = array();
414
+
415
+ foreach ( $plugins as $slug => $plugin ) {
416
+
417
+ if ( ! is_plugin_active( $slug ) ) {
418
+ $results[ $slug ] = $this->install_plugin( $slug );
419
+ }
420
+ }
421
+
422
+ return $results;
423
+ }
424
+
425
+ /**
426
+ * Install and activate a plugin
427
+ *
428
+ * @return void
429
+ */
430
+ public function install_plugin( $plugin_slug ) {
431
+
432
+ $api = plugins_api(
433
+ 'plugin_information',
434
+ array(
435
+ 'slug' => basename( $plugin_slug, '.php' ),
436
+ 'fields' => array(
437
+ 'short_description' => false,
438
+ 'sections' => false,
439
+ 'requires' => false,
440
+ 'rating' => false,
441
+ 'ratings' => false,
442
+ 'downloaded' => false,
443
+ 'last_updated' => false,
444
+ 'added' => false,
445
+ 'tags' => false,
446
+ 'compatibility' => false,
447
+ 'homepage' => false,
448
+ 'donate_link' => false,
449
+ ),
450
+ )
451
+ );
452
+
453
+ if ( ! is_wp_error( $api ) ) {
454
+ $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
455
+
456
+ $upgrader->install( $api->download_link );
457
+
458
+ if ( ! is_wp_error( $upgrader->skin->api ) ) {
459
+ return activate_plugin( $plugin_slug );
460
+ } else {
461
+ return $upgrader->skin->api;
462
+ }
463
+ } else {
464
+ return $api;
465
+ }
466
+
467
+ }
468
+
469
+ /**
470
+ * Get all Contact Forms 7 forms
471
+ */
472
+ public static function get_all_cf7_forms() {
473
+ $args = array(
474
+ 'post_type' => 'wpcf7_contact_form',
475
+ 'posts_per_page' => -1,
476
+ 'fields' => 'ids',
477
+ 'suppress_filters' => true,
478
+ );
479
+
480
+ $cf7_forms = get_posts( $args );
481
+
482
+ return $cf7_forms;
483
+ }
484
+
485
+ /**
486
+ * Duplicate an existing action and connect it with the form.
487
+ *
488
+ * @return void
489
+ */
490
+ public function duplicate_action() {
491
+ $results['action_row'] = '';
492
+
493
+ if ( isset( $_POST['data'] ) ) {
494
+ $action_data = $_POST['data'];
495
+
496
+ $action_post_id = $action_data['post_id'];
497
+
498
+ $action_post = get_post( $action_post_id );
499
+
500
+ $new_action_post_id = $this->duplicate_post( $action_post );
501
+
502
+ update_post_meta( $new_action_post_id, 'wpcf7_id', $action_data['form_id'] );
503
+
504
+ $action = WPCF7R_Action::get_action( $new_action_post_id );
505
+
506
+ $results['action_row'] = $action->get_action_row();
507
+ }
508
+
509
+ wp_send_json( $results );
510
+ }
511
+ /**
512
+ * Create a new action post
513
+ */
514
+ public function add_action_post() {
515
+ $results['action_row'] = '';
516
+
517
+ $post_id = isset( $_POST['data']['post_id'] ) ? (int) sanitize_text_field( $_POST['data']['post_id'] ) : '';
518
+ $rule_id = isset( $_POST['data']['rule_id'] ) ? sanitize_text_field( $_POST['data']['rule_id'] ) : '';
519
+ $action_type = isset( $_POST['data']['action_type'] ) ? sanitize_text_field( $_POST['data']['action_type'] ) : '';
520
+
521
+ $rule_name = __( 'New Action', 'wpcf7-redirect' );
522
+
523
+ $this->cf7r_form = get_cf7r_form( $post_id );
524
+
525
+ $actions = array();
526
+
527
+ // migrate from old api plugin
528
+ if ( 'migrate_from_cf7_api' === $action_type || 'migrate_from_cf7_redirect' === $action_type ) {
529
+ if ( ! $this->cf7r_form->has_migrated( $action_type ) ) {
530
+ $actions = $this->convert_to_action( $action_type, $post_id, $rule_name, $rule_id );
531
+ $this->cf7r_form->update_migration( $action_type );
532
+ }
533
+ } else {
534
+ $actions[] = $this->create_action( $post_id, $rule_name, $rule_id, $action_type );
535
+ }
536
+
537
+ if ( $actions ) {
538
+ foreach ( $actions as $action ) {
539
+ if ( ! is_wp_error( $action ) ) {
540
+ $results['action_row'] .= $action->get_action_row();
541
+ } else {
542
+ wp_send_json( $results );
543
+ }
544
+ }
545
+ } else {
546
+ $results['action_row'] = '';
547
+ }
548
+
549
+ wp_send_json( $results );
550
+ }
551
+
552
+ /**
553
+ * Convert old plugin data to new structure
554
+ *
555
+ * @param $required_conversion
556
+ * @param $post_id
557
+ * @param $rule_name
558
+ * @param $rule_id
559
+ * @return Actions
560
+ *
561
+ * @version 1.2
562
+ */
563
+
564
+ private function convert_to_action( $cf7r_form, $required_conversion, $post_id, $rule_id ) {
565
+ $actions = array();
566
+
567
+ if ( 'migrate_from_cf7_redirect' === $required_conversion ) {
568
+ $old_api_action = $cf7r_form->get_cf7_redirection_settings();
569
+
570
+ if ( $old_api_action ) {
571
+ // CREATE JAVSCRIPT ACTION.
572
+ if ( $old_api_action['fire_sctipt'] ) {
573
+ $javscript_action = $this->create_action( $post_id, __( 'Migrated Javascript Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'FireScript' );
574
+
575
+ $javscript_action->set( 'script', $old_api_action['fire_sctipt'] );
576
+ $javscript_action->set( 'action_status', 'on' );
577
+
578
+ unset( $old_api_action['fire_sctipt'] );
579
+
580
+ $actions[] = $javscript_action;
581
+ }
582
+
583
+ // CREATE REDIRECT ACTION.
584
+ $action = $this->create_action( $post_id, __( 'Migrated Redirect Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'redirect' );
585
+
586
+ $action->set( 'action_status', 'on' );
587
+
588
+ foreach ( $old_api_action as $key => $value ) {
589
+ $action->set( $key, $value );
590
+ }
591
+
592
+ $actions[] = $action;
593
+
594
+ }
595
+ } elseif ( 'migrate_from_cf7_api' === $required_conversion ) {
596
+ $old_api_action = $cf7r_form->get_cf7_api_settings();
597
+
598
+ if ( $old_api_action ) {
599
+
600
+ $old_api__wpcf7_api_data = $old_api_action['_wpcf7_api_data'];
601
+ $old_tags_map = $old_api_action['_wpcf7_api_data_map'];
602
+
603
+ if ( 'params' === $old_api__wpcf7_api_data['input_type'] ) {
604
+ $action_type = 'api_url_request';
605
+ } elseif ( 'xml' === $old_api__wpcf7_api_data['input_type'] || 'json' === $old_api__wpcf7_api_data['input_type'] ) {
606
+ $action_type = 'api_json_xml_request';
607
+ }
608
+
609
+ $action = $this->create_action( $post_id, __( 'Migrated Data from Old Plugin', 'wpcf7-redirect' ), $rule_id, $action_type );
610
+
611
+ if ( ! is_wp_error( $action ) ) {
612
+ $action->set( 'base_url', $old_api__wpcf7_api_data['base_url'] );
613
+ $action->set( 'input_type', strtolower( $old_api__wpcf7_api_data['method'] ) );
614
+ $action->set( 'record_type', strtolower( $old_api__wpcf7_api_data['input_type'] ) );
615
+ $action->set( 'show_debug', '' );
616
+ $action->set( 'action_status', $old_api__wpcf7_api_data['send_to_api'] );
617
+
618
+ $tags_map = array();
619
+
620
+ if ( $old_tags_map ) {
621
+ foreach ( $old_tags_map as $tag_key => $tag_api_key ) {
622
+ $tags_map[ $tag_key ] = $tag_api_key;
623
+ }
624
+
625
+ $action->set( 'tags_map', $tags_map );
626
+ }
627
+
628
+ if ( isset( $old_api_action['_template'] ) && $old_api_action['_template'] ) {
629
+ $action->set( 'request_template', $old_api_action['_template'] );
630
+ } elseif ( isset( $old_api_action['_json_template'] ) && $old_api_action['_json_template'] ) {
631
+ $action->set( 'request_template', $old_api_action['_json_template'] );
632
+ }
633
+
634
+ $actions[] = $action;
635
+ }
636
+ }
637
+ }
638
+
639
+ return $actions;
640
+ }
641
+
642
+ /**
643
+ * Create new post that will hold the action
644
+ *
645
+ * @param $rule_name
646
+ * @param $rule_id
647
+ * @param $action_type
648
+ * @return Actions
649
+ */
650
+ public function create_action( $post_id, $rule_name, $rule_id, $action_type ) {
651
+ $new_action_post = array(
652
+ 'post_type' => 'wpcf7r_action',
653
+ 'post_title' => $rule_name,
654
+ 'post_status' => 'private',
655
+ 'menu_order' => 1,
656
+ 'meta_input' => array(
657
+ 'wpcf7_id' => $post_id,
658
+ 'wpcf7_rule_id' => $rule_id,
659
+ 'action_type' => $action_type,
660
+ 'action_status' => 'on',
661
+ ),
662
+ );
663
+
664
+ $new_action_id = wp_insert_post( $new_action_post );
665
+
666
+ return WPCF7R_Action::get_action( $new_action_id, $post_id );
667
+ }
668
+
669
+ /**
670
+ * Get instance
671
+ */
672
+ public static function get_instance() {
673
+ if ( null === self::$instance ) {
674
+ self::$instance = new self();
675
+ }
676
+ return self::$instance;
677
+ }
678
+
679
+ /**
680
+ * Get the banner template
681
+ */
682
+ public function get_banner() {
683
+ if ( $this->get_option( 'last_banner_displayed' ) === $this->banner_version ) {
684
+ return;
685
+ }
686
+ ob_start();
687
+
688
+ include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'banner.php';
689
+
690
+ $banner_html = ob_get_clean();
691
+
692
+ echo $banner_html;
693
+ }
694
+
695
+ /**
696
+ * Show a message containing the license details
697
+ */
698
+ public function license_details_message() {
699
+ if ( ! self::get_activation_id() ) {
700
+ printf(
701
+ '<tr class="plugin-update-tr active" id="wpcf7-redirect-pro-update" data-slug="wpcf7-redirect-pro" data-plugin="contact-form-7-redirection-pro/wpcf7-redirect-pro.php"><td colspan="3" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p><strong>%s</strong> %s</p></div></td></tr>',
702
+ __( 'Please activate plugin license for updates', 'wpcf7-redirect' ),
703
+ self::get_settings_link()
704
+ );
705
+
706
+ }
707
+
708
+ }
709
+
710
+ /**
711
+ * Get all data related with plugin activation
712
+ */
713
+ public static function get_activation_data() {
714
+ return get_option( 'wpcf7r_activation_data' );
715
+ }
716
+
717
+ /**
718
+ * Get date of plugin license expiration
719
+ */
720
+ public static function get_activation_expiration() {
721
+ return get_option( 'wpcf7r_activation_expiration' );
722
+ }
723
+
724
+ /**
725
+ * A validation function to test the serial key
726
+ */
727
+ public static function validate_serial_key() {
728
+ $instance = self::get_instance();
729
+
730
+ $serial = self::get_serial_key();
731
+ $activation_id = self::get_activation_id();
732
+
733
+ return $instance->api->validate_serial( $activation_id, $serial );
734
+ }
735
+
736
+ /**
737
+ * Get the used serial key
738
+ */
739
+ public static function get_serial_key() {
740
+ return get_option( 'wpcf7r_serial_number' );
741
+ }
742
+
743
+ /**
744
+ * Delete the used setial key
745
+ */
746
+ public static function delete_serial_key() {
747
+ return delete_option( 'wpcf7r_serial_number' );
748
+ }
749
+
750
+ /**
751
+ * Get a url to deactivate plugin license
752
+ */
753
+ public static function get_deactivation_link() {
754
+ $url = self::get_plugin_settings_page_url();
755
+
756
+ $url = add_query_arg( 'wpcf7r_deactivate_license', '', $url );
757
+
758
+ return $url;
759
+ }
760
+
761
+ /**
762
+ * Get the plugin settings link
763
+ */
764
+ public static function get_plugin_settings_page_url() {
765
+ return get_admin_url( null, 'options-general.php?page=wpc7_redirect' );
766
+ }
767
+
768
+ /**
769
+ * Get the activation id
770
+ */
771
+ public static function get_activation_id() {
772
+ return get_option( 'wpcf7r_activation_id' );
773
+ }
774
+
775
+ /**
776
+ * Get a link to the admin settings panel
777
+ */
778
+ public static function get_settings_link() {
779
+ return '<a href="' . self::get_plugin_settings_page_url() . '">' . __( 'Settings', 'wpcf7-redirect' ) . '</a>';
780
+ }
781
+
782
+ /**
783
+ * Close banner
784
+ */
785
+ public function close_banner() {
786
+ $this->update_option( 'last_banner_displayed', $this->banner_version );
787
+ }
788
+
789
+ /**
790
+ * Get specific option by key
791
+ */
792
+ public function get_option( $key ) {
793
+ $options = $this->get_wpcf7_options();
794
+
795
+ return isset( $options[ $key ] ) ? $options[ $key ] : '';
796
+ }
797
+
798
+ /**
799
+ * Update specific option
800
+ *
801
+ * @param $key
802
+ * @param $value
803
+ */
804
+ public function update_option( $key, $value ) {
805
+ $options = $this->get_wpcf7_options();
806
+
807
+ $options[ $key ] = $value;
808
+
809
+ $this->save_wpcf7_options( $options );
810
+
811
+ }
812
+
813
+ /**
814
+ * Get the plugin options
815
+ */
816
+ public function get_wpcf7_options() {
817
+ return get_option( 'wpcf_redirect_options' );
818
+ }
819
+
820
+ /**
821
+ * Save the plugin options
822
+ *
823
+ * @param $options
824
+ */
825
+ public function save_wpcf7_options( $options ) {
826
+ update_option( 'wpcf_redirect_options', $options );
827
+ }
828
+
829
+ /**
830
+ * Get a list of avaiable text functions and callbacks
831
+ *
832
+ * @param string $func
833
+ * @param string $field_type
834
+ */
835
+ public static function get_available_text_functions( $func = '', $field_type = '' ) {
836
+ $functions = array(
837
+ 'md5' => array( 'WPCF7r_Utils', 'func_md5' ),
838
+ 'base64_encode' => array( 'WPCF7r_Utils', 'func_base64_encode' ),
839
+ 'utf8_encode' => array( 'WPCF7r_Utils', 'func_utf8_encode' ),
840
+ 'urlencode' => array( 'WPCF7r_Utils', 'func_urlencode' ),
841
+ 'json_encode' => array( 'WPCF7r_Utils', 'func_json_encode' ),
842
+ 'esc_html' => array( 'WPCF7r_Utils', 'func_esc_html' ),
843
+ 'esc_attr' => array( 'WPCF7r_Utils', 'func_esc_attr' ),
844
+ );
845
+
846
+ if ( 'checkbox' === $field_type || 'checkbox*' === $field_type || 'all' === $field_type ) {
847
+ $functions['implode'] = array( 'WPCF7r_Utils', 'func_implode' );
848
+ }
849
+
850
+ $functions = apply_filters( 'get_available_text_functions', $functions );
851
+
852
+ if ( $func ) {
853
+ return isset( $functions[ $func ] ) ? $functions[ $func ] : '';
854
+ }
855
+
856
+ return $functions;
857
+ }
858
+
859
+ /**
860
+ * [func_utf8_encode description]
861
+ *
862
+ * @param $value
863
+ */
864
+ public static function func_utf8_encode( $value ) {
865
+ return apply_filters( 'func_utf8_encode', utf8_encode( $value ), $value );
866
+ }
867
+
868
+ /**
869
+ * [func_base64_encode description]
870
+ *
871
+ * @param $value
872
+ */
873
+ public static function func_base64_encode( $value ) {
874
+ return apply_filters( 'func_base64_encode', base64_encode( $value ), $value );
875
+ }
876
+
877
+ /**
878
+ * [func_base64_encode description]
879
+ *
880
+ * @param $value
881
+ */
882
+ public static function func_urlencode( $value ) {
883
+ return apply_filters( 'func_urlencode', urlencode( $value ), $value );
884
+ }
885
+
886
+ /**
887
+ * Esc html callback
888
+ *
889
+ * @param $value
890
+ */
891
+ public function func_esc_html( $value ) {
892
+ return apply_filters( 'func_esc_html', esc_html( $value ), $value );
893
+ }
894
+
895
+ /**
896
+ * Esc Attr callback
897
+ *
898
+ * @param $value
899
+ */
900
+ public function func_esc_attr( $value ) {
901
+ return apply_filters( 'func_esc_attr', esc_attr( $value ), $value );
902
+ }
903
+
904
+ /**
905
+ * Json Encode callback
906
+ *
907
+ * @param $value
908
+ */
909
+ public function func_json_encode( $value ) {
910
+ return apply_filters( 'func_json_encode', wp_json_encode( $value ), $value );
911
+ }
912
+ /**
913
+ * [func_base64_encode description]
914
+ *
915
+ * @param $value
916
+ */
917
+ public static function func_implode( $value ) {
918
+
919
+ if ( is_array( $value ) ) {
920
+ $value = apply_filters( 'func_implode', implode( ',', $value ), $value );
921
+ }
922
+
923
+ return $value;
924
+ }
925
+
926
+ /**
927
+ * md5 function
928
+ *
929
+ * @param $value
930
+ */
931
+ public static function func_md5( $value ) {
932
+ return apply_filters( 'func_md5', md5( $value ), $value );
933
+ }
934
+
935
+ public function make_api_test() {
936
+ parse_str( $_POST['data']['data'], $data );
937
+
938
+ if ( ! is_array( $data ) ) {
939
+ die( '-1' );
940
+ }
941
+
942
+ $action_id = isset( $_POST['data']['action_id'] ) ? (int) sanitize_text_field( $_POST['data']['action_id'] ) : '';
943
+ $cf7_id = isset( $_POST['data']['cf7_id'] ) ? (int) sanitize_text_field( $_POST['data']['cf7_id'] ) : '';
944
+ $rule_id = isset( $_POST['data']['rule_id'] ) ? $_POST['data']['rule_id'] : '';
945
+
946
+ add_filter( 'after_qs_cf7_api_send_lead', array( $this, 'after_fake_submission' ), 10, 3 );
947
+
948
+ if ( isset( $data['wpcf7-redirect']['actions'] ) ) {
949
+ $response = array();
950
+
951
+ $posted_action = reset( $data['wpcf7-redirect']['actions'] );
952
+ $posted_action = $posted_action['test_values'];
953
+ $_POST = $posted_action;
954
+ // this will create a fake form submission
955
+ $this->cf7r_form = get_cf7r_form( $cf7_id );
956
+ $this->cf7r_form->enable_action( $action_id );
957
+
958
+ $cf7_form = $this->cf7r_form->get_cf7_form_instance();
959
+ $submission = WPCF7_Submission::get_instance( $cf7_form );
960
+
961
+ if ( $submission->get_status() === 'validation_failed' ) {
962
+ $invalid_fields = $submission->get_invalid_fields();
963
+ $response['status'] = 'failed';
964
+ $response['invalid_fields'] = $invalid_fields;
965
+ } else {
966
+ $response['status'] = 'success';
967
+ $response['html'] = $this->get_test_api_results_html();
968
+ }
969
+
970
+ wp_send_json( $response );
971
+ }
972
+ }
973
+ /**
974
+ * Store the results from the API
975
+ *
976
+ * @param $result
977
+ * @param $record
978
+ */
979
+ public function after_fake_submission( $result, $record, $args ) {
980
+ $this->results = $result;
981
+ $this->record = $record;
982
+ $this->request = $args;
983
+
984
+ return $result;
985
+ }
986
+
987
+ /**
988
+ * Show A preview for the action
989
+ */
990
+ public function show_action_preview() {
991
+ if ( isset( $_GET['wpcf7r-preview'] ) ) {
992
+ $action_id = (int) $_GET['wpcf7r-preview'];
993
+
994
+ $action = WPCF7R_Action::get_action( $action_id );
995
+
996
+ $action->dynamic_params['popup-template'] = isset( $_GET['template'] ) ? sanitize_text_field( $_GET['template'] ) : '';
997
+
998
+ $action->preview();
999
+ }
1000
+ }
1001
+
1002
+ /**
1003
+ * Get action template in case field are dynamicaly changed
1004
+ */
1005
+ public function get_action_template() {
1006
+ $data = isset( $_POST['data'] ) ? $_POST['data'] : '';
1007
+
1008
+ $response = array();
1009
+
1010
+ if ( isset( $data['action_id'] ) ) {
1011
+ $action_id = (int) $data['action_id'];
1012
+ $popup_template = sanitize_text_field( $data['template'] );
1013
+
1014
+ $action = WPCF7R_Action::get_action( $action_id );
1015
+
1016
+ ob_start();
1017
+
1018
+ $params = array(
1019
+ 'popup-template' => $popup_template,
1020
+ );
1021
+
1022
+ $action->get_action_settings( $params );
1023
+
1024
+ $response['action_content'] = ob_get_clean();
1025
+ }
1026
+
1027
+ wp_send_json_success( $response );
1028
+ }
1029
+
1030
+ /**
1031
+ * Get the popup html
1032
+ */
1033
+ public function get_test_api_results_html() {
1034
+ ob_start();
1035
+
1036
+ include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'popup-api-test.php';
1037
+
1038
+ return ob_get_clean();
1039
+ }
1040
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
modules/cf7-shortcode-password-field.php CHANGED
@@ -1,224 +1,224 @@
1
- <?php
2
- /**
3
- * A base module for the following types of tags:
4
- * [text] and [text*] # Single-line text
5
- * [email] and [email*] # Email address
6
- * [url] and [url*] # URL
7
- * [tel] and [tel*] # Telephone number
8
- */
9
-
10
- defined( 'ABSPATH' ) || exit;
11
-
12
- /* form_tag handler */
13
- add_action( 'wpcf7_init', 'wpcf7_add_form_tag_password', 10, 0 );
14
-
15
- function wpcf7_add_form_tag_password() {
16
- if ( function_exists( 'wpcf7_add_form_tag' ) ) {
17
- wpcf7_add_form_tag(
18
- array( 'password', 'password*' ),
19
- 'wpcf7_password_form_tag_handler',
20
- array( 'name-attr' => true )
21
- );
22
- }
23
- }
24
-
25
- function wpcf7_password_form_tag_handler( $tag ) {
26
- if ( empty( $tag->name ) ) {
27
- return '';
28
- }
29
-
30
- $validation_error = wpcf7_get_validation_error( $tag->name );
31
- $class = wpcf7_form_controls_class( $tag->type, 'wpcf7-password' );
32
-
33
- if ( in_array( $tag->basetype, array( 'password' ), true ) ) {
34
- $class .= ' wpcf7-validates-as-' . $tag->basetype;
35
- }
36
-
37
- if ( $validation_error ) {
38
- $class .= ' wpcf7-not-valid';
39
- }
40
-
41
- $atts = array();
42
- $atts['size'] = $tag->get_size_option( '40' );
43
- $atts['maxlength'] = $tag->get_maxlength_option();
44
- $atts['minlength'] = $tag->get_minlength_option();
45
-
46
- if ( $atts['maxlength'] && $atts['minlength'] ) {
47
- $atts['pattern'] = ".{{$atts['minlength']},{$atts['maxlength']}}";
48
- } elseif ( $atts['minlength'] ) {
49
- $atts['pattern'] = ".{{$atts['minlength']},}";
50
- }
51
-
52
- if ( $atts['maxlength'] and $atts['minlength'] && $atts['maxlength'] < $atts['minlength'] ) {
53
- unset( $atts['maxlength'], $atts['minlength'] );
54
- }
55
-
56
- $atts['class'] = $tag->get_class_option( $class );
57
- $atts['id'] = $tag->get_id_option();
58
- $atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
59
- $atts['autocomplete'] = $tag->get_option(
60
- 'autocomplete',
61
- '[-0-9a-zA-Z]+',
62
- true
63
- );
64
-
65
- if ( $tag->has_option( 'readonly' ) ) {
66
- $atts['readonly'] = 'readonly';
67
- }
68
-
69
- if ( $tag->is_required() ) {
70
- $atts['aria-required'] = 'true';
71
- }
72
-
73
- $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
74
- $value = (string) reset( $tag->values );
75
-
76
- if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
77
- $atts['placeholder'] = $value;
78
- $value = '';
79
- }
80
-
81
- $value = $tag->get_default_option( $value );
82
- $value = wpcf7_get_hangover( $tag->name, $value );
83
- $atts['value'] = $value;
84
-
85
- if ( wpcf7_support_html5() ) {
86
- $atts['type'] = $tag->basetype;
87
- } else {
88
- $atts['type'] = 'password';
89
- }
90
-
91
- $atts['name'] = $tag->name;
92
- $atts = wpcf7_format_atts( $atts );
93
- $html = sprintf(
94
- '<span class="wpcf7-form-control-wrap %1$s"><input %2$s autocomplete="false"/>%3$s</span>',
95
- sanitize_html_class( $tag->name ),
96
- $atts,
97
- $validation_error
98
- );
99
-
100
- return $html;
101
- }
102
-
103
- /* Validation filter */
104
- add_filter( 'wpcf7_validate_password', 'wpcf7_password_validation_filter', 10, 2 );
105
- add_filter( 'wpcf7_validate_password*', 'wpcf7_password_validation_filter', 10, 2 );
106
-
107
- function wpcf7_password_validation_filter( $result, $tag ) {
108
- $name = $tag->name;
109
- $value = isset( $_POST[ $name ] )
110
- ? trim( wp_unslash( strtr( (string) $_POST[ $name ], "\n", ' ' ) ) )
111
- : '';
112
- if ( 'password' === $tag->basetype ) {
113
- if ( $tag->is_required() and '' === $value ) {
114
- $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
115
- }
116
- $atts['maxlength'] = $tag->get_maxlength_option();
117
- $atts['minlength'] = $tag->get_minlength_option();
118
- if ( $atts['maxlength'] && strlen( $value ) > $atts['maxlength'] ) {
119
- $result->invalidate( $tag, wpcf7_get_message( 'invalid_too_long' ) );
120
- }
121
- if ( $atts['minlength'] && strlen( $value ) < $atts['minlength'] ) {
122
- $result->invalidate( $tag, wpcf7_get_message( 'invalid_too_short' ) );
123
- }
124
- }
125
- return $result;
126
- }
127
-
128
- /* Messages */
129
- add_filter( 'wpcf7_messages', 'wpcf7_password_messages', 10, 1 );
130
-
131
- function wpcf7_password_messages( $messages ) {
132
- $messages = array_merge(
133
- $messages,
134
- array(
135
- 'invalid_email' => array(
136
- 'description' =>
137
- __( 'Email address that the sender entered is invalid', 'wpcf7-redirect' ),
138
- 'default' =>
139
- __( 'The e-mail address entered is invalid.', 'wpcf7-redirect' ),
140
- ),
141
- 'invalid_url' => array(
142
- 'description' =>
143
- __( 'URL that the sender entered is invalid', 'wpcf7-redirect' ),
144
- 'default' =>
145
- __( 'The URL is invalid.', 'wpcf7-redirect' ),
146
- ),
147
- 'invalid_tel' => array(
148
- 'description' =>
149
- __( 'Telephone number that the sender entered is invalid', 'wpcf7-redirect' ),
150
- 'default' =>
151
- __( 'The telephone number is invalid.', 'wpcf7-redirect' ),
152
- ),
153
- )
154
- );
155
- return $messages;
156
- }
157
-
158
- /**
159
- * Tag generator
160
- */
161
- add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_password', 15, 0 );
162
-
163
- function wpcf7_add_tag_generator_password() {
164
- $tag_generator = WPCF7_TagGenerator::get_instance();
165
- $tag_generator->add(
166
- 'password',
167
- __( 'password', 'wpcf7-redirect' ),
168
- 'wpcf7_tag_generator_password'
169
- );
170
- }
171
-
172
- function wpcf7_tag_generator_password( $contact_form, $args = '' ) {
173
- $args = wp_parse_args( $args, array() );
174
- $type = $args['id'];
175
-
176
- if ( 'password' === $type ) {
177
- $description = __( 'Generate a form-tag for a single-line plain password input field.', 'wpcf7-redirect' );
178
- }
179
-
180
- ?>
181
- <div class="control-box">
182
- <fieldset>
183
- <table class="form-table">
184
- <tbody>
185
- <tr>
186
- <th scope="row"><?php echo esc_html( __( 'Field type', 'wpcf7-redirect' ) ); ?></th>
187
- <td>
188
- <fieldset>
189
- <legend class="screen-reader-text"><?php echo esc_html( __( 'Field type', 'wpcf7-redirect' ) ); ?></legend>
190
- <label><input type="checkbox" name="required" /> <?php echo esc_html( __( 'Required field', 'wpcf7-redirect' ) ); ?></label>
191
- </fieldset>
192
- </td>
193
- </tr>
194
- <tr>
195
- <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'wpcf7-redirect' ) ); ?></label></th>
196
- <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
197
- </tr>
198
- <tr>
199
- <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Default value', 'wpcf7-redirect' ) ); ?></label></th>
200
- <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br />
201
- <label><input type="checkbox" name="placeholder" class="option" /> <?php echo esc_html( __( 'Use this text as the placeholder of the field', 'wpcf7-redirect' ) ); ?></label></td>
202
- </tr>
203
- <tr>
204
- <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'wpcf7-redirect' ) ); ?></label></th>
205
- <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
206
- </tr>
207
- <tr>
208
- <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'wpcf7-redirect' ) ); ?></label></th>
209
- <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
210
- </tr>
211
- </tbody>
212
- </table>
213
- </fieldset>
214
- </div>
215
- <div class="insert-box">
216
- <input type="text" name="<?php echo $type; ?>" class="tag code" readonly="readonly" onfocus="this.select()" />
217
- <div class="submitbox">
218
- <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'wpcf7-redirect' ) ); ?>" />
219
- </div>
220
- <br class="clear" />
221
- <p class="description mail-tag"><label for="<?php echo esc_attr( $args['content'] . '-mailtag' ); ?>"><?php echo sprintf( esc_html( __( 'To use the value input through this field in a mail field, you need to insert the corresponding mail-tag into the field on the Mail tab.', 'wpcf7-redirect' ) ), '<strong><span class="mail-tag"></span></strong>' ); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr( $args['content'] . '-mailtag' ); ?>" /></label></p>
222
- </div>
223
- <?php
224
- }
1
+ <?php
2
+ /**
3
+ * A base module for the following types of tags:
4
+ * [text] and [text*] # Single-line text
5
+ * [email] and [email*] # Email address
6
+ * [url] and [url*] # URL
7
+ * [tel] and [tel*] # Telephone number
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit;
11
+
12
+ /* form_tag handler */
13
+ add_action( 'wpcf7_init', 'wpcf7_add_form_tag_password', 10, 0 );
14
+
15
+ function wpcf7_add_form_tag_password() {
16
+ if ( function_exists( 'wpcf7_add_form_tag' ) ) {
17
+ wpcf7_add_form_tag(
18
+ array( 'password', 'password*' ),
19
+ 'wpcf7_password_form_tag_handler',
20
+ array( 'name-attr' => true )
21
+ );
22
+ }
23
+ }
24
+
25
+ function wpcf7_password_form_tag_handler( $tag ) {
26
+ if ( empty( $tag->name ) ) {
27
+ return '';
28
+ }
29
+
30
+ $validation_error = wpcf7_get_validation_error( $tag->name );
31
+ $class = wpcf7_form_controls_class( $tag->type, 'wpcf7-password' );
32
+
33
+ if ( in_array( $tag->basetype, array( 'password' ), true ) ) {
34
+ $class .= ' wpcf7-validates-as-' . $tag->basetype;
35
+ }
36
+
37
+ if ( $validation_error ) {
38
+ $class .= ' wpcf7-not-valid';
39
+ }
40
+
41
+ $atts = array();
42
+ $atts['size'] = $tag->get_size_option( '40' );
43
+ $atts['maxlength'] = $tag->get_maxlength_option();
44
+ $atts['minlength'] = $tag->get_minlength_option();
45
+
46
+ if ( $atts['maxlength'] && $atts['minlength'] ) {
47
+ $atts['pattern'] = ".{{$atts['minlength']},{$atts['maxlength']}}";
48
+ } elseif ( $atts['minlength'] ) {
49
+ $atts['pattern'] = ".{{$atts['minlength']},}";
50
+ }
51
+
52
+ if ( $atts['maxlength'] and $atts['minlength'] && $atts['maxlength'] < $atts['minlength'] ) {
53
+ unset( $atts['maxlength'], $atts['minlength'] );
54
+ }
55
+
56
+ $atts['class'] = $tag->get_class_option( $class );
57
+ $atts['id'] = $tag->get_id_option();
58
+ $atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
59
+ $atts['autocomplete'] = $tag->get_option(
60
+ 'autocomplete',
61
+ '[-0-9a-zA-Z]+',
62
+ true
63
+ );
64
+
65
+ if ( $tag->has_option( 'readonly' ) ) {
66
+ $atts['readonly'] = 'readonly';
67
+ }
68
+
69
+ if ( $tag->is_required() ) {
70
+ $atts['aria-required'] = 'true';
71
+ }
72
+
73
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
74
+ $value = (string) reset( $tag->values );
75
+
76
+ if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
77
+ $atts['placeholder'] = $value;
78
+ $value = '';
79
+ }
80
+
81
+ $value = $tag->get_default_option( $value );
82
+ $value = wpcf7_get_hangover( $tag->name, $value );
83
+ $atts['value'] = $value;
84
+
85
+ if ( wpcf7_support_html5() ) {
86
+ $atts['type'] = $tag->basetype;
87
+ } else {
88
+ $atts['type'] = 'password';
89
+ }
90
+
91
+ $atts['name'] = $tag->name;
92
+ $atts = wpcf7_format_atts( $atts );
93
+ $html = sprintf(
94
+ '<span class="wpcf7-form-control-wrap %1$s"><input %2$s autocomplete="false"/>%3$s</span>',
95
+ sanitize_html_class( $tag->name ),
96
+ $atts,
97
+ $validation_error
98
+ );
99
+
100
+ return $html;
101
+ }
102
+
103
+ /* Validation filter */
104
+ add_filter( 'wpcf7_validate_password', 'wpcf7_password_validation_filter', 10, 2 );
105
+ add_filter( 'wpcf7_validate_password*', 'wpcf7_password_validation_filter', 10, 2 );
106
+
107
+ function wpcf7_password_validation_filter( $result, $tag ) {
108
+ $name = $tag->name;
109
+ $value = isset( $_POST[ $name ] )
110
+ ? trim( wp_unslash( strtr( (string) $_POST[ $name ], "\n", ' ' ) ) )
111
+ : '';
112
+ if ( 'password' === $tag->basetype ) {
113
+ if ( $tag->is_required() and '' === $value ) {
114
+ $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
115
+ }
116
+ $atts['maxlength'] = $tag->get_maxlength_option();
117
+ $atts['minlength'] = $tag->get_minlength_option();
118
+ if ( $atts['maxlength'] && strlen( $value ) > $atts['maxlength'] ) {
119
+ $result->invalidate( $tag, wpcf7_get_message( 'invalid_too_long' ) );
120
+ }
121
+ if ( $atts['minlength'] && strlen( $value ) < $atts['minlength'] ) {
122
+ $result->invalidate( $tag, wpcf7_get_message( 'invalid_too_short' ) );
123
+ }
124
+ }
125
+ return $result;
126
+ }
127
+
128
+ /* Messages */
129
+ add_filter( 'wpcf7_messages', 'wpcf7_password_messages', 10, 1 );
130
+
131
+ function wpcf7_password_messages( $messages ) {
132
+ $messages = array_merge(
133
+ $messages,
134
+ array(
135
+ 'invalid_email' => array(
136
+ 'description' =>
137
+ __( 'Email address that the sender entered is invalid', 'wpcf7-redirect' ),
138
+ 'default' =>
139
+ __( 'The e-mail address entered is invalid.', 'wpcf7-redirect' ),
140
+ ),
141
+ 'invalid_url' => array(
142
+ 'description' =>
143
+ __( 'URL that the sender entered is invalid', 'wpcf7-redirect' ),
144
+ 'default' =>
145
+ __( 'The URL is invalid.', 'wpcf7-redirect' ),
146
+ ),
147
+ 'invalid_tel' => array(
148
+ 'description' =>
149
+ __( 'Telephone number that the sender entered is invalid', 'wpcf7-redirect' ),
150
+ 'default' =>
151
+ __( 'The telephone number is invalid.', 'wpcf7-redirect' ),
152
+ ),
153
+ )
154
+ );
155
+ return $messages;
156
+ }
157
+
158
+ /**
159
+ * Tag generator
160
+ */
161
+ add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_password', 15, 0 );
162
+
163
+ function wpcf7_add_tag_generator_password() {
164
+ $tag_generator = WPCF7_TagGenerator::get_instance();
165
+ $tag_generator->add(
166
+ 'password',
167
+ __( 'password', 'wpcf7-redirect' ),
168
+ 'wpcf7_tag_generator_password'
169
+ );
170
+ }
171
+
172
+ function wpcf7_tag_generator_password( $contact_form, $args = '' ) {
173
+ $args = wp_parse_args( $args, array() );
174
+ $type = $args['id'];
175
+
176
+ if ( 'password' === $type ) {
177
+ $description = __( 'Generate a form-tag for a single-line plain password input field.', 'wpcf7-redirect' );
178
+ }
179
+
180
+ ?>
181
+ <div class="control-box">
182
+ <fieldset>
183
+ <table class="form-table">
184
+ <tbody>
185
+ <tr>
186
+ <th scope="row"><?php echo esc_html( __( 'Field type', 'wpcf7-redirect' ) ); ?></th>
187
+ <td>
188
+ <fieldset>
189
+ <legend class="screen-reader-text"><?php echo esc_html( __( 'Field type', 'wpcf7-redirect' ) ); ?></legend>
190
+ <label><input type="checkbox" name="required" /> <?php echo esc_html( __( 'Required field', 'wpcf7-redirect' ) ); ?></label>
191
+ </fieldset>
192
+ </td>
193
+ </tr>
194
+ <tr>
195
+ <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'wpcf7-redirect' ) ); ?></label></th>
196
+ <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
197
+ </tr>
198
+ <tr>
199
+ <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Default value', 'wpcf7-redirect' ) ); ?></label></th>
200
+ <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br />
201
+ <label><input type="checkbox" name="placeholder" class="option" /> <?php echo esc_html( __( 'Use this text as the placeholder of the field', 'wpcf7-redirect' ) ); ?></label></td>
202
+ </tr>
203
+ <tr>
204
+ <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'wpcf7-redirect' ) ); ?></label></th>
205
+ <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
206
+ </tr>
207
+ <tr>
208
+ <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'wpcf7-redirect' ) ); ?></label></th>
209
+ <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
210
+ </tr>
211
+ </tbody>
212
+ </table>
213
+ </fieldset>
214
+ </div>
215
+ <div class="insert-box">
216
+ <input type="text" name="<?php echo $type; ?>" class="tag code" readonly="readonly" onfocus="this.select()" />
217
+ <div class="submitbox">
218
+ <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'wpcf7-redirect' ) ); ?>" />
219
+ </div>
220
+ <br class="clear" />
221
+ <p class="description mail-tag"><label for="<?php echo esc_attr( $args['content'] . '-mailtag' ); ?>"><?php echo sprintf( esc_html( __( 'To use the value input through this field in a mail field, you need to insert the corresponding mail-tag into the field on the Mail tab.', 'wpcf7-redirect' ) ), '<strong><span class="mail-tag"></span></strong>' ); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr( $args['content'] . '-mailtag' ); ?>" /></label></p>
222
+ </div>
223
+ <?php
224
+ }
modules/cf7r-shortcode-get-param-field.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- /**
3
- * Get params from the redirect page
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- add_shortcode( 'get_param', 'wpcf7r_get_param' );
9
- add_shortcode( 'wpcf7r_posted_param', 'wpcf7r_get_param' );
10
-
11
- /**
12
- * Collect the data from the query string by parameter
13
- */
14
- function wpcf7r_get_param( $atts ) {
15
- $atts = shortcode_atts(
16
- array(
17
- 'param' => '',
18
- ),
19
- $atts,
20
- 'wpcf7-redirect'
21
- );
22
- $param = '';
23
-
24
- if ( isset( $_GET[ $atts['param'] ] ) && $_GET[ $atts['param'] ] ) {
25
- $param = esc_attr( wp_kses( $_GET[ $atts['param'] ], array( '' ) ) );
26
- }
27
-
28
- return $param;
29
- }
1
+ <?php
2
+ /**
3
+ * Get params from the redirect page
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ add_shortcode( 'get_param', 'wpcf7r_get_param' );
9
+ add_shortcode( 'wpcf7r_posted_param', 'wpcf7r_get_param' );
10
+
11
+ /**
12
+ * Collect the data from the query string by parameter
13
+ */
14
+ function wpcf7r_get_param( $atts ) {
15
+ $atts = shortcode_atts(
16
+ array(
17
+ 'param' => '',
18
+ ),
19
+ $atts,
20
+ 'wpcf7-redirect'
21
+ );
22
+ $param = '';
23
+
24
+ if ( isset( $_GET[ $atts['param'] ] ) && $_GET[ $atts['param'] ] ) {
25
+ $param = esc_attr( wp_kses( $_GET[ $atts['param'] ], array( '' ) ) );
26
+ }
27
+
28
+ return $param;
29
+ }
modules/index.php DELETED
File without changes
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Redirection for Contact Form 7 ===
2
  Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect, registration form, mailchimp, login form, conditional redirect, cms integration, conversions, save leads, paypal
3
  Contributors: yuvalsabar, regevlio
4
- Requires at least: 4.7.0
5
  Tested up to: 5.6
6
- Stable tag: 2.3.1
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -78,6 +78,15 @@ No. One of the reasons we developed this plugin, is because on_send_ok is now de
78
 
79
  == Changelog ==
80
 
 
 
 
 
 
 
 
 
 
81
  = 2.3.1 =
82
  * Added index.php to directories to disable directory browsing.
83
  * Fixed typo in popup action class name for receiving updates.
1
  === Redirection for Contact Form 7 ===
2
  Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect, registration form, mailchimp, login form, conditional redirect, cms integration, conversions, save leads, paypal
3
  Contributors: yuvalsabar, regevlio
4
+ Requires at least: 5.1.0
5
  Tested up to: 5.6
6
+ Stable tag: 2.3.3
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
78
 
79
  == Changelog ==
80
 
81
+ = 2.3.3 =
82
+ * Fixed undefined $_SERVER['HTTP_HOST'] on CLI calls
83
+
84
+ = 2.3.2 =
85
+ * Added columns on actions list (debug mode)
86
+ * Added compatibility for Contact Form 7 Redirection Pro migrations
87
+ * Fixed extensions download process.
88
+ * Moved Mailchimp dependencies to Mailchimp action
89
+
90
  = 2.3.1 =
91
  * Added index.php to directories to disable directory browsing.
92
  * Fixed typo in popup action class name for receiving updates.
templates/banner.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
- /**
3
- * Display banner
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="wpcfr-banner">
10
- <div class="wpcfr-banner-holder">
11
- <span class="dashicons dashicons-no close-banner" title="<?php _e( 'Close', 'wpcf7-redirect' ); ?>"></span>
12
- <a href="https://redirection-for-contact-form7.com/" target="_blank">
13
- <img src="<?php echo wpcf7r_get_redirect_plugin_url(); ?>/assets/images/banner.png" alt="Get pro version" />
14
- </a>
15
- </div>
16
- </div>
1
+ <?php
2
+ /**
3
+ * Display banner
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="wpcfr-banner">
10
+ <div class="wpcfr-banner-holder">
11
+ <span class="dashicons dashicons-no close-banner" title="<?php _e( 'Close', 'wpcf7-redirect' ); ?>"></span>
12
+ <a href="https://redirection-for-contact-form7.com/" target="_blank">
13
+ <img src="<?php echo wpcf7r_get_redirect_plugin_url(); ?>/assets/images/banner.png" alt="Get pro version" />
14
+ </a>
15
+ </div>
16
+ </div>
templates/blank-popup-template.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Popup template
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $file_name = str_replace( 'php', 'css', basename( $template ) );
9
+ if ( file_exists( WPCF7_PRO_REDIRECT_POPUP_TEMPLATES_PATH . $file_name ) ) {
10
+ $css_file_url = WPCF7_PRO_REDIRECT_POPUP_TEMPLATES_URL . $file_name;
11
+ } elseif ( file_exists( get_stylesheet_directory() . $file_name ) ) {
12
+ $css_file_url = get_stylesheet_directory_uri() . $file_name;
13
+ }
14
+ ?>
15
+
16
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
17
+ <html lang="en">
18
+ <head>
19
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
20
+ <link id="popup-template-css" rel="stylesheet" href="<?php echo $css_file_url; ?>">
21
+ <title></title>
22
+ <?php wp_head(); ?>
23
+ </head>
24
+ <body <?php body_class( 'popup-template' ); ?>>
25
+
26
+ <div class="modal fade is-open" tabindex="-1" role="dialog" aria-labelledby="staticBackdrop" aria-hidden="true">
27
+ <?php echo $template_html; ?>
28
+ </div>
29
+
30
+ <?php wp_footer(); ?>
31
+ </body>
32
+ </html>
33
+
templates/block-html.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
- /**
3
- * Displays a condition logic HTML block
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- self::conditional_groups_display( $group_block, $prefix );
1
+ <?php
2
+ /**
3
+ * Displays a condition logic HTML block
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ self::conditional_groups_display( $group_block, $prefix );
templates/block-title.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
- /**
3
- * Displays a conditional block title
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="block-title <?php echo $active_tab_title; ?>" data-rel="<?php echo $group_block_key; ?>">
10
- <?php $active_tab_title = ''; ?>
11
- <span class="dashicons dashicons-edit"></span>
12
- <span class="dashicons dashicons-yes show-on-edit" data-rel="<?php echo $group_block_key; ?>"></span>
13
- <span class="dashicons dashicons-no show-on-edit" data-rel="<?php echo $group_block_key; ?>"></span>
14
- <span class="dashicons dashicons-minus show-on-edit remove-block"></span>
15
- <input type="text" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $group_block_key; ?>][block_title]" value="<?php echo $group_block['block_title']; ?>" data-original="<?php echo $group_block['block_title']; ?>" readonly="readonly">
16
- </div>
1
+ <?php
2
+ /**
3
+ * Displays a conditional block title
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="block-title <?php echo $active_tab_title; ?>" data-rel="<?php echo $group_block_key; ?>">
10
+ <?php $active_tab_title = ''; ?>
11
+ <span class="dashicons dashicons-edit"></span>
12
+ <span class="dashicons dashicons-yes show-on-edit" data-rel="<?php echo $group_block_key; ?>"></span>
13
+ <span class="dashicons dashicons-no show-on-edit" data-rel="<?php echo $group_block_key; ?>"></span>
14
+ <span class="dashicons dashicons-minus show-on-edit remove-block"></span>
15
+ <input type="text" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $group_block_key; ?>][block_title]" value="<?php echo $group_block['block_title']; ?>" data-original="<?php echo $group_block['block_title']; ?>" readonly="readonly">
16
+ </div>
templates/default-settings.php CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
- /**
3
- * Displays the list of actions
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $rule_id = 'default';
9
- $actions = $this->get_actions( $rule_id );
10
- ?>
11
-
12
- <h2>
13
- <?php _e( 'Submission Actions', 'wpcf7-redirect' ); ?>
14
- </h2>
15
-
16
- <legend>
17
- <?php _e( 'You can add actions that will be fired on submission. For details and support check', 'wpcf7-redirect' ); ?> <a href="https://redirection-for-contact-form7.com/" target="_blank"><?php _e( 'official website', 'wpcf7-redirect' ); ?></a>.
18
- </legend>
19
-
20
- <div class="actions-list">
21
- <div class="actions">
22
- <table class="wp-list-table widefat fixed striped pages" data-wrapid="<?php echo $rule_id; ?>">
23
- <thead>
24
- <tr>
25
- <th class="manage-column check-column">
26
- <a href="#"><?php _e( 'No.', 'wpcf7-redirect' ); ?></a>
27
- </th>
28
- <th class="manage-column column-title column-primary sortable desc">
29
- <a href="#"><?php _e( 'Title', 'wpcf7-redirect' ); ?></a>
30
- </th>
31
- <th class="manage-column column-primary sortable desc">
32
- <a href="#"><?php _e( 'Type', 'wpcf7-redirect' ); ?></a>
33
- </th>
34
- <th class="manage-column column-primary sortable desc">
35
- <a href="#"><?php _e( 'Active', 'wpcf7-redirect' ); ?></a>
36
- </th>
37
- <th class="manage-column check-column">
38
- </th>
39
- </tr>
40
- </thead>
41
- <tbody id="the_list">
42
- <?php if ( $actions ) : ?>
43
- <?php foreach ( $actions as $action ) : ?>
44
- <?php echo $action->get_action_row(); ?>
45
- <?php endforeach; ?>
46
- <?php endif; ?>
47
- </tbody>
48
- </table>
49
- </div>
50
- <div class="add-new-action-wrap">
51
- <select class="new-action-selector" name="new-action-selector">
52
- <option value="" selected="selected"><?php _e( 'Choose Action', 'wpcf7-redirect' ); ?></option>
53
- <?php foreach ( wpcf7r_get_available_actions() as $available_action_key => $available_action_label ) : ?>
54
- <option value="<?php echo $available_action_key; ?>" <?php echo $available_action_label['attr']; ?>><?php echo $available_action_label['label']; ?></option>
55
- <?php endforeach; ?>
56
-
57
- <?php foreach ( wpcf7_get_extensions() as $extension ) : ?>
58
- <?php if ( ! isset( $extension['active'] ) || ! $extension['active'] ) : ?>
59
- <option value="<?php echo WPCF7_PRO_REDIRECT_PLUGIN_PAGE_URL . $extension['name']; ?>" data-action="purchase">
60
- <?php echo $extension['title']; ?> (<?php _e( 'Purchase', 'wpcf7-redirect' ); ?>)
61
- </option>
62
- <?php endif; ?>
63
- <?php endforeach; ?>
64
- </select>
65
- <a type="button" name="button" class="button-primary wpcf7-add-new-action" data-ruleid="<?php echo $rule_id; ?>" data-id="<?php echo $this->get_id(); ?>">
66
- <?php _e( 'Add Action', 'wpcf7-redirect' ); ?>
67
- </a>
68
- </div>
69
- </div>
1
+ <?php
2
+ /**
3
+ * Displays the list of actions
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $rule_id = 'default';
9
+ $actions = $this->get_actions( $rule_id );
10
+ ?>
11
+
12
+ <h2>
13
+ <?php _e( 'Submission Actions', 'wpcf7-redirect' ); ?>
14
+ </h2>
15
+
16
+ <legend>
17
+ <?php _e( 'You can add actions that will be fired on submission. For details and support check', 'wpcf7-redirect' ); ?> <a href="https://redirection-for-contact-form7.com/" target="_blank"><?php _e( 'official website', 'wpcf7-redirect' ); ?></a>.
18
+ </legend>
19
+
20
+ <div class="actions-list">
21
+ <div class="actions">
22
+ <table class="wp-list-table widefat fixed striped pages" data-wrapid="<?php echo $rule_id; ?>">
23
+ <thead>
24
+ <tr>
25
+ <th class="manage-column check-column">
26
+ <a href="#"><?php _e( 'No.', 'wpcf7-redirect' ); ?></a>
27
+ </th>
28
+ <th class="manage-column column-title column-primary sortable desc">
29
+ <a href="#"><?php _e( 'Title', 'wpcf7-redirect' ); ?></a>
30
+ </th>
31
+ <th class="manage-column column-primary sortable desc">
32
+ <a href="#"><?php _e( 'Type', 'wpcf7-redirect' ); ?></a>
33
+ </th>
34
+ <th class="manage-column column-primary sortable desc">
35
+ <a href="#"><?php _e( 'Active', 'wpcf7-redirect' ); ?></a>
36
+ </th>
37
+ <th class="manage-column check-column">
38
+ </th>
39
+ </tr>
40
+ </thead>
41
+ <tbody id="the_list">
42
+ <?php if ( $actions ) : ?>
43
+ <?php foreach ( $actions as $action ) : ?>
44
+ <?php echo $action->get_action_row(); ?>
45
+ <?php endforeach; ?>
46
+ <?php endif; ?>
47
+ </tbody>
48
+ </table>
49
+ </div>
50
+ <div class="add-new-action-wrap">
51
+ <select class="new-action-selector" name="new-action-selector">
52
+ <option value="" selected="selected"><?php _e( 'Choose Action', 'wpcf7-redirect' ); ?></option>
53
+ <?php foreach ( wpcf7r_get_available_actions() as $available_action_key => $available_action_label ) : ?>
54
+ <option value="<?php echo $available_action_key; ?>" <?php echo $available_action_label['attr']; ?>><?php echo $available_action_label['label']; ?></option>
55
+ <?php endforeach; ?>
56
+
57
+ <?php foreach ( wpcf7_get_extensions() as $extension ) : ?>
58
+ <?php if ( ! isset( $extension['active'] ) || ! $extension['active'] ) : ?>
59
+ <option value="<?php echo WPCF7_PRO_REDIRECT_PLUGIN_PAGE_URL . $extension['name']; ?>" data-action="purchase">
60
+ <?php echo $extension['title']; ?> (<?php _e( 'Purchase', 'wpcf7-redirect' ); ?>)
61
+ </option>
62
+ <?php endif; ?>
63
+ <?php endforeach; ?>
64
+ </select>
65
+ <a type="button" name="button" class="button-primary wpcf7-add-new-action" data-ruleid="<?php echo $rule_id; ?>" data-id="<?php echo $this->get_id(); ?>">
66
+ <?php _e( 'Add Action', 'wpcf7-redirect' ); ?>
67
+ </a>
68
+ </div>
69
+ </div>
templates/extensions.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- /**
3
- * Displays the extensions panel
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- wp_nonce_field( 'wpcf7_redirect_page_extensions', 'wpcf7_redirect_page_extensions_nonce' );
9
-
10
- do_action( 'before_extensions_settings_tab_title', $this );
11
- ?>
12
-
13
- <fieldset>
14
- <div class="fields-wrap field-wrap-page-id">
15
- <div class="tab-wrap">
16
- <div class="wpcf7r-tab-wrap-inner">
17
- <div data-tab-inner>
18
- <?php include( 'extensions/extensions-table.php' ); ?>
19
- </div>
20
- </div>
21
- </div>
22
- </div>
23
- </fieldset>
24
-
25
- <?php
26
- do_action( 'after_extensions_settings_tab_title', $this );
1
+ <?php
2
+ /**
3
+ * Displays the extensions panel
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ wp_nonce_field( 'wpcf7_redirect_page_extensions', 'wpcf7_redirect_page_extensions_nonce' );
9
+
10
+ do_action( 'before_extensions_settings_tab_title', $this );
11
+ ?>
12
+
13
+ <fieldset>
14
+ <div class="fields-wrap field-wrap-page-id">
15
+ <div class="tab-wrap">
16
+ <div class="wpcf7r-tab-wrap-inner">
17
+ <div data-tab-inner>
18
+ <?php include( 'extensions/extensions-table.php' ); ?>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </fieldset>
24
+
25
+ <?php
26
+ do_action( 'after_extensions_settings_tab_title', $this );
templates/extensions/extension-promo-box.php CHANGED
@@ -1,81 +1,81 @@
1
- <?php
2
- /**
3
- * Render extension promo box
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $ver = $this->get_extension_ver();
9
- $badge = method_exists( $this, 'get_badge' ) ? $this->get_badge() : '';
10
- ?>
11
-
12
- <div class="promo-box <?php echo $this->get_name(); ?> <?php echo $this->needs_activation() ? 'needs-activation' : ''; ?> <?php echo $this->has_update() ? 'has-update' : ''; ?> <?php echo $this->get_name(); ?> <?php echo $this->is_active() ? 'active-ext' : ''; ?>" data-extension="<?php echo $this->get_name(); ?>">
13
- <div class="promo-box-inner">
14
- <div class="promo-bot-title">
15
- <div class="promo-version">
16
- <?php if ( $ver && ! $badge ) : ?>
17
- <small>v.<?php echo $this->get_extension_ver(); ?></small> <span class="dashicons dashicons-editor-code"></span>
18
- <?php elseif ( $badge ) : ?>
19
- <?php echo $badge; ?>
20
- <?php endif; ?>
21
- </div>
22
-
23
- <?php if ( ! $this->is_active() ) : ?>
24
- <div class="promo-purchase-link">
25
- <?php if ( $this->get_aff_url() ) : ?>
26
- <a href="<?php echo $this->get_aff_url(); ?>" class=""><?php _e( 'Activate', 'wpcf7-redirect' ); ?></a>
27
- <?php else : ?>
28
- <span type="button" class="btn-activate"><?php _e( 'Activate', 'wpcf7-redirect' ); ?></span>
29
- <?php endif; ?>
30
- </div>
31
- <?php endif; ?>
32
-
33
- </div>
34
- <div class="promo-box-content">
35
- <div class="promo-box-thumb">
36
- <img src="<?php echo $this->get_icon(); ?>" alt="<?php $this->get_name(); ?>">
37
- </div>
38
- <div class="promo-box-description">
39
- <h3><?php echo $this->get_title(); ?></h3>
40
-
41
- <div class="description">
42
- <?php echo $this->get_description(); ?>
43
- </div>
44
-
45
- <div class="promo-actions-box">
46
- <div class="actions">
47
- <?php if ( $this->get_aff_url() ) : ?>
48
- <a href="<?php echo $this->get_aff_url(); ?>" class="button-primary"><?php echo $this->get_btn_text(); ?></a>
49
- <?php else : ?>
50
- <?php if ( ! $this->is_active() ) : ?>
51
- <?php if ( $this->extension_file_exists() ) : ?>
52
- <span type="button" class="btn-activate"><?php _e( 'Activate' ); ?></span>
53
- <?php else : ?>
54
- <a href="<?php echo $this->get_purchase_link(); ?>" class="btn-getit" target="_blank">
55
- <span class="get-it-label"><?php _e( 'Get It', 'wpcf7-redirect' ); ?></span><span class="dashicons dashicons-arrow-down-alt"></span>
56
- </a>
57
- <?php endif; ?>
58
- <?php else : ?>
59
- <span type="button" class="button-primary btn-deactivate" ><?php _e( 'Deactivate' ); ?></span>
60
- <?php endif; ?>
61
-
62
- <?php if ( $this->is_active() && $this->has_update() ) : ?>
63
- <span type="button" class="button-primary btn-update"><?php _e( 'Update' ); ?></span>
64
- <?php endif; ?>
65
-
66
- <div class="serial">
67
- <input type="text" class="serial-number" value="<?php echo $this->get_serial(); ?>" placeholder="<?php _e( 'License Key', 'wpcf7-redirect' ); ?>">
68
- <span class="button-primary btn-activate-serial" value="<?php _e( 'Save', 'wpcf7-redirect' ); ?>">
69
- <span class="dashicons dashicons-yes"></span>
70
- </span>
71
- <span class="button-primary btn-close" title="<?php _e( 'Cancel', 'wpcf7-redirect' ); ?>">
72
- <span class="dashicons dashicons-no"></span>
73
- </span>
74
- </div>
75
- <?php endif; ?>
76
- </div>
77
- </div>
78
- </div>
79
- </div>
80
- </div>
81
- </div>
1
+ <?php
2
+ /**
3
+ * Render extension promo box
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $ver = $this->get_extension_ver();
9
+ $badge = method_exists( $this, 'get_badge' ) ? $this->get_badge() : '';
10
+ ?>
11
+
12
+ <div class="promo-box <?php echo $this->get_name(); ?> <?php echo $this->needs_activation() ? 'needs-activation' : ''; ?> <?php echo $this->has_update() ? 'has-update' : ''; ?> <?php echo $this->get_name(); ?> <?php echo $this->is_active() ? 'active-ext' : ''; ?>" data-extension="<?php echo $this->get_name(); ?>">
13
+ <div class="promo-box-inner">
14
+ <div class="promo-bot-title">
15
+ <div class="promo-version">
16
+ <?php if ( $ver && ! $badge ) : ?>
17
+ <small>v.<?php echo $this->get_extension_ver(); ?></small> <span class="dashicons dashicons-editor-code"></span>
18
+ <?php elseif ( $badge ) : ?>
19
+ <?php echo $badge; ?>
20
+ <?php endif; ?>
21
+ </div>
22
+
23
+ <?php if ( ! $this->is_active() ) : ?>
24
+ <div class="promo-purchase-link">
25
+ <?php if ( $this->get_aff_url() ) : ?>
26
+ <a href="<?php echo $this->get_aff_url(); ?>" class=""><?php _e( 'Activate', 'wpcf7-redirect' ); ?></a>
27
+ <?php else : ?>
28
+ <span type="button" class="btn-activate"><?php _e( 'Activate', 'wpcf7-redirect' ); ?></span>
29
+ <?php endif; ?>
30
+ </div>
31
+ <?php endif; ?>
32
+
33
+ </div>
34
+ <div class="promo-box-content">
35
+ <div class="promo-box-thumb">
36
+ <img src="<?php echo $this->get_icon(); ?>" alt="<?php $this->get_name(); ?>">
37
+ </div>
38
+ <div class="promo-box-description">
39
+ <h3><?php echo $this->get_title(); ?></h3>
40
+
41
+ <div class="description">
42
+ <?php echo $this->get_description(); ?>
43
+ </div>
44
+
45
+ <div class="promo-actions-box">
46
+ <div class="actions">
47
+ <?php if ( $this->get_aff_url() ) : ?>
48
+ <a href="<?php echo $this->get_aff_url(); ?>" class="button-primary"><?php echo $this->get_btn_text(); ?></a>
49
+ <?php else : ?>
50
+ <?php if ( ! $this->is_active() ) : ?>
51
+ <?php if ( $this->extension_file_exists() ) : ?>
52
+ <span type="button" class="btn-activate"><?php _e( 'Activate' ); ?></span>
53
+ <?php else : ?>
54
+ <a href="<?php echo $this->get_purchase_link(); ?>" class="btn-getit" target="_blank">
55
+ <span class="get-it-label"><?php _e( 'Get It', 'wpcf7-redirect' ); ?></span><span class="dashicons dashicons-arrow-down-alt"></span>
56
+ </a>
57
+ <?php endif; ?>
58
+ <?php else : ?>
59
+ <span type="button" class="button-primary btn-deactivate" ><?php _e( 'Deactivate' ); ?></span>
60
+ <?php endif; ?>
61
+
62
+ <?php if ( $this->is_active() && $this->has_update() ) : ?>
63
+ <span type="button" class="button-primary btn-update"><?php _e( 'Update' ); ?></span>
64
+ <?php endif; ?>
65
+
66
+ <div class="serial">
67
+ <input type="text" class="serial-number" value="<?php echo $this->get_serial(); ?>" placeholder="<?php _e( 'License Key', 'wpcf7-redirect' ); ?>">
68
+ <span class="button-primary btn-activate-serial" value="<?php _e( 'Save', 'wpcf7-redirect' ); ?>">
69
+ <span class="dashicons dashicons-yes"></span>
70
+ </span>
71
+ <span class="button-primary btn-close" title="<?php _e( 'Cancel', 'wpcf7-redirect' ); ?>">
72
+ <span class="dashicons dashicons-no"></span>
73
+ </span>
74
+ </div>
75
+ <?php endif; ?>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
templates/extensions/extensions-table.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- /**
3
- * Render extensions table
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $extensions = $this->get_extensions();
9
- ?>
10
-
11
- <div class="extensions-list">
12
- <div class="extensions">
13
- <?php if ( $extensions ) : ?>
14
- <?php foreach ( $extensions as $extension_slug => $extension ) : ?>
15
- <div class="extension">
16
- <?php echo $extension->get_action_promo(); ?>
17
- </div>
18
- <?php endforeach; ?>
19
- <?php endif; ?>
20
- </div>
21
- </div>
1
+ <?php
2
+ /**
3
+ * Render extensions table
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $extensions = $this->get_extensions();
9
+ ?>
10
+
11
+ <div class="extensions-list">
12
+ <div class="extensions">
13
+ <?php if ( $extensions ) : ?>
14
+ <?php foreach ( $extensions as $extension_slug => $extension ) : ?>
15
+ <div class="extension">
16
+ <?php echo $extension->get_action_promo(); ?>
17
+ </div>
18
+ <?php endforeach; ?>
19
+ <?php endif; ?>
20
+ </div>
21
+ </div>
templates/extensions/index.php DELETED
File without changes
templates/fields/field-button.php CHANGED
@@ -1,18 +1,18 @@
1
- <?php
2
- /**
3
- * Render button field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> wpcf7r-button <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" data-toggle="<?php echo isset( $field['show_selector'] ) ? $field['show_selector'] : ''; ?>">
10
- <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
11
- <label class="wpcf7-redirect-<?php echo $field['name']; ?>"><?php echo $field['label']; ?></label>
12
- <?php endif; ?>
13
- <input type="button" class="button-primary wpcf7-redirect-<?php echo $field['name']; ?>-fields"
14
- name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]"
15
- <?php echo isset( $field['attr'] ) ? wpcf7r_implode_attributes( $field['attr'] ) : ''; ?>
16
- value="<?php echo esc_html( $field['label'] ); ?>"
17
- />
18
- </div>
1
+ <?php
2
+ /**
3
+ * Render button field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> wpcf7r-button <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" data-toggle="<?php echo isset( $field['show_selector'] ) ? $field['show_selector'] : ''; ?>">
10
+ <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
11
+ <label class="wpcf7-redirect-<?php echo $field['name']; ?>"><?php echo $field['label']; ?></label>
12
+ <?php endif; ?>
13
+ <input type="button" class="button-primary wpcf7-redirect-<?php echo $field['name']; ?>-fields"
14
+ name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]"
15
+ <?php echo isset( $field['attr'] ) ? wpcf7r_implode_attributes( $field['attr'] ) : ''; ?>
16
+ value="<?php echo esc_html( $field['label'] ); ?>"
17
+ />
18
+ </div>
templates/fields/field-checkbox.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- /**
3
- * Render checkbox field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?> wpcf7r-checkbox" data-toggle="<?php echo isset( $field['show_selector'] ) ? $field['show_selector'] : ''; ?>">
10
- <label>
11
- <input type="checkbox" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields"
12
- name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]"
13
- <?php checked( $field['value'], 'on', true ); ?>
14
- data-toggle-label="<?php echo isset( $field['toggle-label'] ) ? esc_html( $field['toggle-label'] ) : ''; ?>"
15
- />
16
- <span class="wpcf7r-on-off-button">
17
- <span class="wpcf7r-toggle-button">
18
- </span>
19
- </span>
20
- <strong class="checkbox-label"><?php echo esc_html( $field['label'] ); ?></strong>
21
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
22
- </label>
23
- </div>
1
+ <?php
2
+ /**
3
+ * Render checkbox field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?> wpcf7r-checkbox" data-toggle="<?php echo isset( $field['show_selector'] ) ? $field['show_selector'] : ''; ?>">
10
+ <label>
11
+ <input type="checkbox" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields"
12
+ name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]"
13
+ <?php checked( $field['value'], 'on', true ); ?>
14
+ data-toggle-label="<?php echo isset( $field['toggle-label'] ) ? esc_html( $field['toggle-label'] ) : ''; ?>"
15
+ />
16
+ <span class="wpcf7r-on-off-button">
17
+ <span class="wpcf7r-toggle-button">
18
+ </span>
19
+ </span>
20
+ <strong class="checkbox-label"><?php echo esc_html( $field['label'] ); ?></strong>
21
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
22
+ </label>
23
+ </div>
templates/fields/field-download.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- /**
3
- * Display download field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
9
- <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
10
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
11
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
12
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
13
- </label>
14
- <?php endif; ?>
15
-
16
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
17
-
18
- <div class="wpcf7-subtitle">
19
- <?php echo $field['sub_title']; ?>
20
- </div>
21
-
22
- <?php endif; ?>
23
-
24
- <a href="data:application/octet-stream;base64,<?php echo esc_html( $field['value'] ); ?>" download="<?php echo $field['filename']; ?>"><?php echo $field['filename']; ?></a>
25
-
26
- <div class="field-footer">
27
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
28
- </div>
29
- </div>
1
+ <?php
2
+ /**
3
+ * Display download field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
9
+ <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
10
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
11
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
12
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
13
+ </label>
14
+ <?php endif; ?>
15
+
16
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
17
+
18
+ <div class="wpcf7-subtitle">
19
+ <?php echo $field['sub_title']; ?>
20
+ </div>
21
+
22
+ <?php endif; ?>
23
+
24
+ <a href="data:application/octet-stream;base64,<?php echo esc_html( $field['value'] ); ?>" download="<?php echo $field['filename']; ?>"><?php echo $field['filename']; ?></a>
25
+
26
+ <div class="field-footer">
27
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
28
+ </div>
29
+ </div>
templates/fields/field-editor.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
- /**
3
- * Render editor field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $field_name = "wpcf7-redirect{$prefix}[{$field['name']}]";
9
- $css_class = "wpcf7-redirect-{$field['name']}-fields";
10
- ?>
11
-
12
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
13
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
14
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
15
- </label>
16
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
17
- <div class="wpcf7-subtitle">
18
- <?php echo $field['sub_title']; ?>
19
- </div>
20
- <?php endif; ?>
21
-
22
- <?php
23
- wp_editor(
24
- $field['value'],
25
- 'editor-' . md5( $field_name ),
26
- $settings = array(
27
- 'textarea_name' => $field_name,
28
- 'editor_class' => $css_class,
29
- )
30
- );
31
- ?>
32
-
33
- <div class="field-footer">
34
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
35
- </div>
36
-
37
- </div>
1
+ <?php
2
+ /**
3
+ * Render editor field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $field_name = "wpcf7-redirect{$prefix}[{$field['name']}]";
9
+ $css_class = "wpcf7-redirect-{$field['name']}-fields";
10
+ ?>
11
+
12
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
13
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
14
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
15
+ </label>
16
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
17
+ <div class="wpcf7-subtitle">
18
+ <?php echo $field['sub_title']; ?>
19
+ </div>
20
+ <?php endif; ?>
21
+
22
+ <?php
23
+ wp_editor(
24
+ $field['value'],
25
+ 'editor-' . md5( $field_name ),
26
+ $settings = array(
27
+ 'textarea_name' => $field_name,
28
+ 'editor_class' => $css_class,
29
+ )
30
+ );
31
+ ?>
32
+
33
+ <div class="field-footer">
34
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
35
+ </div>
36
+
37
+ </div>
templates/fields/field-json-editor.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- /**
3
- * Render json editor field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
11
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
12
- </label>
13
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
14
- <div class="wpcf7-subtitle">
15
- <?php echo $field['sub_title']; ?>
16
- </div>
17
- <?php endif; ?>
18
- <textarea rows="10" class="json-container wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo $field['placeholder']; ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]"><?php echo esc_html( $field['value'] ); ?></textarea>
19
- <div class="field-footer">
20
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
21
- </div>
22
- </div>
1
+ <?php
2
+ /**
3
+ * Render json editor field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
11
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
12
+ </label>
13
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
14
+ <div class="wpcf7-subtitle">
15
+ <?php echo $field['sub_title']; ?>
16
+ </div>
17
+ <?php endif; ?>
18
+ <textarea rows="10" class="json-container wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo $field['placeholder']; ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]"><?php echo esc_html( $field['value'] ); ?></textarea>
19
+ <div class="field-footer">
20
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
21
+ </div>
22
+ </div>
templates/fields/field-leads-mapping.php CHANGED
@@ -1,73 +1,73 @@
1
- <?php
2
- /**
3
- * Render mapping leads field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
- <?php if ( isset( $field['title'] ) && $field['title'] ) : ?>
11
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
- <h3><?php echo esc_html( $field['label'] ); ?></h3>
13
- &nbsp;
14
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
15
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>"><?php echo esc_html( $field['sub_title'] ); ?></label>
16
- <br/>&nbsp;
17
- <?php endif; ?>
18
- </label>
19
- <?php endif; ?>
20
-
21
- <div class="cf7_row">
22
- <table class="wp-list-table widefat fixed striped pages wp-list-table-inner">
23
- <tr>
24
- <td>
25
- <strong>
26
- <?php _e( 'Form fields', 'wpcf7-redirect' ); ?>
27
- </strong>
28
- </td>
29
- <td class="tags-map-api-key">
30
- <strong>
31
- <?php _e( 'Field Label', 'wpcf7-redirect' ); ?>
32
- </strong>
33
- <?php echo cf7r_tooltip( __( 'The field label', 'wpcf7-redirect' ) ); ?>
34
- </td>
35
- <td>
36
- <strong>
37
- <?php _e( 'Display on leads list', 'wpcf7-redirect' ); ?>
38
- </strong>
39
- <?php echo cf7r_tooltip( __( 'Should this field appear on the leads list', 'wpcf7-redirect' ) ); ?>
40
- </td>
41
- </tr>
42
- <?php
43
- if ( isset( $field['tags'] ) ) :
44
- foreach ( $field['tags'] as $mail_tag ) :
45
- if ( 'lead_id' === $mail_tag->name ) {
46
- continue;
47
- }
48
- $save = isset( $field['value'][ $mail_tag->name ]['save'] ) ? esc_html( $field['value'][ $mail_tag->name ]['save'] ) : '';
49
- $tag_value = isset( $field['value'][ $mail_tag->name ]['tag'] ) ? esc_html( $field['value'][ $mail_tag->name ]['tag'] ) : '';
50
- $appear = isset( $field['value'][ $mail_tag->name ]['appear'] ) && $field['value'][ $mail_tag->name ]['appear'] ? true : false;
51
- ?>
52
- <tr>
53
- <td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
54
- <td class="tags-map-api-key">
55
- <input type="text" id="sf-<?php echo $mail_tag->name; ?>"
56
- name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>][tag]"
57
- class="large-text"
58
- value="<?php echo $tag_value; ?>" />
59
- </td>
60
- <td>
61
- <input type="checkbox"
62
- name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>][appear]"
63
- value="1"
64
- <?php checked( $appear, 1 ); ?> />
65
- </td>
66
- </tr>
67
- <?php
68
- endforeach;
69
- endif;
70
- ?>
71
- </table>
72
- </div>
73
- </div>
1
+ <?php
2
+ /**
3
+ * Render mapping leads field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
+ <?php if ( isset( $field['title'] ) && $field['title'] ) : ?>
11
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
+ <h3><?php echo esc_html( $field['label'] ); ?></h3>
13
+ &nbsp;
14
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
15
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>"><?php echo esc_html( $field['sub_title'] ); ?></label>
16
+ <br/>&nbsp;
17
+ <?php endif; ?>
18
+ </label>
19
+ <?php endif; ?>
20
+
21
+ <div class="cf7_row">
22
+ <table class="wp-list-table widefat fixed striped pages wp-list-table-inner">
23
+ <tr>
24
+ <td>
25
+ <strong>
26
+ <?php _e( 'Form fields', 'wpcf7-redirect' ); ?>
27
+ </strong>
28
+ </td>
29
+ <td class="tags-map-api-key">
30
+ <strong>
31
+ <?php _e( 'Field Label', 'wpcf7-redirect' ); ?>
32
+ </strong>
33
+ <?php echo cf7r_tooltip( __( 'The field label', 'wpcf7-redirect' ) ); ?>
34
+ </td>
35
+ <td>
36
+ <strong>
37
+ <?php _e( 'Display on leads list', 'wpcf7-redirect' ); ?>
38
+ </strong>
39
+ <?php echo cf7r_tooltip( __( 'Should this field appear on the leads list', 'wpcf7-redirect' ) ); ?>
40
+ </td>
41
+ </tr>
42
+ <?php
43
+ if ( isset( $field['tags'] ) ) :
44
+ foreach ( $field['tags'] as $mail_tag ) :
45
+ if ( 'lead_id' === $mail_tag->name ) {
46
+ continue;
47
+ }
48
+ $save = isset( $field['value'][ $mail_tag->name ]['save'] ) ? esc_html( $field['value'][ $mail_tag->name ]['save'] ) : '';
49
+ $tag_value = isset( $field['value'][ $mail_tag->name ]['tag'] ) ? esc_html( $field['value'][ $mail_tag->name ]['tag'] ) : '';
50
+ $appear = isset( $field['value'][ $mail_tag->name ]['appear'] ) && $field['value'][ $mail_tag->name ]['appear'] ? true : false;
51
+ ?>
52
+ <tr>
53
+ <td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
54
+ <td class="tags-map-api-key">
55
+ <input type="text" id="sf-<?php echo $mail_tag->name; ?>"
56
+ name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>][tag]"
57
+ class="large-text"
58
+ value="<?php echo $tag_value; ?>" />
59
+ </td>
60
+ <td>
61
+ <input type="checkbox"
62
+ name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>][appear]"
63
+ value="1"
64
+ <?php checked( $appear, 1 ); ?> />
65
+ </td>
66
+ </tr>
67
+ <?php
68
+ endforeach;
69
+ endif;
70
+ ?>
71
+ </table>
72
+ </div>
73
+ </div>
templates/fields/field-media.php CHANGED
@@ -1,30 +1,30 @@
1
- <?php
2
- /**
3
- * Render image field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- ?>
9
-
10
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
11
- <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
12
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
13
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
14
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
15
- </label>
16
- <?php endif; ?>
17
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
- <div class="wpcf7-subtitle">
19
- <?php echo $field['sub_title']; ?>
20
- </div>
21
- <?php endif; ?>
22
- <div class="image-container">
23
- <img src="<?php echo esc_html( $field['value'] ); ?>" alt="" style="max-width:100px;" class="popup-image" />
24
- <a title="Set Image" href="javascript:;" class="image-uploader-btn browser button button-hero"><?php _e( 'Select Image', 'wpcf7-redirect' ); ?></a>
25
- <input type="hidden" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>" <?php echo isset( $field['input_attr'] ) ? $field['input_attr'] : ''; ?>>
26
- </div>
27
- <div class="field-footer">
28
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
29
- </div>
30
- </div>
1
+ <?php
2
+ /**
3
+ * Render image field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ ?>
9
+
10
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
11
+ <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
12
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
13
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
14
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
15
+ </label>
16
+ <?php endif; ?>
17
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
+ <div class="wpcf7-subtitle">
19
+ <?php echo $field['sub_title']; ?>
20
+ </div>
21
+ <?php endif; ?>
22
+ <div class="image-container">
23
+ <img src="<?php echo esc_html( $field['value'] ); ?>" alt="" style="max-width:100px;" class="popup-image" />
24
+ <a title="Set Image" href="javascript:;" class="image-uploader-btn browser button button-hero"><?php _e( 'Select Image', 'wpcf7-redirect' ); ?></a>
25
+ <input type="hidden" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>" <?php echo isset( $field['input_attr'] ) ? $field['input_attr'] : ''; ?>>
26
+ </div>
27
+ <div class="field-footer">
28
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
29
+ </div>
30
+ </div>
templates/fields/field-notice.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- /**
3
- * Render notice block
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap">
10
- <div class="field-notice field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
11
- <strong>
12
- <?php echo $field['label']; ?>
13
- </strong>
14
- <?php echo $field['sub_title']; ?>
15
- </div>
16
-
17
- </div>
1
+ <?php
2
+ /**
3
+ * Render notice block
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap">
10
+ <div class="field-notice field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
11
+ <strong>
12
+ <?php echo $field['label']; ?>
13
+ </strong>
14
+ <?php echo $field['sub_title']; ?>
15
+ </div>
16
+
17
+ </div>
templates/fields/field-number.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- /**
3
- * Render number field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
- <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
11
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
13
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
14
- </label>
15
- <?php endif; ?>
16
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
17
- <div class="wpcf7-subtitle">
18
- <?php echo $field['sub_title']; ?>
19
- </div>
20
- <?php endif; ?>
21
- <input type="number" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>" <?php echo isset( $field['input_attr'] ) ? $field['input_attr'] : ''; ?>>
22
- <div class="field-footer">
23
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
24
- </div>
25
- </div>
1
+ <?php
2
+ /**
3
+ * Render number field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
+ <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
11
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
13
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
14
+ </label>
15
+ <?php endif; ?>
16
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
17
+ <div class="wpcf7-subtitle">
18
+ <?php echo $field['sub_title']; ?>
19
+ </div>
20
+ <?php endif; ?>
21
+ <input type="number" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>" <?php echo isset( $field['input_attr'] ) ? $field['input_attr'] : ''; ?>>
22
+ <div class="field-footer">
23
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
24
+ </div>
25
+ </div>
templates/fields/field-page-select.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
- /**
3
- * Render page select field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $field_id = $field['name'] . '-' . rand( 0, 1000 );
9
- ?>
10
-
11
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
12
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
13
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
14
- </label>
15
- <?php
16
- echo wp_dropdown_pages(
17
- array(
18
- 'echo' => 0,
19
- 'name' => 'wpcf7-redirect' . $prefix . '[' . $field['name'] . ']',
20
- 'show_option_none' => $field['placeholder'],
21
- 'option_none_value' => '',
22
- 'selected' => $field['value'] ? $field['value'] : '',
23
- 'id' => $field_id,
24
- 'class' => 'wpcf7-redirect-' . $field['name'] . '-fields',
25
- )
26
- );
27
- ?>
28
- <script>
29
- var element = document.getElementById('<?php echo $field_id; ?>');
30
-
31
- if ( ! element.value ) {
32
- element.options[0].setAttribute('selected','selected');
33
- }
34
- </script>
35
- </div>
1
+ <?php
2
+ /**
3
+ * Render page select field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $field_id = $field['name'] . '-' . rand( 0, 1000 );
9
+ ?>
10
+
11
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
12
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
13
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
14
+ </label>
15
+ <?php
16
+ echo wp_dropdown_pages(
17
+ array(
18
+ 'echo' => 0,
19
+ 'name' => 'wpcf7-redirect' . $prefix . '[' . $field['name'] . ']',
20
+ 'show_option_none' => $field['placeholder'],
21
+ 'option_none_value' => '',
22
+ 'selected' => $field['value'] ? $field['value'] : '',
23
+ 'id' => $field_id,
24
+ 'class' => 'wpcf7-redirect-' . $field['name'] . '-fields',
25
+ )
26
+ );
27
+ ?>
28
+ <script>
29
+ var element = document.getElementById('<?php echo $field_id; ?>');
30
+
31
+ if ( ! element.value ) {
32
+ element.options[0].setAttribute('selected','selected');
33
+ }
34
+ </script>
35
+ </div>
templates/fields/field-password.php CHANGED
@@ -1,28 +1,28 @@
1
- <?php
2
- /**
3
- * Render a password field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
- <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
11
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
13
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
14
- </label>
15
- <?php endif; ?>
16
-
17
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
- <div class="wpcf7-subtitle">
19
- <?php echo $field['sub_title']; ?>
20
- </div>
21
- <?php endif; ?>
22
-
23
- <input type="password" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields <?php echo isset( $field['input_class'] ) ? $field['input_class'] : ''; ?>" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>" <?php echo isset( $field['input_attr'] ) ? $field['input_attr'] : ''; ?>>
24
-
25
- <div class="field-footer">
26
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
27
- </div>
28
- </div>
1
+ <?php
2
+ /**
3
+ * Render a password field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
+ <?php if ( isset( $field['label'] ) && $field['label'] ) : ?>
11
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
13
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
14
+ </label>
15
+ <?php endif; ?>
16
+
17
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
+ <div class="wpcf7-subtitle">
19
+ <?php echo $field['sub_title']; ?>
20
+ </div>
21
+ <?php endif; ?>
22
+
23
+ <input type="password" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields <?php echo isset( $field['input_class'] ) ? $field['input_class'] : ''; ?>" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>" <?php echo isset( $field['input_attr'] ) ? $field['input_attr'] : ''; ?>>
24
+
25
+ <div class="field-footer">
26
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
27
+ </div>
28
+ </div>
templates/fields/field-post-author-select.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
- /**
3
- * Render post author select field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $template = WPCF7_PRO_REDIRECT_FIELDS_PATH . 'field-select.php';
9
-
10
- $args = array(
11
- 'role__in' => array( 'administrator', 'editor', 'author' ),
12
- );
13
-
14
- $author_args = apply_filters( 'wpcf7r_get_authors_args', $args );
15
-
16
- $authors = get_users( $author_args );
17
-
18
- $field['options']['current_user'] = __( 'Current Logged In User', 'wpcf7-redirect' );
19
-
20
- foreach ( $authors as $author ) {
21
- $field['options'][ $author->ID ] = $author->data->user_nicename;
22
- }
23
-
24
-
25
- include $template;
1
+ <?php
2
+ /**
3
+ * Render post author select field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $template = WPCF7_PRO_REDIRECT_FIELDS_PATH . 'field-select.php';
9
+
10
+ $args = array(
11
+ 'role__in' => array( 'administrator', 'editor', 'author' ),
12
+ );
13
+
14
+ $author_args = apply_filters( 'wpcf7r_get_authors_args', $args );
15
+
16
+ $authors = get_users( $author_args );
17
+
18
+ $field['options']['current_user'] = __( 'Current Logged In User', 'wpcf7-redirect' );
19
+
20
+ foreach ( $authors as $author ) {
21
+ $field['options'][ $author->ID ] = $author->data->user_nicename;
22
+ }
23
+
24
+
25
+ include $template;
templates/fields/field-post-type-select.php CHANGED
@@ -1,28 +1,28 @@
1
- <?php
2
- /**
3
- * Render post type select field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $post_types = get_post_types();
9
- ?>
10
-
11
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
12
- <?php if ( $field['label'] ) : ?>
13
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
14
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
15
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
16
- </label>
17
- <?php endif; ?>
18
-
19
- <select class="" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]">
20
- <?php foreach ( $post_types as $option_key => $option_label ) : ?>
21
- <option value="<?php echo $option_key; ?>" <?php selected( $field['value'], $option_key ); ?>><?php echo $option_label; ?></option>
22
- <?php endforeach; ?>
23
- </select>
24
-
25
- <div class="field-footer">
26
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
27
- </div>
28
- </div>
1
+ <?php
2
+ /**
3
+ * Render post type select field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $post_types = get_post_types();
9
+ ?>
10
+
11
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
12
+ <?php if ( $field['label'] ) : ?>
13
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
14
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
15
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
16
+ </label>
17
+ <?php endif; ?>
18
+
19
+ <select class="" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]">
20
+ <?php foreach ( $post_types as $option_key => $option_label ) : ?>
21
+ <option value="<?php echo $option_key; ?>" <?php selected( $field['value'], $option_key ); ?>><?php echo $option_label; ?></option>
22
+ <?php endforeach; ?>
23
+ </select>
24
+
25
+ <div class="field-footer">
26
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
27
+ </div>
28
+ </div>
templates/fields/field-preview.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
- /**
3
- * Render preview iFrame
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
- <iframe data-name="preview" class="preview-iframe" src="<?php echo add_query_arg( $field['value'], admin_url() ); ?>" scrolling="no" style=" width: 100%; height: 500px; overflow: hidden;" ></iframe>
11
- </div>
1
+ <?php
2
+ /**
3
+ * Render preview iFrame
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
+ <iframe data-name="preview" class="preview-iframe" src="<?php echo add_query_arg( $field['value'], admin_url() ); ?>" scrolling="no" style=" width: 100%; height: 500px; overflow: hidden;" ></iframe>
11
+ </div>
templates/fields/field-repeater.php CHANGED
@@ -1,90 +1,90 @@
1
- <?php
2
- /**
3
- * Render a repater field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $values = isset( $field['value'] ) && ! empty( $field['value'] ) > 0 ? $field['value'] : array( 'default' );
9
- $base_prefix = $prefix;
10
- $repeater_row_template = array();
11
- ?>
12
-
13
- <?php ob_start(); ?>
14
-
15
- <tr class="qs-repeater-row <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" data-repeater-row-count="new_row">
16
- <?php $prefix = $base_prefix . '[' . $field['name'] . ']' . '[new_row]'; ?>
17
- <?php foreach ( $field['fields'] as $child_field ) : ?>
18
- <td>
19
- <?php
20
- $child_field['value'] = isset( $value[ $child_field['name'] ] ) ? $value[ $child_field['name'] ] : '';
21
- $child_field['label'] = '';
22
- WPCF7R_Html::render_field( $child_field, $prefix );
23
- ?>
24
- </td>
25
- <?php endforeach; ?>
26
- <td>
27
- <div class="qs-repeater-action">
28
- <span class="dashicons dashicons-plus"></span>
29
- <span class="dashicons dashicons-minus"></span>
30
- </div>
31
- </td>
32
- </tr>
33
-
34
- <?php $repeater_single_row_template['template'] = ob_get_clean(); ?>
35
-
36
- <div class="qs-row">
37
- <div class="qs-col qs-col-12">
38
- <?php if ( isset( $field['sub_title'] ) ) : ?>
39
- <h2><?php echo esc_html( $field['sub_title'] ); ?></h2>
40
- <?php endif; ?>
41
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
42
- <h3><?php echo esc_html( $field['label'] ); ?> <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?></h3>
43
- </label>
44
- <div>
45
- <div class="actions">
46
- <table class="wp-list-table widefat fixed striped pages repeater-table leads-list">
47
- <thead>
48
- <tr>
49
- <?php foreach ( $values as $value_row => $value ) : ?>
50
- <?php foreach ( $field['fields'] as $child_field ) : ?>
51
- <th class="manage-column column-primary sortable desc">
52
- <a href="#"><?php echo $child_field['label']; ?></a>
53
- </th>
54
- <?php endforeach; ?>
55
- <th><?php _e( 'Actions', 'wpcf7-redirect' ); ?></th>
56
- <?php break; ?>
57
- <?php endforeach; ?>
58
- </tr>
59
- </thead>
60
-
61
- <tbody id="the_list" data-repeater-template="<?php echo htmlspecialchars( wp_json_encode( $repeater_single_row_template ) ); ?>">
62
- <?php foreach ( $values as $value_row => $value ) : ?>
63
- <tr class="qs-repeater-row" data-repeater-row-count="<?php echo $value_row; ?>">
64
- <?php $prefix = $base_prefix . '[' . $field['name'] . ']' . '[' . $value_row . ']'; ?>
65
- <?php foreach ( $field['fields'] as $child_field ) : ?>
66
- <td>
67
- <?php
68
- $child_field['value'] = isset( $value[ $child_field['name'] ] ) ? $value[ $child_field['name'] ] : '';
69
- $child_field['label'] = '';
70
- WPCF7R_Html::render_field( $child_field, $prefix );
71
- ?>
72
- </td>
73
- <?php endforeach; ?>
74
- <td>
75
- <div class="qs-repeater-action">
76
- <span class="dashicons dashicons-plus"></span>
77
- <span class="dashicons dashicons-minus"></span>
78
- </div>
79
- </td>
80
- </tr>
81
- <?php endforeach; ?>
82
- </tbody>
83
- </table>
84
- </div>
85
- </div>
86
- <div class="field-footer">
87
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
88
- </div>
89
- </div>
90
- </div>
1
+ <?php
2
+ /**
3
+ * Render a repater field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $values = isset( $field['value'] ) && ! empty( $field['value'] ) > 0 ? $field['value'] : array( 'default' );
9
+ $base_prefix = $prefix;
10
+ $repeater_row_template = array();
11
+ ?>
12
+
13
+ <?php ob_start(); ?>
14
+
15
+ <tr class="qs-repeater-row <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" data-repeater-row-count="new_row">
16
+ <?php $prefix = $base_prefix . '[' . $field['name'] . ']' . '[new_row]'; ?>
17
+ <?php foreach ( $field['fields'] as $child_field ) : ?>
18
+ <td>
19
+ <?php
20
+ $child_field['value'] = isset( $value[ $child_field['name'] ] ) ? $value[ $child_field['name'] ] : '';
21
+ $child_field['label'] = '';
22
+ WPCF7R_Html::render_field( $child_field, $prefix );
23
+ ?>
24
+ </td>
25
+ <?php endforeach; ?>
26
+ <td>
27
+ <div class="qs-repeater-action">
28
+ <span class="dashicons dashicons-plus"></span>
29
+ <span class="dashicons dashicons-minus"></span>
30
+ </div>
31
+ </td>
32
+ </tr>
33
+
34
+ <?php $repeater_single_row_template['template'] = ob_get_clean(); ?>
35
+
36
+ <div class="qs-row">
37
+ <div class="qs-col qs-col-12">
38
+ <?php if ( isset( $field['sub_title'] ) ) : ?>
39
+ <h2><?php echo esc_html( $field['sub_title'] ); ?></h2>
40
+ <?php endif; ?>
41
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
42
+ <h3><?php echo esc_html( $field['label'] ); ?> <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?></h3>
43
+ </label>
44
+ <div>
45
+ <div class="actions">
46
+ <table class="wp-list-table widefat fixed striped pages repeater-table leads-list">
47
+ <thead>
48
+ <tr>
49
+ <?php foreach ( $values as $value_row => $value ) : ?>
50
+ <?php foreach ( $field['fields'] as $child_field ) : ?>
51
+ <th class="manage-column column-primary sortable desc">
52
+ <a href="#"><?php echo $child_field['label']; ?></a>
53
+ </th>
54
+ <?php endforeach; ?>
55
+ <th><?php _e( 'Actions', 'wpcf7-redirect' ); ?></th>
56
+ <?php break; ?>
57
+ <?php endforeach; ?>
58
+ </tr>
59
+ </thead>
60
+
61
+ <tbody id="the_list" data-repeater-template="<?php echo htmlspecialchars( wp_json_encode( $repeater_single_row_template ) ); ?>">
62
+ <?php foreach ( $values as $value_row => $value ) : ?>
63
+ <tr class="qs-repeater-row" data-repeater-row-count="<?php echo $value_row; ?>">
64
+ <?php $prefix = $base_prefix . '[' . $field['name'] . ']' . '[' . $value_row . ']'; ?>
65
+ <?php foreach ( $field['fields'] as $child_field ) : ?>
66
+ <td>
67
+ <?php
68
+ $child_field['value'] = isset( $value[ $child_field['name'] ] ) ? $value[ $child_field['name'] ] : '';
69
+ $child_field['label'] = '';
70
+ WPCF7R_Html::render_field( $child_field, $prefix );
71
+ ?>
72
+ </td>
73
+ <?php endforeach; ?>
74
+ <td>
75
+ <div class="qs-repeater-action">
76
+ <span class="dashicons dashicons-plus"></span>
77
+ <span class="dashicons dashicons-minus"></span>
78
+ </div>
79
+ </td>
80
+ </tr>
81
+ <?php endforeach; ?>
82
+ </tbody>
83
+ </table>
84
+ </div>
85
+ </div>
86
+ <div class="field-footer">
87
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
88
+ </div>
89
+ </div>
90
+ </div>
templates/fields/field-rule-blocks.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php
2
- /**
3
- * Render a block of rules
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- if ( ! conditional_logic_enabled() ) {
9
- return;
10
- }
11
- ?>
12
-
13
- <div class="conditional-logic-blocks <?php echo $field['has_conditional_logic'] ? 'active' : ''; ?>">
14
- <div class="conditional-groups-wrap">
15
- <div class="conditional-groups-tabs">
16
- <div class="conditional-group-blocks">
17
- <div class="qs-row">
18
- <div class="qs-col qs-col-12">
19
- <div class="wpcfr-rule-groups">
20
- <?php
21
- $active_tab = 'active';
22
- foreach ( $field['blocks'] as $group_block ) :
23
- WPCF7R_Html::get_block_html( 'block_1', $group_block, $active_tab, true, $prefix );
24
- $active_tab = false;
25
- endforeach;
26
- ?>
27
- </div>
28
- </div>
29
- <div class="qs-col qs-col-12">
30
- <div class="groups-actions">
31
- <a href="#" class="button-primary wpcfr-add-group"><?php _e( 'OR', 'wpcf7-redirect' ); ?></a>
32
- </div>
33
- </div>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- </div>
1
+ <?php
2
+ /**
3
+ * Render a block of rules
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ if ( ! conditional_logic_enabled() ) {
9
+ return;
10
+ }
11
+ ?>
12
+
13
+ <div class="conditional-logic-blocks <?php echo $field['has_conditional_logic'] ? 'active' : ''; ?>">
14
+ <div class="conditional-groups-wrap">
15
+ <div class="conditional-groups-tabs">
16
+ <div class="conditional-group-blocks">
17
+ <div class="qs-row">
18
+ <div class="qs-col qs-col-12">
19
+ <div class="wpcfr-rule-groups">
20
+ <?php
21
+ $active_tab = 'active';
22
+ foreach ( $field['blocks'] as $group_block ) :
23
+ WPCF7R_Html::get_block_html( 'block_1', $group_block, $active_tab, true, $prefix );
24
+ $active_tab = false;
25
+ endforeach;
26
+ ?>
27
+ </div>
28
+ </div>
29
+ <div class="qs-col qs-col-12">
30
+ <div class="groups-actions">
31
+ <a href="#" class="button-primary wpcfr-add-group"><?php _e( 'OR', 'wpcf7-redirect' ); ?></a>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
templates/fields/field-select.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /**
3
- * Render a select field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $selected = selected( '1', '1', false );
9
- $toggler = isset( $field['toggler'] ) ? $field['name'] : false;
10
- ?>
11
-
12
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" >
13
- <?php if ( $field['label'] ) : ?>
14
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
15
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
16
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
17
- </label>
18
- <?php endif; ?>
19
- <select class="" <?php echo $toggler ? "data-toggler-name='{$toggler}'" : ''; ?> name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" >
20
- <?php foreach ( $field['options'] as $option_key => $option_label ) : ?>
21
- <?php
22
- $selected = isset( $field['value'] ) && $field['value'] ? selected( $field['value'], $option_key, false ) : $selected;
23
- ?>
24
- <option value="<?php echo $option_key; ?>" <?php echo $selected; ?>><?php echo $option_label; ?></option>
25
- <?php $selected = ''; ?>
26
- <?php endforeach; ?>
27
- </select>
28
- <div class="field-footer">
29
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
30
- </div>
31
- </div>
1
+ <?php
2
+ /**
3
+ * Render a select field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $selected = selected( '1', '1', false );
9
+ $toggler = isset( $field['toggler'] ) ? $field['name'] : false;
10
+ ?>
11
+
12
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" >
13
+ <?php if ( $field['label'] ) : ?>
14
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
15
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
16
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
17
+ </label>
18
+ <?php endif; ?>
19
+ <select class="" <?php echo $toggler ? "data-toggler-name='{$toggler}'" : ''; ?> name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" >
20
+ <?php foreach ( $field['options'] as $option_key => $option_label ) : ?>
21
+ <?php
22
+ $selected = isset( $field['value'] ) && $field['value'] ? selected( $field['value'], $option_key, false ) : $selected;
23
+ ?>
24
+ <option value="<?php echo $option_key; ?>" <?php echo $selected; ?>><?php echo $option_label; ?></option>
25
+ <?php $selected = ''; ?>
26
+ <?php endforeach; ?>
27
+ </select>
28
+ <div class="field-footer">
29
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
30
+ </div>
31
+ </div>
templates/fields/field-tags-map.php CHANGED
@@ -1,76 +1,76 @@
1
- <?php
2
- /**
3
- * Render tags mapping for API field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $defaults_name = isset( $field['defaults_name'] ) ? $field['defaults_name'] : 'tags_defaults';
9
- $selected = selected( '1', '1', false );
10
- ?>
11
-
12
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
13
- <?php if ( isset( $field['title'] ) && $field['title'] ) : ?>
14
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
15
- <h3><?php echo esc_html( $field['label'] ); ?></h3>
16
- &nbsp;
17
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>"><?php echo esc_html( $field['sub_title'] ); ?></label>
19
- <br/>&nbsp;
20
- <?php endif; ?>
21
- </label>
22
- <?php endif; ?>
23
-
24
- <div class="cf7_row">
25
- <table class="wp-list-table widefat fixed striped pages wp-list-table-inner">
26
- <tr>
27
- <td><strong><?php _e( 'Form Field Name', 'wpcf7-redirect' ); ?></strong></td>
28
- <?php if ( 'test_tags_map' !== $field['name'] ) : ?>
29
- <td class="tags-map-api-key"><strong><?php _e( 'Matching 3rd-Party Field Name', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'The Matching 3rd-Party field name as your api provider required', 'wpcf7-redirect' ) ); ?></td>
30
- <?php endif; ?>
31
- <?php if ( 'test_tags_map' !== $field['name'] ) : ?>
32
- <td><strong><?php _e( 'Defaults', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Send default values if not selected by the user', 'wpcf7-redirect' ) ); ?></td>
33
- <?php else : ?>
34
- <td><strong><?php _e( 'Value', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Which value to send', 'wpcf7-redirect' ) ); ?></td>
35
- <?php endif; ?>
36
- <?php if ( 'test_tags_map' !== $field['name'] && isset( $field['tags_functions'] ) ) : ?>
37
- <td><strong><?php _e( 'Function', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Perform actions on the submitted value', 'wpcf7-redirect' ) ); ?></td>
38
- <?php endif; ?>
39
- </tr>
40
- <?php
41
- if ( isset( $field['tags'] ) && $field['tags'] ) :
42
- foreach ( $field['tags'] as $mail_tag ) :
43
- ?>
44
- <tr>
45
- <td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
46
- <?php if ( 'test_tags_map' !== $field['name'] ) : ?>
47
- <td class="tags-map-api-key">
48
- <input type="text" id="sf-<?php echo $mail_tag->name; ?>"
49
- name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>]"
50
- class="large-text"
51
- value="<?php echo isset( $field['value'][ $mail_tag->name ] ) ? esc_html( $field['value'][ $mail_tag->name ] ) : ''; ?>" />
52
- </td>
53
- <?php endif; ?>
54
- <td>
55
- <?php $selected_value = isset( $field[ $defaults_name ][ "{$mail_tag->name}" ] ) ? $field[ $defaults_name ][ "{$mail_tag->name}" ] : ''; ?>
56
- <input type="text" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $defaults_name; ?>][<?php echo $mail_tag->name; ?>]" value="<?php echo $selected_value; ?>" />
57
- </td>
58
- <?php if ( 'test_tags_map' !== $field['name'] && isset( $field['tags_functions'] ) ) : ?>
59
- <td>
60
- <?php $selected_function = isset( $field['tags_functions'][ "{$mail_tag->name}" ] ) ? $field['tags_functions'][ "{$mail_tag->name}" ] : ''; ?>
61
- <select class="" name="wpcf7-redirect<?php echo $prefix; ?>[tags_functions][<?php echo $mail_tag->name; ?>]">
62
- <?php $functions = WPCF7r_Utils::get_available_text_functions( '', $mail_tag->type ); ?>
63
- <option value="" <?php echo ! $selected_function ? "selected='selected'" : ''; ?>><?php _e( 'Select' ); ?></option>
64
- <?php foreach ( array_keys( $functions ) as $function_name ) : ?>
65
- <option value="<?php echo $function_name; ?>" <?php selected( $selected_function, $function_name, true ); ?>><?php echo $function_name; ?></option>
66
- <?php $selected = ''; ?>
67
- <?php endforeach; ?>
68
- </select>
69
- </td>
70
- <?php endif; ?>
71
- </tr>
72
- <?php endforeach; ?>
73
- <?php endif; ?>
74
- </table>
75
- </div>
76
- </div>
1
+ <?php
2
+ /**
3
+ * Render tags mapping for API field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $defaults_name = isset( $field['defaults_name'] ) ? $field['defaults_name'] : 'tags_defaults';
9
+ $selected = selected( '1', '1', false );
10
+ ?>
11
+
12
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
13
+ <?php if ( isset( $field['title'] ) && $field['title'] ) : ?>
14
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
15
+ <h3><?php echo esc_html( $field['label'] ); ?></h3>
16
+ &nbsp;
17
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>"><?php echo esc_html( $field['sub_title'] ); ?></label>
19
+ <br/>&nbsp;
20
+ <?php endif; ?>
21
+ </label>
22
+ <?php endif; ?>
23
+
24
+ <div class="cf7_row">
25
+ <table class="wp-list-table widefat fixed striped pages wp-list-table-inner">
26
+ <tr>
27
+ <td><strong><?php _e( 'Form Field Name', 'wpcf7-redirect' ); ?></strong></td>
28
+ <?php if ( 'test_tags_map' !== $field['name'] ) : ?>
29
+ <td class="tags-map-api-key"><strong><?php _e( 'Matching 3rd-Party Field Name', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'The Matching 3rd-Party field name as your api provider required', 'wpcf7-redirect' ) ); ?></td>
30
+ <?php endif; ?>
31
+ <?php if ( 'test_tags_map' !== $field['name'] ) : ?>
32
+ <td><strong><?php _e( 'Defaults', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Send default values if not selected by the user', 'wpcf7-redirect' ) ); ?></td>
33
+ <?php else : ?>
34
+ <td><strong><?php _e( 'Value', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Which value to send', 'wpcf7-redirect' ) ); ?></td>
35
+ <?php endif; ?>
36
+ <?php if ( 'test_tags_map' !== $field['name'] && isset( $field['tags_functions'] ) ) : ?>
37
+ <td><strong><?php _e( 'Function', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Perform actions on the submitted value', 'wpcf7-redirect' ) ); ?></td>
38
+ <?php endif; ?>
39
+ </tr>
40
+ <?php
41
+ if ( isset( $field['tags'] ) && $field['tags'] ) :
42
+ foreach ( $field['tags'] as $mail_tag ) :
43
+ ?>
44
+ <tr>
45
+ <td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
46
+ <?php if ( 'test_tags_map' !== $field['name'] ) : ?>
47
+ <td class="tags-map-api-key">
48
+ <input type="text" id="sf-<?php echo $mail_tag->name; ?>"
49
+ name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>]"
50
+ class="large-text"
51
+ value="<?php echo isset( $field['value'][ $mail_tag->name ] ) ? esc_html( $field['value'][ $mail_tag->name ] ) : ''; ?>" />
52
+ </td>
53
+ <?php endif; ?>
54
+ <td>
55
+ <?php $selected_value = isset( $field[ $defaults_name ][ "{$mail_tag->name}" ] ) ? $field[ $defaults_name ][ "{$mail_tag->name}" ] : ''; ?>
56
+ <input type="text" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $defaults_name; ?>][<?php echo $mail_tag->name; ?>]" value="<?php echo $selected_value; ?>" />
57
+ </td>
58
+ <?php if ( 'test_tags_map' !== $field['name'] && isset( $field['tags_functions'] ) ) : ?>
59
+ <td>
60
+ <?php $selected_function = isset( $field['tags_functions'][ "{$mail_tag->name}" ] ) ? $field['tags_functions'][ "{$mail_tag->name}" ] : ''; ?>
61
+ <select class="" name="wpcf7-redirect<?php echo $prefix; ?>[tags_functions][<?php echo $mail_tag->name; ?>]">
62
+ <?php $functions = WPCF7r_Utils::get_available_text_functions( '', $mail_tag->type ); ?>
63
+ <option value="" <?php echo ! $selected_function ? "selected='selected'" : ''; ?>><?php _e( 'Select' ); ?></option>
64
+ <?php foreach ( array_keys( $functions ) as $function_name ) : ?>
65
+ <option value="<?php echo $function_name; ?>" <?php selected( $selected_function, $function_name, true ); ?>><?php echo $function_name; ?></option>
66
+ <?php $selected = ''; ?>
67
+ <?php endforeach; ?>
68
+ </select>
69
+ </td>
70
+ <?php endif; ?>
71
+ </tr>
72
+ <?php endforeach; ?>
73
+ <?php endif; ?>
74
+ </table>
75
+ </div>
76
+ </div>
templates/fields/field-taxonomy.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- /**
3
- * Render taxonomy select field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $taxonomiies = get_taxonomies();
9
- ?>
10
-
11
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
12
- <?php if ( $field['label'] ) : ?>
13
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
14
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
15
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
16
- </label>
17
- <?php endif; ?>
18
- <select class="" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]">
19
- <?php foreach ( $taxonomiies as $option_key => $option_label ) : ?>
20
- <option value="<?php echo $option_key; ?>" <?php selected( $field['value'], $option_key ); ?>><?php echo $option_label; ?></option>
21
- <?php endforeach; ?>
22
- </select>
23
- <div class="field-footer">
24
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
25
- </div>
26
- </div>
1
+ <?php
2
+ /**
3
+ * Render taxonomy select field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $taxonomiies = get_taxonomies();
9
+ ?>
10
+
11
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
12
+ <?php if ( $field['label'] ) : ?>
13
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
14
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
15
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
16
+ </label>
17
+ <?php endif; ?>
18
+ <select class="" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]">
19
+ <?php foreach ( $taxonomiies as $option_key => $option_label ) : ?>
20
+ <option value="<?php echo $option_key; ?>" <?php selected( $field['value'], $option_key ); ?>><?php echo $option_label; ?></option>
21
+ <?php endforeach; ?>
22
+ </select>
23
+ <div class="field-footer">
24
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
25
+ </div>
26
+ </div>
templates/fields/field-text.php CHANGED
@@ -1,41 +1,41 @@
1
- <?php
2
- /**
3
- * Display text field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $name = isset( $field['name'] ) ? $field['name'] : '';
9
- $class = isset( $field['class'] ) ? $field['class'] : '';
10
- $label = isset( $field['label'] ) ? $field['label'] : '';
11
- $tooltip = isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : '';
12
- $sub_title = isset( $field['sub_title'] ) ? $field['sub_title'] : '';
13
- $input_class = isset( $field['input_class'] ) ? $field['input_class'] : '';
14
- $input_attr = isset( $field['input_attr'] ) ? $field['input_attr'] : '';
15
- $footer = isset( $field['footer'] ) ? $field['footer'] : '';
16
- $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
17
- $value = isset( $field['value'] ) ? $field['value'] : '';
18
-
19
- ?>
20
- <div class="field-wrap field-wrap-<?php echo esc_html( $name ); ?> <?php echo $class; ?>">
21
- <?php if ( $label ) : ?>
22
- <label for="wpcf7-redirect-<?php echo $name; ?>">
23
- <strong><?php echo esc_html( $label ); ?></strong>
24
- <?php echo $tooltip;?>
25
- </label>
26
- <?php endif; ?>
27
-
28
- <?php if ( $sub_title ) : ?>
29
-
30
- <div class="wpcf7-subtitle">
31
- <?php echo esc_html( $sub_title ); ?>
32
- </div>
33
-
34
- <?php endif; ?>
35
-
36
- <input type="text" class="wpcf7-redirect-<?php echo esc_html( $name ); ?>-fields <?php echo esc_html( $input_class ); ?>" placeholder="<?php echo esc_html( $placeholder ); ?>" name="wpcf7-redirect<?php echo esc_html( $prefix ); ?>[<?php echo esc_html( $name ); ?>]" value="<?php echo esc_html( $value ); ?>" <?php echo esc_html( $input_attr ); ?>>
37
-
38
- <div class="field-footer">
39
- <?php echo $footer; ?>
40
- </div>
41
- </div>
1
+ <?php
2
+ /**
3
+ * Display text field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $name = isset( $field['name'] ) ? $field['name'] : '';
9
+ $class = isset( $field['class'] ) ? $field['class'] : '';
10
+ $label = isset( $field['label'] ) ? $field['label'] : '';
11
+ $tooltip = isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : '';
12
+ $sub_title = isset( $field['sub_title'] ) ? $field['sub_title'] : '';
13
+ $input_class = isset( $field['input_class'] ) ? $field['input_class'] : '';
14
+ $input_attr = isset( $field['input_attr'] ) ? $field['input_attr'] : '';
15
+ $footer = isset( $field['footer'] ) ? $field['footer'] : '';
16
+ $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
17
+ $value = isset( $field['value'] ) ? $field['value'] : '';
18
+
19
+ ?>
20
+ <div class="field-wrap field-wrap-<?php echo esc_html( $name ); ?> <?php echo $class; ?>">
21
+ <?php if ( $label ) : ?>
22
+ <label for="wpcf7-redirect-<?php echo $name; ?>">
23
+ <strong><?php echo esc_html( $label ); ?></strong>
24
+ <?php echo $tooltip;?>
25
+ </label>
26
+ <?php endif; ?>
27
+
28
+ <?php if ( $sub_title ) : ?>
29
+
30
+ <div class="wpcf7-subtitle">
31
+ <?php echo esc_html( $sub_title ); ?>
32
+ </div>
33
+
34
+ <?php endif; ?>
35
+
36
+ <input type="text" class="wpcf7-redirect-<?php echo esc_html( $name ); ?>-fields <?php echo esc_html( $input_class ); ?>" placeholder="<?php echo esc_html( $placeholder ); ?>" name="wpcf7-redirect<?php echo esc_html( $prefix ); ?>[<?php echo esc_html( $name ); ?>]" value="<?php echo esc_html( $value ); ?>" <?php echo esc_html( $input_attr ); ?>>
37
+
38
+ <div class="field-footer">
39
+ <?php echo $footer; ?>
40
+ </div>
41
+ </div>
templates/fields/field-textarea.php CHANGED
@@ -1,33 +1,33 @@
1
- <?php
2
- /**
3
- * Render a textarea field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- $name = isset( $field['name'] ) ? $field['name'] : '';
9
- $class = isset( $field['class'] ) ? $field['class'] : '';
10
- $label = isset( $field['label'] ) ? $field['label'] : '';
11
- $tooltip = isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : '';
12
- $sub_title = isset( $field['sub_title'] ) ? $field['sub_title'] : '';
13
- $input_class = isset( $field['input_class'] ) ? $field['input_class'] : '';
14
- $input_attr = isset( $field['input_attr'] ) ? $field['input_attr'] : '';
15
- $footer = isset( $field['footer'] ) ? $field['footer'] : '';
16
- $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
17
- $value = isset( $field['value'] ) ? $field['value'] : '';
18
-
19
- ?>
20
- <div class="field-wrap field-wrap-<?php echo esc_html( $name ); ?> <?php echo esc_html( $class ); ?>">
21
- <label for="wpcf7-redirect-<?php echo esc_html( $name ); ?>">
22
- <strong><?php echo esc_html( $label ); ?></strong>
23
- </label>
24
- <?php if ( $sub_title ) : ?>
25
- <div class="wpcf7-subtitle">
26
- <?php echo esc_html( $sub_title ); ?>
27
- </div>
28
- <?php endif; ?>
29
- <textarea rows="10" class="wpcf7-redirect-<?php echo esc_html( $name ); ?>-fields" placeholder="<?php echo esc_html( $placeholder ); ?>" name="wpcf7-redirect<?php echo esc_html( $prefix ); ?>[<?php echo esc_html( $name ); ?>]"><?php echo esc_html( $value ); ?></textarea>
30
- <div class="field-footer">
31
- <?php echo $footer ; ?>
32
- </div>
33
- </div>
1
+ <?php
2
+ /**
3
+ * Render a textarea field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ $name = isset( $field['name'] ) ? $field['name'] : '';
9
+ $class = isset( $field['class'] ) ? $field['class'] : '';
10
+ $label = isset( $field['label'] ) ? $field['label'] : '';
11
+ $tooltip = isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : '';
12
+ $sub_title = isset( $field['sub_title'] ) ? $field['sub_title'] : '';
13
+ $input_class = isset( $field['input_class'] ) ? $field['input_class'] : '';
14
+ $input_attr = isset( $field['input_attr'] ) ? $field['input_attr'] : '';
15
+ $footer = isset( $field['footer'] ) ? $field['footer'] : '';
16
+ $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
17
+ $value = isset( $field['value'] ) ? $field['value'] : '';
18
+
19
+ ?>
20
+ <div class="field-wrap field-wrap-<?php echo esc_html( $name ); ?> <?php echo esc_html( $class ); ?>">
21
+ <label for="wpcf7-redirect-<?php echo esc_html( $name ); ?>">
22
+ <strong><?php echo esc_html( $label ); ?></strong>
23
+ </label>
24
+ <?php if ( $sub_title ) : ?>
25
+ <div class="wpcf7-subtitle">
26
+ <?php echo esc_html( $sub_title ); ?>
27
+ </div>
28
+ <?php endif; ?>
29
+ <textarea rows="10" class="wpcf7-redirect-<?php echo esc_html( $name ); ?>-fields" placeholder="<?php echo esc_html( $placeholder ); ?>" name="wpcf7-redirect<?php echo esc_html( $prefix ); ?>[<?php echo esc_html( $name ); ?>]"><?php echo esc_html( $value ); ?></textarea>
30
+ <div class="field-footer">
31
+ <?php echo $footer ; ?>
32
+ </div>
33
+ </div>
templates/fields/field-url.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- /**
3
- * Render url field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
11
- <strong><?php echo esc_html( $field['label'] ); ?></strong>
12
- <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
13
- </label>
14
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
15
- <div class="wpcf7-subtitle">
16
- <?php echo $field['sub_title']; ?>
17
- </div>
18
- <?php endif; ?>
19
- <input type="url" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>">
20
- <div class="field-footer">
21
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
22
- </div>
23
- </div>
1
+ <?php
2
+ /**
3
+ * Render url field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
10
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
11
+ <strong><?php echo esc_html( $field['label'] ); ?></strong>
12
+ <?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
13
+ </label>
14
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
15
+ <div class="wpcf7-subtitle">
16
+ <?php echo $field['sub_title']; ?>
17
+ </div>
18
+ <?php endif; ?>
19
+ <input type="url" class="wpcf7-redirect-<?php echo $field['name']; ?>-fields" placeholder="<?php echo esc_html( $field['placeholder'] ); ?>" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" value="<?php echo esc_html( $field['value'] ); ?>">
20
+ <div class="field-footer">
21
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
22
+ </div>
23
+ </div>
templates/fields/index.php CHANGED
@@ -1,2 +1,2 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit;
templates/fields/section.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
- /**
3
- * Wrapper for each field
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?> qs-section clearfix" <?php echo isset( $field['attr'] ) ? $field['attr'] : ''; ?>>
10
- <?php if ( isset( $field['title'] ) && $field['title'] ) : ?>
11
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
- <h3 class="" data-tab-target="section-inner-wrap-<?php echo $field['name']; ?>"><span class="dashicons dashicons-plus-alt"></span> <?php echo esc_html( $field['title'] ); ?></h3>
13
- </label>
14
- <?php endif; ?>
15
-
16
- <div class="section-inner-wrap" data-tab="section-inner-wrap-<?php echo $field['name']; ?>">
17
- <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
- <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
19
- <h4><?php echo $field['sub_title']; ?></h4>
20
- </label>
21
- <?php endif; ?>
22
- <div>&nbsp;</div>
23
-
24
- <?php foreach ( $field['fields'] as $child_field ) : ?>
25
- <?php WPCF7R_Html::render_field( $child_field, $prefix ); ?>
26
- <?php endforeach; ?>
27
-
28
- <div class="field-footer">
29
- <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
30
- </div>
31
- </div>
32
- </div>
1
+ <?php
2
+ /**
3
+ * Wrapper for each field
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?> qs-section clearfix" <?php echo isset( $field['attr'] ) ? $field['attr'] : ''; ?>>
10
+ <?php if ( isset( $field['title'] ) && $field['title'] ) : ?>
11
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
12
+ <h3 class="" data-tab-target="section-inner-wrap-<?php echo $field['name']; ?>"><span class="dashicons dashicons-plus-alt"></span> <?php echo esc_html( $field['title'] ); ?></h3>
13
+ </label>
14
+ <?php endif; ?>
15
+
16
+ <div class="section-inner-wrap" data-tab="section-inner-wrap-<?php echo $field['name']; ?>">
17
+ <?php if ( isset( $field['sub_title'] ) && $field['sub_title'] ) : ?>
18
+ <label for="wpcf7-redirect-<?php echo $field['name']; ?>">
19
+ <h4><?php echo $field['sub_title']; ?></h4>
20
+ </label>
21
+ <?php endif; ?>
22
+ <div>&nbsp;</div>
23
+
24
+ <?php foreach ( $field['fields'] as $child_field ) : ?>
25
+ <?php WPCF7R_Html::render_field( $child_field, $prefix ); ?>
26
+ <?php endforeach; ?>
27
+
28
+ <div class="field-footer">
29
+ <?php echo isset( $field['footer'] ) ? $field['footer'] : ''; ?>
30
+ </div>
31
+ </div>
32
+ </div>
templates/index.php CHANGED
@@ -1,2 +1,2 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit;
templates/popup-api-test.php CHANGED
@@ -1,74 +1,74 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
- ?>
4
-
5
- <div class="wpcfr-popup-wrap wpcfr-popup-hidden <?php echo $template; ?> middle-center">
6
- <div class="wpcfr-popup-wrap-inner">
7
- <span class="dashicons dashicons-no-alt wpcfr-close-popup top-right"></span>
8
- <div class="wpcfr-popup-wrap-content">
9
- <h3>
10
- <?php _e( 'Record', 'wpcf7-redirect' ); ?>
11
- </h3>
12
- <div class="wrapper">
13
- <textarea name="name" rows="8" cols="80">
14
- <?php
15
- ob_start();
16
-
17
- print_r( $this->record );
18
-
19
- echo esc_html( ob_get_clean() );
20
- ?>
21
- </textarea>
22
- </div>
23
- <h3>
24
- <?php _e( 'Request', 'wpcf7-redirect' ); ?>
25
- </h3>
26
- <div class="wrapper">
27
- <textarea name="name" rows="8" cols="80">
28
- <?php
29
- ob_start();
30
-
31
- print_r( $this->request );
32
-
33
- echo esc_html( ob_get_clean() );
34
- ?>
35
- </textarea>
36
- </div>
37
- <h3>
38
- <?php _e( 'Response', 'wpcf7-redirect' ); ?>
39
- </h3>
40
- <div class="wrapper">
41
- <?php if ( is_wp_error( $this->results ) ) : ?>
42
- <span class="err"><?php _e( 'Error!' ); ?></span>
43
- <textarea name="name" rows="8" cols="80">
44
- <?php
45
- ob_start();
46
-
47
- print_r( $this->results );
48
-
49
- echo esc_html( ob_get_clean() );
50
- ?>
51
- </textarea>
52
- <?php else : ?>
53
- <div class="field-wrap">
54
- <div class="label">
55
- <label>
56
- <?php _e( 'Response code', 'wpcf7-redirect' ); ?>
57
- </label>
58
- <span><?php echo $this->results['response']['message']; ?>(<?php echo $this->results['response']['code']; ?>)</span>
59
- </div>
60
- <textarea name="name" rows="8" cols="80">
61
- <?php
62
- ob_start();
63
-
64
- print_r( $this->results );
65
-
66
- echo esc_html( ob_get_clean() );
67
- ?>
68
- </textarea>
69
- </div>
70
- <?php endif; ?>
71
- </div>
72
- </div>
73
- </div>
74
- </div>
1
+ <?php
2
+ defined( 'ABSPATH' ) || exit;
3
+ ?>
4
+
5
+ <div class="wpcfr-popup-wrap wpcfr-popup-hidden <?php echo $template; ?> middle-center">
6
+ <div class="wpcfr-popup-wrap-inner">
7
+ <span class="dashicons dashicons-no-alt wpcfr-close-popup top-right"></span>
8
+ <div class="wpcfr-popup-wrap-content">
9
+ <h3>
10
+ <?php _e( 'Record', 'wpcf7-redirect' ); ?>
11
+ </h3>
12
+ <div class="wrapper">
13
+ <textarea name="name" rows="8" cols="80">
14
+ <?php
15
+ ob_start();
16
+
17
+ print_r( $this->record );
18
+
19
+ echo esc_html( ob_get_clean() );
20
+ ?>
21
+ </textarea>
22
+ </div>
23
+ <h3>
24
+ <?php _e( 'Request', 'wpcf7-redirect' ); ?>
25
+ </h3>
26
+ <div class="wrapper">
27
+ <textarea name="name" rows="8" cols="80">
28
+ <?php
29
+ ob_start();
30
+
31
+ print_r( $this->request );
32
+
33
+ echo esc_html( ob_get_clean() );
34
+ ?>
35
+ </textarea>
36
+ </div>
37
+ <h3>
38
+ <?php _e( 'Response', 'wpcf7-redirect' ); ?>
39
+ </h3>
40
+ <div class="wrapper">
41
+ <?php if ( is_wp_error( $this->results ) ) : ?>
42
+ <span class="err"><?php _e( 'Error!' ); ?></span>
43
+ <textarea name="name" rows="8" cols="80">
44
+ <?php
45
+ ob_start();
46
+
47
+ print_r( $this->results );
48
+
49
+ echo esc_html( ob_get_clean() );
50
+ ?>
51
+ </textarea>
52
+ <?php else : ?>
53
+ <div class="field-wrap">
54
+ <div class="label">
55
+ <label>
56
+ <?php _e( 'Response code', 'wpcf7-redirect' ); ?>
57
+ </label>
58
+ <span><?php echo $this->results['response']['message']; ?>(<?php echo $this->results['response']['code']; ?>)</span>
59
+ </div>
60
+ <textarea name="name" rows="8" cols="80">
61
+ <?php
62
+ ob_start();
63
+
64
+ print_r( $this->results );
65
+
66
+ echo esc_html( ob_get_clean() );
67
+ ?>
68
+ </textarea>
69
+ </div>
70
+ <?php endif; ?>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </div>
templates/popups/template-1.css ADDED
@@ -0,0 +1 @@
 
1
+ .popup-template .modal{position:fixed;left:0;bottom:0;width:100%;opacity:0;z-index:-1;visibility:hidden;background:rgba(0,0,0,.9);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:999;-webkit-transition:all 0s;-o-transition:all 0s;transition:all 0s}.popup-template .modal-container{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:720px;width:100%;border-radius:10px;overflow:hidden;position:absolute;opacity:0;pointer-events:none;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;background:#fff;-webkit-transform:translateY(100px) scale(.4);-ms-transform:translateY(100px) scale(.4);transform:translateY(100px) scale(.4)}.popup-template .modal-title{font-size:26px;margin:0;font-weight:400;color:#55311c}.popup-template .modal-desc{margin:6px 0 30px 0}.popup-template .modal-left{padding:40px 30px;background:#fff;-webkit-box-flex:1.5;-ms-flex:1.5;flex:1.5;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;-webkit-transform:translateY(80px);-ms-transform:translateY(80px);transform:translateY(80px);opacity:0}.popup-template .modal-button{color:#7d695e;font-family:Nunito,sans-serif;font-size:18px;cursor:pointer;border:0;outline:0;padding:10px 40px;border-radius:30px;background:#fff;-webkit-box-shadow:0 10px 40px rgba(0,0,0,.16);box-shadow:0 10px 40px rgba(0,0,0,.16);-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.popup-template .modal-button:hover{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.8)}.popup-template .modal-right{-webkit-box-flex:2;-ms-flex:2;flex:2;font-size:0;-webkit-transition:.3s;-o-transition:.3s;transition:.3s;overflow:hidden}.popup-template .modal-right img{width:100%;height:100%;-webkit-transform:scale(2);-ms-transform:scale(2);transform:scale(2);-o-object-fit:cover;object-fit:cover;-webkit-transition-duration:1.2s;-o-transition-duration:1.2s;transition-duration:1.2s}.popup-template .modal.is-open{background:rgba(51,51,51,.85);opacity:1;z-index:9999;visibility:visible}.popup-template .modal.is-open .modal-button{opacity:0}.popup-template .modal.is-open .modal-container{opacity:1;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;pointer-events:auto;-webkit-transform:translateY(0) scale(1);-ms-transform:translateY(0) scale(1);transform:translateY(0) scale(1)}.popup-template .modal.is-open .modal-right img{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.popup-template .modal.is-open .modal-left{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;-webkit-transition-delay:.1s;-o-transition-delay:.1s;transition-delay:.1s}.popup-template .modal-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.popup-template .modal-buttons a{color:rgba(51,51,51,.6);font-size:14px}.popup-template .modal .icon-button{outline:0;position:absolute;right:10px;top:12px;width:32px;height:32px;border:0;background:0;padding:0;cursor:pointer}@media (max-width:750px){.popup-template .modal-container{width:90%}.popup-template .modal-right{display:none}}
templates/popups/template-1.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Popup Template Name: 50-50 With Image Template
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="modal-container">
10
+ <div class="modal-left">
11
+ <h1 class="modal-title" style="color:{{template_title_color.color}}">{{template_title.text}}</h1>
12
+ <p class="modal-desc">{{template_description.description}}</p>
13
+ <div class="modal-buttons">
14
+ <a href="{{template_button1_link.url}}" class="" style="color:{{template_button1_color.color}}">{{template_button1.text}}</a>
15
+ </div>
16
+
17
+ <p class="sign-up"><span style="color:{{template_footer_text_color.color}}">{{template_footer_text.text}}</span> <a href="{{template_footer_button_link.url}}" style="color:{{template_footer_button_link_color.color}}">{{template_footer_button_text.text}}</a></p>
18
+ </div>
19
+ <div class="modal-right">
20
+ <img src="{{template_image.media}}" alt="">
21
+ </div>
22
+ <button class="icon-button close-button">
23
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
24
+ <path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
25
+ </svg>
26
+ </button>
27
+ </div>
templates/popups/template-1.scss ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // out: template-1.css, compress: true, sourceMap: false, autoprefixer: last 5 versions, groupmedia: true
2
+ .popup-template {
3
+ .modal {
4
+ position: fixed;
5
+ left: 0;
6
+ bottom: 0;
7
+ width: 100%;
8
+ opacity:0;
9
+ z-index: -1;
10
+ visibility:hidden;
11
+ background: rgba(#000, 0.9);
12
+ display: flex;
13
+ flex-direction: column;
14
+ align-items: center;
15
+ justify-content: center;
16
+ height:100%;
17
+ z-index: 999;
18
+ transition:all 0.8ms;
19
+
20
+ &-container {
21
+ display: flex;
22
+ max-width: 720px;
23
+ width: 100%;
24
+ border-radius: 10px;
25
+ overflow: hidden;
26
+ position: absolute;
27
+ opacity: 0;
28
+ pointer-events: none;
29
+ transition-duration: 0.3s;
30
+ background: #fff;
31
+ transform: translateY(100px) scale(0.4);
32
+ }
33
+
34
+ &-title {
35
+ font-size: 26px;
36
+ margin: 0;
37
+ font-weight: 400;
38
+ color: #55311c;
39
+ }
40
+
41
+ &-desc {
42
+ margin: 6px 0 30px 0;
43
+ }
44
+
45
+ &-left {
46
+ padding: 40px 30px;
47
+ background: #fff;
48
+ flex: 1.5;
49
+ transition-duration: 0.5s;
50
+ transform: translateY(80px);
51
+ opacity: 0;
52
+ }
53
+
54
+ &-button {
55
+ color: darken(#8c7569, 5%);
56
+ font-family: "Nunito", sans-serif;
57
+ font-size: 18px;
58
+ cursor: pointer;
59
+ border: 0;
60
+ outline: 0;
61
+ padding: 10px 40px;
62
+ border-radius: 30px;
63
+ background: rgb(255, 255, 255);
64
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
65
+ transition: 0.3s;
66
+
67
+ &:hover {
68
+ border-color: rgba(255, 255, 255, 0.2);
69
+ background: rgba(#fff, 0.8);
70
+ }
71
+ }
72
+
73
+ &-right {
74
+ flex: 2;
75
+ font-size: 0;
76
+ transition: 0.3s;
77
+ overflow: hidden;
78
+
79
+ img {
80
+ width: 100%;
81
+ height: 100%;
82
+ transform: scale(2);
83
+ object-fit: cover;
84
+ transition-duration: 1.2s;
85
+ }
86
+ }
87
+
88
+ &.is-open {
89
+ background: rgba(#333, 0.85);
90
+ opacity:1;
91
+ z-index: 9999;
92
+ visibility:visible;
93
+ .modal-button {
94
+ opacity: 0;
95
+ }
96
+
97
+ .modal-container {
98
+ opacity: 1;
99
+ transition-duration: 0.6s;
100
+ pointer-events: auto;
101
+ transform: translateY(0) scale(1);
102
+ }
103
+
104
+ .modal-right img {
105
+ transform: scale(1);
106
+ }
107
+
108
+ .modal-left {
109
+ transform: translateY(0);
110
+ opacity: 1;
111
+ transition-delay: 0.1s;
112
+ }
113
+ }
114
+
115
+ &-buttons {
116
+ display: flex;
117
+ justify-content: space-between;
118
+ align-items: center;
119
+
120
+ a {
121
+ color: rgba(#333, 0.6);
122
+ font-size: 14px;
123
+ }
124
+ }
125
+ .icon-button {
126
+ outline: 0;
127
+ position: absolute;
128
+ right: 10px;
129
+ top: 12px;
130
+ width: 32px;
131
+ height: 32px;
132
+ border: 0;
133
+ background: 0;
134
+ padding: 0;
135
+ cursor: pointer;
136
+ }
137
+ }
138
+
139
+ @media (max-width: 750px) {
140
+ .modal-container {
141
+ width: 90%;
142
+ }
143
+
144
+ .modal-right {
145
+ display: none;
146
+ }
147
+ }
148
+ }
templates/popups/template-2.css ADDED
@@ -0,0 +1 @@
 
1
+ .popup-template .modal{position:fixed;left:0;bottom:0;width:100%;opacity:0;z-index:-1;visibility:hidden;background:rgba(0,0,0,.9);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:999;-webkit-transition:all 0s;-o-transition:all 0s;transition:all 0s}.popup-template .modal-container{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:720px;width:100%;border-radius:10px;overflow:hidden;position:absolute;opacity:0;pointer-events:none;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;background:#fff;-webkit-transform:translateY(100px) scale(.4);-ms-transform:translateY(100px) scale(.4);transform:translateY(100px) scale(.4)}.popup-template .modal-title{font-size:26px;margin:0;font-weight:400;color:#55311c}.popup-template .modal-desc{margin:6px 0 30px 0}.popup-template .modal-left,.popup-template .modal-right{padding:40px 30px;background:#fff;-webkit-box-flex:1.5;-ms-flex:1.5;flex:1.5;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;-webkit-transform:translateY(80px);-ms-transform:translateY(80px);transform:translateY(80px);opacity:0}.popup-template .modal-button{color:#7d695e;font-family:Nunito,sans-serif;font-size:18px;cursor:pointer;border:0;outline:0;padding:10px 40px;border-radius:30px;background:#fff;-webkit-box-shadow:0 10px 40px rgba(0,0,0,.16);box-shadow:0 10px 40px rgba(0,0,0,.16);-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.popup-template .modal-button:hover{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.8)}.popup-template .modal.is-open{background:rgba(51,51,51,.85);opacity:1;z-index:9999;visibility:visible}.popup-template .modal.is-open .modal-button{opacity:0}.popup-template .modal.is-open .modal-container{opacity:1;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;pointer-events:auto;-webkit-transform:translateY(0) scale(1);-ms-transform:translateY(0) scale(1);transform:translateY(0) scale(1)}.popup-template .modal.is-open .modal-left,.popup-template .modal.is-open .modal-right{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;-webkit-transition-delay:.1s;-o-transition-delay:.1s;transition-delay:.1s}.popup-template .modal-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.popup-template .modal-buttons a{color:rgba(51,51,51,.6);font-size:14px}.popup-template .modal .icon-button{outline:0;position:absolute;right:10px;top:12px;width:32px;height:32px;border:0;background:0;padding:0;cursor:pointer}@media (max-width:750px){.popup-template .modal-container{width:90%}}
templates/popups/template-2.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Popup Template Name: 50-50 Text
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <div class="modal-container">
10
+ <div class="modal-left">
11
+ <h2 class="modal-title">{{template_title_left.text}}</h2>
12
+ <p class="modal-desc">{{template_description_left.description}}</p>
13
+ <div class="modal-buttons">
14
+ <a href="{{template_button1_link.url}}" class="">{{template_button1_left.text}}</a>
15
+ </div>
16
+
17
+ <p class="sign-up">{{template_footer_text.text}} <a href="{{template_footer_button_link.url}}">{{template_footer_button_text_left.text}}</a></p>
18
+ </div>
19
+ <div class="modal-right">
20
+ <h2 class="modal-title">{{template_title_right.text}}</h2>
21
+ <p class="modal-desc">{{template_description_right.description}}</p>
22
+ <div class="modal-buttons">
23
+ <a href="{{template_button1_link.url}}" class="">{{template_button1_right.text}}</a>
24
+ </div>
25
+
26
+ <p class="sign-up">{{template_footer_text_right.text}} <a href="{{template_footer_button_link.url}}">{{template_footer_button_text_right.text}}</a></p>
27
+ </div>
28
+ <button class="icon-button close-button">
29
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
30
+ <path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
31
+ </svg>
32
+ </button>
33
+ </div>
templates/popups/template-2.scss ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // out: template-2.css, compress: true, sourceMap: false, autoprefixer: last 5 versions, groupmedia: true
2
+ .popup-template {
3
+ .modal {
4
+ position: fixed;
5
+ left: 0;
6
+ bottom: 0;
7
+ width: 100%;
8
+ opacity:0;
9
+ z-index: -1;
10
+ visibility:hidden;
11
+ background: rgba(#000, 0.9);
12
+ display: flex;
13
+ flex-direction: column;
14
+ align-items: center;
15
+ justify-content: center;
16
+ height:100%;
17
+ z-index: 999;
18
+ transition:all 0.8ms;
19
+
20
+ &-container {
21
+ display: flex;
22
+ max-width: 720px;
23
+ width: 100%;
24
+ border-radius: 10px;
25
+ overflow: hidden;
26
+ position: absolute;
27
+ opacity: 0;
28
+ pointer-events: none;
29
+ transition-duration: 0.3s;
30
+ background: #fff;
31
+ transform: translateY(100px) scale(0.4);
32
+ }
33
+
34
+ &-title {
35
+ font-size: 26px;
36
+ margin: 0;
37
+ font-weight: 400;
38
+ color: #55311c;
39
+ }
40
+
41
+ &-desc {
42
+ margin: 6px 0 30px 0;
43
+ }
44
+ &-right,
45
+ &-left {
46
+ padding: 40px 30px;
47
+ background: #fff;
48
+ flex: 1.5;
49
+ transition-duration: 0.5s;
50
+ transform: translateY(80px);
51
+ opacity: 0;
52
+ }
53
+
54
+ &-button {
55
+ color: darken(#8c7569, 5%);
56
+ font-family: "Nunito", sans-serif;
57
+ font-size: 18px;
58
+ cursor: pointer;
59
+ border: 0;
60
+ outline: 0;
61
+ padding: 10px 40px;
62
+ border-radius: 30px;
63
+ background: rgb(255, 255, 255);
64
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
65
+ transition: 0.3s;
66
+
67
+ &:hover {
68
+ border-color: rgba(255, 255, 255, 0.2);
69
+ background: rgba(#fff, 0.8);
70
+ }
71
+ }
72
+
73
+ &.is-open {
74
+ background: rgba(#333, 0.85);
75
+ opacity:1;
76
+ z-index: 9999;
77
+ visibility:visible;
78
+ .modal-button {
79
+ opacity: 0;
80
+ }
81
+
82
+ .modal-container {
83
+ opacity: 1;
84
+ transition-duration: 0.6s;
85
+ pointer-events: auto;
86
+ transform: translateY(0) scale(1);
87
+ }
88
+ .modal-right,
89
+ .modal-left {
90
+ transform: translateY(0);
91
+ opacity: 1;
92
+ transition-delay: 0.1s;
93
+ }
94
+ }
95
+
96
+ &-buttons {
97
+ display: flex;
98
+ justify-content: space-between;
99
+ align-items: center;
100
+
101
+ a {
102
+ color: rgba(#333, 0.6);
103
+ font-size: 14px;
104
+ }
105
+ }
106
+ .icon-button {
107
+ outline: 0;
108
+ position: absolute;
109
+ right: 10px;
110
+ top: 12px;
111
+ width: 32px;
112
+ height: 32px;
113
+ border: 0;
114
+ background: 0;
115
+ padding: 0;
116
+ cursor: pointer;
117
+ }
118
+ }
119
+
120
+ @media (max-width: 750px) {
121
+ .modal-container {
122
+ width: 90%;
123
+ }
124
+ }
125
+ }
templates/popups/template-3.css ADDED
@@ -0,0 +1 @@
 
1
+ .popup-template .modal{position:fixed;left:0;bottom:0;width:100%;opacity:0;z-index:-1;visibility:hidden;background:rgba(0,0,0,.9);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:999;-webkit-transition:all 0s;-o-transition:all 0s;transition:all 0s}.popup-template .modal .modal-middle{background:rgba(255,255,255,.7);padding:10px;border-radius:10px}.popup-template .modal-container{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:720px;width:100%;border-radius:10px;overflow:hidden;position:absolute;opacity:0;pointer-events:none;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;background:#fff;-webkit-transform:translateY(100px) scale(.4);-ms-transform:translateY(100px) scale(.4);transform:translateY(100px) scale(.4)}.popup-template .modal-title{font-size:26px;margin:0;font-weight:400;color:#55311c}.popup-template .modal-desc{margin:6px 0 30px 0}.popup-template .modal-button{color:#7d695e;font-family:Nunito,sans-serif;font-size:18px;cursor:pointer;border:0;outline:0;padding:10px 40px;border-radius:30px;background:#fff;-webkit-box-shadow:0 10px 40px rgba(0,0,0,.16);box-shadow:0 10px 40px rgba(0,0,0,.16);-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.popup-template .modal-button:hover{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.8)}.popup-template .modal.is-open{background:rgba(51,51,51,.85);opacity:1;z-index:9999;visibility:visible}.popup-template .modal.is-open .modal-button{opacity:0}.popup-template .modal.is-open .modal-container{opacity:1;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;pointer-events:auto;-webkit-transform:translateY(0) scale(1);-ms-transform:translateY(0) scale(1);transform:translateY(0) scale(1);padding:40px}.popup-template .modal-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.popup-template .modal-buttons a{color:rgba(51,51,51,.6);font-size:14px}.popup-template .modal .icon-button{outline:0;position:absolute;right:10px;top:12px;width:32px;height:32px;border:0;background:0;padding:0;cursor:pointer}@media (max-width:750px){.popup-template .modal-container{width:90%}}
templates/popups/template-3.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Popup Template Name: Background Image
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <!-- Modal-->
10
+
11
+ <div class="modal-container" style="background-image:url('{{template_background_image.media}}')">
12
+ <div class="modal-middle">
13
+ <h2 class="modal-title">{{template_title_right.text}}</h2>
14
+ <p class="modal-desc">{{template_description_right.description}}</p>
15
+ <div class="modal-buttons">
16
+ <a href="{{template_button1_link.url}}" class="">{{template_button1_right.text}}</a>
17
+ </div>
18
+
19
+ <p class="sign-up">{{template_footer_text_right.text}} <a href="{{template_footer_button_link.url}}">{{template_footer_button_text_right.text}}</a></p>
20
+ </div>
21
+ <button class="icon-button close-button">
22
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
23
+ <path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
24
+ </svg>
25
+ </button>
26
+ </div>
27
+
28
+ <!--End of Modal -->
templates/popups/template-3.scss ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // out: template-3.css, compress: true, sourceMap: false, autoprefixer: last 5 versions, groupmedia: true
2
+ .popup-template {
3
+ .modal {
4
+ position: fixed;
5
+ left: 0;
6
+ bottom: 0;
7
+ width: 100%;
8
+ opacity:0;
9
+ z-index: -1;
10
+ visibility:hidden;
11
+ background: rgba(#000, 0.9);
12
+ display: flex;
13
+ flex-direction: column;
14
+ align-items: center;
15
+ justify-content: center;
16
+ height:100%;
17
+ z-index: 999;
18
+ transition:all 0.8ms;
19
+
20
+ .modal-middle {
21
+ background: rgba(255,255,255,0.7);
22
+ padding: 10px;
23
+ border-radius: 10px;
24
+ }
25
+
26
+ &-container {
27
+ display: flex;
28
+ max-width: 720px;
29
+ width: 100%;
30
+ border-radius: 10px;
31
+ overflow: hidden;
32
+ position: absolute;
33
+ opacity: 0;
34
+ pointer-events: none;
35
+ transition-duration: 0.3s;
36
+ background: #fff;
37
+ transform: translateY(100px) scale(0.4);
38
+ }
39
+
40
+ &-title {
41
+ font-size: 26px;
42
+ margin: 0;
43
+ font-weight: 400;
44
+ color: #55311c;
45
+ }
46
+
47
+ &-desc {
48
+ margin: 6px 0 30px 0;
49
+ }
50
+ &-button {
51
+ color: darken(#8c7569, 5%);
52
+ font-family: "Nunito", sans-serif;
53
+ font-size: 18px;
54
+ cursor: pointer;
55
+ border: 0;
56
+ outline: 0;
57
+ padding: 10px 40px;
58
+ border-radius: 30px;
59
+ background: rgb(255, 255, 255);
60
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
61
+ transition: 0.3s;
62
+
63
+ &:hover {
64
+ border-color: rgba(255, 255, 255, 0.2);
65
+ background: rgba(#fff, 0.8);
66
+ }
67
+ }
68
+ &.is-open {
69
+ background: rgba(#333, 0.85);
70
+ opacity:1;
71
+ z-index: 9999;
72
+ visibility:visible;
73
+ .modal-button {
74
+ opacity: 0;
75
+ }
76
+
77
+ .modal-container {
78
+ opacity: 1;
79
+ transition-duration: 0.6s;
80
+ pointer-events: auto;
81
+ transform: translateY(0) scale(1);
82
+ padding:40px;
83
+ }
84
+ }
85
+
86
+ &-buttons {
87
+ display: flex;
88
+ justify-content: space-between;
89
+ align-items: center;
90
+
91
+ a {
92
+ color: rgba(#333, 0.6);
93
+ font-size: 14px;
94
+ }
95
+ }
96
+ .icon-button {
97
+ outline: 0;
98
+ position: absolute;
99
+ right: 10px;
100
+ top: 12px;
101
+ width: 32px;
102
+ height: 32px;
103
+ border: 0;
104
+ background: 0;
105
+ padding: 0;
106
+ cursor: pointer;
107
+ }
108
+ }
109
+
110
+ @media (max-width: 750px) {
111
+ .modal-container {
112
+ width: 90%;
113
+ }
114
+ }
115
+ }
templates/popups/template-4.css ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .template-4 .is-open {
2
+ overflow: hidden;
3
+ }
4
+
5
+ .template-4 .is-open .modal {
6
+ overflow-x: hidden;
7
+ overflow-y: auto;
8
+ }
9
+
10
+ .template-4 .btn.btn-primary {
11
+ color: #FFFFFF;
12
+ background-color: #3699FF;
13
+ border-color: #3699FF;
14
+ }
15
+
16
+ .template-4 .modal {
17
+ position: fixed;
18
+ top: 0;
19
+ left: 0;
20
+ z-index: 1050;
21
+ display: none;
22
+ width: 100%;
23
+ height: 100%;
24
+ overflow: hidden;
25
+ outline: 0;
26
+ background: rgba(0, 0, 0, 0.9);
27
+ z-index: 999;
28
+ }
29
+
30
+ .template-4 .modal.is-open {
31
+ display: block;
32
+ }
33
+
34
+ .template-4 .icon-button {
35
+ outline: 0;
36
+ position: absolute;
37
+ right: 10px;
38
+ top: 12px;
39
+ width: 32px;
40
+ height: 32px;
41
+ border: 0;
42
+ background: 0;
43
+ padding: 0;
44
+ cursor: pointer;
45
+ }
46
+
47
+ .template-4 .modal-dialog {
48
+ position: relative;
49
+ width: auto;
50
+ margin: 0.5rem;
51
+ pointer-events: none;
52
+ }
53
+
54
+ .template-4 .modal.fade .modal-dialog {
55
+ -webkit-transition: -webkit-transform 0.3s ease-out;
56
+ transition: -webkit-transform 0.3s ease-out;
57
+ transition: transform 0.3s ease-out;
58
+ transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
59
+ -webkit-transform: translate(0, -50px);
60
+ transform: translate(0, -50px);
61
+ }
62
+
63
+ .template-4 .modal.is-open .modal-dialog {
64
+ -webkit-transform: none;
65
+ transform: none;
66
+ }
67
+
68
+ .template-4 .modal.modal-static .modal-dialog {
69
+ -webkit-transform: scale(1.02);
70
+ transform: scale(1.02);
71
+ }
72
+
73
+ .template-4 .modal-dialog-scrollable {
74
+ display: -webkit-box;
75
+ display: -ms-flexbox;
76
+ display: flex;
77
+ max-height: calc(100% - 1rem);
78
+ }
79
+
80
+ .template-4 .modal-dialog-scrollable .modal-content {
81
+ max-height: calc(100vh - 1rem);
82
+ overflow: hidden;
83
+ }
84
+
85
+ .template-4 .modal-dialog-scrollable .modal-header {
86
+ -ms-flex-negative: 0;
87
+ flex-shrink: 0;
88
+ }
89
+
90
+ .template-4 .modal-dialog-scrollable .modal-footer {
91
+ -ms-flex-negative: 0;
92
+ flex-shrink: 0;
93
+ }
94
+
95
+ .template-4 .modal-dialog-scrollable .modal-body {
96
+ overflow-y: auto;
97
+ }
98
+
99
+ .template-4 .modal-dialog-centered {
100
+ display: -webkit-box;
101
+ display: -ms-flexbox;
102
+ display: flex;
103
+ -webkit-box-align: center;
104
+ -ms-flex-align: center;
105
+ align-items: center;
106
+ min-height: calc(100% - 1rem);
107
+ }
108
+
109
+ .template-4 .modal-dialog-centered::before {
110
+ display: block;
111
+ height: calc(100vh - 1rem);
112
+ height: -webkit-min-content;
113
+ height: -moz-min-content;
114
+ height: min-content;
115
+ content: "";
116
+ }
117
+
118
+ .template-4 .modal-dialog-centered.modal-dialog-scrollable {
119
+ -webkit-box-orient: vertical;
120
+ -webkit-box-direction: normal;
121
+ -ms-flex-direction: column;
122
+ flex-direction: column;
123
+ -webkit-box-pack: center;
124
+ -ms-flex-pack: center;
125
+ justify-content: center;
126
+ height: 100%;
127
+ }
128
+
129
+ .template-4 .modal-dialog-centered.modal-dialog-scrollable .modal-content {
130
+ max-height: none;
131
+ }
132
+
133
+ .template-4 .modal-dialog-centered.modal-dialog-scrollable::before {
134
+ content: none;
135
+ }
136
+
137
+ .template-4 .modal-content {
138
+ position: relative;
139
+ display: -webkit-box;
140
+ display: -ms-flexbox;
141
+ display: flex;
142
+ -webkit-box-orient: vertical;
143
+ -webkit-box-direction: normal;
144
+ -ms-flex-direction: column;
145
+ flex-direction: column;
146
+ width: 100%;
147
+ pointer-events: auto;
148
+ background-color: #ffffff;
149
+ background-clip: padding-box;
150
+ border: 0 solid rgba(0, 0, 0, 0.2);
151
+ border-radius: 0.42rem;
152
+ -webkit-box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
153
+ box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
154
+ outline: 0;
155
+ }
156
+
157
+ .template-4 .modal-backdrop {
158
+ position: fixed;
159
+ top: 0;
160
+ left: 0;
161
+ z-index: 1040;
162
+ width: 100vw;
163
+ height: 100vh;
164
+ background-color: #000000;
165
+ }
166
+
167
+ .template-4 .modal-backdrop.fade {
168
+ opacity: 0;
169
+ }
170
+
171
+ .template-4 .modal-backdrop.is-open {
172
+ opacity: 0.2;
173
+ }
174
+
175
+ .template-4 .modal-header {
176
+ display: -webkit-box;
177
+ display: -ms-flexbox;
178
+ display: flex;
179
+ -webkit-box-align: start;
180
+ -ms-flex-align: start;
181
+ align-items: flex-start;
182
+ -webkit-box-pack: justify;
183
+ -ms-flex-pack: justify;
184
+ justify-content: space-between;
185
+ padding: 1.5rem 1.75rem;
186
+ border-bottom: 1px solid #EBEDF3;
187
+ border-top-left-radius: 0.42rem;
188
+ border-top-right-radius: 0.42rem;
189
+ }
190
+
191
+ .template-4 .modal-header .close {
192
+ padding: 1.5rem 1.75rem;
193
+ margin: -1.5rem -1.75rem -1.5rem auto;
194
+ }
195
+
196
+ .template-4 .modal-title {
197
+ margin-bottom: 0;
198
+ line-height: 1.5;
199
+ font-weight: bold;
200
+ }
201
+
202
+ .template-4 .modal-body {
203
+ position: relative;
204
+ -webkit-box-flex: 1;
205
+ -ms-flex: 1 1 auto;
206
+ flex: 1 1 auto;
207
+ padding: 1.75rem;
208
+ }
209
+
210
+ .template-4 .modal-footer {
211
+ display: -webkit-box;
212
+ display: -ms-flexbox;
213
+ display: flex;
214
+ -ms-flex-wrap: wrap;
215
+ flex-wrap: wrap;
216
+ -webkit-box-align: center;
217
+ -ms-flex-align: center;
218
+ align-items: center;
219
+ -webkit-box-pack: end;
220
+ -ms-flex-pack: end;
221
+ justify-content: flex-end;
222
+ padding: 1.5rem;
223
+ border-top: 1px solid #EBEDF3;
224
+ border-bottom-right-radius: 0.42rem;
225
+ border-bottom-left-radius: 0.42rem;
226
+ }
227
+
228
+ .template-4 .modal-footer > * {
229
+ margin: 0.25rem;
230
+ }
231
+
232
+ .template-4 .modal-scrollbar-measure {
233
+ position: absolute;
234
+ top: -9999px;
235
+ width: 50px;
236
+ height: 50px;
237
+ overflow: scroll;
238
+ }
239
+
240
+ @media (prefers-reduced-motion: reduce) {
241
+ .template-4 .modal.fade .modal-dialog {
242
+ -webkit-transition: none;
243
+ transition: none;
244
+ }
245
+ }
246
+
247
+ @media (min-width: 576px) {
248
+ .template-4 .modal-dialog {
249
+ max-width: 500px;
250
+ margin: 1.75rem auto;
251
+ }
252
+ .template-4 .modal-dialog-scrollable {
253
+ max-height: calc(100% - 3.5rem);
254
+ }
255
+ .template-4 .modal-dialog-scrollable .modal-content {
256
+ max-height: calc(100vh - 3.5rem);
257
+ }
258
+ .template-4 .modal-dialog-centered {
259
+ min-height: calc(100% - 3.5rem);
260
+ }
261
+ .template-4 .modal-dialog-centered::before {
262
+ height: calc(100vh - 3.5rem);
263
+ height: -webkit-min-content;
264
+ height: -moz-min-content;
265
+ height: min-content;
266
+ }
267
+ .template-4 .modal-content {
268
+ -webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
269
+ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
270
+ }
271
+ .template-4 .modal-sm {
272
+ max-width: 300px;
273
+ }
274
+ }
275
+
276
+ @media (min-width: 992px) {
277
+ .template-4 .modal-lg {
278
+ max-width: 800px;
279
+ }
280
+ .template-4 .modal-xl {
281
+ max-width: 800px;
282
+ }
283
+ }
284
+
285
+ @media (min-width: 1200px) {
286
+ .template-4 .modal-xl {
287
+ max-width: 1140px;
288
+ }
289
+ }
templates/popups/template-4.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Popup Template Name: Blank Template
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <!-- Modal-->
10
+
11
+ <div class="modal-dialog modal-dialog-scrollable" role="document">
12
+ <div class="modal-content">
13
+ <div class="modal-header">
14
+ <button class="icon-button close-button">
15
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
16
+ <path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
17
+ </svg>
18
+ </button>
19
+ </div>
20
+ <div class="modal-body" style="height: 300px;">
21
+ {{template_content.description}}
22
+ </div>
23
+ </div>
24
+ </div>
25
+
26
+ <!--End of Modal -->
templates/popups/template-4.scss ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .template-4 {
2
+ .is-open {
3
+ overflow: hidden;
4
+ .modal {
5
+ overflow-x: hidden;
6
+ overflow-y: auto;
7
+ }
8
+ }
9
+ .btn.btn-primary {
10
+ color: #FFFFFF;
11
+ background-color: #3699FF;
12
+ border-color: #3699FF;
13
+ }
14
+ .modal {
15
+ position: fixed;
16
+ top: 0;
17
+ left: 0;
18
+ z-index: 1050;
19
+ display: none;
20
+ width: 100%;
21
+ height: 100%;
22
+ overflow: hidden;
23
+ outline: 0;
24
+ background:rgba(0,0,0,0.9);
25
+ z-index: 999;
26
+ &.is-open{
27
+ display:block;
28
+ }
29
+ }
30
+ .icon-button {
31
+ outline: 0;
32
+ position: absolute;
33
+ right: 10px;
34
+ top: 12px;
35
+ width: 32px;
36
+ height: 32px;
37
+ border: 0;
38
+ background: 0;
39
+ padding: 0;
40
+ cursor: pointer;
41
+ }
42
+ .modal-dialog {
43
+ position: relative;
44
+ width: auto;
45
+ margin: 0.5rem;
46
+ pointer-events: none;
47
+ }
48
+
49
+ .modal.fade {
50
+ .modal-dialog {
51
+ -webkit-transition: -webkit-transform 0.3s ease-out;
52
+ transition: -webkit-transform 0.3s ease-out;
53
+ transition: transform 0.3s ease-out;
54
+ transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
55
+ -webkit-transform: translate(0, -50px);
56
+ transform: translate(0, -50px);
57
+ }
58
+ }
59
+
60
+ .modal.is-open {
61
+ .modal-dialog {
62
+ -webkit-transform: none;
63
+ transform: none;
64
+ }
65
+ }
66
+
67
+ .modal.modal-static {
68
+ .modal-dialog {
69
+ -webkit-transform: scale(1.02);
70
+ transform: scale(1.02);
71
+ }
72
+ }
73
+
74
+ .modal-dialog-scrollable {
75
+ display: -webkit-box;
76
+ display: -ms-flexbox;
77
+ display: flex;
78
+ max-height: calc(100% - 1rem);
79
+
80
+ .modal-content {
81
+ max-height: calc(100vh - 1rem);
82
+ overflow: hidden;
83
+ }
84
+
85
+ .modal-header {
86
+ -ms-flex-negative: 0;
87
+ flex-shrink: 0;
88
+ }
89
+
90
+ .modal-footer {
91
+ -ms-flex-negative: 0;
92
+ flex-shrink: 0;
93
+ }
94
+
95
+ .modal-body {
96
+ overflow-y: auto;
97
+ }
98
+ }
99
+
100
+ .modal-dialog-centered {
101
+ display: -webkit-box;
102
+ display: -ms-flexbox;
103
+ display: flex;
104
+ -webkit-box-align: center;
105
+ -ms-flex-align: center;
106
+ align-items: center;
107
+ min-height: calc(100% - 1rem);
108
+
109
+ &::before {
110
+ display: block;
111
+ height: calc(100vh - 1rem);
112
+ height: -webkit-min-content;
113
+ height: -moz-min-content;
114
+ height: min-content;
115
+ content: "";
116
+ }
117
+ }
118
+
119
+ .modal-dialog-centered.modal-dialog-scrollable {
120
+ -webkit-box-orient: vertical;
121
+ -webkit-box-direction: normal;
122
+ -ms-flex-direction: column;
123
+ flex-direction: column;
124
+ -webkit-box-pack: center;
125
+ -ms-flex-pack: center;
126
+ justify-content: center;
127
+ height: 100%;
128
+
129
+ .modal-content {
130
+ max-height: none;
131
+ }
132
+
133
+ &::before {
134
+ content: none;
135
+ }
136
+ }
137
+
138
+ .modal-content {
139
+ position: relative;
140
+ display: -webkit-box;
141
+ display: -ms-flexbox;
142
+ display: flex;
143
+ -webkit-box-orient: vertical;
144
+ -webkit-box-direction: normal;
145
+ -ms-flex-direction: column;
146
+ flex-direction: column;
147
+ width: 100%;
148
+ pointer-events: auto;
149
+ background-color: #ffffff;
150
+ background-clip: padding-box;
151
+ border: 0 solid rgba(0, 0, 0, 0.2);
152
+ border-radius: 0.42rem;
153
+ -webkit-box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
154
+ box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
155
+ outline: 0;
156
+ }
157
+
158
+ .modal-backdrop {
159
+ position: fixed;
160
+ top: 0;
161
+ left: 0;
162
+ z-index: 1040;
163
+ width: 100vw;
164
+ height: 100vh;
165
+ background-color: #000000;
166
+ }
167
+
168
+ .modal-backdrop.fade {
169
+ opacity: 0;
170
+ }
171
+
172
+ .modal-backdrop.is-open {
173
+ opacity: 0.2;
174
+ }
175
+
176
+ .modal-header {
177
+ display: -webkit-box;
178
+ display: -ms-flexbox;
179
+ display: flex;
180
+ -webkit-box-align: start;
181
+ -ms-flex-align: start;
182
+ align-items: flex-start;
183
+ -webkit-box-pack: justify;
184
+ -ms-flex-pack: justify;
185
+ justify-content: space-between;
186
+ padding: 1.5rem 1.75rem;
187
+ border-bottom: 1px solid #EBEDF3;
188
+ border-top-left-radius: 0.42rem;
189
+ border-top-right-radius: 0.42rem;
190
+
191
+ .close {
192
+ padding: 1.5rem 1.75rem;
193
+ margin: -1.5rem -1.75rem -1.5rem auto;
194
+ }
195
+ }
196
+
197
+ .modal-title {
198
+ margin-bottom: 0;
199
+ line-height: 1.5;
200
+ font-weight: bold;
201
+ }
202
+
203
+ .modal-body {
204
+ position: relative;
205
+ -webkit-box-flex: 1;
206
+ -ms-flex: 1 1 auto;
207
+ flex: 1 1 auto;
208
+ padding: 1.75rem;
209
+ }
210
+
211
+ .modal-footer {
212
+ display: -webkit-box;
213
+ display: -ms-flexbox;
214
+ display: flex;
215
+ -ms-flex-wrap: wrap;
216
+ flex-wrap: wrap;
217
+ -webkit-box-align: center;
218
+ -ms-flex-align: center;
219
+ align-items: center;
220
+ -webkit-box-pack: end;
221
+ -ms-flex-pack: end;
222
+ justify-content: flex-end;
223
+ padding: 1.5rem;
224
+ border-top: 1px solid #EBEDF3;
225
+ border-bottom-right-radius: 0.42rem;
226
+ border-bottom-left-radius: 0.42rem;
227
+
228
+ >* {
229
+ margin: 0.25rem;
230
+ }
231
+ }
232
+
233
+ .modal-scrollbar-measure {
234
+ position: absolute;
235
+ top: -9999px;
236
+ width: 50px;
237
+ height: 50px;
238
+ overflow: scroll;
239
+ }
240
+
241
+ @media (prefers-reduced-motion: reduce) {
242
+ .modal.fade {
243
+ .modal-dialog {
244
+ -webkit-transition: none;
245
+ transition: none;
246
+ }
247
+ }
248
+ }
249
+
250
+ @media (min-width: 576px) {
251
+ .modal-dialog {
252
+ max-width: 500px;
253
+ margin: 1.75rem auto;
254
+ }
255
+
256
+ .modal-dialog-scrollable {
257
+ max-height: calc(100% - 3.5rem);
258
+
259
+ .modal-content {
260
+ max-height: calc(100vh - 3.5rem);
261
+ }
262
+ }
263
+
264
+ .modal-dialog-centered {
265
+ min-height: calc(100% - 3.5rem);
266
+
267
+ &::before {
268
+ height: calc(100vh - 3.5rem);
269
+ height: -webkit-min-content;
270
+ height: -moz-min-content;
271
+ height: min-content;
272
+ }
273
+ }
274
+
275
+ .modal-content {
276
+ -webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
277
+ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
278
+ }
279
+
280
+ .modal-sm {
281
+ max-width: 300px;
282
+ }
283
+ }
284
+
285
+ @media (min-width: 992px) {
286
+ .modal-lg {
287
+ max-width: 800px;
288
+ }
289
+
290
+ .modal-xl {
291
+ max-width: 800px;
292
+ }
293
+ }
294
+
295
+ @media (min-width: 1200px) {
296
+ .modal-xl {
297
+ max-width: 1140px;
298
+ }
299
+ }
300
+
301
+ }
templates/popups/wpcfr-popup-wrap-default.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ ?>
6
+ <div class="wpcfr-2-rows">
7
+ <div class="wpcfr-row">
8
+ Our team is processing your request!
9
+ </div>
10
+ <div class="wpcfr-row">
11
+ Some content
12
+ </div>
13
+ </div>
templates/save-form.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- /**
3
- * Please save your form message
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
- ?>
8
-
9
- <fieldset>
10
- <div class="fields-wrap field-wrap-page-id">
11
- <div class="tab-wrap">
12
- <div class="wpcf7r-tab-wrap-inner">
13
- <div data-tab-inner>
14
- <h3>
15
- <?php _e( 'Please save your form', 'wpcf7-redirect' ); ?>
16
- </h3>
17
- </div>
18
- </div>
19
- </div>
20
- </div>
21
- </fieldset>
1
+ <?php
2
+ /**
3
+ * Please save your form message
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+ ?>
8
+
9
+ <fieldset>
10
+ <div class="fields-wrap field-wrap-page-id">
11
+ <div class="tab-wrap">
12
+ <div class="wpcf7r-tab-wrap-inner">
13
+ <div data-tab-inner>
14
+ <h3>
15
+ <?php _e( 'Please save your form', 'wpcf7-redirect' ); ?>
16
+ </h3>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </fieldset>
templates/settings.php CHANGED
@@ -1,28 +1,28 @@
1
- <?php
2
- /**
3
- * Displays the settings panel
4
- */
5
-
6
- defined( 'ABSPATH' ) || exit;
7
-
8
- wp_nonce_field( 'wpcf7_redirect_page_metaboxes', 'wpcf7_redirect_page_metaboxes_nonce' );
9
-
10
- do_action( 'before_redirect_settings_tab_title', $this->cf7_post );
11
- ?>
12
-
13
- <fieldset>
14
- <div class="fields-wrap field-wrap-page-id">
15
- <div class="tab-wrap">
16
- <div class="wpcf7r-tab-wrap-inner">
17
- <div data-tab-inner>
18
- <div class="qs-row">
19
- <?php include( 'default-settings.php' ); ?>
20
- </div>
21
- </div>
22
- </div>
23
- </div>
24
- </div>
25
- </fieldset>
26
-
27
- <?php
28
- do_action( 'after_redirect_settings_tab_form', $this->cf7_post );
1
+ <?php
2
+ /**
3
+ * Displays the settings panel
4
+ */
5
+
6
+ defined( 'ABSPATH' ) || exit;
7
+
8
+ wp_nonce_field( 'wpcf7_redirect_page_metaboxes', 'wpcf7_redirect_page_metaboxes_nonce' );
9
+
10
+ do_action( 'before_redirect_settings_tab_title', $this->cf7_post );
11
+ ?>
12
+
13
+ <fieldset>
14
+ <div class="fields-wrap field-wrap-page-id">
15
+ <div class="tab-wrap">
16
+ <div class="wpcf7r-tab-wrap-inner">
17
+ <div data-tab-inner>
18
+ <div class="qs-row">
19
+ <?php include( 'default-settings.php' ); ?>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </fieldset>
26
+
27
+ <?php
28
+ do_action( 'after_redirect_settings_tab_form', $this->cf7_post );
vendor/index.php DELETED
File without changes
wpcf7-redirect.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: Redirection for Contact Form 7
4
  * Plugin URI: https://redirection-for-contact-form7.com/
5
  * Description: The ultimate add-on for Contact Form 7 - redirect to any page after submission, fire scripts, save submissions in database, and much more options to make Contact Form 7 poweful than ever.
6
- * Version: 2.3.1
7
  * Author: Query Solutions
8
  * Author URI: https://redirection-for-contact-form7.com/
9
  * Contributors: querysolutions, yuvalsabar, regevlio
10
- * Requires at least: 4.7.0
11
  *
12
  * Text Domain: wpcf7-redirect
13
  * Domain Path: /lang
@@ -23,14 +23,14 @@ if ( ! defined( 'CF7_REDIRECT_DEBUG' ) ) {
23
  define( 'CF7_REDIRECT_DEBUG', get_option( 'wpcf_debug' ) ? true : false );
24
  }
25
 
26
- define( 'WPCF7_PRO_REDIRECT_PLUGIN_VERSION', '2.3.1' );
27
  define( 'WPCF7_PRO_MIGRATION_VERSION', '1' );
28
  define( 'WPCF7_PRO_REDIRECT_CLASSES_PATH', plugin_dir_path( __FILE__ ) . 'classes/' );
29
 
30
- require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-action.php' ;
31
- require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-utils.php' ;
32
- require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-actions.php' ;
33
- require_once 'class-wpcf7-redirect.php' ;
34
 
35
  add_action( 'admin_init', 'wpcf7r_activation_process' );
36
 
3
  * Plugin Name: Redirection for Contact Form 7
4
  * Plugin URI: https://redirection-for-contact-form7.com/
5
  * Description: The ultimate add-on for Contact Form 7 - redirect to any page after submission, fire scripts, save submissions in database, and much more options to make Contact Form 7 poweful than ever.
6
+ * Version: 2.3.3
7
  * Author: Query Solutions
8
  * Author URI: https://redirection-for-contact-form7.com/
9
  * Contributors: querysolutions, yuvalsabar, regevlio
10
+ * Requires at least: 5.1
11
  *
12
  * Text Domain: wpcf7-redirect
13
  * Domain Path: /lang
23
  define( 'CF7_REDIRECT_DEBUG', get_option( 'wpcf_debug' ) ? true : false );
24
  }
25
 
26
+ define( 'WPCF7_PRO_REDIRECT_PLUGIN_VERSION', '2.3.3' );
27
  define( 'WPCF7_PRO_MIGRATION_VERSION', '1' );
28
  define( 'WPCF7_PRO_REDIRECT_CLASSES_PATH', plugin_dir_path( __FILE__ ) . 'classes/' );
29
 
30
+ require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-action.php';
31
+ require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-utils.php';
32
+ require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-actions.php';
33
+ require_once 'class-wpcf7-redirect.php';
34
 
35
  add_action( 'admin_init', 'wpcf7r_activation_process' );
36
 
wpcf7r-functions.php CHANGED
@@ -71,7 +71,7 @@ function wpcf7_redirect_get_all_extensions_list() {
71
  'filename' => 'class-wpcf7r-action-stripe.php',
72
  'title' => __( 'Stripe Integration', 'wpcf7-redirect' ),
73
  'description' => __( 'Collect payments with your Contact Form 7 form. Setup product details and custom stripe fields.', 'wpcf7-redirect' ),
74
- 'icon' => home_url() . '/wp-content/uploads/2020/11/362px-Stripe_Logo_revised_2016.svg_.png',
75
  'classname' => 'WPCF7R_Action_Stripe_Integration',
76
  ),
77
  'wpcf7r-api' => array(
71
  'filename' => 'class-wpcf7r-action-stripe.php',
72
  'title' => __( 'Stripe Integration', 'wpcf7-redirect' ),
73
  'description' => __( 'Collect payments with your Contact Form 7 form. Setup product details and custom stripe fields.', 'wpcf7-redirect' ),
74
+ 'icon' => WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/stripe.png',
75
  'classname' => 'WPCF7R_Action_Stripe_Integration',
76
  ),
77
  'wpcf7r-api' => array(