Version Description
- Improvement: Improved compatibility with latest version of Divi.
- Bugfix: Fixed appearance of Submit button when displayed in line with form part.
- Bugfix: Fixed double border issue in Style step.
- Bugfix: Fixed "Reveal on focus" description mode in parts that support Prefix and Suffix.
Download this release
Release Info
Developer | thethemefoundry |
Plugin | Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms |
Version | 1.9.9 |
Comparing to | |
See all releases |
Code changes from version 1.9.8 to 1.9.9
- core/assets/css/customize.css +13 -0
- core/assets/css/layout.css +1 -3
- core/assets/css/preview.css +2 -2
- core/assets/js/frontend/email.js +1 -0
- core/assets/js/frontend/number.js +1 -0
- core/classes/class-block.php +8 -8
- core/classes/class-form-admin.php +8 -8
- core/classes/class-form-controller.php +15 -15
- core/classes/class-form-email.php +20 -20
- core/classes/class-form-part-library.php +1 -1
- core/classes/class-form-setup.php +29 -29
- core/classes/class-form-styles.php +130 -130
- core/classes/class-happyforms-core.php +18 -18
- core/classes/class-happyforms-widget.php +4 -4
- core/classes/class-tracking.php +7 -7
- core/classes/class-validation-messages.php +7 -7
- core/classes/class-wp-customize-form-manager.php +11 -11
- core/classes/parts/class-part-checkbox.php +4 -4
- core/classes/parts/class-part-email.php +4 -4
- core/classes/parts/class-part-multi-line-text.php +3 -3
- core/classes/parts/class-part-number.php +5 -5
- core/classes/parts/class-part-radio.php +3 -3
- core/classes/parts/class-part-select.php +5 -5
- core/classes/parts/class-part-single-line-text.php +3 -3
- core/helpers/helper-activation.php +7 -7
- core/helpers/helper-form-templates.php +234 -234
- core/helpers/helper-misc.php +384 -384
- core/templates/admin-form-modal.php +3 -3
- core/templates/admin-tracking.php +5 -5
- core/templates/customize-controls/setup/alert-email-subject.php +1 -1
- core/templates/customize-controls/style/divider.php +2 -2
- core/templates/customize-form-build.php +4 -4
- core/templates/customize-form-item.php +6 -6
- core/templates/customize-form-part-footer.php +4 -4
- core/templates/customize-form-part-logic.php +2 -2
- core/templates/customize-form-parts-drawer.php +5 -5
- core/templates/customize-form-setup-logic.php +1 -1
- core/templates/customize-form-steps.php +4 -4
- core/templates/customize-header-actions.php +6 -6
- core/templates/parts/customize-checkbox.php +30 -30
- core/templates/parts/customize-email.php +20 -20
- core/templates/parts/customize-multi-line-text.php +24 -24
- core/templates/parts/customize-number.php +25 -25
- core/templates/parts/customize-radio.php +26 -26
- core/templates/parts/customize-select.php +25 -25
- core/templates/parts/customize-single-line-text.php +17 -17
- core/templates/parts/frontend-checkbox.php +1 -1
- core/templates/preview-form-pencil.php +1 -1
- happyforms.php +5 -6
- inc/assets/js/customize.js +37 -25
- inc/assets/js/frontend.js +7 -0
- inc/classes/class-happyforms.php +35 -35
- languages/happyforms.pot +5 -13
- readme.txt +10 -1
core/assets/css/customize.css
CHANGED
@@ -167,7 +167,9 @@ p.description a {
|
|
167 |
.customize-control.customize-control-checkbox_dummy label a:after,
|
168 |
.customize-control.customize-control--upsell a:after {
|
169 |
content: "\f504";
|
|
|
170 |
font-family: dashicons;
|
|
|
171 |
}
|
172 |
|
173 |
#customize-controls span.description {
|
@@ -972,8 +974,10 @@ ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-
|
|
972 |
|
973 |
ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-list-item-title a:after {
|
974 |
content: "\f504";
|
|
|
975 |
font-family: dashicons;
|
976 |
font-size: 100%;
|
|
|
977 |
}
|
978 |
|
979 |
ul.happyforms-parts-list li .happyforms-parts-list-item-title:before {
|
@@ -1161,6 +1165,7 @@ ul.happyforms-style-controls {
|
|
1161 |
float: left;
|
1162 |
width: 100%;
|
1163 |
height: 100%;
|
|
|
1164 |
}
|
1165 |
|
1166 |
ul.happyforms-style-controls .customize-control {
|
@@ -1424,6 +1429,10 @@ div.customize-section-description {
|
|
1424 |
display: none;
|
1425 |
}
|
1426 |
|
|
|
|
|
|
|
|
|
1427 |
#customize-control-confirm_submission[data-value="success_message"] ~ .customize-control-group #customize-control-confirmation_message {
|
1428 |
display: block;
|
1429 |
}
|
@@ -1443,3 +1452,7 @@ div.customize-section-description {
|
|
1443 |
#customize-control-confirm_submission[data-value="redirect"] ~ #happyforms-redirect-upsell {
|
1444 |
display: block;
|
1445 |
}
|
|
|
|
|
|
|
|
167 |
.customize-control.customize-control-checkbox_dummy label a:after,
|
168 |
.customize-control.customize-control--upsell a:after {
|
169 |
content: "\f504";
|
170 |
+
display: inline-block;
|
171 |
font-family: dashicons;
|
172 |
+
text-decoration: none;
|
173 |
}
|
174 |
|
175 |
#customize-controls span.description {
|
974 |
|
975 |
ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-list-item-title a:after {
|
976 |
content: "\f504";
|
977 |
+
display: inline-block;
|
978 |
font-family: dashicons;
|
979 |
font-size: 100%;
|
980 |
+
text-decoration: none;
|
981 |
}
|
982 |
|
983 |
ul.happyforms-parts-list li .happyforms-parts-list-item-title:before {
|
1165 |
float: left;
|
1166 |
width: 100%;
|
1167 |
height: 100%;
|
1168 |
+
overflow: hidden;
|
1169 |
}
|
1170 |
|
1171 |
ul.happyforms-style-controls .customize-control {
|
1429 |
display: none;
|
1430 |
}
|
1431 |
|
1432 |
+
.happyforms-nested-settings[data-trigger="confirm_submission"] {
|
1433 |
+
display: block;
|
1434 |
+
}
|
1435 |
+
|
1436 |
#customize-control-confirm_submission[data-value="success_message"] ~ .customize-control-group #customize-control-confirmation_message {
|
1437 |
display: block;
|
1438 |
}
|
1452 |
#customize-control-confirm_submission[data-value="redirect"] ~ #happyforms-redirect-upsell {
|
1453 |
display: block;
|
1454 |
}
|
1455 |
+
|
1456 |
+
[class*='et-core-'] {
|
1457 |
+
display: none !important;
|
1458 |
+
}
|
core/assets/css/layout.css
CHANGED
@@ -110,9 +110,7 @@ h3.happyforms-form__title {
|
|
110 |
.happyforms-part--width-auto+.happyforms-part--submit,
|
111 |
.happyforms-part--width-auto+.happyforms-part--recaptcha+.happyforms-part--submit,
|
112 |
.happyforms-part--width-auto+.happyforms-part--recaptcha {
|
113 |
-
|
114 |
-
top: -15px;
|
115 |
-
align-self: flex-end;
|
116 |
width: auto !important;
|
117 |
margin-bottom: 0 !important;
|
118 |
padding-top: 5px;
|
110 |
.happyforms-part--width-auto+.happyforms-part--submit,
|
111 |
.happyforms-part--width-auto+.happyforms-part--recaptcha+.happyforms-part--submit,
|
112 |
.happyforms-part--width-auto+.happyforms-part--recaptcha {
|
113 |
+
align-self: center;
|
|
|
|
|
114 |
width: auto !important;
|
115 |
margin-bottom: 0 !important;
|
116 |
padding-top: 5px;
|
core/assets/css/preview.css
CHANGED
@@ -13,7 +13,7 @@ body::before, body::after {
|
|
13 |
}
|
14 |
|
15 |
.customize-partial-edit-shortcut.happyforms-partial-edit-shortcut {
|
16 |
-
display: block;
|
17 |
position: absolute;
|
18 |
top: 0;
|
19 |
}
|
@@ -89,4 +89,4 @@ a.happyforms-ask-link.customize-unpreviewable {
|
|
89 |
a.disabled {
|
90 |
pointer-events: none;
|
91 |
cursor: not-allowed;
|
92 |
-
}
|
13 |
}
|
14 |
|
15 |
.customize-partial-edit-shortcut.happyforms-partial-edit-shortcut {
|
16 |
+
display: block !important;
|
17 |
position: absolute;
|
18 |
top: 0;
|
19 |
}
|
89 |
a.disabled {
|
90 |
pointer-events: none;
|
91 |
cursor: not-allowed;
|
92 |
+
}
|
core/assets/js/frontend/email.js
CHANGED
@@ -15,6 +15,7 @@
|
|
15 |
|
16 |
this.$input.on( 'keyup', this.triggerChange.bind( this ) );
|
17 |
this.$input.on( 'change', this.triggerChange.bind( this ) );
|
|
|
18 |
this.$visualInput.on( 'blur', this.onBlur.bind( this ) );
|
19 |
},
|
20 |
|
15 |
|
16 |
this.$input.on( 'keyup', this.triggerChange.bind( this ) );
|
17 |
this.$input.on( 'change', this.triggerChange.bind( this ) );
|
18 |
+
this.$input.on( 'focus', this.onInputFocus.bind( this ) );
|
19 |
this.$visualInput.on( 'blur', this.onBlur.bind( this ) );
|
20 |
},
|
21 |
|
core/assets/js/frontend/number.js
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
|
15 |
this.$input.on( 'keyup', this.onKeyUp.bind( this ) );
|
16 |
this.$input.on( 'change', this.triggerChange.bind( this ) );
|
|
|
17 |
this.$input.on( 'blur', this.onBlur.bind( this ) );
|
18 |
|
19 |
this.numeralDecimalMark = this.$el.attr( 'data-decimal-mark' ) || '';
|
14 |
|
15 |
this.$input.on( 'keyup', this.onKeyUp.bind( this ) );
|
16 |
this.$input.on( 'change', this.triggerChange.bind( this ) );
|
17 |
+
this.$input.on( 'focus', this.onInputFocus.bind( this ) );
|
18 |
this.$input.on( 'blur', this.onBlur.bind( this ) );
|
19 |
|
20 |
this.numeralDecimalMark = this.$el.attr( 'data-decimal-mark' ) || '';
|
core/classes/class-block.php
CHANGED
@@ -46,8 +46,8 @@ class HappyForms_Block {
|
|
46 |
|
47 |
private function get_properties() {
|
48 |
$properties = array(
|
49 |
-
'title' => __( 'HappyForms',
|
50 |
-
'description' => __( 'Contact form to manage and respond to conversations with customers.',
|
51 |
'category' => 'widgets',
|
52 |
'icon' => 'format-status',
|
53 |
'keywords' => array(
|
@@ -98,16 +98,16 @@ class HappyForms_Block {
|
|
98 |
'upgrade_notice' => array(
|
99 |
'show' => ( ! defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) ? true : false,
|
100 |
'i18n' => array(
|
101 |
-
'text' => __( 'Do you want access to HappyForms’ most powerful features?',
|
102 |
-
'link_text' => __( 'Discover HappyForms Upgrade',
|
103 |
),
|
104 |
'nonces' => $upgrade_notice_nonces
|
105 |
),
|
106 |
'i18n' => array(
|
107 |
-
'select_default' => __( 'Choose',
|
108 |
-
'placeholder_text' => __( 'Which form would you like to add here?',
|
109 |
-
'settings_title' => __( 'HappyForms Settings',
|
110 |
-
'edit_form' => __( 'Edit Form',
|
111 |
),
|
112 |
'dismissed_notices' => $admin_notices->get_dismissed_notices( $user_id )
|
113 |
);
|
46 |
|
47 |
private function get_properties() {
|
48 |
$properties = array(
|
49 |
+
'title' => __( 'HappyForms', 'happyforms' ),
|
50 |
+
'description' => __( 'Contact form to manage and respond to conversations with customers.', 'happyforms' ),
|
51 |
'category' => 'widgets',
|
52 |
'icon' => 'format-status',
|
53 |
'keywords' => array(
|
98 |
'upgrade_notice' => array(
|
99 |
'show' => ( ! defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) ? true : false,
|
100 |
'i18n' => array(
|
101 |
+
'text' => __( 'Do you want access to HappyForms’ most powerful features?', 'happyforms' ),
|
102 |
+
'link_text' => __( 'Discover HappyForms Upgrade', 'happyforms' ),
|
103 |
),
|
104 |
'nonces' => $upgrade_notice_nonces
|
105 |
),
|
106 |
'i18n' => array(
|
107 |
+
'select_default' => __( 'Choose', 'happyforms' ),
|
108 |
+
'placeholder_text' => __( 'Which form would you like to add here?', 'happyforms' ),
|
109 |
+
'settings_title' => __( 'HappyForms Settings', 'happyforms' ),
|
110 |
+
'edit_form' => __( 'Edit Form', 'happyforms' )
|
111 |
),
|
112 |
'dismissed_notices' => $admin_notices->get_dismissed_notices( $user_id )
|
113 |
);
|
core/classes/class-form-admin.php
CHANGED
@@ -242,8 +242,8 @@ class HappyForms_Form_Admin {
|
|
242 |
'cb' => $columns['cb'],
|
243 |
'title' => $columns['title'],
|
244 |
);
|
245 |
-
$columns['shortcode'] = __( 'Shortcode',
|
246 |
-
$columns['author'] = __( 'Author',
|
247 |
$columns = $columns + array( 'date' => $date_column );
|
248 |
|
249 |
/**
|
@@ -281,7 +281,7 @@ class HappyForms_Form_Admin {
|
|
281 |
<div class="happyforms-shortcode-col">
|
282 |
<span><?php echo esc_html( $shortcode ); ?></span>
|
283 |
<input type="text" value="<?php echo esc_attr( $shortcode ); ?>">
|
284 |
-
<a href="#" class="happyforms-shortcode-clipboard"><?php _e( 'Copy to clipboard',
|
285 |
</div>
|
286 |
<?php
|
287 |
break;
|
@@ -378,15 +378,15 @@ class HappyForms_Form_Admin {
|
|
378 |
|
379 |
$links = array(
|
380 |
'edit' => array(
|
381 |
-
__( 'Edit',
|
382 |
get_edit_post_link( $post->ID, 'build' )
|
383 |
),
|
384 |
'duplicate' => array(
|
385 |
-
__( 'Duplicate',
|
386 |
$duplicate_url,
|
387 |
),
|
388 |
'trash' => array(
|
389 |
-
__( 'Trash',
|
390 |
get_delete_post_link( $post->ID, '' )
|
391 |
),
|
392 |
);
|
@@ -430,9 +430,9 @@ class HappyForms_Form_Admin {
|
|
430 |
|
431 |
$notice = sprintf(
|
432 |
'%s <a href="%s">%s</a>',
|
433 |
-
__( '1 form duplicated.',
|
434 |
get_delete_post_link( $new_form_id, '', true ),
|
435 |
-
__( 'Undo',
|
436 |
);
|
437 |
|
438 |
$admin_notices = happyforms_get_admin_notices();
|
242 |
'cb' => $columns['cb'],
|
243 |
'title' => $columns['title'],
|
244 |
);
|
245 |
+
$columns['shortcode'] = __( 'Shortcode', 'happyforms' );
|
246 |
+
$columns['author'] = __( 'Author', 'happyforms' );
|
247 |
$columns = $columns + array( 'date' => $date_column );
|
248 |
|
249 |
/**
|
281 |
<div class="happyforms-shortcode-col">
|
282 |
<span><?php echo esc_html( $shortcode ); ?></span>
|
283 |
<input type="text" value="<?php echo esc_attr( $shortcode ); ?>">
|
284 |
+
<a href="#" class="happyforms-shortcode-clipboard"><?php _e( 'Copy to clipboard', 'happyforms' ); ?></a>
|
285 |
</div>
|
286 |
<?php
|
287 |
break;
|
378 |
|
379 |
$links = array(
|
380 |
'edit' => array(
|
381 |
+
__( 'Edit', 'happyforms' ),
|
382 |
get_edit_post_link( $post->ID, 'build' )
|
383 |
),
|
384 |
'duplicate' => array(
|
385 |
+
__( 'Duplicate', 'happyforms' ),
|
386 |
$duplicate_url,
|
387 |
),
|
388 |
'trash' => array(
|
389 |
+
__( 'Trash', 'happyforms' ),
|
390 |
get_delete_post_link( $post->ID, '' )
|
391 |
),
|
392 |
);
|
430 |
|
431 |
$notice = sprintf(
|
432 |
'%s <a href="%s">%s</a>',
|
433 |
+
__( '1 form duplicated.', 'happyforms' ),
|
434 |
get_delete_post_link( $new_form_id, '', true ),
|
435 |
+
__( 'Undo', 'happyforms' )
|
436 |
);
|
437 |
|
438 |
$admin_notices = happyforms_get_admin_notices();
|
core/classes/class-form-controller.php
CHANGED
@@ -71,19 +71,19 @@ class HappyForms_Form_Controller {
|
|
71 |
*/
|
72 |
public function register_post_type() {
|
73 |
$labels = array(
|
74 |
-
'name' => __( 'Forms',
|
75 |
-
'singular_name' => __( 'Form',
|
76 |
-
'add_new' => __( 'Add New', $this->post_type,
|
77 |
-
'add_new_item' => __( 'Build form',
|
78 |
-
'edit_item' => __( 'Edit form',
|
79 |
-
'new_item' => __( 'Build form',
|
80 |
-
'view_item' => __( 'View form',
|
81 |
-
'view_items' => __( 'View forms',
|
82 |
-
'search_items' => __( 'Search Forms',
|
83 |
-
'not_found' => __( 'No forms found.',
|
84 |
-
'not_found_in_trash' => __( 'No forms found in Trash',
|
85 |
-
'all_items' => __( 'All Forms',
|
86 |
-
'menu_name' => __( 'All Forms',
|
87 |
);
|
88 |
|
89 |
$args = array(
|
@@ -530,7 +530,7 @@ class HappyForms_Form_Controller {
|
|
530 |
*/
|
531 |
public function update( $form_data = array() ) {
|
532 |
if ( empty( $form_data['post_title'] ) ) {
|
533 |
-
$form_data['post_title'] = __( '(no title)',
|
534 |
}
|
535 |
|
536 |
$validated_data = $this->validate_fields( $form_data );
|
@@ -619,7 +619,7 @@ class HappyForms_Form_Controller {
|
|
619 |
'post_type', 'post_status',
|
620 |
) ) );
|
621 |
|
622 |
-
$duplicate['post_title'] = trim( $form->post_title . __( ' Copy',
|
623 |
$duplicate_id = wp_insert_post( $duplicate );
|
624 |
|
625 |
if ( ! is_wp_error( $duplicate_id ) ) {
|
71 |
*/
|
72 |
public function register_post_type() {
|
73 |
$labels = array(
|
74 |
+
'name' => __( 'Forms', 'happyforms' ),
|
75 |
+
'singular_name' => __( 'Form', 'happyforms' ),
|
76 |
+
'add_new' => __( 'Add New', $this->post_type, 'happyforms' ),
|
77 |
+
'add_new_item' => __( 'Build form', 'happyforms' ),
|
78 |
+
'edit_item' => __( 'Edit form', 'happyforms' ),
|
79 |
+
'new_item' => __( 'Build form', 'happyforms' ),
|
80 |
+
'view_item' => __( 'View form', 'happyforms' ),
|
81 |
+
'view_items' => __( 'View forms', 'happyforms' ),
|
82 |
+
'search_items' => __( 'Search Forms', 'happyforms' ),
|
83 |
+
'not_found' => __( 'No forms found.', 'happyforms' ),
|
84 |
+
'not_found_in_trash' => __( 'No forms found in Trash', 'happyforms' ),
|
85 |
+
'all_items' => __( 'All Forms', 'happyforms' ),
|
86 |
+
'menu_name' => __( 'All Forms', 'happyforms' ),
|
87 |
);
|
88 |
|
89 |
$args = array(
|
530 |
*/
|
531 |
public function update( $form_data = array() ) {
|
532 |
if ( empty( $form_data['post_title'] ) ) {
|
533 |
+
$form_data['post_title'] = __( '(no title)', 'happyforms' );
|
534 |
}
|
535 |
|
536 |
$validated_data = $this->validate_fields( $form_data );
|
619 |
'post_type', 'post_status',
|
620 |
) ) );
|
621 |
|
622 |
+
$duplicate['post_title'] = trim( $form->post_title . __( ' Copy', 'happyforms' ) );
|
623 |
$duplicate_id = wp_insert_post( $duplicate );
|
624 |
|
625 |
if ( ! is_wp_error( $duplicate_id ) ) {
|
core/classes/class-form-email.php
CHANGED
@@ -40,7 +40,7 @@ class HappyForms_Form_Email {
|
|
40 |
'sanitize' => 'happyforms_sanitize_checkbox',
|
41 |
),
|
42 |
'alert_email_subject' => array(
|
43 |
-
'default' => __( 'You received a new message',
|
44 |
'sanitize' => 'sanitize_text_field',
|
45 |
),
|
46 |
'send_confirmation_email' => array(
|
@@ -60,11 +60,11 @@ class HappyForms_Form_Email {
|
|
60 |
'sanitize' => 'sanitize_text_field',
|
61 |
),
|
62 |
'confirmation_email_subject' => array(
|
63 |
-
'default' => __( 'We received your message',
|
64 |
'sanitize' => 'sanitize_text_field',
|
65 |
),
|
66 |
'confirmation_email_content' => array(
|
67 |
-
'default' => __( 'Your message has been successfully sent. We appreciate you contacting us and we’ll be in touch soon.',
|
68 |
'sanitize' => 'esc_html',
|
69 |
),
|
70 |
'confirmation_email_include_values' => array(
|
@@ -80,7 +80,7 @@ class HappyForms_Form_Email {
|
|
80 |
$controls = array(
|
81 |
200 => array(
|
82 |
'type' => 'checkbox',
|
83 |
-
'label' => __( 'Receive submission alerts',
|
84 |
'field' => 'receive_email_alerts',
|
85 |
),
|
86 |
201 => array(
|
@@ -89,20 +89,20 @@ class HappyForms_Form_Email {
|
|
89 |
),
|
90 |
300 => array(
|
91 |
'type' => 'text',
|
92 |
-
'label' => __( 'Email address',
|
93 |
-
'tooltip' => __( 'Add your email address here to receive a confirmation email for each form response. You can add multiple email addresses by separating each address with a comma.',
|
94 |
'field' => 'email_recipient',
|
95 |
),
|
96 |
310 => array(
|
97 |
'type' => 'text',
|
98 |
-
'label' => __( 'Email Bcc address',
|
99 |
-
'tooltip' => __( 'Add your Bcc email address here to receive a confirmation email for each form response without appearing in the received message header. You can add multiple email addresses by separating each address with a comma.',
|
100 |
'field' => 'email_bccs',
|
101 |
),
|
102 |
400 => array(
|
103 |
'type' => 'text',
|
104 |
-
'label' => __( 'Email subject',
|
105 |
-
'tooltip' => __( 'Each time a user submits a message, you\'ll receive an email with this subject.',
|
106 |
'field' => 'alert_email_subject',
|
107 |
),
|
108 |
490 => array(
|
@@ -110,7 +110,7 @@ class HappyForms_Form_Email {
|
|
110 |
),
|
111 |
500 => array(
|
112 |
'type' => 'checkbox',
|
113 |
-
'label' => __( 'Send confirmation email',
|
114 |
'field' => 'send_confirmation_email',
|
115 |
),
|
116 |
501 => array(
|
@@ -119,35 +119,35 @@ class HappyForms_Form_Email {
|
|
119 |
),
|
120 |
580 => array(
|
121 |
'type' => 'text',
|
122 |
-
'label' => __( 'Email address',
|
123 |
'field' => 'confirmation_email_sender_address',
|
124 |
),
|
125 |
590 => array(
|
126 |
'type' => 'text',
|
127 |
-
'label' => __( 'Reply email address',
|
128 |
'field' => 'confirmation_email_reply_to',
|
129 |
),
|
130 |
600 => array(
|
131 |
'type' => 'text',
|
132 |
-
'label' => __( 'Email display name',
|
133 |
-
'tooltip' => __( 'If your form contains an email field, users will receive an email with this sender name.',
|
134 |
'field' => 'confirmation_email_from_name',
|
135 |
),
|
136 |
700 => array(
|
137 |
'type' => 'text',
|
138 |
-
'label' => __( 'Email subject',
|
139 |
-
'tooltip' => __( 'If your form contains an email field, users will receive an email with this subject.',
|
140 |
'field' => 'confirmation_email_subject',
|
141 |
),
|
142 |
800 => array(
|
143 |
'type' => 'editor',
|
144 |
-
'label' => __( 'Email content',
|
145 |
-
'tooltip' => __( 'If your form contains an email field, users will receive an email with this content.',
|
146 |
'field' => 'confirmation_email_content',
|
147 |
),
|
148 |
810 => array(
|
149 |
'type' => 'checkbox',
|
150 |
-
'label' => __( 'Include submitted values',
|
151 |
'field' => 'confirmation_email_include_values'
|
152 |
),
|
153 |
820 => array(
|
40 |
'sanitize' => 'happyforms_sanitize_checkbox',
|
41 |
),
|
42 |
'alert_email_subject' => array(
|
43 |
+
'default' => __( 'You received a new message', 'happyforms' ),
|
44 |
'sanitize' => 'sanitize_text_field',
|
45 |
),
|
46 |
'send_confirmation_email' => array(
|
60 |
'sanitize' => 'sanitize_text_field',
|
61 |
),
|
62 |
'confirmation_email_subject' => array(
|
63 |
+
'default' => __( 'We received your message', 'happyforms' ),
|
64 |
'sanitize' => 'sanitize_text_field',
|
65 |
),
|
66 |
'confirmation_email_content' => array(
|
67 |
+
'default' => __( 'Your message has been successfully sent. We appreciate you contacting us and we’ll be in touch soon.', 'happyforms' ),
|
68 |
'sanitize' => 'esc_html',
|
69 |
),
|
70 |
'confirmation_email_include_values' => array(
|
80 |
$controls = array(
|
81 |
200 => array(
|
82 |
'type' => 'checkbox',
|
83 |
+
'label' => __( 'Receive submission alerts', 'happyforms' ),
|
84 |
'field' => 'receive_email_alerts',
|
85 |
),
|
86 |
201 => array(
|
89 |
),
|
90 |
300 => array(
|
91 |
'type' => 'text',
|
92 |
+
'label' => __( 'Email address', 'happyforms' ),
|
93 |
+
'tooltip' => __( 'Add your email address here to receive a confirmation email for each form response. You can add multiple email addresses by separating each address with a comma.', 'happyforms' ),
|
94 |
'field' => 'email_recipient',
|
95 |
),
|
96 |
310 => array(
|
97 |
'type' => 'text',
|
98 |
+
'label' => __( 'Email Bcc address', 'happyforms' ),
|
99 |
+
'tooltip' => __( 'Add your Bcc email address here to receive a confirmation email for each form response without appearing in the received message header. You can add multiple email addresses by separating each address with a comma.', 'happyforms' ),
|
100 |
'field' => 'email_bccs',
|
101 |
),
|
102 |
400 => array(
|
103 |
'type' => 'text',
|
104 |
+
'label' => __( 'Email subject', 'happyforms' ),
|
105 |
+
'tooltip' => __( 'Each time a user submits a message, you\'ll receive an email with this subject.', 'happyforms' ),
|
106 |
'field' => 'alert_email_subject',
|
107 |
),
|
108 |
490 => array(
|
110 |
),
|
111 |
500 => array(
|
112 |
'type' => 'checkbox',
|
113 |
+
'label' => __( 'Send confirmation email', 'happyforms' ),
|
114 |
'field' => 'send_confirmation_email',
|
115 |
),
|
116 |
501 => array(
|
119 |
),
|
120 |
580 => array(
|
121 |
'type' => 'text',
|
122 |
+
'label' => __( 'Email address', 'happyforms' ),
|
123 |
'field' => 'confirmation_email_sender_address',
|
124 |
),
|
125 |
590 => array(
|
126 |
'type' => 'text',
|
127 |
+
'label' => __( 'Reply email address', 'happyforms' ),
|
128 |
'field' => 'confirmation_email_reply_to',
|
129 |
),
|
130 |
600 => array(
|
131 |
'type' => 'text',
|
132 |
+
'label' => __( 'Email display name', 'happyforms' ),
|
133 |
+
'tooltip' => __( 'If your form contains an email field, users will receive an email with this sender name.', 'happyforms' ),
|
134 |
'field' => 'confirmation_email_from_name',
|
135 |
),
|
136 |
700 => array(
|
137 |
'type' => 'text',
|
138 |
+
'label' => __( 'Email subject', 'happyforms' ),
|
139 |
+
'tooltip' => __( 'If your form contains an email field, users will receive an email with this subject.', 'happyforms' ),
|
140 |
'field' => 'confirmation_email_subject',
|
141 |
),
|
142 |
800 => array(
|
143 |
'type' => 'editor',
|
144 |
+
'label' => __( 'Email content', 'happyforms' ),
|
145 |
+
'tooltip' => __( 'If your form contains an email field, users will receive an email with this content.', 'happyforms' ),
|
146 |
'field' => 'confirmation_email_content',
|
147 |
),
|
148 |
810 => array(
|
149 |
'type' => 'checkbox',
|
150 |
+
'label' => __( 'Include submitted values', 'happyforms' ),
|
151 |
'field' => 'confirmation_email_include_values'
|
152 |
),
|
153 |
820 => array(
|
core/classes/class-form-part-library.php
CHANGED
@@ -220,7 +220,7 @@ class HappyForms_Form_Part_Library {
|
|
220 |
}
|
221 |
} else {
|
222 |
$error = new WP_Error( 'part', sprintf(
|
223 |
-
__( 'Missing validation callback for field %s',
|
224 |
$field_name
|
225 |
) );
|
226 |
|
220 |
}
|
221 |
} else {
|
222 |
$error = new WP_Error( 'part', sprintf(
|
223 |
+
__( 'Missing validation callback for field %s', 'happyforms' ),
|
224 |
$field_name
|
225 |
) );
|
226 |
|
core/classes/class-form-setup.php
CHANGED
@@ -53,11 +53,11 @@ class HappyForms_Form_Setup {
|
|
53 |
'sanitize' => 'sanitize_text_field',
|
54 |
),
|
55 |
'confirmation_message' => array(
|
56 |
-
'default' => __( 'Thank you! Your submission has been sent.',
|
57 |
'sanitize' => 'esc_html',
|
58 |
),
|
59 |
'error_message' => array(
|
60 |
-
'default' => __( 'There is a problem! Please review your submission.',
|
61 |
'sanitize' => 'esc_html'
|
62 |
),
|
63 |
'redirect_on_complete' => array(
|
@@ -77,15 +77,15 @@ class HappyForms_Form_Setup {
|
|
77 |
'sanitize' => 'happyforms_sanitize_checkbox',
|
78 |
),
|
79 |
'required_part_label' => array(
|
80 |
-
'default' => __( 'This field is required.',
|
81 |
'sanitize' => 'sanitize_text_field'
|
82 |
),
|
83 |
'optional_part_label' => array(
|
84 |
-
'default' => __( '(optional)',
|
85 |
'sanitize' => 'sanitize_text_field',
|
86 |
),
|
87 |
'submit_button_label' => array(
|
88 |
-
'default' => __( 'Send',
|
89 |
'sanitize' => 'sanitize_text_field',
|
90 |
),
|
91 |
'form_expiration_datetime' => array(
|
@@ -109,7 +109,7 @@ class HappyForms_Form_Setup {
|
|
109 |
'sanitize' => 'sanitize_text_field',
|
110 |
),
|
111 |
'captcha_label' => array(
|
112 |
-
'default' => __( 'Validate your submission',
|
113 |
'sanitize' => 'sanitize_text_field'
|
114 |
),
|
115 |
'preview_before_submit' => array(
|
@@ -117,11 +117,11 @@ class HappyForms_Form_Setup {
|
|
117 |
'sanitize' => 'happyforms_sanitize_checkbox',
|
118 |
),
|
119 |
'review_button_label' => array(
|
120 |
-
'default' => __( 'Review submission',
|
121 |
'sanitize' => 'sanitize_text_field',
|
122 |
),
|
123 |
'edit_button_label' => array(
|
124 |
-
'default' => __( 'Edit',
|
125 |
'sanitize' => 'sanitize_text_field',
|
126 |
),
|
127 |
'unique_id' => array(
|
@@ -169,17 +169,17 @@ class HappyForms_Form_Setup {
|
|
169 |
$controls = array(
|
170 |
10 => array(
|
171 |
'type' => 'select',
|
172 |
-
'label' => __( 'Confirm submission',
|
173 |
'options' => array(
|
174 |
-
'success_message' => __( 'Success message',
|
175 |
-
'redirect' => __( 'Redirect to web address',
|
176 |
),
|
177 |
'field' => 'confirm_submission',
|
178 |
-
'tooltip' => __( 'Choose how the form should confirm successful submission.',
|
179 |
),
|
180 |
11 => array(
|
181 |
'type' => 'upsell',
|
182 |
-
'label' => __( 'Upgrade',
|
183 |
'field' => '',
|
184 |
'id' => 'happyforms-redirect-upsell',
|
185 |
),
|
@@ -189,7 +189,7 @@ class HappyForms_Form_Setup {
|
|
189 |
),
|
190 |
100 => array(
|
191 |
'type' => 'editor',
|
192 |
-
'label' => __( 'Success message',
|
193 |
'field' => 'confirmation_message',
|
194 |
),
|
195 |
101 => array(
|
@@ -197,33 +197,33 @@ class HappyForms_Form_Setup {
|
|
197 |
),
|
198 |
110 => array(
|
199 |
'type' => 'editor',
|
200 |
-
'label' => __( 'Error message',
|
201 |
-
'tooltip' => __( 'This is the message your users will see when there are form errors preventing submission.',
|
202 |
'field' => 'error_message',
|
203 |
),
|
204 |
900 => array(
|
205 |
'type' => 'text',
|
206 |
-
'label' => __( 'Optional part label',
|
207 |
-
'tooltip' => __( 'Mark optional parts in your form to let your users distinguish them from required parts.',
|
208 |
'field' => 'optional_part_label',
|
209 |
),
|
210 |
1000 => array(
|
211 |
'type' => 'text',
|
212 |
-
'label' => __( 'Submit button label',
|
213 |
-
'tooltip' => __( 'Change text of submit button to describe an action your form performs.',
|
214 |
'field' => 'submit_button_label',
|
215 |
),
|
216 |
1100 => array(
|
217 |
'type' => 'text',
|
218 |
-
'label' => __( 'Submit button CSS classes',
|
219 |
-
'tooltip' => __( 'Add custom CSS classes separated by space for targeting a button in your stylesheet.',
|
220 |
'field' => 'submit_button_html_class'
|
221 |
),
|
222 |
1200 => array(
|
223 |
'type' => 'checkbox',
|
224 |
-
'label' => __( 'Use custom HTML ID',
|
225 |
'field' => 'use_html_id',
|
226 |
-
'tooltip' => __( 'Add a unique HTML ID to your form. Write without a hash (#) character.',
|
227 |
),
|
228 |
1201 => array(
|
229 |
'type' => 'group_start',
|
@@ -231,7 +231,7 @@ class HappyForms_Form_Setup {
|
|
231 |
),
|
232 |
1202 => array(
|
233 |
'type' => 'text',
|
234 |
-
'label' => __( 'Form HTML ID',
|
235 |
'field' => 'html_id',
|
236 |
),
|
237 |
1203 => array(
|
@@ -239,14 +239,14 @@ class HappyForms_Form_Setup {
|
|
239 |
),
|
240 |
1204 => array(
|
241 |
'type' => 'checkbox',
|
242 |
-
'label' => __( 'Hide form after submit',
|
243 |
-
'tooltip' => __( 'Hide all form parts and display just title and confirmation message on submit.',
|
244 |
'field' => 'form_hide_on_submit'
|
245 |
),
|
246 |
1400 => array(
|
247 |
'type' => 'checkbox',
|
248 |
-
'label' => __( 'Spam prevention',
|
249 |
-
'tooltip' => __( 'Protect your form against bots by using HoneyPot security.',
|
250 |
'field' => 'spam_prevention',
|
251 |
),
|
252 |
);
|
53 |
'sanitize' => 'sanitize_text_field',
|
54 |
),
|
55 |
'confirmation_message' => array(
|
56 |
+
'default' => __( 'Thank you! Your submission has been sent.', 'happyforms' ),
|
57 |
'sanitize' => 'esc_html',
|
58 |
),
|
59 |
'error_message' => array(
|
60 |
+
'default' => __( 'There is a problem! Please review your submission.', 'happyforms' ),
|
61 |
'sanitize' => 'esc_html'
|
62 |
),
|
63 |
'redirect_on_complete' => array(
|
77 |
'sanitize' => 'happyforms_sanitize_checkbox',
|
78 |
),
|
79 |
'required_part_label' => array(
|
80 |
+
'default' => __( 'This field is required.', 'happyforms' ),
|
81 |
'sanitize' => 'sanitize_text_field'
|
82 |
),
|
83 |
'optional_part_label' => array(
|
84 |
+
'default' => __( '(optional)', 'happyforms' ),
|
85 |
'sanitize' => 'sanitize_text_field',
|
86 |
),
|
87 |
'submit_button_label' => array(
|
88 |
+
'default' => __( 'Send', 'happyforms' ),
|
89 |
'sanitize' => 'sanitize_text_field',
|
90 |
),
|
91 |
'form_expiration_datetime' => array(
|
109 |
'sanitize' => 'sanitize_text_field',
|
110 |
),
|
111 |
'captcha_label' => array(
|
112 |
+
'default' => __( 'Validate your submission', 'happyforms' ),
|
113 |
'sanitize' => 'sanitize_text_field'
|
114 |
),
|
115 |
'preview_before_submit' => array(
|
117 |
'sanitize' => 'happyforms_sanitize_checkbox',
|
118 |
),
|
119 |
'review_button_label' => array(
|
120 |
+
'default' => __( 'Review submission', 'happyforms' ),
|
121 |
'sanitize' => 'sanitize_text_field',
|
122 |
),
|
123 |
'edit_button_label' => array(
|
124 |
+
'default' => __( 'Edit', 'happyforms' ),
|
125 |
'sanitize' => 'sanitize_text_field',
|
126 |
),
|
127 |
'unique_id' => array(
|
169 |
$controls = array(
|
170 |
10 => array(
|
171 |
'type' => 'select',
|
172 |
+
'label' => __( 'Confirm submission', 'happyforms' ),
|
173 |
'options' => array(
|
174 |
+
'success_message' => __( 'Success message', 'happyforms' ),
|
175 |
+
'redirect' => __( 'Redirect to web address', 'happyforms' ),
|
176 |
),
|
177 |
'field' => 'confirm_submission',
|
178 |
+
'tooltip' => __( 'Choose how the form should confirm successful submission.', 'happyforms' ),
|
179 |
),
|
180 |
11 => array(
|
181 |
'type' => 'upsell',
|
182 |
+
'label' => __( 'Upgrade', 'happyforms' ),
|
183 |
'field' => '',
|
184 |
'id' => 'happyforms-redirect-upsell',
|
185 |
),
|
189 |
),
|
190 |
100 => array(
|
191 |
'type' => 'editor',
|
192 |
+
'label' => __( 'Success message', 'happyforms' ),
|
193 |
'field' => 'confirmation_message',
|
194 |
),
|
195 |
101 => array(
|
197 |
),
|
198 |
110 => array(
|
199 |
'type' => 'editor',
|
200 |
+
'label' => __( 'Error message', 'happyforms' ),
|
201 |
+
'tooltip' => __( 'This is the message your users will see when there are form errors preventing submission.', 'happyforms' ),
|
202 |
'field' => 'error_message',
|
203 |
),
|
204 |
900 => array(
|
205 |
'type' => 'text',
|
206 |
+
'label' => __( 'Optional part label', 'happyforms' ),
|
207 |
+
'tooltip' => __( 'Mark optional parts in your form to let your users distinguish them from required parts.', 'happyforms' ),
|
208 |
'field' => 'optional_part_label',
|
209 |
),
|
210 |
1000 => array(
|
211 |
'type' => 'text',
|
212 |
+
'label' => __( 'Submit button label', 'happyforms' ),
|
213 |
+
'tooltip' => __( 'Change text of submit button to describe an action your form performs.', 'happyforms' ),
|
214 |
'field' => 'submit_button_label',
|
215 |
),
|
216 |
1100 => array(
|
217 |
'type' => 'text',
|
218 |
+
'label' => __( 'Submit button CSS classes', 'happyforms' ),
|
219 |
+
'tooltip' => __( 'Add custom CSS classes separated by space for targeting a button in your stylesheet.', 'happyforms' ),
|
220 |
'field' => 'submit_button_html_class'
|
221 |
),
|
222 |
1200 => array(
|
223 |
'type' => 'checkbox',
|
224 |
+
'label' => __( 'Use custom HTML ID', 'happyforms' ),
|
225 |
'field' => 'use_html_id',
|
226 |
+
'tooltip' => __( 'Add a unique HTML ID to your form. Write without a hash (#) character.', 'happyforms' ),
|
227 |
),
|
228 |
1201 => array(
|
229 |
'type' => 'group_start',
|
231 |
),
|
232 |
1202 => array(
|
233 |
'type' => 'text',
|
234 |
+
'label' => __( 'Form HTML ID', 'happyforms' ),
|
235 |
'field' => 'html_id',
|
236 |
),
|
237 |
1203 => array(
|
239 |
),
|
240 |
1204 => array(
|
241 |
'type' => 'checkbox',
|
242 |
+
'label' => __( 'Hide form after submit', 'happyforms' ),
|
243 |
+
'tooltip' => __( 'Hide all form parts and display just title and confirmation message on submit.', 'happyforms' ),
|
244 |
'field' => 'form_hide_on_submit'
|
245 |
),
|
246 |
1400 => array(
|
247 |
'type' => 'checkbox',
|
248 |
+
'label' => __( 'Spam prevention', 'happyforms' ),
|
249 |
+
'tooltip' => __( 'Protect your form against bots by using HoneyPot security.', 'happyforms' ),
|
250 |
'field' => 'spam_prevention',
|
251 |
),
|
252 |
);
|
core/classes/class-form-styles.php
CHANGED
@@ -46,8 +46,8 @@ class HappyForms_Form_Styles {
|
|
46 |
'form_direction' => array(
|
47 |
'default' => '',
|
48 |
'options' => array(
|
49 |
-
'' => __( 'Left-to-right',
|
50 |
-
'happyforms-form--direction-rtl' => __( 'Right-to-left',
|
51 |
),
|
52 |
'target' => 'form_class',
|
53 |
'sanitize' => 'sanitize_text_field'
|
@@ -68,9 +68,9 @@ class HappyForms_Form_Styles {
|
|
68 |
'form_padding' => array(
|
69 |
'default' => '',
|
70 |
'options' => array(
|
71 |
-
'' => __( 'Default',
|
72 |
-
'happyforms-form--padding-narrow' => __( 'Narrow',
|
73 |
-
'happyforms-form--padding-wide' => __( 'Wide',
|
74 |
),
|
75 |
'target' => 'form_class',
|
76 |
'sanitize' => 'sanitize_text_field'
|
@@ -84,8 +84,8 @@ class HappyForms_Form_Styles {
|
|
84 |
'form_title' => array(
|
85 |
'default' => '',
|
86 |
'options' => array(
|
87 |
-
'' => __( 'Show',
|
88 |
-
'happyforms-form--hide-title' => __( 'Hide',
|
89 |
),
|
90 |
'target' => 'form_class',
|
91 |
'sanitize' => 'sanitize_text_field'
|
@@ -93,9 +93,9 @@ class HappyForms_Form_Styles {
|
|
93 |
'form_title_alignment' => array(
|
94 |
'default' => '',
|
95 |
'options' => array(
|
96 |
-
'' => __( 'Left',
|
97 |
-
'happyforms-form--title-text-align-center' => __( 'Center',
|
98 |
-
'happyforms-form--title-text-align-right' => __( 'Right',
|
99 |
),
|
100 |
'sanitize' => 'sanitize_text_field',
|
101 |
'target' => 'form_class'
|
@@ -113,8 +113,8 @@ class HappyForms_Form_Styles {
|
|
113 |
'part_border' => array(
|
114 |
'default' => '',
|
115 |
'options' => array(
|
116 |
-
'' => __( 'Show',
|
117 |
-
'happyforms-form--part-border-off' => __( 'Hide',
|
118 |
),
|
119 |
'target' => 'form_class',
|
120 |
'sanitize' => 'sanitize_text_field'
|
@@ -122,8 +122,8 @@ class HappyForms_Form_Styles {
|
|
122 |
'part_border_location' => array(
|
123 |
'default' => '',
|
124 |
'options' => array(
|
125 |
-
'' => __( 'All sides',
|
126 |
-
'happyforms-form--part-borders-bottom-only' => __( 'Bottom only',
|
127 |
),
|
128 |
'target' => 'form_class',
|
129 |
'sanitize' => 'sanitize_text_field'
|
@@ -131,9 +131,9 @@ class HappyForms_Form_Styles {
|
|
131 |
'part_border_radius' => array(
|
132 |
'default' => '',
|
133 |
'options' => array(
|
134 |
-
'happyforms-form--part-border-radius-square' => __( 'Square',
|
135 |
-
'' => __( 'Round',
|
136 |
-
'happyforms-form--part-border-radius-pill' => __( 'Pill',
|
137 |
),
|
138 |
'target' => 'form_class',
|
139 |
'sanitize' => 'sanitize_text_field'
|
@@ -141,9 +141,9 @@ class HappyForms_Form_Styles {
|
|
141 |
'part_outer_padding' => array(
|
142 |
'default' => '',
|
143 |
'options' => array(
|
144 |
-
'happyforms-form--part-outer-padding-narrow' => __( 'Narrow',
|
145 |
-
'' => __( 'Default',
|
146 |
-
'happyforms-form--part-outer-padding-wide' => __( 'Wide',
|
147 |
),
|
148 |
'target' => 'form_class',
|
149 |
'sanitize' => 'sanitize_text_field'
|
@@ -151,9 +151,9 @@ class HappyForms_Form_Styles {
|
|
151 |
'part_inner_padding' => array(
|
152 |
'default' => '',
|
153 |
'options' => array(
|
154 |
-
'happyforms-form--part-inner-padding-narrow' => __( 'Narrow',
|
155 |
-
'' => __( 'Default',
|
156 |
-
'happyforms-form--part-inner-padding-wide' => __( 'Wide',
|
157 |
),
|
158 |
'target' => 'form_class',
|
159 |
'sanitize' => 'sanitize_text_field'
|
@@ -167,9 +167,9 @@ class HappyForms_Form_Styles {
|
|
167 |
'part_title_alignment' => array(
|
168 |
'default' => '',
|
169 |
'options' => array(
|
170 |
-
'' => __( 'Left',
|
171 |
-
'happyforms-form--part-title-text-align-center' => __( 'Center',
|
172 |
-
'happyforms-form--part-title-text-align-right' => __( 'Right',
|
173 |
),
|
174 |
'sanitize' => 'sanitize_text_field',
|
175 |
'target' => 'form_class'
|
@@ -187,8 +187,8 @@ class HappyForms_Form_Styles {
|
|
187 |
'part_title_font_weight' => array(
|
188 |
'default' => '',
|
189 |
'options' => array(
|
190 |
-
'' => __( 'Normal',
|
191 |
-
'happyforms-form--part-title-font-weight-bold' => __( 'Bold',
|
192 |
),
|
193 |
'target' => 'form_class',
|
194 |
'sanitize' => 'sanitize_text_field'
|
@@ -196,9 +196,9 @@ class HappyForms_Form_Styles {
|
|
196 |
'part_description_alignment' => array(
|
197 |
'default' => '',
|
198 |
'options' => array(
|
199 |
-
'' => __( 'Left',
|
200 |
-
'happyforms-form--part-description-text-align-center' => __( 'Center',
|
201 |
-
'happyforms-form--part-description-text-align-right' => __( 'Right',
|
202 |
),
|
203 |
'sanitize' => 'sanitize_text_field',
|
204 |
'target' => 'form_class'
|
@@ -216,9 +216,9 @@ class HappyForms_Form_Styles {
|
|
216 |
'part_value_alignment' => array(
|
217 |
'default' => '',
|
218 |
'options' => array(
|
219 |
-
'' => __( 'Left',
|
220 |
-
'happyforms-form--part-value-text-align-center' => __( 'Center',
|
221 |
-
'happyforms-form--part-value-text-align-right' => __( 'Right',
|
222 |
),
|
223 |
'sanitize' => 'sanitize_text_field',
|
224 |
'target' => 'form_class'
|
@@ -236,8 +236,8 @@ class HappyForms_Form_Styles {
|
|
236 |
'submit_button_border' => array(
|
237 |
'default' => '',
|
238 |
'options' => array(
|
239 |
-
'' => __( 'Show',
|
240 |
-
'happyforms-form--submit-button-border-hide' => __( 'Hide',
|
241 |
),
|
242 |
'target' => 'form_class',
|
243 |
'sanitize' => 'sanitize_text_field'
|
@@ -245,9 +245,9 @@ class HappyForms_Form_Styles {
|
|
245 |
'submit_button_border_radius' => array(
|
246 |
'default' => '',
|
247 |
'options' => array(
|
248 |
-
'happyforms-form--submit-button-border-radius-square' => __( 'Square',
|
249 |
-
'' => __( 'Round',
|
250 |
-
'happyforms-form--submit-button-border-radius-pill' => __( 'Pill',
|
251 |
),
|
252 |
'target' => 'form_class',
|
253 |
'sanitize' => 'sanitize_text_field'
|
@@ -255,8 +255,8 @@ class HappyForms_Form_Styles {
|
|
255 |
'submit_button_width' => array(
|
256 |
'default' => '',
|
257 |
'options' => array(
|
258 |
-
'' => __( 'Default',
|
259 |
-
'happyforms-form--submit-button-fullwidth' => __( 'Full width',
|
260 |
),
|
261 |
'target' => 'form_class',
|
262 |
'sanitize' => 'sanitize_text_field'
|
@@ -264,9 +264,9 @@ class HappyForms_Form_Styles {
|
|
264 |
'submit_button_padding' => array(
|
265 |
'default' => '',
|
266 |
'options' => array(
|
267 |
-
'happyforms-form--submit-button-padding-narrow' => __( 'Narrow',
|
268 |
-
'' => __( 'Default',
|
269 |
-
'happyforms-form--submit-button-padding-wide' => __( 'Wide',
|
270 |
),
|
271 |
'target' => 'form_class',
|
272 |
'sanitize' => 'sanitize_text_field'
|
@@ -284,8 +284,8 @@ class HappyForms_Form_Styles {
|
|
284 |
'submit_button_font_weight' => array(
|
285 |
'default' => '',
|
286 |
'options' => array(
|
287 |
-
'' => __( 'Normal',
|
288 |
-
'happyforms-form--submit-button-bold' => __( 'Bold',
|
289 |
),
|
290 |
'target' => 'form_class',
|
291 |
'sanitize' => 'sanitize_text_field'
|
@@ -293,9 +293,9 @@ class HappyForms_Form_Styles {
|
|
293 |
'submit_button_alignment' => array(
|
294 |
'default' => '',
|
295 |
'options' => array(
|
296 |
-
'' => __( 'Left',
|
297 |
-
'happyforms-form--submit-button-align-center' => __( 'Center',
|
298 |
-
'happyforms-form--submit-button-align-right' => __( 'Right',
|
299 |
),
|
300 |
'target' => 'form_class',
|
301 |
'sanitize' => 'sanitize_text_field'
|
@@ -501,8 +501,8 @@ class HappyForms_Form_Styles {
|
|
501 |
'notices_position' => array(
|
502 |
'default' => '',
|
503 |
'options' => array(
|
504 |
-
'' => __( 'Above form',
|
505 |
-
'happyforms-form--notices-below' => __( 'Below form',
|
506 |
),
|
507 |
'target' => 'form_class',
|
508 |
'sanitize' => 'sanitize_text_field'
|
@@ -522,372 +522,372 @@ class HappyForms_Form_Styles {
|
|
522 |
$controls = array(
|
523 |
100 => array(
|
524 |
'type' => 'divider',
|
525 |
-
'label' => __( 'General',
|
526 |
'id' => 'general',
|
527 |
),
|
528 |
200 => array(
|
529 |
'type' => 'range',
|
530 |
-
'label' => __( 'Width',
|
531 |
'field' => 'form_width'
|
532 |
),
|
533 |
300 => array(
|
534 |
'type' => 'buttonset',
|
535 |
-
'label' => __( 'Padding',
|
536 |
'field' => 'form_padding',
|
537 |
),
|
538 |
400 => array(
|
539 |
'type' => 'buttonset',
|
540 |
-
'label' => __( 'Direction',
|
541 |
'field' => 'form_direction'
|
542 |
),
|
543 |
500 => array(
|
544 |
'type' => 'buttonset',
|
545 |
-
'label' => __( 'Message location',
|
546 |
'field' => 'notices_position'
|
547 |
),
|
548 |
600 => array(
|
549 |
'type' => 'heading',
|
550 |
'id' => 'colors_general',
|
551 |
-
'label' => __( 'Colors',
|
552 |
),
|
553 |
700 => array(
|
554 |
'type' => 'color',
|
555 |
-
'label' => __( 'Primary',
|
556 |
'field' => 'color_primary',
|
557 |
),
|
558 |
800 => array(
|
559 |
'type' => 'color',
|
560 |
-
'label' => __( 'Success message background',
|
561 |
'field' => 'color_success_notice',
|
562 |
),
|
563 |
801 => array(
|
564 |
'type' => 'color',
|
565 |
-
'label' => __( 'Success message text',
|
566 |
'field' => 'color_success_notice_text',
|
567 |
),
|
568 |
900 => array(
|
569 |
'type' => 'color',
|
570 |
-
'label' => __( 'Validation message text',
|
571 |
'field' => 'color_error',
|
572 |
),
|
573 |
901 => array(
|
574 |
'type' => 'color',
|
575 |
-
'label' => __( 'Error message background',
|
576 |
'field' => 'color_error_notice',
|
577 |
),
|
578 |
902 => array(
|
579 |
'type' => 'color',
|
580 |
-
'label' => __( 'Error message text',
|
581 |
'field' => 'color_error_notice_text',
|
582 |
),
|
583 |
1000 => array(
|
584 |
'type' => 'divider',
|
585 |
-
'label' => __( 'Title',
|
586 |
'id' => 'form_title',
|
587 |
),
|
588 |
1100 => array(
|
589 |
'type' => 'buttonset',
|
590 |
-
'label' => __( 'Display',
|
591 |
'field' => 'form_title',
|
592 |
),
|
593 |
1200 => array(
|
594 |
'type' => 'buttonset',
|
595 |
-
'label' => __( 'Alignment',
|
596 |
'field' => 'form_title_alignment'
|
597 |
),
|
598 |
1300 => array(
|
599 |
'type' => 'range',
|
600 |
-
'label' => __( 'Font size',
|
601 |
'field' => 'form_title_font_size',
|
602 |
),
|
603 |
1400 => array(
|
604 |
'type' => 'divider',
|
605 |
-
'label' => __( 'Part borders & spacing',
|
606 |
'id' => 'borders-spacing',
|
607 |
),
|
608 |
1500 => array(
|
609 |
'type' => 'buttonset',
|
610 |
-
'label' => __( 'Border',
|
611 |
'field' => 'part_border',
|
612 |
),
|
613 |
1600 => array(
|
614 |
'type' => 'buttonset',
|
615 |
-
'label' => __( 'Border location',
|
616 |
'field' => 'part_border_location',
|
617 |
),
|
618 |
1700 => array(
|
619 |
'type' => 'buttonset',
|
620 |
-
'label' => __( 'Border radius',
|
621 |
'field' => 'part_border_radius',
|
622 |
),
|
623 |
1800 => array(
|
624 |
'type' => 'buttonset',
|
625 |
-
'label' => __( 'Outer spacing',
|
626 |
'field' => 'part_outer_padding',
|
627 |
),
|
628 |
1900 => array(
|
629 |
'type' => 'buttonset',
|
630 |
-
'label' => __( 'Inner spacing',
|
631 |
'field' => 'part_inner_padding',
|
632 |
),
|
633 |
2000 => array(
|
634 |
'type' => 'heading',
|
635 |
'id' => 'colors_part_borders',
|
636 |
-
'label' => __( 'Colors',
|
637 |
),
|
638 |
2100 => array(
|
639 |
'type' => 'color',
|
640 |
-
'label' => __( 'Border',
|
641 |
'field' => 'color_part_border',
|
642 |
),
|
643 |
2200 => array(
|
644 |
'type' => 'color',
|
645 |
-
'label' => __( 'Border on focus',
|
646 |
'field' => 'color_part_border_focus',
|
647 |
),
|
648 |
2300 => array(
|
649 |
'type' => 'color',
|
650 |
-
'label' => __( 'Background',
|
651 |
'field' => 'color_part_background',
|
652 |
),
|
653 |
2400 => array(
|
654 |
'type' => 'color',
|
655 |
-
'label' => __( 'Background on focus',
|
656 |
'field' => 'color_part_background_focus',
|
657 |
),
|
658 |
2500 => array(
|
659 |
'type' => 'divider',
|
660 |
-
'label' => __( 'Part labels & text',
|
661 |
'id' => 'labels-text',
|
662 |
),
|
663 |
2600 => array(
|
664 |
'type' => 'checkbox',
|
665 |
-
'label' => __( 'Toggle placeholder on part focus',
|
666 |
'field' => 'part_toggle_placeholders',
|
667 |
),
|
668 |
2700 => array(
|
669 |
'type' => 'buttonset',
|
670 |
-
'label' => __( 'Title alignment',
|
671 |
'field' => 'part_title_alignment'
|
672 |
),
|
673 |
2800 => array(
|
674 |
'type' => 'range',
|
675 |
-
'label' => __( 'Title font size',
|
676 |
'field' => 'part_title_font_size',
|
677 |
),
|
678 |
2900 => array(
|
679 |
'type' => 'buttonset',
|
680 |
-
'label' => __( 'Title font weight',
|
681 |
'field' => 'part_title_font_weight',
|
682 |
),
|
683 |
3000 => array(
|
684 |
'type' => 'buttonset',
|
685 |
-
'label' => __( 'Description alignment',
|
686 |
'field' => 'part_description_alignment'
|
687 |
),
|
688 |
3100 => array(
|
689 |
'type' => 'range',
|
690 |
-
'label' => __( 'Description font size',
|
691 |
'field' => 'part_description_font_size',
|
692 |
),
|
693 |
3200 => array(
|
694 |
'type' => 'buttonset',
|
695 |
-
'label' => __( 'Placeholder & value alignment',
|
696 |
'field' => 'part_value_alignment'
|
697 |
),
|
698 |
3300 => array(
|
699 |
'type' => 'range',
|
700 |
-
'label' => __( 'Value font size',
|
701 |
'field' => 'part_value_font_size',
|
702 |
),
|
703 |
3400 => array(
|
704 |
'type' => 'heading',
|
705 |
'id' => 'colors_part_text',
|
706 |
-
'label' => __( 'Colors',
|
707 |
),
|
708 |
3500 => array(
|
709 |
'type' => 'color',
|
710 |
-
'label' => __( 'Title',
|
711 |
'field' => 'color_part_title',
|
712 |
),
|
713 |
3600 => array(
|
714 |
'type' => 'color',
|
715 |
-
'label' => __( 'Value',
|
716 |
'field' => 'color_part_text',
|
717 |
),
|
718 |
3700 => array(
|
719 |
'type' => 'color',
|
720 |
-
'label' => __( 'Placeholder',
|
721 |
'field' => 'color_part_placeholder',
|
722 |
),
|
723 |
3701 => array(
|
724 |
'type' => 'color',
|
725 |
-
'label' => __( 'Description',
|
726 |
'field' => 'color_part_description',
|
727 |
),
|
728 |
3800 => array(
|
729 |
'type' => 'divider',
|
730 |
-
'label' => __( 'Dropdowns',
|
731 |
'id' => 'dropdowns',
|
732 |
),
|
733 |
3900 => array(
|
734 |
'type' => 'heading',
|
735 |
'id' => 'colors_dropdown_items',
|
736 |
-
'label' => __( 'Items',
|
737 |
),
|
738 |
4000 => array(
|
739 |
'type' => 'color',
|
740 |
-
'label' => __( 'Background',
|
741 |
'field' => 'color_dropdown_item_bg',
|
742 |
),
|
743 |
4100 => array(
|
744 |
'type' => 'color',
|
745 |
-
'label' => __( 'Text',
|
746 |
'field' => 'color_dropdown_item_text',
|
747 |
),
|
748 |
4200 => array(
|
749 |
'type' => 'color',
|
750 |
-
'label' => __( 'Background on focus',
|
751 |
'field' => 'color_dropdown_item_bg_hover',
|
752 |
),
|
753 |
4300 => array(
|
754 |
'type' => 'color',
|
755 |
-
'label' => __( 'Text focused',
|
756 |
'field' => 'color_dropdown_item_text_hover',
|
757 |
),
|
758 |
4400 => array(
|
759 |
'type' => 'divider',
|
760 |
-
'label' => __( 'Checkboxes & Radios',
|
761 |
'id' => 'checkboxes-radios',
|
762 |
),
|
763 |
4500 => array(
|
764 |
'type' => 'color',
|
765 |
-
'label' => __( 'Background',
|
766 |
'field' => 'color_choice_checkmark_bg',
|
767 |
),
|
768 |
4600 => array(
|
769 |
'type' => 'color',
|
770 |
-
'label' => __( 'Background on focus',
|
771 |
'field' => 'color_choice_checkmark_bg_focus',
|
772 |
),
|
773 |
4700 => array(
|
774 |
'type' => 'color',
|
775 |
-
'label' => __( 'Checkmark',
|
776 |
'field' => 'color_choice_checkmark_color',
|
777 |
),
|
778 |
4800 => array(
|
779 |
'type' => 'divider',
|
780 |
-
'label' => __( 'Rating',
|
781 |
'id' => 'rating',
|
782 |
),
|
783 |
4900 => array(
|
784 |
'type' => 'color',
|
785 |
-
'label' => __( 'Rating star color',
|
786 |
'field' => 'color_rating_star',
|
787 |
),
|
788 |
5000 => array(
|
789 |
'type' => 'color',
|
790 |
-
'label' => __( 'Rating star color on hover',
|
791 |
'field' => 'color_rating_star_hover',
|
792 |
),
|
793 |
5300 => array(
|
794 |
'type' => 'divider',
|
795 |
-
'label' => __( 'Tables',
|
796 |
'id' => 'tables',
|
797 |
),
|
798 |
5400 => array(
|
799 |
'type' => 'color',
|
800 |
-
'label' => __( 'Odd row primary',
|
801 |
'field' => 'color_table_row_odd',
|
802 |
),
|
803 |
5500 => array(
|
804 |
'type' => 'color',
|
805 |
-
'label' => __( 'Odd row secondary',
|
806 |
'field' => 'color_table_row_odd_text',
|
807 |
),
|
808 |
5600 => array(
|
809 |
'type' => 'color',
|
810 |
-
'label' => __( 'Even row primary',
|
811 |
'field' => 'color_table_row_even',
|
812 |
),
|
813 |
5700 => array(
|
814 |
'type' => 'color',
|
815 |
-
'label' => __( 'Even row secondary',
|
816 |
'field' => 'color_table_row_even_text',
|
817 |
),
|
818 |
5800 => array(
|
819 |
'type' => 'divider',
|
820 |
-
'label' => __( 'Submit button',
|
821 |
'id' => 'submit',
|
822 |
),
|
823 |
5900 => array(
|
824 |
'type' => 'buttonset',
|
825 |
-
'label' => __( 'Border',
|
826 |
'field' => 'submit_button_border',
|
827 |
),
|
828 |
6000 => array(
|
829 |
'type' => 'buttonset',
|
830 |
-
'label' => __( 'Border radius',
|
831 |
'field' => 'submit_button_border_radius',
|
832 |
),
|
833 |
6100 => array(
|
834 |
'type' => 'buttonset',
|
835 |
-
'label' => __( 'Width',
|
836 |
'field' => 'submit_button_width',
|
837 |
),
|
838 |
6200 => array(
|
839 |
'type' => 'buttonset',
|
840 |
-
'label' => __( 'Padding',
|
841 |
'field' => 'submit_button_padding',
|
842 |
),
|
843 |
6300 => array(
|
844 |
'type' => 'range',
|
845 |
-
'label' => __( 'Font size',
|
846 |
'field' => 'submit_button_font_size',
|
847 |
),
|
848 |
6400 => array(
|
849 |
'type' => 'buttonset',
|
850 |
-
'label' => __( 'Font weight',
|
851 |
'field' => 'submit_button_font_weight',
|
852 |
),
|
853 |
6500 => array(
|
854 |
'type' => 'buttonset',
|
855 |
-
'label' => __( 'Alignment',
|
856 |
'field' => 'submit_button_alignment',
|
857 |
),
|
858 |
6600 => array(
|
859 |
'type' => 'checkbox',
|
860 |
-
'label' => __( 'Make button a part of last input',
|
861 |
'field' => 'submit_button_part_of_last_input'
|
862 |
),
|
863 |
6700 => array(
|
864 |
'type' => 'heading',
|
865 |
'id' => 'colors_submit_button',
|
866 |
-
'label' => __( 'Colors',
|
867 |
),
|
868 |
6800 => array(
|
869 |
'type' => 'color',
|
870 |
-
'label' => __( 'Background',
|
871 |
'field' => 'color_submit_background',
|
872 |
),
|
873 |
6900 => array(
|
874 |
'type' => 'color',
|
875 |
-
'label' => __( 'Background on focus',
|
876 |
'field' => 'color_submit_background_hover',
|
877 |
),
|
878 |
7000 => array(
|
879 |
'type' => 'color',
|
880 |
-
'label' => __( 'Border',
|
881 |
'field' => 'color_submit_border',
|
882 |
),
|
883 |
7100 => array(
|
884 |
'type' => 'color',
|
885 |
-
'label' => __( 'Text',
|
886 |
'field' => 'color_submit_text',
|
887 |
),
|
888 |
7200 => array(
|
889 |
'type' => 'color',
|
890 |
-
'label' => __( 'Text on focus',
|
891 |
'field' => 'color_submit_text_hover',
|
892 |
),
|
893 |
);
|
@@ -899,9 +899,9 @@ class HappyForms_Form_Styles {
|
|
899 |
$code_editor_mode = 'rich';
|
900 |
}
|
901 |
|
902 |
-
$code_section_description = '<p>' . __( 'Add your own CSS code here to customize the appearance of your form.',
|
903 |
'<p>' . sprintf(
|
904 |
-
__( 'For each rule you add, we\'ll prepend your form\'s HTML ID. This makes sure all styles added will only apply to this form. For example %s becomes %s.',
|
905 |
'<code>p</code>',
|
906 |
'<code><%= ( happyForms.form.get( \'form_id\' ) ) ? happyForms.form.get( \'html_id\' ) : \'#happyforms-\'+happyForms.form.get( \'ID\' ) %> p</code>'
|
907 |
)
|
@@ -909,7 +909,7 @@ class HappyForms_Form_Styles {
|
|
909 |
|
910 |
if ( 'rich' === $code_editor_mode ) {
|
911 |
$code_section_description .= sprintf(
|
912 |
-
'<p>' . __( 'The edit field automatically highlights code syntax. You can disable this in your <a href="%s" class="%s" target="_blank">user profile</a> to work in plain text mode.',
|
913 |
get_edit_profile_url( $current_user_id ),
|
914 |
'external external-link'
|
915 |
);
|
@@ -917,7 +917,7 @@ class HappyForms_Form_Styles {
|
|
917 |
|
918 |
$controls[99990] = array(
|
919 |
'type' => 'divider',
|
920 |
-
'label' => __( 'Additional CSS',
|
921 |
'id' => 'additional_css_divider',
|
922 |
'class' => "code-editor-mode--{$code_editor_mode}",
|
923 |
'description' => $code_section_description
|
@@ -927,7 +927,7 @@ class HappyForms_Form_Styles {
|
|
927 |
'type' => 'code',
|
928 |
'mode' => $code_editor_mode,
|
929 |
'hide_title' => true,
|
930 |
-
'label' => __( 'Additional CSS',
|
931 |
'field' => 'additional_css'
|
932 |
);
|
933 |
|
46 |
'form_direction' => array(
|
47 |
'default' => '',
|
48 |
'options' => array(
|
49 |
+
'' => __( 'Left-to-right', 'happyforms' ),
|
50 |
+
'happyforms-form--direction-rtl' => __( 'Right-to-left', 'happyforms' )
|
51 |
),
|
52 |
'target' => 'form_class',
|
53 |
'sanitize' => 'sanitize_text_field'
|
68 |
'form_padding' => array(
|
69 |
'default' => '',
|
70 |
'options' => array(
|
71 |
+
'' => __( 'Default', 'happyforms' ),
|
72 |
+
'happyforms-form--padding-narrow' => __( 'Narrow', 'happyforms' ),
|
73 |
+
'happyforms-form--padding-wide' => __( 'Wide', 'happyforms' )
|
74 |
),
|
75 |
'target' => 'form_class',
|
76 |
'sanitize' => 'sanitize_text_field'
|
84 |
'form_title' => array(
|
85 |
'default' => '',
|
86 |
'options' => array(
|
87 |
+
'' => __( 'Show', 'happyforms' ),
|
88 |
+
'happyforms-form--hide-title' => __( 'Hide', 'happyforms' )
|
89 |
),
|
90 |
'target' => 'form_class',
|
91 |
'sanitize' => 'sanitize_text_field'
|
93 |
'form_title_alignment' => array(
|
94 |
'default' => '',
|
95 |
'options' => array(
|
96 |
+
'' => __( 'Left', 'happyforms' ),
|
97 |
+
'happyforms-form--title-text-align-center' => __( 'Center', 'happyforms' ),
|
98 |
+
'happyforms-form--title-text-align-right' => __( 'Right', 'happyforms' )
|
99 |
),
|
100 |
'sanitize' => 'sanitize_text_field',
|
101 |
'target' => 'form_class'
|
113 |
'part_border' => array(
|
114 |
'default' => '',
|
115 |
'options' => array(
|
116 |
+
'' => __( 'Show', 'happyforms' ),
|
117 |
+
'happyforms-form--part-border-off' => __( 'Hide', 'happyforms' )
|
118 |
),
|
119 |
'target' => 'form_class',
|
120 |
'sanitize' => 'sanitize_text_field'
|
122 |
'part_border_location' => array(
|
123 |
'default' => '',
|
124 |
'options' => array(
|
125 |
+
'' => __( 'All sides', 'happyforms' ),
|
126 |
+
'happyforms-form--part-borders-bottom-only' => __( 'Bottom only', 'happyforms' )
|
127 |
),
|
128 |
'target' => 'form_class',
|
129 |
'sanitize' => 'sanitize_text_field'
|
131 |
'part_border_radius' => array(
|
132 |
'default' => '',
|
133 |
'options' => array(
|
134 |
+
'happyforms-form--part-border-radius-square' => __( 'Square', 'happyforms' ),
|
135 |
+
'' => __( 'Round', 'happyforms' ),
|
136 |
+
'happyforms-form--part-border-radius-pill' => __( 'Pill', 'happyforms' )
|
137 |
),
|
138 |
'target' => 'form_class',
|
139 |
'sanitize' => 'sanitize_text_field'
|
141 |
'part_outer_padding' => array(
|
142 |
'default' => '',
|
143 |
'options' => array(
|
144 |
+
'happyforms-form--part-outer-padding-narrow' => __( 'Narrow', 'happyforms' ),
|
145 |
+
'' => __( 'Default', 'happyforms' ),
|
146 |
+
'happyforms-form--part-outer-padding-wide' => __( 'Wide', 'happyforms' )
|
147 |
),
|
148 |
'target' => 'form_class',
|
149 |
'sanitize' => 'sanitize_text_field'
|
151 |
'part_inner_padding' => array(
|
152 |
'default' => '',
|
153 |
'options' => array(
|
154 |
+
'happyforms-form--part-inner-padding-narrow' => __( 'Narrow', 'happyforms' ),
|
155 |
+
'' => __( 'Default', 'happyforms' ),
|
156 |
+
'happyforms-form--part-inner-padding-wide' => __( 'Wide', 'happyforms' )
|
157 |
),
|
158 |
'target' => 'form_class',
|
159 |
'sanitize' => 'sanitize_text_field'
|
167 |
'part_title_alignment' => array(
|
168 |
'default' => '',
|
169 |
'options' => array(
|
170 |
+
'' => __( 'Left', 'happyforms' ),
|
171 |
+
'happyforms-form--part-title-text-align-center' => __( 'Center', 'happyforms' ),
|
172 |
+
'happyforms-form--part-title-text-align-right' => __( 'Right', 'happyforms' )
|
173 |
),
|
174 |
'sanitize' => 'sanitize_text_field',
|
175 |
'target' => 'form_class'
|
187 |
'part_title_font_weight' => array(
|
188 |
'default' => '',
|
189 |
'options' => array(
|
190 |
+
'' => __( 'Normal', 'happyforms' ),
|
191 |
+
'happyforms-form--part-title-font-weight-bold' => __( 'Bold', 'happyforms' )
|
192 |
),
|
193 |
'target' => 'form_class',
|
194 |
'sanitize' => 'sanitize_text_field'
|
196 |
'part_description_alignment' => array(
|
197 |
'default' => '',
|
198 |
'options' => array(
|
199 |
+
'' => __( 'Left', 'happyforms' ),
|
200 |
+
'happyforms-form--part-description-text-align-center' => __( 'Center', 'happyforms' ),
|
201 |
+
'happyforms-form--part-description-text-align-right' => __( 'Right', 'happyforms' )
|
202 |
),
|
203 |
'sanitize' => 'sanitize_text_field',
|
204 |
'target' => 'form_class'
|
216 |
'part_value_alignment' => array(
|
217 |
'default' => '',
|
218 |
'options' => array(
|
219 |
+
'' => __( 'Left', 'happyforms' ),
|
220 |
+
'happyforms-form--part-value-text-align-center' => __( 'Center', 'happyforms' ),
|
221 |
+
'happyforms-form--part-value-text-align-right' => __( 'Right', 'happyforms' )
|
222 |
),
|
223 |
'sanitize' => 'sanitize_text_field',
|
224 |
'target' => 'form_class'
|
236 |
'submit_button_border' => array(
|
237 |
'default' => '',
|
238 |
'options' => array(
|
239 |
+
'' => __( 'Show', 'happyforms' ),
|
240 |
+
'happyforms-form--submit-button-border-hide' => __( 'Hide', 'happyforms' )
|
241 |
),
|
242 |
'target' => 'form_class',
|
243 |
'sanitize' => 'sanitize_text_field'
|
245 |
'submit_button_border_radius' => array(
|
246 |
'default' => '',
|
247 |
'options' => array(
|
248 |
+
'happyforms-form--submit-button-border-radius-square' => __( 'Square', 'happyforms' ),
|
249 |
+
'' => __( 'Round', 'happyforms' ),
|
250 |
+
'happyforms-form--submit-button-border-radius-pill' => __( 'Pill', 'happyforms' )
|
251 |
),
|
252 |
'target' => 'form_class',
|
253 |
'sanitize' => 'sanitize_text_field'
|
255 |
'submit_button_width' => array(
|
256 |
'default' => '',
|
257 |
'options' => array(
|
258 |
+
'' => __( 'Default', 'happyforms' ),
|
259 |
+
'happyforms-form--submit-button-fullwidth' => __( 'Full width', 'happyforms' )
|
260 |
),
|
261 |
'target' => 'form_class',
|
262 |
'sanitize' => 'sanitize_text_field'
|
264 |
'submit_button_padding' => array(
|
265 |
'default' => '',
|
266 |
'options' => array(
|
267 |
+
'happyforms-form--submit-button-padding-narrow' => __( 'Narrow', 'happyforms' ),
|
268 |
+
'' => __( 'Default', 'happyforms' ),
|
269 |
+
'happyforms-form--submit-button-padding-wide' => __( 'Wide', 'happyforms' )
|
270 |
),
|
271 |
'target' => 'form_class',
|
272 |
'sanitize' => 'sanitize_text_field'
|
284 |
'submit_button_font_weight' => array(
|
285 |
'default' => '',
|
286 |
'options' => array(
|
287 |
+
'' => __( 'Normal', 'happyforms' ),
|
288 |
+
'happyforms-form--submit-button-bold' => __( 'Bold', 'happyforms' )
|
289 |
),
|
290 |
'target' => 'form_class',
|
291 |
'sanitize' => 'sanitize_text_field'
|
293 |
'submit_button_alignment' => array(
|
294 |
'default' => '',
|
295 |
'options' => array(
|
296 |
+
'' => __( 'Left', 'happyforms' ),
|
297 |
+
'happyforms-form--submit-button-align-center' => __( 'Center', 'happyforms' ),
|
298 |
+
'happyforms-form--submit-button-align-right' => __( 'Right', 'happyforms' )
|
299 |
),
|
300 |
'target' => 'form_class',
|
301 |
'sanitize' => 'sanitize_text_field'
|
501 |
'notices_position' => array(
|
502 |
'default' => '',
|
503 |
'options' => array(
|
504 |
+
'' => __( 'Above form', 'happyforms' ),
|
505 |
+
'happyforms-form--notices-below' => __( 'Below form', 'happyforms' ),
|
506 |
),
|
507 |
'target' => 'form_class',
|
508 |
'sanitize' => 'sanitize_text_field'
|
522 |
$controls = array(
|
523 |
100 => array(
|
524 |
'type' => 'divider',
|
525 |
+
'label' => __( 'General', 'happyforms' ),
|
526 |
'id' => 'general',
|
527 |
),
|
528 |
200 => array(
|
529 |
'type' => 'range',
|
530 |
+
'label' => __( 'Width', 'happyforms' ),
|
531 |
'field' => 'form_width'
|
532 |
),
|
533 |
300 => array(
|
534 |
'type' => 'buttonset',
|
535 |
+
'label' => __( 'Padding', 'happyforms' ),
|
536 |
'field' => 'form_padding',
|
537 |
),
|
538 |
400 => array(
|
539 |
'type' => 'buttonset',
|
540 |
+
'label' => __( 'Direction', 'happyforms' ),
|
541 |
'field' => 'form_direction'
|
542 |
),
|
543 |
500 => array(
|
544 |
'type' => 'buttonset',
|
545 |
+
'label' => __( 'Message location', 'happyforms' ),
|
546 |
'field' => 'notices_position'
|
547 |
),
|
548 |
600 => array(
|
549 |
'type' => 'heading',
|
550 |
'id' => 'colors_general',
|
551 |
+
'label' => __( 'Colors', 'happyforms' )
|
552 |
),
|
553 |
700 => array(
|
554 |
'type' => 'color',
|
555 |
+
'label' => __( 'Primary', 'happyforms' ),
|
556 |
'field' => 'color_primary',
|
557 |
),
|
558 |
800 => array(
|
559 |
'type' => 'color',
|
560 |
+
'label' => __( 'Success message background', 'happyforms' ),
|
561 |
'field' => 'color_success_notice',
|
562 |
),
|
563 |
801 => array(
|
564 |
'type' => 'color',
|
565 |
+
'label' => __( 'Success message text', 'happyforms' ),
|
566 |
'field' => 'color_success_notice_text',
|
567 |
),
|
568 |
900 => array(
|
569 |
'type' => 'color',
|
570 |
+
'label' => __( 'Validation message text', 'happyforms' ),
|
571 |
'field' => 'color_error',
|
572 |
),
|
573 |
901 => array(
|
574 |
'type' => 'color',
|
575 |
+
'label' => __( 'Error message background', 'happyforms' ),
|
576 |
'field' => 'color_error_notice',
|
577 |
),
|
578 |
902 => array(
|
579 |
'type' => 'color',
|
580 |
+
'label' => __( 'Error message text', 'happyforms' ),
|
581 |
'field' => 'color_error_notice_text',
|
582 |
),
|
583 |
1000 => array(
|
584 |
'type' => 'divider',
|
585 |
+
'label' => __( 'Title', 'happyforms' ),
|
586 |
'id' => 'form_title',
|
587 |
),
|
588 |
1100 => array(
|
589 |
'type' => 'buttonset',
|
590 |
+
'label' => __( 'Display', 'happyforms' ),
|
591 |
'field' => 'form_title',
|
592 |
),
|
593 |
1200 => array(
|
594 |
'type' => 'buttonset',
|
595 |
+
'label' => __( 'Alignment', 'happyforms' ),
|
596 |
'field' => 'form_title_alignment'
|
597 |
),
|
598 |
1300 => array(
|
599 |
'type' => 'range',
|
600 |
+
'label' => __( 'Font size', 'happyforms' ),
|
601 |
'field' => 'form_title_font_size',
|
602 |
),
|
603 |
1400 => array(
|
604 |
'type' => 'divider',
|
605 |
+
'label' => __( 'Part borders & spacing', 'happyforms' ),
|
606 |
'id' => 'borders-spacing',
|
607 |
),
|
608 |
1500 => array(
|
609 |
'type' => 'buttonset',
|
610 |
+
'label' => __( 'Border', 'happyforms' ),
|
611 |
'field' => 'part_border',
|
612 |
),
|
613 |
1600 => array(
|
614 |
'type' => 'buttonset',
|
615 |
+
'label' => __( 'Border location', 'happyforms' ),
|
616 |
'field' => 'part_border_location',
|
617 |
),
|
618 |
1700 => array(
|
619 |
'type' => 'buttonset',
|
620 |
+
'label' => __( 'Border radius', 'happyforms' ),
|
621 |
'field' => 'part_border_radius',
|
622 |
),
|
623 |
1800 => array(
|
624 |
'type' => 'buttonset',
|
625 |
+
'label' => __( 'Outer spacing', 'happyforms' ),
|
626 |
'field' => 'part_outer_padding',
|
627 |
),
|
628 |
1900 => array(
|
629 |
'type' => 'buttonset',
|
630 |
+
'label' => __( 'Inner spacing', 'happyforms' ),
|
631 |
'field' => 'part_inner_padding',
|
632 |
),
|
633 |
2000 => array(
|
634 |
'type' => 'heading',
|
635 |
'id' => 'colors_part_borders',
|
636 |
+
'label' => __( 'Colors', 'happyforms' )
|
637 |
),
|
638 |
2100 => array(
|
639 |
'type' => 'color',
|
640 |
+
'label' => __( 'Border', 'happyforms' ),
|
641 |
'field' => 'color_part_border',
|
642 |
),
|
643 |
2200 => array(
|
644 |
'type' => 'color',
|
645 |
+
'label' => __( 'Border on focus', 'happyforms' ),
|
646 |
'field' => 'color_part_border_focus',
|
647 |
),
|
648 |
2300 => array(
|
649 |
'type' => 'color',
|
650 |
+
'label' => __( 'Background', 'happyforms' ),
|
651 |
'field' => 'color_part_background',
|
652 |
),
|
653 |
2400 => array(
|
654 |
'type' => 'color',
|
655 |
+
'label' => __( 'Background on focus', 'happyforms' ),
|
656 |
'field' => 'color_part_background_focus',
|
657 |
),
|
658 |
2500 => array(
|
659 |
'type' => 'divider',
|
660 |
+
'label' => __( 'Part labels & text', 'happyforms' ),
|
661 |
'id' => 'labels-text',
|
662 |
),
|
663 |
2600 => array(
|
664 |
'type' => 'checkbox',
|
665 |
+
'label' => __( 'Toggle placeholder on part focus', 'happyforms' ),
|
666 |
'field' => 'part_toggle_placeholders',
|
667 |
),
|
668 |
2700 => array(
|
669 |
'type' => 'buttonset',
|
670 |
+
'label' => __( 'Title alignment', 'happyforms' ),
|
671 |
'field' => 'part_title_alignment'
|
672 |
),
|
673 |
2800 => array(
|
674 |
'type' => 'range',
|
675 |
+
'label' => __( 'Title font size', 'happyforms' ),
|
676 |
'field' => 'part_title_font_size',
|
677 |
),
|
678 |
2900 => array(
|
679 |
'type' => 'buttonset',
|
680 |
+
'label' => __( 'Title font weight', 'happyforms' ),
|
681 |
'field' => 'part_title_font_weight',
|
682 |
),
|
683 |
3000 => array(
|
684 |
'type' => 'buttonset',
|
685 |
+
'label' => __( 'Description alignment', 'happyforms' ),
|
686 |
'field' => 'part_description_alignment'
|
687 |
),
|
688 |
3100 => array(
|
689 |
'type' => 'range',
|
690 |
+
'label' => __( 'Description font size', 'happyforms' ),
|
691 |
'field' => 'part_description_font_size',
|
692 |
),
|
693 |
3200 => array(
|
694 |
'type' => 'buttonset',
|
695 |
+
'label' => __( 'Placeholder & value alignment', 'happyforms' ),
|
696 |
'field' => 'part_value_alignment'
|
697 |
),
|
698 |
3300 => array(
|
699 |
'type' => 'range',
|
700 |
+
'label' => __( 'Value font size', 'happyforms' ),
|
701 |
'field' => 'part_value_font_size',
|
702 |
),
|
703 |
3400 => array(
|
704 |
'type' => 'heading',
|
705 |
'id' => 'colors_part_text',
|
706 |
+
'label' => __( 'Colors', 'happyforms' )
|
707 |
),
|
708 |
3500 => array(
|
709 |
'type' => 'color',
|
710 |
+
'label' => __( 'Title', 'happyforms' ),
|
711 |
'field' => 'color_part_title',
|
712 |
),
|
713 |
3600 => array(
|
714 |
'type' => 'color',
|
715 |
+
'label' => __( 'Value', 'happyforms' ),
|
716 |
'field' => 'color_part_text',
|
717 |
),
|
718 |
3700 => array(
|
719 |
'type' => 'color',
|
720 |
+
'label' => __( 'Placeholder', 'happyforms' ),
|
721 |
'field' => 'color_part_placeholder',
|
722 |
),
|
723 |
3701 => array(
|
724 |
'type' => 'color',
|
725 |
+
'label' => __( 'Description', 'happyforms' ),
|
726 |
'field' => 'color_part_description',
|
727 |
),
|
728 |
3800 => array(
|
729 |
'type' => 'divider',
|
730 |
+
'label' => __( 'Dropdowns', 'happyforms' ),
|
731 |
'id' => 'dropdowns',
|
732 |
),
|
733 |
3900 => array(
|
734 |
'type' => 'heading',
|
735 |
'id' => 'colors_dropdown_items',
|
736 |
+
'label' => __( 'Items', 'happyforms' )
|
737 |
),
|
738 |
4000 => array(
|
739 |
'type' => 'color',
|
740 |
+
'label' => __( 'Background', 'happyforms' ),
|
741 |
'field' => 'color_dropdown_item_bg',
|
742 |
),
|
743 |
4100 => array(
|
744 |
'type' => 'color',
|
745 |
+
'label' => __( 'Text', 'happyforms' ),
|
746 |
'field' => 'color_dropdown_item_text',
|
747 |
),
|
748 |
4200 => array(
|
749 |
'type' => 'color',
|
750 |
+
'label' => __( 'Background on focus', 'happyforms' ),
|
751 |
'field' => 'color_dropdown_item_bg_hover',
|
752 |
),
|
753 |
4300 => array(
|
754 |
'type' => 'color',
|
755 |
+
'label' => __( 'Text focused', 'happyforms' ),
|
756 |
'field' => 'color_dropdown_item_text_hover',
|
757 |
),
|
758 |
4400 => array(
|
759 |
'type' => 'divider',
|
760 |
+
'label' => __( 'Checkboxes & Radios', 'happyforms' ),
|
761 |
'id' => 'checkboxes-radios',
|
762 |
),
|
763 |
4500 => array(
|
764 |
'type' => 'color',
|
765 |
+
'label' => __( 'Background', 'happyforms' ),
|
766 |
'field' => 'color_choice_checkmark_bg',
|
767 |
),
|
768 |
4600 => array(
|
769 |
'type' => 'color',
|
770 |
+
'label' => __( 'Background on focus', 'happyforms' ),
|
771 |
'field' => 'color_choice_checkmark_bg_focus',
|
772 |
),
|
773 |
4700 => array(
|
774 |
'type' => 'color',
|
775 |
+
'label' => __( 'Checkmark', 'happyforms' ),
|
776 |
'field' => 'color_choice_checkmark_color',
|
777 |
),
|
778 |
4800 => array(
|
779 |
'type' => 'divider',
|
780 |
+
'label' => __( 'Rating', 'happyforms' ),
|
781 |
'id' => 'rating',
|
782 |
),
|
783 |
4900 => array(
|
784 |
'type' => 'color',
|
785 |
+
'label' => __( 'Rating star color', 'happyforms' ),
|
786 |
'field' => 'color_rating_star',
|
787 |
),
|
788 |
5000 => array(
|
789 |
'type' => 'color',
|
790 |
+
'label' => __( 'Rating star color on hover', 'happyforms' ),
|
791 |
'field' => 'color_rating_star_hover',
|
792 |
),
|
793 |
5300 => array(
|
794 |
'type' => 'divider',
|
795 |
+
'label' => __( 'Tables', 'happyforms' ),
|
796 |
'id' => 'tables',
|
797 |
),
|
798 |
5400 => array(
|
799 |
'type' => 'color',
|
800 |
+
'label' => __( 'Odd row primary', 'happyforms' ),
|
801 |
'field' => 'color_table_row_odd',
|
802 |
),
|
803 |
5500 => array(
|
804 |
'type' => 'color',
|
805 |
+
'label' => __( 'Odd row secondary', 'happyforms' ),
|
806 |
'field' => 'color_table_row_odd_text',
|
807 |
),
|
808 |
5600 => array(
|
809 |
'type' => 'color',
|
810 |
+
'label' => __( 'Even row primary', 'happyforms' ),
|
811 |
'field' => 'color_table_row_even',
|
812 |
),
|
813 |
5700 => array(
|
814 |
'type' => 'color',
|
815 |
+
'label' => __( 'Even row secondary', 'happyforms' ),
|
816 |
'field' => 'color_table_row_even_text',
|
817 |
),
|
818 |
5800 => array(
|
819 |
'type' => 'divider',
|
820 |
+
'label' => __( 'Submit button', 'happyforms' ),
|
821 |
'id' => 'submit',
|
822 |
),
|
823 |
5900 => array(
|
824 |
'type' => 'buttonset',
|
825 |
+
'label' => __( 'Border', 'happyforms' ),
|
826 |
'field' => 'submit_button_border',
|
827 |
),
|
828 |
6000 => array(
|
829 |
'type' => 'buttonset',
|
830 |
+
'label' => __( 'Border radius', 'happyforms' ),
|
831 |
'field' => 'submit_button_border_radius',
|
832 |
),
|
833 |
6100 => array(
|
834 |
'type' => 'buttonset',
|
835 |
+
'label' => __( 'Width', 'happyforms' ),
|
836 |
'field' => 'submit_button_width',
|
837 |
),
|
838 |
6200 => array(
|
839 |
'type' => 'buttonset',
|
840 |
+
'label' => __( 'Padding', 'happyforms' ),
|
841 |
'field' => 'submit_button_padding',
|
842 |
),
|
843 |
6300 => array(
|
844 |
'type' => 'range',
|
845 |
+
'label' => __( 'Font size', 'happyforms' ),
|
846 |
'field' => 'submit_button_font_size',
|
847 |
),
|
848 |
6400 => array(
|
849 |
'type' => 'buttonset',
|
850 |
+
'label' => __( 'Font weight', 'happyforms' ),
|
851 |
'field' => 'submit_button_font_weight',
|
852 |
),
|
853 |
6500 => array(
|
854 |
'type' => 'buttonset',
|
855 |
+
'label' => __( 'Alignment', 'happyforms' ),
|
856 |
'field' => 'submit_button_alignment',
|
857 |
),
|
858 |
6600 => array(
|
859 |
'type' => 'checkbox',
|
860 |
+
'label' => __( 'Make button a part of last input', 'happyforms' ),
|
861 |
'field' => 'submit_button_part_of_last_input'
|
862 |
),
|
863 |
6700 => array(
|
864 |
'type' => 'heading',
|
865 |
'id' => 'colors_submit_button',
|
866 |
+
'label' => __( 'Colors', 'happyforms' )
|
867 |
),
|
868 |
6800 => array(
|
869 |
'type' => 'color',
|
870 |
+
'label' => __( 'Background', 'happyforms' ),
|
871 |
'field' => 'color_submit_background',
|
872 |
),
|
873 |
6900 => array(
|
874 |
'type' => 'color',
|
875 |
+
'label' => __( 'Background on focus', 'happyforms' ),
|
876 |
'field' => 'color_submit_background_hover',
|
877 |
),
|
878 |
7000 => array(
|
879 |
'type' => 'color',
|
880 |
+
'label' => __( 'Border', 'happyforms' ),
|
881 |
'field' => 'color_submit_border',
|
882 |
),
|
883 |
7100 => array(
|
884 |
'type' => 'color',
|
885 |
+
'label' => __( 'Text', 'happyforms' ),
|
886 |
'field' => 'color_submit_text',
|
887 |
),
|
888 |
7200 => array(
|
889 |
'type' => 'color',
|
890 |
+
'label' => __( 'Text on focus', 'happyforms' ),
|
891 |
'field' => 'color_submit_text_hover',
|
892 |
),
|
893 |
);
|
899 |
$code_editor_mode = 'rich';
|
900 |
}
|
901 |
|
902 |
+
$code_section_description = '<p>' . __( 'Add your own CSS code here to customize the appearance of your form.', 'happyforms' ) . '</p>' .
|
903 |
'<p>' . sprintf(
|
904 |
+
__( 'For each rule you add, we\'ll prepend your form\'s HTML ID. This makes sure all styles added will only apply to this form. For example %s becomes %s.', 'happyforms' ),
|
905 |
'<code>p</code>',
|
906 |
'<code><%= ( happyForms.form.get( \'form_id\' ) ) ? happyForms.form.get( \'html_id\' ) : \'#happyforms-\'+happyForms.form.get( \'ID\' ) %> p</code>'
|
907 |
)
|
909 |
|
910 |
if ( 'rich' === $code_editor_mode ) {
|
911 |
$code_section_description .= sprintf(
|
912 |
+
'<p>' . __( 'The edit field automatically highlights code syntax. You can disable this in your <a href="%s" class="%s" target="_blank">user profile</a> to work in plain text mode.', 'happyforms' ) . '</p>',
|
913 |
get_edit_profile_url( $current_user_id ),
|
914 |
'external external-link'
|
915 |
);
|
917 |
|
918 |
$controls[99990] = array(
|
919 |
'type' => 'divider',
|
920 |
+
'label' => __( 'Additional CSS', 'happyforms' ),
|
921 |
'id' => 'additional_css_divider',
|
922 |
'class' => "code-editor-mode--{$code_editor_mode}",
|
923 |
'description' => $code_section_description
|
927 |
'type' => 'code',
|
928 |
'mode' => $code_editor_mode,
|
929 |
'hide_title' => true,
|
930 |
+
'label' => __( 'Additional CSS', 'happyforms' ),
|
931 |
'field' => 'additional_css'
|
932 |
);
|
933 |
|
core/classes/class-happyforms-core.php
CHANGED
@@ -162,8 +162,8 @@ class HappyForms_Core {
|
|
162 |
$form_controller = happyforms_get_form_controller();
|
163 |
|
164 |
add_menu_page(
|
165 |
-
__( 'HappyForms Index',
|
166 |
-
__( 'HappyForms',
|
167 |
$form_controller->capability,
|
168 |
'happyforms',
|
169 |
array( $this, 'happyforms_page_index' ),
|
@@ -173,24 +173,24 @@ class HappyForms_Core {
|
|
173 |
|
174 |
add_submenu_page(
|
175 |
'happyforms',
|
176 |
-
__( 'All Forms',
|
177 |
-
__( 'All Forms',
|
178 |
$form_controller->capability,
|
179 |
'/edit.php?post_type=happyform'
|
180 |
);
|
181 |
|
182 |
add_submenu_page(
|
183 |
'happyforms',
|
184 |
-
__( 'Add New',
|
185 |
-
__( 'Add New',
|
186 |
$form_controller->capability,
|
187 |
happyforms_get_form_edit_link( 0 )
|
188 |
);
|
189 |
|
190 |
add_submenu_page(
|
191 |
'happyforms',
|
192 |
-
__( 'Activity',
|
193 |
-
__( 'Activity',
|
194 |
apply_filters( 'happyforms_responses_page_capabilities', 'manage_options' ),
|
195 |
apply_filters( 'happyforms_responses_page_url', '#responses' ),
|
196 |
apply_filters( 'happyforms_responses_page_method', '' )
|
@@ -198,8 +198,8 @@ class HappyForms_Core {
|
|
198 |
|
199 |
add_submenu_page(
|
200 |
'happyforms',
|
201 |
-
__( 'Settings',
|
202 |
-
__( 'Settings',
|
203 |
apply_filters( 'happyforms_settings_page_capabilities', 'manage_options' ),
|
204 |
apply_filters( 'happyforms_settings_page_url', '#settings' ),
|
205 |
apply_filters( 'happyforms_settings_page_method', '' )
|
@@ -207,8 +207,8 @@ class HappyForms_Core {
|
|
207 |
|
208 |
add_submenu_page(
|
209 |
'happyforms',
|
210 |
-
__( 'Welcome',
|
211 |
-
__( 'Welcome',
|
212 |
'manage_options',
|
213 |
'happyforms-welcome',
|
214 |
array( happyforms_get_tracking(), 'settings_page' )
|
@@ -430,7 +430,7 @@ class HappyForms_Core {
|
|
430 |
return;
|
431 |
}
|
432 |
|
433 |
-
$button_html = '<a href="#" class="button happyforms-editor-button" data-title="' . __( 'Insert HappyForm',
|
434 |
|
435 |
add_action( 'admin_footer', array( $this, 'output_happyforms_modal' ) );
|
436 |
|
@@ -626,7 +626,7 @@ class HappyForms_Core {
|
|
626 |
|
627 |
$screen->add_help_tab( array(
|
628 |
'id' => 'happyforms_help_tab_overview',
|
629 |
-
'title' => __( 'Overview',
|
630 |
'callback' => array( $this, 'help_tab_overview_contents' )
|
631 |
) );
|
632 |
|
@@ -636,10 +636,10 @@ class HappyForms_Core {
|
|
636 |
|
637 |
public function help_tab_overview_contents() {
|
638 |
?>
|
639 |
-
<p><?php _e( 'Hey 👋 Welcome to your HappyForms Dashboard!',
|
640 |
|
641 |
<p><?php printf(
|
642 |
-
__( 'Are you looking for help? Well, we’ve swept the nacho crumbs from our keyboards, refilled our ginger beers and are ready to reply with answers! So, go on, email %s.',
|
643 |
'<a href="mailto:support@thethemefoundry.com">support@thethemefoundry.com</a>'
|
644 |
); ?></p>
|
645 |
<?php
|
@@ -648,9 +648,9 @@ class HappyForms_Core {
|
|
648 |
public function get_help_tab_sidebar_content() {
|
649 |
ob_start();
|
650 |
?>
|
651 |
-
<p><strong><?php _e( 'For more help',
|
652 |
|
653 |
-
<p><a href="https://happyforms.me/help-guide"><?php _e( 'Help guide',
|
654 |
<?php
|
655 |
$content = ob_get_clean();
|
656 |
|
162 |
$form_controller = happyforms_get_form_controller();
|
163 |
|
164 |
add_menu_page(
|
165 |
+
__( 'HappyForms Index', 'happyforms' ),
|
166 |
+
__( 'HappyForms', 'happyforms' ),
|
167 |
$form_controller->capability,
|
168 |
'happyforms',
|
169 |
array( $this, 'happyforms_page_index' ),
|
173 |
|
174 |
add_submenu_page(
|
175 |
'happyforms',
|
176 |
+
__( 'All Forms', 'happyforms' ),
|
177 |
+
__( 'All Forms', 'happyforms' ),
|
178 |
$form_controller->capability,
|
179 |
'/edit.php?post_type=happyform'
|
180 |
);
|
181 |
|
182 |
add_submenu_page(
|
183 |
'happyforms',
|
184 |
+
__( 'Add New', 'happyforms' ),
|
185 |
+
__( 'Add New', 'happyforms' ),
|
186 |
$form_controller->capability,
|
187 |
happyforms_get_form_edit_link( 0 )
|
188 |
);
|
189 |
|
190 |
add_submenu_page(
|
191 |
'happyforms',
|
192 |
+
__( 'Activity', 'happyforms' ),
|
193 |
+
__( 'Activity', 'happyforms' ),
|
194 |
apply_filters( 'happyforms_responses_page_capabilities', 'manage_options' ),
|
195 |
apply_filters( 'happyforms_responses_page_url', '#responses' ),
|
196 |
apply_filters( 'happyforms_responses_page_method', '' )
|
198 |
|
199 |
add_submenu_page(
|
200 |
'happyforms',
|
201 |
+
__( 'Settings', 'happyforms' ),
|
202 |
+
__( 'Settings', 'happyforms' ) . apply_filters( 'happyforms_settings_page_menu_badge', '' ),
|
203 |
apply_filters( 'happyforms_settings_page_capabilities', 'manage_options' ),
|
204 |
apply_filters( 'happyforms_settings_page_url', '#settings' ),
|
205 |
apply_filters( 'happyforms_settings_page_method', '' )
|
207 |
|
208 |
add_submenu_page(
|
209 |
'happyforms',
|
210 |
+
__( 'Welcome', 'happyforms' ),
|
211 |
+
__( 'Welcome', 'happyforms' ),
|
212 |
'manage_options',
|
213 |
'happyforms-welcome',
|
214 |
array( happyforms_get_tracking(), 'settings_page' )
|
430 |
return;
|
431 |
}
|
432 |
|
433 |
+
$button_html = '<a href="#" class="button happyforms-editor-button" data-title="' . __( 'Insert HappyForm', 'happyforms' ) . '"><span class="dashicons dashicons-format-status"></span><span>'. __( 'Add HappyForms', 'happyforms' ) .'</span></a>';
|
434 |
|
435 |
add_action( 'admin_footer', array( $this, 'output_happyforms_modal' ) );
|
436 |
|
626 |
|
627 |
$screen->add_help_tab( array(
|
628 |
'id' => 'happyforms_help_tab_overview',
|
629 |
+
'title' => __( 'Overview', 'happyforms' ),
|
630 |
'callback' => array( $this, 'help_tab_overview_contents' )
|
631 |
) );
|
632 |
|
636 |
|
637 |
public function help_tab_overview_contents() {
|
638 |
?>
|
639 |
+
<p><?php _e( 'Hey 👋 Welcome to your HappyForms Dashboard!', 'happyforms' ); ?></p>
|
640 |
|
641 |
<p><?php printf(
|
642 |
+
__( 'Are you looking for help? Well, we’ve swept the nacho crumbs from our keyboards, refilled our ginger beers and are ready to reply with answers! So, go on, email %s.', 'happyforms' ),
|
643 |
'<a href="mailto:support@thethemefoundry.com">support@thethemefoundry.com</a>'
|
644 |
); ?></p>
|
645 |
<?php
|
648 |
public function get_help_tab_sidebar_content() {
|
649 |
ob_start();
|
650 |
?>
|
651 |
+
<p><strong><?php _e( 'For more help', 'happyforms' ); ?>:</strong></p>
|
652 |
|
653 |
+
<p><a href="https://happyforms.me/help-guide"><?php _e( 'Help guide', 'happyforms' ); ?></a></p>
|
654 |
<?php
|
655 |
$content = ob_get_clean();
|
656 |
|
core/classes/class-happyforms-widget.php
CHANGED
@@ -10,9 +10,9 @@ class HappyForms_Widget extends WP_Widget {
|
|
10 |
function __construct() {
|
11 |
parent::__construct(
|
12 |
'happyforms_widget',
|
13 |
-
__( 'HappyForms',
|
14 |
array(
|
15 |
-
'description' => __( 'Easily add your HappyForms to widget areas.',
|
16 |
)
|
17 |
);
|
18 |
}
|
@@ -68,11 +68,11 @@ class HappyForms_Widget extends WP_Widget {
|
|
68 |
}
|
69 |
?>
|
70 |
<p>
|
71 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:',
|
72 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
73 |
</p>
|
74 |
<p>
|
75 |
-
<label for="<?php echo $this->get_field_id( 'form_id' ); ?>"><?php _e( 'Form:',
|
76 |
<select class="widefat" id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>">
|
77 |
<?php
|
78 |
$forms = happyforms_get_form_controller()->get();
|
10 |
function __construct() {
|
11 |
parent::__construct(
|
12 |
'happyforms_widget',
|
13 |
+
__( 'HappyForms', 'happyforms' ),
|
14 |
array(
|
15 |
+
'description' => __( 'Easily add your HappyForms to widget areas.', 'happyforms' )
|
16 |
)
|
17 |
);
|
18 |
}
|
68 |
}
|
69 |
?>
|
70 |
<p>
|
71 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'happyforms' ); ?></label>
|
72 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
73 |
</p>
|
74 |
<p>
|
75 |
+
<label for="<?php echo $this->get_field_id( 'form_id' ); ?>"><?php _e( 'Form:', 'happyforms' ); ?></label>
|
76 |
<select class="widefat" id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>">
|
77 |
<?php
|
78 |
$forms = happyforms_get_form_controller()->get();
|
core/classes/class-tracking.php
CHANGED
@@ -166,7 +166,7 @@ class HappyForms_Tracking {
|
|
166 |
*/
|
167 |
public function settings_page() {
|
168 |
if ( ! current_user_can( 'manage_options' ) ) {
|
169 |
-
wp_die( __( 'Sorry, you are not allowed to access this page.',
|
170 |
}
|
171 |
|
172 |
require_once( happyforms_get_core_folder() . '/templates/admin-tracking.php' );
|
@@ -202,13 +202,13 @@ class HappyForms_Tracking {
|
|
202 |
*/
|
203 |
public function print_template( $template ) {
|
204 |
if ( 'success' === $template ): ?>
|
205 |
-
<h2><?php _e( 'Thank you!',
|
206 |
-
<p class="about-description"><?php _e( 'Now let\'s go enjoy HappyForms.',
|
207 |
-
<p><?php _e( 'You\'ve set up notifications and helped us to improve HappyForms. You\'re ready to get started with your first form.',
|
208 |
-
<a href="<?php echo happyforms_get_form_edit_link( 0, happyforms_get_all_form_link() ); ?>" class="button button-primary button-hero" id="happyforms-tracking-proceed"><?php _e( 'Create your first form',
|
209 |
<?php elseif ( 'error' === $template ): ?>
|
210 |
-
<p class="about-description"><?php _e( 'Aw snap! Something went wrong.',
|
211 |
-
<p><?php _e( 'Error description',
|
212 |
<?php endif;
|
213 |
}
|
214 |
|
166 |
*/
|
167 |
public function settings_page() {
|
168 |
if ( ! current_user_can( 'manage_options' ) ) {
|
169 |
+
wp_die( __( 'Sorry, you are not allowed to access this page.', 'happyforms' ) );
|
170 |
}
|
171 |
|
172 |
require_once( happyforms_get_core_folder() . '/templates/admin-tracking.php' );
|
202 |
*/
|
203 |
public function print_template( $template ) {
|
204 |
if ( 'success' === $template ): ?>
|
205 |
+
<h2><?php _e( 'Thank you!', 'happyforms' ); ?></h2>
|
206 |
+
<p class="about-description"><?php _e( 'Now let\'s go enjoy HappyForms.', 'happyforms' ); ?></p>
|
207 |
+
<p><?php _e( 'You\'ve set up notifications and helped us to improve HappyForms. You\'re ready to get started with your first form.', 'happyforms' ); ?></p>
|
208 |
+
<a href="<?php echo happyforms_get_form_edit_link( 0, happyforms_get_all_form_link() ); ?>" class="button button-primary button-hero" id="happyforms-tracking-proceed"><?php _e( 'Create your first form', 'happyforms' ); ?></a>
|
209 |
<?php elseif ( 'error' === $template ): ?>
|
210 |
+
<p class="about-description"><?php _e( 'Aw snap! Something went wrong.', 'happyforms' ); ?></p>
|
211 |
+
<p><?php _e( 'Error description', 'happyforms' ); ?></p>
|
212 |
<?php endif;
|
213 |
}
|
214 |
|
core/classes/class-validation-messages.php
CHANGED
@@ -49,13 +49,13 @@ class HappyForms_Validation_Messages {
|
|
49 |
|
50 |
public function get_default_messages() {
|
51 |
$messages = array(
|
52 |
-
'field_empty' => __( 'Please fill in this field',
|
53 |
-
'field_invalid' => __( 'This is invalid',
|
54 |
-
'values_mismatch' => __( 'This doesn\'t match',
|
55 |
-
'select_more_choices' => __( 'Please select more choices',
|
56 |
-
'select_less_choices' => __( 'Please select less choices',
|
57 |
-
'message_too_long' => __( 'This message is too long',
|
58 |
-
'message_too_short' => __( 'This message is too short',
|
59 |
);
|
60 |
|
61 |
return apply_filters( 'happyforms_default_validation_messages', $messages );
|
49 |
|
50 |
public function get_default_messages() {
|
51 |
$messages = array(
|
52 |
+
'field_empty' => __( 'Please fill in this field', 'happyforms' ),
|
53 |
+
'field_invalid' => __( 'This is invalid', 'happyforms' ),
|
54 |
+
'values_mismatch' => __( 'This doesn\'t match', 'happyforms' ),
|
55 |
+
'select_more_choices' => __( 'Please select more choices', 'happyforms' ),
|
56 |
+
'select_less_choices' => __( 'Please select less choices', 'happyforms' ),
|
57 |
+
'message_too_long' => __( 'This message is too long', 'happyforms' ),
|
58 |
+
'message_too_short' => __( 'This message is too short', 'happyforms' ),
|
59 |
);
|
60 |
|
61 |
return apply_filters( 'happyforms_default_validation_messages', $messages );
|
core/classes/class-wp-customize-form-manager.php
CHANGED
@@ -160,25 +160,25 @@ class HappyForms_WP_Customize_Form_Manager {
|
|
160 |
$notice_dismissible = true;
|
161 |
$notice_onetime = false;
|
162 |
$notice_content = '';
|
163 |
-
$notice_content .= '<h3>' . __( 'Form saved 👏',
|
164 |
-
$notice_content .= '<p>' . __( 'There are two ways to embed your form. Here goes…',
|
165 |
-
$notice_content .= '<h4>' . __( 'Add HappyForms to your page or post',
|
166 |
-
$notice_content .= '<ol><li>' . __( 'In your Edit Post / Edit Page screen, click Add Block.',
|
167 |
-
$notice_content .= '<h4>' . __( 'Use HappyForms in a widget area',
|
168 |
$notice_content .= '<ol>';
|
169 |
-
$notice_content .= '<li>' . sprintf( __( 'Head over to Appearance → <a href="%s">Widgets</a> screen.',
|
170 |
-
$notice_content .= '<li>' . __( 'Drag the HappyForms widget to your sidebar.',
|
171 |
-
$notice_content .= '<li>' . __( 'Select a form in the Form dropdown.',
|
172 |
-
$notice_content .= '<li>' . __( 'All done!',
|
173 |
$notice_content .= '</ol>';
|
174 |
-
$notice_content .= '<p>' . sprintf( __( 'Still have questions? Head over to our <a href="%s" target="_blank">help guide</a>.',
|
175 |
} else {
|
176 |
$notice_name = 'happyforms_form_saved';
|
177 |
$notice_type = 'success';
|
178 |
$notice_dismissible = false;
|
179 |
$notice_onetime = true;
|
180 |
$notice_content = sprintf(
|
181 |
-
__( 'Form saved. You can add this form to any Page, Post and Widget area. Have questions? <a href="%s" target="_blank">Ask for help in our support forums</a>.',
|
182 |
'https://wordpress.org/support/plugin/happyforms'
|
183 |
);
|
184 |
}
|
160 |
$notice_dismissible = true;
|
161 |
$notice_onetime = false;
|
162 |
$notice_content = '';
|
163 |
+
$notice_content .= '<h3>' . __( 'Form saved 👏', 'happyforms' ) . '</h3>';
|
164 |
+
$notice_content .= '<p>' . __( 'There are two ways to embed your form. Here goes…', 'happyforms' ) . '</p>';
|
165 |
+
$notice_content .= '<h4>' . __( 'Add HappyForms to your page or post', 'happyforms' ) . '</h4>';
|
166 |
+
$notice_content .= '<ol><li>' . __( 'In your Edit Post / Edit Page screen, click Add Block.', 'happyforms' ) . '</li><li>' . __( 'Select the HappyForms content block.', 'happyforms' ) . '</li><li>' . __( 'Select a form in the Form dropdown.', 'happyforms' ) . '</li><li> ' . __( 'That\'s it! You\'ll see a basic preview of your form in the editor.', 'happyforms' ) . '</li></ol>';
|
167 |
+
$notice_content .= '<h4>' . __( 'Use HappyForms in a widget area', 'happyforms' ) . '</h4>';
|
168 |
$notice_content .= '<ol>';
|
169 |
+
$notice_content .= '<li>' . sprintf( __( 'Head over to Appearance → <a href="%s">Widgets</a> screen.', 'happyforms' ), get_site_url( NULL, 'wp-admin/widgets.php' ) ) . '</li>';
|
170 |
+
$notice_content .= '<li>' . __( 'Drag the HappyForms widget to your sidebar.', 'happyforms' ) .'</li>';
|
171 |
+
$notice_content .= '<li>' . __( 'Select a form in the Form dropdown.', 'happyforms' ) . '</li>';
|
172 |
+
$notice_content .= '<li>' . __( 'All done!', 'happyforms' ) . '</li>';
|
173 |
$notice_content .= '</ol>';
|
174 |
+
$notice_content .= '<p>' . sprintf( __( 'Still have questions? Head over to our <a href="%s" target="_blank">help guide</a>.', 'happyforms' ), 'https://happyforms.me/help-guide' ) . '</p>';
|
175 |
} else {
|
176 |
$notice_name = 'happyforms_form_saved';
|
177 |
$notice_type = 'success';
|
178 |
$notice_dismissible = false;
|
179 |
$notice_onetime = true;
|
180 |
$notice_content = sprintf(
|
181 |
+
__( 'Form saved. You can add this form to any Page, Post and Widget area. Have questions? <a href="%s" target="_blank">Ask for help in our support forums</a>.', 'happyforms' ),
|
182 |
'https://wordpress.org/support/plugin/happyforms'
|
183 |
);
|
184 |
}
|
core/classes/parts/class-part-checkbox.php
CHANGED
@@ -7,8 +7,8 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
7 |
public static $parent;
|
8 |
|
9 |
public function __construct() {
|
10 |
-
$this->label = __( 'Multiple Choice',
|
11 |
-
$this->description = __( 'For checkboxes allowing multiple selections.',
|
12 |
|
13 |
$this->hook();
|
14 |
}
|
@@ -36,7 +36,7 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
36 |
'sanitize' => 'sanitize_text_field',
|
37 |
),
|
38 |
'label' => array(
|
39 |
-
'default' => __( 'Untitled',
|
40 |
'sanitize' => 'sanitize_text_field',
|
41 |
),
|
42 |
'label_placement' => array(
|
@@ -80,7 +80,7 @@ class HappyForms_Part_Checkbox extends HappyForms_Form_Part {
|
|
80 |
'sanitize' => 'happyforms_sanitize_checkbox'
|
81 |
),
|
82 |
'select_all_label' => array(
|
83 |
-
'default' => __( 'Select all',
|
84 |
'sanitize' => 'sanitize_text_field',
|
85 |
)
|
86 |
);
|
7 |
public static $parent;
|
8 |
|
9 |
public function __construct() {
|
10 |
+
$this->label = __( 'Multiple Choice', 'happyforms' );
|
11 |
+
$this->description = __( 'For checkboxes allowing multiple selections.', 'happyforms' );
|
12 |
|
13 |
$this->hook();
|
14 |
}
|
36 |
'sanitize' => 'sanitize_text_field',
|
37 |
),
|
38 |
'label' => array(
|
39 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
40 |
'sanitize' => 'sanitize_text_field',
|
41 |
),
|
42 |
'label_placement' => array(
|
80 |
'sanitize' => 'happyforms_sanitize_checkbox'
|
81 |
),
|
82 |
'select_all_label' => array(
|
83 |
+
'default' => __( 'Select all', 'happyforms' ),
|
84 |
'sanitize' => 'sanitize_text_field',
|
85 |
)
|
86 |
);
|
core/classes/parts/class-part-email.php
CHANGED
@@ -5,7 +5,7 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
5 |
public $type = 'email';
|
6 |
|
7 |
public function __construct() {
|
8 |
-
$this->label = __( 'Email',
|
9 |
$this->description = __( 'For formatted email addresses. The \'@\' symbol is required.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
@@ -30,7 +30,7 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
30 |
'sanitize' => 'sanitize_text_field',
|
31 |
),
|
32 |
'label' => array(
|
33 |
-
'default' => __( 'Untitled',
|
34 |
'sanitize' => 'sanitize_text_field',
|
35 |
),
|
36 |
'label_placement' => array(
|
@@ -54,11 +54,11 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
|
|
54 |
'sanitize' => 'intval'
|
55 |
),
|
56 |
'confirmation_field_label' => array(
|
57 |
-
'default' => __( 'Untitled',
|
58 |
'sanitize' => 'sanitize_text_field'
|
59 |
),
|
60 |
'confirmation_field_placeholder' => array(
|
61 |
-
'default' => __( '',
|
62 |
'sanitize' => 'sanitize_text_field'
|
63 |
),
|
64 |
'placeholder' => array(
|
5 |
public $type = 'email';
|
6 |
|
7 |
public function __construct() {
|
8 |
+
$this->label = __( 'Email', 'happyforms' );
|
9 |
$this->description = __( 'For formatted email addresses. The \'@\' symbol is required.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
30 |
'sanitize' => 'sanitize_text_field',
|
31 |
),
|
32 |
'label' => array(
|
33 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
34 |
'sanitize' => 'sanitize_text_field',
|
35 |
),
|
36 |
'label_placement' => array(
|
54 |
'sanitize' => 'intval'
|
55 |
),
|
56 |
'confirmation_field_label' => array(
|
57 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
58 |
'sanitize' => 'sanitize_text_field'
|
59 |
),
|
60 |
'confirmation_field_placeholder' => array(
|
61 |
+
'default' => __( '', 'happyforms' ),
|
62 |
'sanitize' => 'sanitize_text_field'
|
63 |
),
|
64 |
'placeholder' => array(
|
core/classes/parts/class-part-multi-line-text.php
CHANGED
@@ -5,8 +5,8 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
|
|
5 |
public $type = 'multi_line_text';
|
6 |
|
7 |
public function __construct() {
|
8 |
-
$this->label = __( 'Long Text',
|
9 |
-
$this->description = __( 'For paragraph text fields.',
|
10 |
|
11 |
add_filter( 'happyforms_the_part_value', array( $this, 'output_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_email_part_value', array( $this, 'email_part_value' ), 10, 4 );
|
@@ -31,7 +31,7 @@ class HappyForms_Part_MultiLineText extends HappyForms_Form_Part {
|
|
31 |
'sanitize' => 'sanitize_text_field',
|
32 |
),
|
33 |
'label' => array(
|
34 |
-
'default' => __( 'Untitled',
|
35 |
'sanitize' => 'sanitize_text_field',
|
36 |
),
|
37 |
'label_placement' => array(
|
5 |
public $type = 'multi_line_text';
|
6 |
|
7 |
public function __construct() {
|
8 |
+
$this->label = __( 'Long Text', 'happyforms' );
|
9 |
+
$this->description = __( 'For paragraph text fields.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_the_part_value', array( $this, 'output_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_email_part_value', array( $this, 'email_part_value' ), 10, 4 );
|
31 |
'sanitize' => 'sanitize_text_field',
|
32 |
),
|
33 |
'label' => array(
|
34 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
35 |
'sanitize' => 'sanitize_text_field',
|
36 |
),
|
37 |
'label_placement' => array(
|
core/classes/parts/class-part-number.php
CHANGED
@@ -5,8 +5,8 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
5 |
public $type = 'number';
|
6 |
|
7 |
public function __construct() {
|
8 |
-
$this->label = __( 'Number',
|
9 |
-
$this->description = __( 'For numeric fields.',
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
@@ -29,7 +29,7 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
29 |
'sanitize' => 'sanitize_text_field',
|
30 |
),
|
31 |
'label' => array(
|
32 |
-
'default' => __( 'Untitled',
|
33 |
'sanitize' => 'sanitize_text_field',
|
34 |
),
|
35 |
'label_placement' => array(
|
@@ -89,11 +89,11 @@ class HappyForms_Part_Number extends HappyForms_Form_Part {
|
|
89 |
'sanitize' => 'intval'
|
90 |
),
|
91 |
'confirmation_field_label' => array(
|
92 |
-
'default' => __( 'Untitled',
|
93 |
'sanitize' => 'sanitize_text_field'
|
94 |
),
|
95 |
'confirmation_field_placeholder' => array(
|
96 |
-
'default' => __( '',
|
97 |
'sanitize' => 'sanitize_text_field'
|
98 |
),
|
99 |
'required' => array(
|
5 |
public $type = 'number';
|
6 |
|
7 |
public function __construct() {
|
8 |
+
$this->label = __( 'Number', 'happyforms' );
|
9 |
+
$this->description = __( 'For numeric fields.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_part_class', array( $this, 'html_part_class' ), 10, 3 );
|
12 |
add_filter( 'happyforms_part_data_attributes', array( $this, 'html_part_data_attributes' ), 10, 3 );
|
29 |
'sanitize' => 'sanitize_text_field',
|
30 |
),
|
31 |
'label' => array(
|
32 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
33 |
'sanitize' => 'sanitize_text_field',
|
34 |
),
|
35 |
'label_placement' => array(
|
89 |
'sanitize' => 'intval'
|
90 |
),
|
91 |
'confirmation_field_label' => array(
|
92 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
93 |
'sanitize' => 'sanitize_text_field'
|
94 |
),
|
95 |
'confirmation_field_placeholder' => array(
|
96 |
+
'default' => __( '', 'happyforms' ),
|
97 |
'sanitize' => 'sanitize_text_field'
|
98 |
),
|
99 |
'required' => array(
|
core/classes/parts/class-part-radio.php
CHANGED
@@ -9,8 +9,8 @@ class HappyForms_Part_Radio extends HappyForms_Form_Part {
|
|
9 |
public static $parent;
|
10 |
|
11 |
public function __construct() {
|
12 |
-
$this->label = __( 'Single Choice',
|
13 |
-
$this->description = __( 'For radio buttons allowing one selection.',
|
14 |
|
15 |
$this->hook();
|
16 |
}
|
@@ -37,7 +37,7 @@ class HappyForms_Part_Radio extends HappyForms_Form_Part {
|
|
37 |
'sanitize' => 'sanitize_text_field',
|
38 |
),
|
39 |
'label' => array(
|
40 |
-
'default' => __( 'Untitled',
|
41 |
'sanitize' => 'sanitize_text_field',
|
42 |
),
|
43 |
'label_placement' => array(
|
9 |
public static $parent;
|
10 |
|
11 |
public function __construct() {
|
12 |
+
$this->label = __( 'Single Choice', 'happyforms' );
|
13 |
+
$this->description = __( 'For radio buttons allowing one selection.', 'happyforms' );
|
14 |
|
15 |
$this->hook();
|
16 |
}
|
37 |
'sanitize' => 'sanitize_text_field',
|
38 |
),
|
39 |
'label' => array(
|
40 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
41 |
'sanitize' => 'sanitize_text_field',
|
42 |
),
|
43 |
'label_placement' => array(
|
core/classes/parts/class-part-select.php
CHANGED
@@ -5,8 +5,8 @@ class HappyForms_Part_Select extends HappyForms_Form_Part {
|
|
5 |
public $type = 'select';
|
6 |
|
7 |
public function __construct() {
|
8 |
-
$this->label = __( 'Dropdown',
|
9 |
-
$this->description = __( 'For selecting one option from a long list. Default value adjustable.',
|
10 |
|
11 |
$this->hook();
|
12 |
}
|
@@ -32,7 +32,7 @@ class HappyForms_Part_Select extends HappyForms_Form_Part {
|
|
32 |
'sanitize' => 'sanitize_text_field',
|
33 |
),
|
34 |
'label' => array(
|
35 |
-
'default' => __( 'Untitled',
|
36 |
'sanitize' => 'sanitize_text_field',
|
37 |
),
|
38 |
'label_placement' => array(
|
@@ -48,7 +48,7 @@ class HappyForms_Part_Select extends HappyForms_Form_Part {
|
|
48 |
'sanitize' => 'sanitize_text_field'
|
49 |
),
|
50 |
'placeholder' => array(
|
51 |
-
'default' => __( 'Choose',
|
52 |
'sanitize' => 'sanitize_text_field',
|
53 |
),
|
54 |
'width' => array(
|
@@ -72,7 +72,7 @@ class HappyForms_Part_Select extends HappyForms_Form_Part {
|
|
72 |
'sanitize' => 'happyforms_sanitize_checkbox'
|
73 |
),
|
74 |
'no_results_label' => array(
|
75 |
-
'default' => __( 'No results',
|
76 |
'sanitize' => 'sanitize_text_field',
|
77 |
),
|
78 |
);
|
5 |
public $type = 'select';
|
6 |
|
7 |
public function __construct() {
|
8 |
+
$this->label = __( 'Dropdown', 'happyforms' );
|
9 |
+
$this->description = __( 'For selecting one option from a long list. Default value adjustable.', 'happyforms' );
|
10 |
|
11 |
$this->hook();
|
12 |
}
|
32 |
'sanitize' => 'sanitize_text_field',
|
33 |
),
|
34 |
'label' => array(
|
35 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
36 |
'sanitize' => 'sanitize_text_field',
|
37 |
),
|
38 |
'label_placement' => array(
|
48 |
'sanitize' => 'sanitize_text_field'
|
49 |
),
|
50 |
'placeholder' => array(
|
51 |
+
'default' => __( 'Choose', 'happyforms' ),
|
52 |
'sanitize' => 'sanitize_text_field',
|
53 |
),
|
54 |
'width' => array(
|
72 |
'sanitize' => 'happyforms_sanitize_checkbox'
|
73 |
),
|
74 |
'no_results_label' => array(
|
75 |
+
'default' => __( 'No results', 'happyforms' ),
|
76 |
'sanitize' => 'sanitize_text_field',
|
77 |
),
|
78 |
);
|
core/classes/parts/class-part-single-line-text.php
CHANGED
@@ -5,8 +5,8 @@ class HappyForms_Part_SingleLineText extends HappyForms_Form_Part {
|
|
5 |
public $type = 'single_line_text';
|
6 |
|
7 |
public function __construct() {
|
8 |
-
$this->label = __( 'Short Text',
|
9 |
-
$this->description = __( 'For single line text fields.',
|
10 |
|
11 |
add_filter( 'happyforms_the_part_value', array( $this, 'output_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
@@ -27,7 +27,7 @@ class HappyForms_Part_SingleLineText extends HappyForms_Form_Part {
|
|
27 |
'sanitize' => 'sanitize_text_field',
|
28 |
),
|
29 |
'label' => array(
|
30 |
-
'default' => __( 'Untitled',
|
31 |
'sanitize' => 'sanitize_text_field',
|
32 |
),
|
33 |
'label_placement' => array(
|
5 |
public $type = 'single_line_text';
|
6 |
|
7 |
public function __construct() {
|
8 |
+
$this->label = __( 'Short Text', 'happyforms' );
|
9 |
+
$this->description = __( 'For single line text fields.', 'happyforms' );
|
10 |
|
11 |
add_filter( 'happyforms_the_part_value', array( $this, 'output_part_value' ), 10, 3 );
|
12 |
add_filter( 'happyforms_stringify_part_value', array( $this, 'stringify_value' ), 10, 3 );
|
27 |
'sanitize' => 'sanitize_text_field',
|
28 |
),
|
29 |
'label' => array(
|
30 |
+
'default' => __( 'Untitled', 'happyforms' ),
|
31 |
'sanitize' => 'sanitize_text_field',
|
32 |
),
|
33 |
'label_placement' => array(
|
core/helpers/helper-activation.php
CHANGED
@@ -67,7 +67,7 @@ function happyforms_create_samples() {
|
|
67 |
// Get the new form default data
|
68 |
$form_data = $form_controller->get( $form->ID );
|
69 |
|
70 |
-
$form_data['post_title'] = __( 'Sample Form',
|
71 |
|
72 |
// Prepare age dropdown options
|
73 |
$age_options = array(
|
@@ -97,12 +97,12 @@ function happyforms_create_samples() {
|
|
97 |
$form_parts = array(
|
98 |
array(
|
99 |
'type' => 'single_line_text',
|
100 |
-
'label' => __( 'First name',
|
101 |
'width' => 'half',
|
102 |
),
|
103 |
array(
|
104 |
'type' => 'single_line_text',
|
105 |
-
'label' => __( 'Last name',
|
106 |
'width' => 'half',
|
107 |
),
|
108 |
array(
|
@@ -110,13 +110,13 @@ function happyforms_create_samples() {
|
|
110 |
'label' => __( 'What\'s your reason for contacting us?', 'happyforms' ),
|
111 |
'options' => array(
|
112 |
array(
|
113 |
-
'label' => __( 'Need technical help',
|
114 |
),
|
115 |
array(
|
116 |
-
'label' => __( 'Want to suggest a feature',
|
117 |
),
|
118 |
array(
|
119 |
-
'label' => __( 'Asking about my account',
|
120 |
),
|
121 |
),
|
122 |
),
|
@@ -127,7 +127,7 @@ function happyforms_create_samples() {
|
|
127 |
),
|
128 |
array(
|
129 |
'type' => 'multi_line_text',
|
130 |
-
'label' => __( 'Your message',
|
131 |
),
|
132 |
);
|
133 |
|
67 |
// Get the new form default data
|
68 |
$form_data = $form_controller->get( $form->ID );
|
69 |
|
70 |
+
$form_data['post_title'] = __( 'Sample Form', 'happyforms' );
|
71 |
|
72 |
// Prepare age dropdown options
|
73 |
$age_options = array(
|
97 |
$form_parts = array(
|
98 |
array(
|
99 |
'type' => 'single_line_text',
|
100 |
+
'label' => __( 'First name', 'happyforms' ),
|
101 |
'width' => 'half',
|
102 |
),
|
103 |
array(
|
104 |
'type' => 'single_line_text',
|
105 |
+
'label' => __( 'Last name', 'happyforms' ),
|
106 |
'width' => 'half',
|
107 |
),
|
108 |
array(
|
110 |
'label' => __( 'What\'s your reason for contacting us?', 'happyforms' ),
|
111 |
'options' => array(
|
112 |
array(
|
113 |
+
'label' => __( 'Need technical help', 'happyforms' ),
|
114 |
),
|
115 |
array(
|
116 |
+
'label' => __( 'Want to suggest a feature', 'happyforms' ),
|
117 |
),
|
118 |
array(
|
119 |
+
'label' => __( 'Asking about my account', 'happyforms' ),
|
120 |
),
|
121 |
),
|
122 |
),
|
127 |
),
|
128 |
array(
|
129 |
'type' => 'multi_line_text',
|
130 |
+
'label' => __( 'Your message', 'happyforms' ),
|
131 |
),
|
132 |
);
|
133 |
|
core/helpers/helper-form-templates.php
CHANGED
@@ -62,7 +62,7 @@ function happyforms_honeypot( $form ) {
|
|
62 |
|
63 |
if ( $controller->has_spam_protection( $form ) ) : ?>
|
64 |
<label>
|
65 |
-
<input type="checkbox" name="<?php echo $form['ID']; ?>single_line_text_-1" value="1" style="display: none;" tabindex="-1" autocomplete="off"> <span class="screen-reader-text"><?php _e( 'Spam protection, skip this field',
|
66 |
</label>
|
67 |
<?php endif;
|
68 |
}
|
@@ -894,11 +894,11 @@ if ( ! function_exists( 'happyforms_get_form_property' ) ):
|
|
894 |
function happyforms_get_form_property( $form, $key ) {
|
895 |
if ( is_array( $form ) ) {
|
896 |
$value = isset( $form[$key] ) ? $form[$key] : '';
|
897 |
-
$value = is_numeric( $value ) ? intval( $value ) : $value;
|
898 |
} else {
|
899 |
$value = happyforms_get_meta( $form, $key, true );
|
900 |
}
|
901 |
-
|
902 |
return $value;
|
903 |
}
|
904 |
|
@@ -1023,18 +1023,18 @@ if ( ! function_exists( 'happyforms_get_months' ) ) :
|
|
1023 |
|
1024 |
function happyforms_get_months( $form = array() ) {
|
1025 |
$months = array(
|
1026 |
-
1 => __( 'January',
|
1027 |
-
2 => __( 'February',
|
1028 |
-
3 => __( 'March',
|
1029 |
-
4 => __( 'April',
|
1030 |
-
5 => __( 'May',
|
1031 |
-
6 => __( 'June',
|
1032 |
-
7 => __( 'July',
|
1033 |
-
8 => __( 'August',
|
1034 |
-
9 => __( 'September',
|
1035 |
-
10 => __( 'October',
|
1036 |
-
11 => __( 'November',
|
1037 |
-
12 => __( 'December',
|
1038 |
);
|
1039 |
|
1040 |
$months = apply_filters( 'happyforms_get_months', $months, $form );
|
@@ -1075,225 +1075,225 @@ if ( ! function_exists( 'happyforms_get_phone_countries' ) ) :
|
|
1075 |
|
1076 |
function happyforms_get_phone_countries() {
|
1077 |
$countries = array(
|
1078 |
-
'AD' => array( 'name' => __( 'Andorra',
|
1079 |
-
'AE' => array( 'name' => __( 'United Arab Emirates',
|
1080 |
-
'AF' => array( 'name' => __( 'Afghanistan',
|
1081 |
-
'AG' => array( 'name' => __( 'Antigua and Barbuda',
|
1082 |
-
'AI' => array( 'name' => __( 'Anguilla',
|
1083 |
-
'AL' => array( 'name' => __( 'Albania',
|
1084 |
-
'AM' => array( 'name' => __( 'Armenia',
|
1085 |
-
'AO' => array( 'name' => __( 'Angola',
|
1086 |
-
'AQ' => array( 'name' => __( 'Antarctica',
|
1087 |
-
'AR' => array( 'name' => __( 'Argentina',
|
1088 |
-
'AS' => array( 'name' => __( 'American Samoa',
|
1089 |
-
'AT' => array( 'name' => __( 'Austria',
|
1090 |
-
'AU' => array( 'name' => __( 'Australia',
|
1091 |
-
'AW' => array( 'name' => __( 'Aruba',
|
1092 |
-
'AZ' => array( 'name' => __( 'Azerbaijan',
|
1093 |
-
'BA' => array( 'name' => __( 'Bosnia and Herzegovina',
|
1094 |
-
'BB' => array( 'name' => __( 'Barbados',
|
1095 |
-
'BD' => array( 'name' => __( 'Bangladesh',
|
1096 |
-
'BE' => array( 'name' => __( 'Belgium',
|
1097 |
-
'BF' => array( 'name' => __( 'Burkina Faso',
|
1098 |
-
'BG' => array( 'name' => __( 'Bulgaria',
|
1099 |
-
'BH' => array( 'name' => __( 'Bahrain',
|
1100 |
-
'BI' => array( 'name' => __( 'Burundi',
|
1101 |
-
'BJ' => array( 'name' => __( 'Benin',
|
1102 |
-
'BL' => array( 'name' => __( 'Saint Barthelemy',
|
1103 |
-
'BM' => array( 'name' => __( 'Bermuda',
|
1104 |
-
'BN' => array( 'name' => __( 'Brunei Darussalam',
|
1105 |
-
'BO' => array( 'name' => __( 'Bolivia',
|
1106 |
-
'BR' => array( 'name' => __( 'Brazil',
|
1107 |
-
'BS' => array( 'name' => __( 'Bahamas',
|
1108 |
-
'BT' => array( 'name' => __( 'Bhutan',
|
1109 |
-
'BW' => array( 'name' => __( 'Botswana',
|
1110 |
-
'BY' => array( 'name' => __( 'Belarus',
|
1111 |
-
'BZ' => array( 'name' => __( 'Belize',
|
1112 |
-
'CA' => array( 'name' => __( 'Canada',
|
1113 |
-
'CD' => array( 'name' => __( 'Congo, The Democratic Republic of the',
|
1114 |
-
'CF' => array( 'name' => __( 'Central African Republic',
|
1115 |
-
'CG' => array( 'name' => __( 'Congo',
|
1116 |
-
'CH' => array( 'name' => __( 'Switzerland',
|
1117 |
-
'CK' => array( 'name' => __( 'Cook Islands',
|
1118 |
-
'CL' => array( 'name' => __( 'Chile',
|
1119 |
-
'CM' => array( 'name' => __( 'Cameroon',
|
1120 |
-
'CN' => array( 'name' => __( 'China',
|
1121 |
-
'CO' => array( 'name' => __( 'Colombia',
|
1122 |
-
'CR' => array( 'name' => __( 'Costa Rica',
|
1123 |
-
'CU' => array( 'name' => __( 'Cuba',
|
1124 |
-
'CV' => array( 'name' => __( 'Cape Verde',
|
1125 |
-
'CY' => array( 'name' => __( 'Cyprus',
|
1126 |
-
'CZ' => array( 'name' => __( 'Czech Republic',
|
1127 |
-
'DE' => array( 'name' => __( 'Germany',
|
1128 |
-
'DJ' => array( 'name' => __( 'Djibouti',
|
1129 |
-
'DK' => array( 'name' => __( 'Denmark',
|
1130 |
-
'DM' => array( 'name' => __( 'Dominica',
|
1131 |
-
'DO' => array( 'name' => __( 'Dominican Republic',
|
1132 |
-
'DZ' => array( 'name' => __( 'Algeria',
|
1133 |
-
'EC' => array( 'name' => __( 'Ecuador',
|
1134 |
-
'EE' => array( 'name' => __( 'Estonia',
|
1135 |
-
'EG' => array( 'name' => __( 'Egypt',
|
1136 |
-
'ER' => array( 'name' => __( 'Eritrea',
|
1137 |
-
'ES' => array( 'name' => __( 'Spain',
|
1138 |
-
'ET' => array( 'name' => __( 'Ethiopia',
|
1139 |
-
'FI' => array( 'name' => __( 'Finland',
|
1140 |
-
'FJ' => array( 'name' => __( 'Fiji',
|
1141 |
-
'FK' => array( 'name' => __( 'Falkland Islands (Malvinas)',
|
1142 |
-
'FM' => array( 'name' => __( 'Micronesia, Federated States of',
|
1143 |
-
'FO' => array( 'name' => __( 'Faroe Islands',
|
1144 |
-
'FR' => array( 'name' => __( 'France',
|
1145 |
-
'GA' => array( 'name' => __( 'Gabon',
|
1146 |
-
'GB' => array( 'name' => __( 'United Kingdom',
|
1147 |
-
'GD' => array( 'name' => __( 'Grenada',
|
1148 |
-
'GE' => array( 'name' => __( 'Georgia',
|
1149 |
-
'GH' => array( 'name' => __( 'Ghana',
|
1150 |
-
'GI' => array( 'name' => __( 'Gibraltar',
|
1151 |
-
'GL' => array( 'name' => __( 'Greenland',
|
1152 |
-
'GM' => array( 'name' => __( 'Gambia',
|
1153 |
-
'GN' => array( 'name' => __( 'Guinea',
|
1154 |
-
'GR' => array( 'name' => __( 'Greece',
|
1155 |
-
'GT' => array( 'name' => __( 'Guatemala',
|
1156 |
-
'GU' => array( 'name' => __( 'Guam',
|
1157 |
-
'GW' => array( 'name' => __( 'Guinea-bissau',
|
1158 |
-
'GY' => array( 'name' => __( 'Guyana',
|
1159 |
-
'HK' => array( 'name' => __( 'Hong Kong',
|
1160 |
-
'HN' => array( 'name' => __( 'Honduras',
|
1161 |
-
'HR' => array( 'name' => __( 'Croatia',
|
1162 |
-
'HT' => array( 'name' => __( 'Haiti',
|
1163 |
-
'HU' => array( 'name' => __( 'Hungary',
|
1164 |
-
'ID' => array( 'name' => __( 'Indonesia',
|
1165 |
-
'IE' => array( 'name' => __( 'Ireland',
|
1166 |
-
'IL' => array( 'name' => __( 'Israel',
|
1167 |
-
'IN' => array( 'name' => __( 'India',
|
1168 |
-
'IQ' => array( 'name' => __( 'Iraq',
|
1169 |
-
'IR' => array( 'name' => __( 'Iran, Islamic Republic of',
|
1170 |
-
'IS' => array( 'name' => __( 'Iceland',
|
1171 |
-
'IT' => array( 'name' => __( 'Italy',
|
1172 |
-
'JM' => array( 'name' => __( 'Jamaica',
|
1173 |
-
'JO' => array( 'name' => __( 'Jordan',
|
1174 |
-
'JP' => array( 'name' => __( 'Japan',
|
1175 |
-
'KE' => array( 'name' => __( 'Kenya',
|
1176 |
-
'KG' => array( 'name' => __( 'Kyrgyzstan',
|
1177 |
-
'KH' => array( 'name' => __( 'Cambodia',
|
1178 |
-
'KI' => array( 'name' => __( 'Kiribati',
|
1179 |
-
'KM' => array( 'name' => __( 'Comoros',
|
1180 |
-
'KN' => array( 'name' => __( 'Saint Kitts and Nevis',
|
1181 |
-
'KP' => array( 'name' => __( 'Korea Democratic Peoples Republic of',
|
1182 |
-
'KR' => array( 'name' => __( 'Korea Republic of',
|
1183 |
-
'KW' => array( 'name' => __( 'Kuwait',
|
1184 |
-
'KY' => array( 'name' => __( 'Cayman Islands',
|
1185 |
-
'LA' => array( 'name' => __( 'Lao Peoples Democratic Republic',
|
1186 |
-
'LB' => array( 'name' => __( 'Lebanon',
|
1187 |
-
'LC' => array( 'name' => __( 'Saint Lucia',
|
1188 |
-
'LI' => array( 'name' => __( 'Liechtenstein',
|
1189 |
-
'LK' => array( 'name' => __( 'Sri Lanka',
|
1190 |
-
'LR' => array( 'name' => __( 'Liberia',
|
1191 |
-
'LS' => array( 'name' => __( 'Lesotho',
|
1192 |
-
'LT' => array( 'name' => __( 'Lithuania',
|
1193 |
-
'LU' => array( 'name' => __( 'Luxembourg',
|
1194 |
-
'LV' => array( 'name' => __( 'Latvia',
|
1195 |
-
'LY' => array( 'name' => __( 'Libyan Arab Jamahiriya',
|
1196 |
-
'MA' => array( 'name' => __( 'Morocco',
|
1197 |
-
'MC' => array( 'name' => __( 'Monaco',
|
1198 |
-
'MD' => array( 'name' => __( 'Moldova, Republic of',
|
1199 |
-
'ME' => array( 'name' => __( 'Montenegro',
|
1200 |
-
'MG' => array( 'name' => __( 'Madagascar',
|
1201 |
-
'MH' => array( 'name' => __( 'Marshall Islands',
|
1202 |
-
'MK' => array( 'name' => __( 'Macedonia, The Former Yugoslav Republic of',
|
1203 |
-
'ML' => array( 'name' => __( 'Mali',
|
1204 |
-
'MM' => array( 'name' => __( 'Myanmar',
|
1205 |
-
'MN' => array( 'name' => __( 'Mongolia',
|
1206 |
-
'MO' => array( 'name' => __( 'Macau',
|
1207 |
-
'MP' => array( 'name' => __( 'Northern Mariana Islands',
|
1208 |
-
'MR' => array( 'name' => __( 'Mauritania',
|
1209 |
-
'MS' => array( 'name' => __( 'Montserrat',
|
1210 |
-
'MT' => array( 'name' => __( 'Malta',
|
1211 |
-
'MU' => array( 'name' => __( 'Mauritius',
|
1212 |
-
'MV' => array( 'name' => __( 'Maldives',
|
1213 |
-
'MW' => array( 'name' => __( 'Malawi',
|
1214 |
-
'MX' => array( 'name' => __( 'Mexico',
|
1215 |
-
'MY' => array( 'name' => __( 'Malaysia',
|
1216 |
-
'MZ' => array( 'name' => __( 'Mozambique',
|
1217 |
-
'NA' => array( 'name' => __( 'Namibia',
|
1218 |
-
'NC' => array( 'name' => __( 'New Caledonia',
|
1219 |
-
'NE' => array( 'name' => __( 'Niger',
|
1220 |
-
'NG' => array( 'name' => __( 'Nigeria',
|
1221 |
-
'NI' => array( 'name' => __( 'Nicaragua',
|
1222 |
-
'NL' => array( 'name' => __( 'Netherlands',
|
1223 |
-
'NO' => array( 'name' => __( 'Norway',
|
1224 |
-
'NP' => array( 'name' => __( 'Nepal',
|
1225 |
-
'NR' => array( 'name' => __( 'Nauru',
|
1226 |
-
'NU' => array( 'name' => __( 'Niue',
|
1227 |
-
'NZ' => array( 'name' => __( 'New Zealand',
|
1228 |
-
'OM' => array( 'name' => __( 'Oman',
|
1229 |
-
'PA' => array( 'name' => __( 'Panama',
|
1230 |
-
'PE' => array( 'name' => __( 'Peru',
|
1231 |
-
'PF' => array( 'name' => __( 'French Polynesia',
|
1232 |
-
'PG' => array( 'name' => __( 'Papua New Guinea',
|
1233 |
-
'PH' => array( 'name' => __( 'Philippines',
|
1234 |
-
'PK' => array( 'name' => __( 'Pakistan',
|
1235 |
-
'PL' => array( 'name' => __( 'Poland',
|
1236 |
-
'PM' => array( 'name' => __( 'Saint Pierre and Miquelon',
|
1237 |
-
'PN' => array( 'name' => __( 'Pitcairn',
|
1238 |
-
'PT' => array( 'name' => __( 'Portugal',
|
1239 |
-
'PW' => array( 'name' => __( 'Palau',
|
1240 |
-
'PY' => array( 'name' => __( 'Paraguay',
|
1241 |
-
'QA' => array( 'name' => __( 'Qatar',
|
1242 |
-
'RO' => array( 'name' => __( 'Romania',
|
1243 |
-
'RS' => array( 'name' => __( 'Serbia',
|
1244 |
-
'RU' => array( 'name' => __( 'Russian Federation',
|
1245 |
-
'RW' => array( 'name' => __( 'Rwanda',
|
1246 |
-
'SA' => array( 'name' => __( 'Saudi Arabia',
|
1247 |
-
'SB' => array( 'name' => __( 'Solomon Islands',
|
1248 |
-
'SC' => array( 'name' => __( 'Seychelles',
|
1249 |
-
'SD' => array( 'name' => __( 'Sudan',
|
1250 |
-
'SE' => array( 'name' => __( 'Sweden',
|
1251 |
-
'SG' => array( 'name' => __( 'Singapore',
|
1252 |
-
'SH' => array( 'name' => __( 'Saint Helena',
|
1253 |
-
'SI' => array( 'name' => __( 'Slovenia',
|
1254 |
-
'SK' => array( 'name' => __( 'Slovakia',
|
1255 |
-
'SL' => array( 'name' => __( 'Sierra Leone',
|
1256 |
-
'SM' => array( 'name' => __( 'San Marino',
|
1257 |
-
'SN' => array( 'name' => __( 'Senegal',
|
1258 |
-
'SO' => array( 'name' => __( 'Somalia',
|
1259 |
-
'SR' => array( 'name' => __( 'Suriname',
|
1260 |
-
'ST' => array( 'name' => __( 'Sao Tome and Principe',
|
1261 |
-
'SV' => array( 'name' => __( 'El Salvador',
|
1262 |
-
'SY' => array( 'name' => __( 'Syrian Arab Republic',
|
1263 |
-
'SZ' => array( 'name' => __( 'Swaziland',
|
1264 |
-
'TC' => array( 'name' => __( 'Turks and Caicos Islands',
|
1265 |
-
'TD' => array( 'name' => __( 'Chad',
|
1266 |
-
'TG' => array( 'name' => __( 'Togo',
|
1267 |
-
'TH' => array( 'name' => __( 'Thailand',
|
1268 |
-
'TJ' => array( 'name' => __( 'Tajikistan',
|
1269 |
-
'TK' => array( 'name' => __( 'Tokelau',
|
1270 |
-
'TL' => array( 'name' => __( 'Timor-leste',
|
1271 |
-
'TM' => array( 'name' => __( 'Turkmenistan',
|
1272 |
-
'TN' => array( 'name' => __( 'Tunisia',
|
1273 |
-
'TO' => array( 'name' => __( 'Tonga',
|
1274 |
-
'TR' => array( 'name' => __( 'Turkey',
|
1275 |
-
'TT' => array( 'name' => __( 'Trinidad and Tobago',
|
1276 |
-
'TV' => array( 'name' => __( 'Tuvalu',
|
1277 |
-
'TW' => array( 'name' => __( 'Taiwan, Province of China',
|
1278 |
-
'TZ' => array( 'name' => __( 'Tanzania, United Republic of',
|
1279 |
-
'UA' => array( 'name' => __( 'Ukraine',
|
1280 |
-
'UG' => array( 'name' => __( 'Uganda',
|
1281 |
-
'US' => array( 'name' => __( 'United States',
|
1282 |
-
'UY' => array( 'name' => __( 'Uruguay',
|
1283 |
-
'UZ' => array( 'name' => __( 'Uzbekistan',
|
1284 |
-
'VC' => array( 'name' => __( 'Saint Vincent and the Grenadines',
|
1285 |
-
'VE' => array( 'name' => __( 'Venezuela',
|
1286 |
-
'VG' => array( 'name' => __( 'Virgin Islands, British',
|
1287 |
-
'VI' => array( 'name' => __( 'Virgin Islands, U.S.',
|
1288 |
-
'VN' => array( 'name' => __( 'Vietnam',
|
1289 |
-
'VU' => array( 'name' => __( 'Vanuatu',
|
1290 |
-
'WF' => array( 'name' => __( 'Wallis and Futuna',
|
1291 |
-
'WS' => array( 'name' => __( 'Samoa',
|
1292 |
-
'YE' => array( 'name' => __( 'Yemen',
|
1293 |
-
'YT' => array( 'name' => __( 'Mayotte',
|
1294 |
-
'ZA' => array( 'name' => __( 'South Africa',
|
1295 |
-
'ZM' => array( 'name' => __( 'Zambia',
|
1296 |
-
'ZW' => array( 'name' => __( 'Zimbabwe',
|
1297 |
);
|
1298 |
|
1299 |
return $countries;
|
62 |
|
63 |
if ( $controller->has_spam_protection( $form ) ) : ?>
|
64 |
<label>
|
65 |
+
<input type="checkbox" name="<?php echo $form['ID']; ?>single_line_text_-1" value="1" style="display: none;" tabindex="-1" autocomplete="off"> <span class="screen-reader-text"><?php _e( 'Spam protection, skip this field', 'happyforms' ); ?></span>
|
66 |
</label>
|
67 |
<?php endif;
|
68 |
}
|
894 |
function happyforms_get_form_property( $form, $key ) {
|
895 |
if ( is_array( $form ) ) {
|
896 |
$value = isset( $form[$key] ) ? $form[$key] : '';
|
897 |
+
$value = is_numeric( $value ) ? intval( $value ) : $value;
|
898 |
} else {
|
899 |
$value = happyforms_get_meta( $form, $key, true );
|
900 |
}
|
901 |
+
|
902 |
return $value;
|
903 |
}
|
904 |
|
1023 |
|
1024 |
function happyforms_get_months( $form = array() ) {
|
1025 |
$months = array(
|
1026 |
+
1 => __( 'January', 'happyforms' ),
|
1027 |
+
2 => __( 'February', 'happyforms' ),
|
1028 |
+
3 => __( 'March', 'happyforms' ),
|
1029 |
+
4 => __( 'April', 'happyforms' ),
|
1030 |
+
5 => __( 'May', 'happyforms' ),
|
1031 |
+
6 => __( 'June', 'happyforms' ),
|
1032 |
+
7 => __( 'July', 'happyforms' ),
|
1033 |
+
8 => __( 'August', 'happyforms' ),
|
1034 |
+
9 => __( 'September', 'happyforms' ),
|
1035 |
+
10 => __( 'October', 'happyforms' ),
|
1036 |
+
11 => __( 'November', 'happyforms' ),
|
1037 |
+
12 => __( 'December', 'happyforms' )
|
1038 |
);
|
1039 |
|
1040 |
$months = apply_filters( 'happyforms_get_months', $months, $form );
|
1075 |
|
1076 |
function happyforms_get_phone_countries() {
|
1077 |
$countries = array(
|
1078 |
+
'AD' => array( 'name' => __( 'Andorra', 'happyforms' ), 'code' => '376', 'flag' => '🇦🇩' ),
|
1079 |
+
'AE' => array( 'name' => __( 'United Arab Emirates', 'happyforms' ), 'code' => '971', 'flag' => '🇦🇪' ),
|
1080 |
+
'AF' => array( 'name' => __( 'Afghanistan', 'happyforms' ), 'code' => '93', 'flag' => '🇦🇫' ),
|
1081 |
+
'AG' => array( 'name' => __( 'Antigua and Barbuda', 'happyforms' ), 'code' => '1268', 'flag' => '🇦🇬' ),
|
1082 |
+
'AI' => array( 'name' => __( 'Anguilla', 'happyforms' ), 'code' => '1264', 'flag' => '🇦🇮' ),
|
1083 |
+
'AL' => array( 'name' => __( 'Albania', 'happyforms' ), 'code' => '355', 'flag' => '🇦🇱' ),
|
1084 |
+
'AM' => array( 'name' => __( 'Armenia', 'happyforms' ), 'code' => '374', 'flag' => '🇦🇲' ),
|
1085 |
+
'AO' => array( 'name' => __( 'Angola', 'happyforms' ), 'code' => '244', 'flag' => '🇦🇴' ),
|
1086 |
+
'AQ' => array( 'name' => __( 'Antarctica', 'happyforms' ), 'code' => '672', 'flag' => '🇦🇶' ),
|
1087 |
+
'AR' => array( 'name' => __( 'Argentina', 'happyforms' ), 'code' => '54', 'flag' => '🇦🇷' ),
|
1088 |
+
'AS' => array( 'name' => __( 'American Samoa', 'happyforms' ), 'code' => '1684', 'flag' => '🇦🇸' ),
|
1089 |
+
'AT' => array( 'name' => __( 'Austria', 'happyforms' ), 'code' => '43', 'flag' => '🇦🇹' ),
|
1090 |
+
'AU' => array( 'name' => __( 'Australia', 'happyforms' ), 'code' => '61', 'flag' => '🇦🇺' ),
|
1091 |
+
'AW' => array( 'name' => __( 'Aruba', 'happyforms' ), 'code' => '297', 'flag' => '🇦🇼' ),
|
1092 |
+
'AZ' => array( 'name' => __( 'Azerbaijan', 'happyforms' ), 'code' => '994', 'flag' => '🇦🇿' ),
|
1093 |
+
'BA' => array( 'name' => __( 'Bosnia and Herzegovina', 'happyforms' ), 'code' => '387', 'flag' => '🇧🇦' ),
|
1094 |
+
'BB' => array( 'name' => __( 'Barbados', 'happyforms' ), 'code' => '1246', 'flag' => '🇧🇧' ),
|
1095 |
+
'BD' => array( 'name' => __( 'Bangladesh', 'happyforms' ), 'code' => '880', 'flag' => '🇧🇩' ),
|
1096 |
+
'BE' => array( 'name' => __( 'Belgium', 'happyforms' ), 'code' => '32', 'flag' => '🇧🇪' ),
|
1097 |
+
'BF' => array( 'name' => __( 'Burkina Faso', 'happyforms' ), 'code' => '226', 'flag' => '🇧🇫' ),
|
1098 |
+
'BG' => array( 'name' => __( 'Bulgaria', 'happyforms' ), 'code' => '359', 'flag' => '🇧🇬' ),
|
1099 |
+
'BH' => array( 'name' => __( 'Bahrain', 'happyforms' ), 'code' => '973', 'flag' => '🇧🇭' ),
|
1100 |
+
'BI' => array( 'name' => __( 'Burundi', 'happyforms' ), 'code' => '257', 'flag' => '🇧🇮' ),
|
1101 |
+
'BJ' => array( 'name' => __( 'Benin', 'happyforms' ), 'code' => '229', 'flag' => '🇧🇯' ),
|
1102 |
+
'BL' => array( 'name' => __( 'Saint Barthelemy', 'happyforms' ), 'code' => '590', 'flag' => '🇧🇱' ),
|
1103 |
+
'BM' => array( 'name' => __( 'Bermuda', 'happyforms' ), 'code' => '1441', 'flag' => '🇧🇲' ),
|
1104 |
+
'BN' => array( 'name' => __( 'Brunei Darussalam', 'happyforms' ), 'code' => '673', 'flag' => '🇧🇳' ),
|
1105 |
+
'BO' => array( 'name' => __( 'Bolivia', 'happyforms' ), 'code' => '591', 'flag' => '🇧🇴' ),
|
1106 |
+
'BR' => array( 'name' => __( 'Brazil', 'happyforms' ), 'code' => '55', 'flag' => '🇧🇷' ),
|
1107 |
+
'BS' => array( 'name' => __( 'Bahamas', 'happyforms' ), 'code' => '1242', 'flag' => '🇧🇸' ),
|
1108 |
+
'BT' => array( 'name' => __( 'Bhutan', 'happyforms' ), 'code' => '975', 'flag' => '🇧🇹' ),
|
1109 |
+
'BW' => array( 'name' => __( 'Botswana', 'happyforms' ), 'code' => '267', 'flag' => '🇧🇼' ),
|
1110 |
+
'BY' => array( 'name' => __( 'Belarus', 'happyforms' ), 'code' => '375', 'flag' => '🇧🇾' ),
|
1111 |
+
'BZ' => array( 'name' => __( 'Belize', 'happyforms' ), 'code' => '501', 'flag' => '🇧🇿' ),
|
1112 |
+
'CA' => array( 'name' => __( 'Canada', 'happyforms' ), 'code' => '1', 'flag' => '🇨🇦' ),
|
1113 |
+
'CD' => array( 'name' => __( 'Congo, The Democratic Republic of the', 'happyforms' ), 'code' => '243', 'flag' => '🇨🇩' ),
|
1114 |
+
'CF' => array( 'name' => __( 'Central African Republic', 'happyforms' ), 'code' => '236', 'flag' => '🇨🇫' ),
|
1115 |
+
'CG' => array( 'name' => __( 'Congo', 'happyforms' ), 'code' => '242', 'flag' => '🇨🇬' ),
|
1116 |
+
'CH' => array( 'name' => __( 'Switzerland', 'happyforms' ), 'code' => '41', 'flag' => '🇨🇭' ),
|
1117 |
+
'CK' => array( 'name' => __( 'Cook Islands', 'happyforms' ), 'code' => '682', 'flag' => '🇨🇰' ),
|
1118 |
+
'CL' => array( 'name' => __( 'Chile', 'happyforms' ), 'code' => '56', 'flag' => '🇨🇱' ),
|
1119 |
+
'CM' => array( 'name' => __( 'Cameroon', 'happyforms' ), 'code' => '237', 'flag' => '🇨🇲' ),
|
1120 |
+
'CN' => array( 'name' => __( 'China', 'happyforms' ), 'code' => '86', 'flag' => '🇨🇳' ),
|
1121 |
+
'CO' => array( 'name' => __( 'Colombia', 'happyforms' ), 'code' => '57', 'flag' => '🇨🇴' ),
|
1122 |
+
'CR' => array( 'name' => __( 'Costa Rica', 'happyforms' ), 'code' => '506', 'flag' => '🇨🇷' ),
|
1123 |
+
'CU' => array( 'name' => __( 'Cuba', 'happyforms' ), 'code' => '53', 'flag' => '🇨🇺' ),
|
1124 |
+
'CV' => array( 'name' => __( 'Cape Verde', 'happyforms' ), 'code' => '238', 'flag' => '🇨🇻' ),
|
1125 |
+
'CY' => array( 'name' => __( 'Cyprus', 'happyforms' ), 'code' => '357', 'flag' => '🇨🇾' ),
|
1126 |
+
'CZ' => array( 'name' => __( 'Czech Republic', 'happyforms' ), 'code' => '420', 'flag' => '🇨🇿' ),
|
1127 |
+
'DE' => array( 'name' => __( 'Germany', 'happyforms' ), 'code' => '49', 'flag' => '🇩🇪' ),
|
1128 |
+
'DJ' => array( 'name' => __( 'Djibouti', 'happyforms' ), 'code' => '253', 'flag' => '🇩🇯' ),
|
1129 |
+
'DK' => array( 'name' => __( 'Denmark', 'happyforms' ), 'code' => '45', 'flag' => '🇩🇰' ),
|
1130 |
+
'DM' => array( 'name' => __( 'Dominica', 'happyforms' ), 'code' => '1767', 'flag' => '🇩🇲' ),
|
1131 |
+
'DO' => array( 'name' => __( 'Dominican Republic', 'happyforms' ), 'code' => '1809', 'flag' => '🇩🇴' ),
|
1132 |
+
'DZ' => array( 'name' => __( 'Algeria', 'happyforms' ), 'code' => '213', 'flag' => '🇩🇿' ),
|
1133 |
+
'EC' => array( 'name' => __( 'Ecuador', 'happyforms' ), 'code' => '593', 'flag' => '🇪🇨' ),
|
1134 |
+
'EE' => array( 'name' => __( 'Estonia', 'happyforms' ), 'code' => '372', 'flag' => '🇪🇪' ),
|
1135 |
+
'EG' => array( 'name' => __( 'Egypt', 'happyforms' ), 'code' => '20', 'flag' => '🇪🇬' ),
|
1136 |
+
'ER' => array( 'name' => __( 'Eritrea', 'happyforms' ), 'code' => '291', 'flag' => '🇪🇷' ),
|
1137 |
+
'ES' => array( 'name' => __( 'Spain', 'happyforms' ), 'code' => '34', 'flag' => '🇪🇸' ),
|
1138 |
+
'ET' => array( 'name' => __( 'Ethiopia', 'happyforms' ), 'code' => '251', 'flag' => '🇪🇹' ),
|
1139 |
+
'FI' => array( 'name' => __( 'Finland', 'happyforms' ), 'code' => '358', 'flag' => '🇫🇮' ),
|
1140 |
+
'FJ' => array( 'name' => __( 'Fiji', 'happyforms' ), 'code' => '679', 'flag' => '🇫🇯' ),
|
1141 |
+
'FK' => array( 'name' => __( 'Falkland Islands (Malvinas)', 'happyforms' ), 'code' => '500', 'flag' => '🇫🇰' ),
|
1142 |
+
'FM' => array( 'name' => __( 'Micronesia, Federated States of', 'happyforms' ), 'code' => '691', 'flag' => '🇫🇲' ),
|
1143 |
+
'FO' => array( 'name' => __( 'Faroe Islands', 'happyforms' ), 'code' => '298', 'flag' => '🇫🇴' ),
|
1144 |
+
'FR' => array( 'name' => __( 'France', 'happyforms' ), 'code' => '33', 'flag' => '🇫🇷' ),
|
1145 |
+
'GA' => array( 'name' => __( 'Gabon', 'happyforms' ), 'code' => '241', 'flag' => '🇬🇦' ),
|
1146 |
+
'GB' => array( 'name' => __( 'United Kingdom', 'happyforms' ), 'code' => '44', 'flag' => '🇬🇧' ),
|
1147 |
+
'GD' => array( 'name' => __( 'Grenada', 'happyforms' ), 'code' => '1473', 'flag' => '🇬🇩' ),
|
1148 |
+
'GE' => array( 'name' => __( 'Georgia', 'happyforms' ), 'code' => '995', 'flag' => '🇬🇪' ),
|
1149 |
+
'GH' => array( 'name' => __( 'Ghana', 'happyforms' ), 'code' => '233', 'flag' => '🇬🇭' ),
|
1150 |
+
'GI' => array( 'name' => __( 'Gibraltar', 'happyforms' ), 'code' => '350', 'flag' => '🇬🇮' ),
|
1151 |
+
'GL' => array( 'name' => __( 'Greenland', 'happyforms' ), 'code' => '299', 'flag' => '🇬🇱' ),
|
1152 |
+
'GM' => array( 'name' => __( 'Gambia', 'happyforms' ), 'code' => '220', 'flag' => '🇬🇲' ),
|
1153 |
+
'GN' => array( 'name' => __( 'Guinea', 'happyforms' ), 'code' => '224', 'flag' => '🇬🇳' ),
|
1154 |
+
'GR' => array( 'name' => __( 'Greece', 'happyforms' ), 'code' => '30', 'flag' => '🇬🇷' ),
|
1155 |
+
'GT' => array( 'name' => __( 'Guatemala', 'happyforms' ), 'code' => '502', 'flag' => '🇬🇹' ),
|
1156 |
+
'GU' => array( 'name' => __( 'Guam', 'happyforms' ), 'code' => '1671', 'flag' => '🇬🇺' ),
|
1157 |
+
'GW' => array( 'name' => __( 'Guinea-bissau', 'happyforms' ), 'code' => '245', 'flag' => '🇬🇼' ),
|
1158 |
+
'GY' => array( 'name' => __( 'Guyana', 'happyforms' ), 'code' => '592', 'flag' => '🇬🇾' ),
|
1159 |
+
'HK' => array( 'name' => __( 'Hong Kong', 'happyforms' ), 'code' => '852', 'flag' => '🇭🇰' ),
|
1160 |
+
'HN' => array( 'name' => __( 'Honduras', 'happyforms' ), 'code' => '504', 'flag' => '🇭🇳' ),
|
1161 |
+
'HR' => array( 'name' => __( 'Croatia', 'happyforms' ), 'code' => '385', 'flag' => '🇭🇷' ),
|
1162 |
+
'HT' => array( 'name' => __( 'Haiti', 'happyforms' ), 'code' => '509', 'flag' => '🇭🇹' ),
|
1163 |
+
'HU' => array( 'name' => __( 'Hungary', 'happyforms' ), 'code' => '36', 'flag' => '🇭🇺' ),
|
1164 |
+
'ID' => array( 'name' => __( 'Indonesia', 'happyforms' ), 'code' => '62', 'flag' => '🇮🇩' ),
|
1165 |
+
'IE' => array( 'name' => __( 'Ireland', 'happyforms' ), 'code' => '353', 'flag' => '🇮🇪' ),
|
1166 |
+
'IL' => array( 'name' => __( 'Israel', 'happyforms' ), 'code' => '972', 'flag' => '🇮🇱' ),
|
1167 |
+
'IN' => array( 'name' => __( 'India', 'happyforms' ), 'code' => '91', 'flag' => '🇮🇳' ),
|
1168 |
+
'IQ' => array( 'name' => __( 'Iraq', 'happyforms' ), 'code' => '964', 'flag' => '🇮🇶' ),
|
1169 |
+
'IR' => array( 'name' => __( 'Iran, Islamic Republic of', 'happyforms' ), 'code' => '98', 'flag' => '🇮🇷' ),
|
1170 |
+
'IS' => array( 'name' => __( 'Iceland', 'happyforms' ), 'code' => '354', 'flag' => '🇮🇸' ),
|
1171 |
+
'IT' => array( 'name' => __( 'Italy', 'happyforms' ), 'code' => '39', 'flag' => '🇮🇹' ),
|
1172 |
+
'JM' => array( 'name' => __( 'Jamaica', 'happyforms' ), 'code' => '1876', 'flag' => '🇯🇲' ),
|
1173 |
+
'JO' => array( 'name' => __( 'Jordan', 'happyforms' ), 'code' => '962', 'flag' => '🇯🇴' ),
|
1174 |
+
'JP' => array( 'name' => __( 'Japan', 'happyforms' ), 'code' => '81', 'flag' => '🇯🇵' ),
|
1175 |
+
'KE' => array( 'name' => __( 'Kenya', 'happyforms' ), 'code' => '254', 'flag' => '🇰🇪' ),
|
1176 |
+
'KG' => array( 'name' => __( 'Kyrgyzstan', 'happyforms' ), 'code' => '996', 'flag' => '🇰🇬' ),
|
1177 |
+
'KH' => array( 'name' => __( 'Cambodia', 'happyforms' ), 'code' => '855', 'flag' => '🇰🇭' ),
|
1178 |
+
'KI' => array( 'name' => __( 'Kiribati', 'happyforms' ), 'code' => '686', 'flag' => '🇰🇮' ),
|
1179 |
+
'KM' => array( 'name' => __( 'Comoros', 'happyforms' ), 'code' => '269', 'flag' => '🇰🇲' ),
|
1180 |
+
'KN' => array( 'name' => __( 'Saint Kitts and Nevis', 'happyforms' ), 'code' => '1869', 'flag' => '🇰🇳' ),
|
1181 |
+
'KP' => array( 'name' => __( 'Korea Democratic Peoples Republic of', 'happyforms' ), 'code' => '850', 'flag' => '🇰🇵' ),
|
1182 |
+
'KR' => array( 'name' => __( 'Korea Republic of', 'happyforms' ), 'code' => '82', 'flag' => '🇰🇷' ),
|
1183 |
+
'KW' => array( 'name' => __( 'Kuwait', 'happyforms' ), 'code' => '965', 'flag' => '🇰🇼' ),
|
1184 |
+
'KY' => array( 'name' => __( 'Cayman Islands', 'happyforms' ), 'code' => '1345', 'flag' => '🇰🇾' ),
|
1185 |
+
'LA' => array( 'name' => __( 'Lao Peoples Democratic Republic', 'happyforms' ), 'code' => '856', 'flag' => '🇱🇦' ),
|
1186 |
+
'LB' => array( 'name' => __( 'Lebanon', 'happyforms' ), 'code' => '961', 'flag' => '🇱🇧' ),
|
1187 |
+
'LC' => array( 'name' => __( 'Saint Lucia', 'happyforms' ), 'code' => '1758', 'flag' => '🇱🇨' ),
|
1188 |
+
'LI' => array( 'name' => __( 'Liechtenstein', 'happyforms' ), 'code' => '423', 'flag' => '🇱🇮' ),
|
1189 |
+
'LK' => array( 'name' => __( 'Sri Lanka', 'happyforms' ), 'code' => '94', 'flag' => '🇱🇰' ),
|
1190 |
+
'LR' => array( 'name' => __( 'Liberia', 'happyforms' ), 'code' => '231', 'flag' => '🇱🇷' ),
|
1191 |
+
'LS' => array( 'name' => __( 'Lesotho', 'happyforms' ), 'code' => '266', 'flag' => '🇱🇸' ),
|
1192 |
+
'LT' => array( 'name' => __( 'Lithuania', 'happyforms' ), 'code' => '370', 'flag' => '🇱🇹' ),
|
1193 |
+
'LU' => array( 'name' => __( 'Luxembourg', 'happyforms' ), 'code' => '352', 'flag' => '🇱🇺' ),
|
1194 |
+
'LV' => array( 'name' => __( 'Latvia', 'happyforms' ), 'code' => '371', 'flag' => '🇱🇻' ),
|
1195 |
+
'LY' => array( 'name' => __( 'Libyan Arab Jamahiriya', 'happyforms' ), 'code' => '218', 'flag' => '🇱🇾' ),
|
1196 |
+
'MA' => array( 'name' => __( 'Morocco', 'happyforms' ), 'code' => '212', 'flag' => '🇲🇦' ),
|
1197 |
+
'MC' => array( 'name' => __( 'Monaco', 'happyforms' ), 'code' => '377', 'flag' => '🇲🇨' ),
|
1198 |
+
'MD' => array( 'name' => __( 'Moldova, Republic of', 'happyforms' ), 'code' => '373', 'flag' => '🇲🇩' ),
|
1199 |
+
'ME' => array( 'name' => __( 'Montenegro', 'happyforms' ), 'code' => '382', 'flag' => '🇲🇪' ),
|
1200 |
+
'MG' => array( 'name' => __( 'Madagascar', 'happyforms' ), 'code' => '261', 'flag' => '🇲🇬' ),
|
1201 |
+
'MH' => array( 'name' => __( 'Marshall Islands', 'happyforms' ), 'code' => '692', 'flag' => '🇲🇭' ),
|
1202 |
+
'MK' => array( 'name' => __( 'Macedonia, The Former Yugoslav Republic of', 'happyforms' ), 'code' => '389', 'flag' => '🇲🇰' ),
|
1203 |
+
'ML' => array( 'name' => __( 'Mali', 'happyforms' ), 'code' => '223', 'flag' => '🇲🇱' ),
|
1204 |
+
'MM' => array( 'name' => __( 'Myanmar', 'happyforms' ), 'code' => '95', 'flag' => '🇲🇲' ),
|
1205 |
+
'MN' => array( 'name' => __( 'Mongolia', 'happyforms' ), 'code' => '976', 'flag' => '🇲🇳' ),
|
1206 |
+
'MO' => array( 'name' => __( 'Macau', 'happyforms' ), 'code' => '853', 'flag' => '🇲🇴' ),
|
1207 |
+
'MP' => array( 'name' => __( 'Northern Mariana Islands', 'happyforms' ), 'code' => '1670', 'flag' => '🇲🇵' ),
|
1208 |
+
'MR' => array( 'name' => __( 'Mauritania', 'happyforms' ), 'code' => '222', 'flag' => '🇲🇺' ),
|
1209 |
+
'MS' => array( 'name' => __( 'Montserrat', 'happyforms' ), 'code' => '1664', 'flag' => '🇲🇸' ),
|
1210 |
+
'MT' => array( 'name' => __( 'Malta', 'happyforms' ), 'code' => '356', 'flag' => '🇲🇹' ),
|
1211 |
+
'MU' => array( 'name' => __( 'Mauritius', 'happyforms' ), 'code' => '230', 'flag' => '🇲🇺' ),
|
1212 |
+
'MV' => array( 'name' => __( 'Maldives', 'happyforms' ), 'code' => '960', 'flag' => '🇲🇻' ),
|
1213 |
+
'MW' => array( 'name' => __( 'Malawi', 'happyforms' ), 'code' => '265', 'flag' => '🇲🇼' ),
|
1214 |
+
'MX' => array( 'name' => __( 'Mexico', 'happyforms' ), 'code' => '52', 'flag' => '🇲🇽' ),
|
1215 |
+
'MY' => array( 'name' => __( 'Malaysia', 'happyforms' ), 'code' => '60', 'flag' => '🇲🇾' ),
|
1216 |
+
'MZ' => array( 'name' => __( 'Mozambique', 'happyforms' ), 'code' => '258', 'flag' => '🇲🇿' ),
|
1217 |
+
'NA' => array( 'name' => __( 'Namibia', 'happyforms' ), 'code' => '264', 'flag' => '🇳🇦' ),
|
1218 |
+
'NC' => array( 'name' => __( 'New Caledonia', 'happyforms' ), 'code' => '687', 'flag' => '🇳🇨' ),
|
1219 |
+
'NE' => array( 'name' => __( 'Niger', 'happyforms' ), 'code' => '227', 'flag' => '🇳🇪' ),
|
1220 |
+
'NG' => array( 'name' => __( 'Nigeria', 'happyforms' ), 'code' => '234', 'flag' => '🇳🇬' ),
|
1221 |
+
'NI' => array( 'name' => __( 'Nicaragua', 'happyforms' ), 'code' => '505', 'flag' => '🇳🇮' ),
|
1222 |
+
'NL' => array( 'name' => __( 'Netherlands', 'happyforms' ), 'code' => '31', 'flag' => '🇳🇱' ),
|
1223 |
+
'NO' => array( 'name' => __( 'Norway', 'happyforms' ), 'code' => '47', 'flag' => '🇳🇴' ),
|
1224 |
+
'NP' => array( 'name' => __( 'Nepal', 'happyforms' ), 'code' => '977', 'flag' => '🇳🇵' ),
|
1225 |
+
'NR' => array( 'name' => __( 'Nauru', 'happyforms' ), 'code' => '674', 'flag' => '🇳🇷' ),
|
1226 |
+
'NU' => array( 'name' => __( 'Niue', 'happyforms' ), 'code' => '683', 'flag' => '🇳🇺' ),
|
1227 |
+
'NZ' => array( 'name' => __( 'New Zealand', 'happyforms' ), 'code' => '64', 'flag' => '🇳🇿' ),
|
1228 |
+
'OM' => array( 'name' => __( 'Oman', 'happyforms' ), 'code' => '968', 'flag' => '🇴🇲' ),
|
1229 |
+
'PA' => array( 'name' => __( 'Panama', 'happyforms' ), 'code' => '507', 'flag' => '🇵🇦' ),
|
1230 |
+
'PE' => array( 'name' => __( 'Peru', 'happyforms' ), 'code' => '51', 'flag' => '🇵🇪' ),
|
1231 |
+
'PF' => array( 'name' => __( 'French Polynesia', 'happyforms' ), 'code' => '689', 'flag' => '🇵🇫' ),
|
1232 |
+
'PG' => array( 'name' => __( 'Papua New Guinea', 'happyforms' ), 'code' => '675', 'flag' => '🇵🇬' ),
|
1233 |
+
'PH' => array( 'name' => __( 'Philippines', 'happyforms' ), 'code' => '63', 'flag' => '🇵🇭' ),
|
1234 |
+
'PK' => array( 'name' => __( 'Pakistan', 'happyforms' ), 'code' => '92', 'flag' => '🇵🇰' ),
|
1235 |
+
'PL' => array( 'name' => __( 'Poland', 'happyforms' ), 'code' => '48', 'flag' => '🇵🇱' ),
|
1236 |
+
'PM' => array( 'name' => __( 'Saint Pierre and Miquelon', 'happyforms' ), 'code' => '508', 'flag' => '🇵🇲' ),
|
1237 |
+
'PN' => array( 'name' => __( 'Pitcairn', 'happyforms' ), 'code' => '870', 'flag' => '🇵🇳' ),
|
1238 |
+
'PT' => array( 'name' => __( 'Portugal', 'happyforms' ), 'code' => '351', 'flag' => '🇵🇹' ),
|
1239 |
+
'PW' => array( 'name' => __( 'Palau', 'happyforms' ), 'code' => '680', 'flag' => '🇵🇼' ),
|
1240 |
+
'PY' => array( 'name' => __( 'Paraguay', 'happyforms' ), 'code' => '595', 'flag' => '🇵🇾' ),
|
1241 |
+
'QA' => array( 'name' => __( 'Qatar', 'happyforms' ), 'code' => '974', 'flag' => '🇶🇦' ),
|
1242 |
+
'RO' => array( 'name' => __( 'Romania', 'happyforms' ), 'code' => '40', 'flag' => '🇷🇴' ),
|
1243 |
+
'RS' => array( 'name' => __( 'Serbia', 'happyforms' ), 'code' => '381', 'flag' => '🇷🇸' ),
|
1244 |
+
'RU' => array( 'name' => __( 'Russian Federation', 'happyforms' ), 'code' => '7', 'flag' => '🇷🇺' ),
|
1245 |
+
'RW' => array( 'name' => __( 'Rwanda', 'happyforms' ), 'code' => '250', 'flag' => '🇷🇼' ),
|
1246 |
+
'SA' => array( 'name' => __( 'Saudi Arabia', 'happyforms' ), 'code' => '966', 'flag' => '🇸🇦' ),
|
1247 |
+
'SB' => array( 'name' => __( 'Solomon Islands', 'happyforms' ), 'code' => '677', 'flag' => '🇸🇧' ),
|
1248 |
+
'SC' => array( 'name' => __( 'Seychelles', 'happyforms' ), 'code' => '248', 'flag' => '🇸🇨' ),
|
1249 |
+
'SD' => array( 'name' => __( 'Sudan', 'happyforms' ), 'code' => '249', 'flag' => '🇸🇩' ),
|
1250 |
+
'SE' => array( 'name' => __( 'Sweden', 'happyforms' ), 'code' => '46', 'flag' => '🇸🇪' ),
|
1251 |
+
'SG' => array( 'name' => __( 'Singapore', 'happyforms' ), 'code' => '65', 'flag' => '🇸🇬' ),
|
1252 |
+
'SH' => array( 'name' => __( 'Saint Helena', 'happyforms' ), 'code' => '290', 'flag' => '🇸🇭' ),
|
1253 |
+
'SI' => array( 'name' => __( 'Slovenia', 'happyforms' ), 'code' => '386', 'flag' => '🇸🇮' ),
|
1254 |
+
'SK' => array( 'name' => __( 'Slovakia', 'happyforms' ), 'code' => '421', 'flag' => '🇸🇰' ),
|
1255 |
+
'SL' => array( 'name' => __( 'Sierra Leone', 'happyforms' ), 'code' => '232', 'flag' => '🇸🇱' ),
|
1256 |
+
'SM' => array( 'name' => __( 'San Marino', 'happyforms' ), 'code' => '378', 'flag' => '🇸🇲' ),
|
1257 |
+
'SN' => array( 'name' => __( 'Senegal', 'happyforms' ), 'code' => '221', 'flag' => '🇸🇳' ),
|
1258 |
+
'SO' => array( 'name' => __( 'Somalia', 'happyforms' ), 'code' => '252', 'flag' => '🇸🇴' ),
|
1259 |
+
'SR' => array( 'name' => __( 'Suriname', 'happyforms' ), 'code' => '597', 'flag' => '🇸🇷' ),
|
1260 |
+
'ST' => array( 'name' => __( 'Sao Tome and Principe', 'happyforms' ), 'code' => '239', 'flag' => '🇸🇹' ),
|
1261 |
+
'SV' => array( 'name' => __( 'El Salvador', 'happyforms' ), 'code' => '503', 'flag' => '🇸🇻' ),
|
1262 |
+
'SY' => array( 'name' => __( 'Syrian Arab Republic', 'happyforms' ), 'code' => '963', 'flag' => '🇸🇾' ),
|
1263 |
+
'SZ' => array( 'name' => __( 'Swaziland', 'happyforms' ), 'code' => '268', 'flag' => '🇸🇿' ),
|
1264 |
+
'TC' => array( 'name' => __( 'Turks and Caicos Islands', 'happyforms' ), 'code' => '1649', 'flag' => '🇹🇨' ),
|
1265 |
+
'TD' => array( 'name' => __( 'Chad', 'happyforms' ), 'code' => '235', 'flag' => '🇹🇩' ),
|
1266 |
+
'TG' => array( 'name' => __( 'Togo', 'happyforms' ), 'code' => '228', 'flag' => '🇹🇬' ),
|
1267 |
+
'TH' => array( 'name' => __( 'Thailand', 'happyforms' ), 'code' => '66', 'flag' => '🇹🇭' ),
|
1268 |
+
'TJ' => array( 'name' => __( 'Tajikistan', 'happyforms' ), 'code' => '992', 'flag' => '🇹🇯' ),
|
1269 |
+
'TK' => array( 'name' => __( 'Tokelau', 'happyforms' ), 'code' => '690', 'flag' => '🇹🇰' ),
|
1270 |
+
'TL' => array( 'name' => __( 'Timor-leste', 'happyforms' ), 'code' => '670', 'flag' => '🇹🇱' ),
|
1271 |
+
'TM' => array( 'name' => __( 'Turkmenistan', 'happyforms' ), 'code' => '993', 'flag' => '🇹🇲' ),
|
1272 |
+
'TN' => array( 'name' => __( 'Tunisia', 'happyforms' ), 'code' => '216', 'flag' => '🇹🇳' ),
|
1273 |
+
'TO' => array( 'name' => __( 'Tonga', 'happyforms' ), 'code' => '676', 'flag' => '🇹🇴' ),
|
1274 |
+
'TR' => array( 'name' => __( 'Turkey', 'happyforms' ), 'code' => '90', 'flag' => '🇹🇷' ),
|
1275 |
+
'TT' => array( 'name' => __( 'Trinidad and Tobago', 'happyforms' ), 'code' => '1868', 'flag' => '🇹🇹' ),
|
1276 |
+
'TV' => array( 'name' => __( 'Tuvalu', 'happyforms' ), 'code' => '688', 'flag' => '🇹🇻' ),
|
1277 |
+
'TW' => array( 'name' => __( 'Taiwan, Province of China', 'happyforms' ), 'code' => '886', 'flag' => '🇹🇼' ),
|
1278 |
+
'TZ' => array( 'name' => __( 'Tanzania, United Republic of', 'happyforms' ), 'code' => '255', 'flag' => '🇹🇿' ),
|
1279 |
+
'UA' => array( 'name' => __( 'Ukraine', 'happyforms' ), 'code' => '380', 'flag' => '🇺🇦' ),
|
1280 |
+
'UG' => array( 'name' => __( 'Uganda', 'happyforms' ), 'code' => '256', 'flag' => '🇺🇬' ),
|
1281 |
+
'US' => array( 'name' => __( 'United States', 'happyforms' ), 'code' => '1', 'flag' => '🇺🇸' ),
|
1282 |
+
'UY' => array( 'name' => __( 'Uruguay', 'happyforms' ), 'code' => '598', 'flag' => '🇺🇾' ),
|
1283 |
+
'UZ' => array( 'name' => __( 'Uzbekistan', 'happyforms' ), 'code' => '998', 'flag' => '🇺🇿' ),
|
1284 |
+
'VC' => array( 'name' => __( 'Saint Vincent and the Grenadines', 'happyforms' ), 'code' => '1784', 'flag' => '🇻🇨' ),
|
1285 |
+
'VE' => array( 'name' => __( 'Venezuela', 'happyforms' ), 'code' => '58', 'flag' => '🇻🇪' ),
|
1286 |
+
'VG' => array( 'name' => __( 'Virgin Islands, British', 'happyforms' ), 'code' => '1284', 'flag' => '🇻🇬' ),
|
1287 |
+
'VI' => array( 'name' => __( 'Virgin Islands, U.S.', 'happyforms' ), 'code' => '1340', 'flag' => '🇻🇮' ),
|
1288 |
+
'VN' => array( 'name' => __( 'Vietnam', 'happyforms' ), 'code' => '84', 'flag' => '🇻🇳' ),
|
1289 |
+
'VU' => array( 'name' => __( 'Vanuatu', 'happyforms' ), 'code' => '678', 'flag' => '🇻🇺' ),
|
1290 |
+
'WF' => array( 'name' => __( 'Wallis and Futuna', 'happyforms' ), 'code' => '681', 'flag' => '🇼🇫' ),
|
1291 |
+
'WS' => array( 'name' => __( 'Samoa', 'happyforms' ), 'code' => '685', 'flag' => '🇼🇸' ),
|
1292 |
+
'YE' => array( 'name' => __( 'Yemen', 'happyforms' ), 'code' => '967', 'flag' => '🇾🇪' ),
|
1293 |
+
'YT' => array( 'name' => __( 'Mayotte', 'happyforms' ), 'code' => '262', 'flag' => '🇾🇹' ),
|
1294 |
+
'ZA' => array( 'name' => __( 'South Africa', 'happyforms' ), 'code' => '27', 'flag' => '🇿🇦' ),
|
1295 |
+
'ZM' => array( 'name' => __( 'Zambia', 'happyforms' ), 'code' => '260', 'flag' => '🇿🇲' ),
|
1296 |
+
'ZW' => array( 'name' => __( 'Zimbabwe', 'happyforms' ), 'code' => '263', 'flag' => '🇿🇼' ),
|
1297 |
);
|
1298 |
|
1299 |
return $countries;
|
core/helpers/helper-misc.php
CHANGED
@@ -194,7 +194,7 @@ if ( ! function_exists( 'happyforms_admin_footer' ) ):
|
|
194 |
function happyforms_admin_footer() {
|
195 |
?>
|
196 |
<span id="footer-thankyou">
|
197 |
-
<?php _e( 'Thank you for creating with',
|
198 |
</span>
|
199 |
<?php
|
200 |
}
|
@@ -211,245 +211,245 @@ if ( ! function_exists( 'happyforms_get_countries' ) ):
|
|
211 |
*/
|
212 |
function happyforms_get_countries() {
|
213 |
return array(
|
214 |
-
__( 'Afghanistan',
|
215 |
-
__( 'Albania',
|
216 |
-
__( 'Algeria',
|
217 |
-
__( 'American Samoa',
|
218 |
-
__( 'Andorra',
|
219 |
-
__( 'Angola',
|
220 |
-
__( 'Anguilla',
|
221 |
-
__( 'Antarctica',
|
222 |
-
__( 'Antigua and Barbuda',
|
223 |
-
__( 'Argentina',
|
224 |
-
__( 'Armenia',
|
225 |
-
__( 'Aruba',
|
226 |
-
__( 'Australia',
|
227 |
-
__( 'Austria',
|
228 |
-
__( 'Azerbaijan',
|
229 |
-
__( 'Bahamas',
|
230 |
-
__( 'Bahrain',
|
231 |
-
__( 'Bangladesh',
|
232 |
-
__( 'Barbados',
|
233 |
-
__( 'Belarus',
|
234 |
-
__( 'Belgium',
|
235 |
-
__( 'Belize',
|
236 |
-
__( 'Benin',
|
237 |
-
__( 'Bermuda',
|
238 |
-
__( 'Bhutan',
|
239 |
-
__( 'Bolivia',
|
240 |
-
__( 'Bosnia and Herzegowina',
|
241 |
-
__( 'Botswana',
|
242 |
-
__( 'Bouvet Island',
|
243 |
-
__( 'Brazil',
|
244 |
-
__( 'British Indian Ocean Territory',
|
245 |
-
__( 'Brunei Darussalam',
|
246 |
-
__( 'Bulgaria',
|
247 |
-
__( 'Burkina Faso',
|
248 |
-
__( 'Burundi',
|
249 |
-
__( 'Cambodia',
|
250 |
-
__( 'Cameroon',
|
251 |
-
__( 'Canada',
|
252 |
-
__( 'Cape Verde',
|
253 |
-
__( 'Cayman Islands',
|
254 |
-
__( 'Central African Republic',
|
255 |
-
__( 'Chad',
|
256 |
-
__( 'Chile',
|
257 |
-
__( 'China',
|
258 |
-
__( 'Christmas Island',
|
259 |
-
__( 'Cocos (Keeling) Islands',
|
260 |
-
__( 'Colombia',
|
261 |
-
__( 'Comoros',
|
262 |
-
__( 'Congo',
|
263 |
-
__( 'Congo, the Democratic Republic of the',
|
264 |
-
__( 'Cook Islands',
|
265 |
-
__( 'Costa Rica',
|
266 |
-
__( 'Ivory Coast',
|
267 |
-
__( 'Croatia (Hrvatska)',
|
268 |
-
__( 'Cuba',
|
269 |
-
__( 'Cyprus',
|
270 |
-
__( 'Czech Republic',
|
271 |
-
__( 'Denmark',
|
272 |
-
__( 'Djibouti',
|
273 |
-
__( 'Dominica',
|
274 |
-
__( 'Dominican Republic',
|
275 |
-
__( 'East Timor',
|
276 |
-
__( 'Ecuador',
|
277 |
-
__( 'Egypt',
|
278 |
-
__( 'El Salvador',
|
279 |
-
__( 'Equatorial Guinea',
|
280 |
-
__( 'Eritrea',
|
281 |
-
__( 'Estonia',
|
282 |
-
__( 'Ethiopia',
|
283 |
-
__( 'Falkland Islands (Malvinas)',
|
284 |
-
__( 'Faroe Islands',
|
285 |
-
__( 'Fiji',
|
286 |
-
__( 'Finland',
|
287 |
-
__( 'France',
|
288 |
-
__( 'France Metropolitan',
|
289 |
-
__( 'French Guiana',
|
290 |
-
__( 'French Polynesia',
|
291 |
-
__( 'French Southern Territories',
|
292 |
-
__( 'Gabon',
|
293 |
-
__( 'Gambia',
|
294 |
-
__( 'Georgia',
|
295 |
-
__( 'Germany',
|
296 |
-
__( 'Ghana',
|
297 |
-
__( 'Gibraltar',
|
298 |
-
__( 'Greece',
|
299 |
-
__( 'Greenland',
|
300 |
-
__( 'Grenada',
|
301 |
-
__( 'Guadeloupe',
|
302 |
-
__( 'Guam',
|
303 |
-
__( 'Guatemala',
|
304 |
-
__( 'Guinea',
|
305 |
-
__( 'Guinea-Bissau',
|
306 |
-
__( 'Guyana',
|
307 |
-
__( 'Haiti',
|
308 |
-
__( 'Heard and Mc Donald Islands',
|
309 |
-
__( 'Holy See (Vatican City State)',
|
310 |
-
__( 'Honduras',
|
311 |
-
__( 'Hong Kong',
|
312 |
-
__( 'Hungary',
|
313 |
-
__( 'Iceland',
|
314 |
-
__( 'India',
|
315 |
-
__( 'Indonesia',
|
316 |
-
__( 'Iran (Islamic Republic of)',
|
317 |
-
__( 'Iraq',
|
318 |
-
__( 'Ireland',
|
319 |
-
__( 'Israel',
|
320 |
-
__( 'Italy',
|
321 |
-
__( 'Jamaica',
|
322 |
-
__( 'Japan',
|
323 |
-
__( 'Jordan',
|
324 |
-
__( 'Kazakhstan',
|
325 |
-
__( 'Kenya',
|
326 |
-
__( 'Kiribati',
|
327 |
-
__( 'Korea, Democratic People\'s Republic of',
|
328 |
-
__( 'Korea, Republic of',
|
329 |
-
__( 'Kuwait',
|
330 |
-
__( 'Kyrgyzstan',
|
331 |
-
__( 'Lao, People\'s Democratic Republic',
|
332 |
-
__( 'Latvia',
|
333 |
-
__( 'Lebanon',
|
334 |
-
__( 'Lesotho',
|
335 |
-
__( 'Liberia',
|
336 |
-
__( 'Libyan Arab Jamahiriya',
|
337 |
-
__( 'Liechtenstein',
|
338 |
-
__( 'Lithuania',
|
339 |
-
__( 'Luxembourg',
|
340 |
-
__( 'Macau',
|
341 |
-
__( 'Macedonia, The Former Yugoslav Republic of',
|
342 |
-
__( 'Madagascar',
|
343 |
-
__( 'Malawi',
|
344 |
-
__( 'Malaysia',
|
345 |
-
__( 'Maldives',
|
346 |
-
__( 'Mali',
|
347 |
-
__( 'Malta',
|
348 |
-
__( 'Marshall Islands',
|
349 |
-
__( 'Martinique',
|
350 |
-
__( 'Mauritania',
|
351 |
-
__( 'Mauritius',
|
352 |
-
__( 'Mayotte',
|
353 |
-
__( 'Mexico',
|
354 |
-
__( 'Micronesia, Federated States of',
|
355 |
-
__( 'Moldova, Republic of',
|
356 |
-
__( 'Monaco',
|
357 |
-
__( 'Mongolia',
|
358 |
-
__( 'Montserrat',
|
359 |
-
__( 'Morocco',
|
360 |
-
__( 'Mozambique',
|
361 |
-
__( 'Myanmar',
|
362 |
-
__( 'Namibia',
|
363 |
-
__( 'Nauru',
|
364 |
-
__( 'Nepal',
|
365 |
-
__( 'Netherlands',
|
366 |
-
__( 'Netherlands Antilles',
|
367 |
-
__( 'New Caledonia',
|
368 |
-
__( 'New Zealand',
|
369 |
-
__( 'Nicaragua',
|
370 |
-
__( 'Niger',
|
371 |
-
__( 'Nigeria',
|
372 |
-
__( 'Niue',
|
373 |
-
__( 'Norfolk Island',
|
374 |
-
__( 'Northern Mariana Islands',
|
375 |
-
__( 'Norway',
|
376 |
-
__( 'Oman',
|
377 |
-
__( 'Pakistan',
|
378 |
-
__( 'Palau',
|
379 |
-
__( 'Panama',
|
380 |
-
__( 'Papua New Guinea',
|
381 |
-
__( 'Paraguay',
|
382 |
-
__( 'Peru',
|
383 |
-
__( 'Philippines',
|
384 |
-
__( 'Pitcairn',
|
385 |
-
__( 'Poland',
|
386 |
-
__( 'Portugal',
|
387 |
-
__( 'Puerto Rico',
|
388 |
-
__( 'Qatar',
|
389 |
-
__( 'Reunion',
|
390 |
-
__( 'Romania',
|
391 |
-
__( 'Russian Federation',
|
392 |
-
__( 'Rwanda',
|
393 |
-
__( 'Saint Kitts and Nevis',
|
394 |
-
__( 'Saint Lucia',
|
395 |
-
__( 'Saint Vincent and the Grenadines',
|
396 |
-
__( 'Samoa',
|
397 |
-
__( 'San Marino',
|
398 |
-
__( 'Sao Tome and Principe',
|
399 |
-
__( 'Saudi Arabia',
|
400 |
-
__( 'Senegal',
|
401 |
-
__( 'Seychelles',
|
402 |
-
__( 'Sierra Leone',
|
403 |
-
__( 'Singapore',
|
404 |
-
__( 'Slovakia (Slovak Republic)',
|
405 |
-
__( 'Slovenia',
|
406 |
-
__( 'Solomon Islands',
|
407 |
-
__( 'Somalia',
|
408 |
-
__( 'South Africa',
|
409 |
-
__( 'South Georgia and the South Sandwich Islands',
|
410 |
-
__( 'Spain',
|
411 |
-
__( 'Sri Lanka',
|
412 |
-
__( 'St. Helena',
|
413 |
-
__( 'St. Pierre and Miquelon',
|
414 |
-
__( 'Sudan',
|
415 |
-
__( 'Suriname',
|
416 |
-
__( 'Svalbard and Jan Mayen Islands',
|
417 |
-
__( 'Swaziland',
|
418 |
-
__( 'Sweden',
|
419 |
-
__( 'Switzerland',
|
420 |
-
__( 'Syrian Arab Republic',
|
421 |
-
__( 'Taiwan, Province of China',
|
422 |
-
__( 'Tajikistan',
|
423 |
-
__( 'Tanzania, United Republic of',
|
424 |
-
__( 'Thailand',
|
425 |
-
__( 'Togo',
|
426 |
-
__( 'Tokelau',
|
427 |
-
__( 'Tonga',
|
428 |
-
__( 'Trinidad and Tobago',
|
429 |
-
__( 'Tunisia',
|
430 |
-
__( 'Turkey',
|
431 |
-
__( 'Turkmenistan',
|
432 |
-
__( 'Turks and Caicos Islands',
|
433 |
-
__( 'Tuvalu',
|
434 |
-
__( 'Uganda',
|
435 |
-
__( 'Ukraine',
|
436 |
-
__( 'United Arab Emirates',
|
437 |
-
__( 'United Kingdom',
|
438 |
-
__( 'United States',
|
439 |
-
__( 'United States Minor Outlying Islands',
|
440 |
-
__( 'Uruguay',
|
441 |
-
__( 'Uzbekistan',
|
442 |
-
__( 'Vanuatu',
|
443 |
-
__( 'Venezuela',
|
444 |
-
__( 'Vietnam',
|
445 |
-
__( 'Virgin Islands (British)',
|
446 |
-
__( 'Virgin Islands (U.S.)',
|
447 |
-
__( 'Wallis and Futuna Islands',
|
448 |
-
__( 'Western Sahara',
|
449 |
-
__( 'Yemen',
|
450 |
-
__( 'Yugoslavia',
|
451 |
-
__( 'Zambia',
|
452 |
-
__( 'Zimbabwe',
|
453 |
);
|
454 |
}
|
455 |
|
@@ -640,7 +640,7 @@ endif;
|
|
640 |
if ( ! function_exists( 'happyforms_get_message_title' ) ):
|
641 |
|
642 |
function happyforms_get_message_title( $message_id ) {
|
643 |
-
$title = sprintf( __( 'Response #%s',
|
644 |
|
645 |
return $title;
|
646 |
}
|
@@ -699,142 +699,142 @@ if ( ! function_exists( 'happyforms_get_php_locales' ) ):
|
|
699 |
|
700 |
function happyforms_get_php_locales( $code = '' ) {
|
701 |
$locales = array(
|
702 |
-
'af' => __( 'Afrikaans',
|
703 |
-
'ak' => __( 'Akan',
|
704 |
-
'sq' => __( 'Albanian',
|
705 |
-
'arq' => __( 'Algerian Arabic',
|
706 |
-
'am' => __( 'Amharic',
|
707 |
-
'ar' => __( 'Arabic',
|
708 |
-
'hy' => __( 'Armenian',
|
709 |
-
'rup' => __( 'Aromanian',
|
710 |
-
'frp' => __( 'Arpitan',
|
711 |
-
'as' => __( 'Assamese',
|
712 |
-
'az' => __( 'Azerbaijani',
|
713 |
-
'bcc' => __( 'Balochi Southern',
|
714 |
-
'ba' => __( 'Bashkir',
|
715 |
-
'eu' => __( 'Basque',
|
716 |
-
'bel' => __( 'Belarusian',
|
717 |
-
'bn' => __( 'Bengali',
|
718 |
-
'bs' => __( 'Bosnian',
|
719 |
-
'br' => __( 'Breton',
|
720 |
-
'bg' => __( 'Bulgarian',
|
721 |
-
'ca' => __( 'Catalan',
|
722 |
-
'ceb' => __( 'Cebuano',
|
723 |
-
'zh' => __( 'Chinese',
|
724 |
-
'co' => __( 'Corsican',
|
725 |
-
'hr' => __( 'Croatian',
|
726 |
-
'cs' => __( 'Czech',
|
727 |
-
'da' => __( 'Danish',
|
728 |
-
'dv' => __( 'Dhivehi',
|
729 |
-
'nl' => __( 'Dutch',
|
730 |
-
'dzo' => __( 'Dzongkha',
|
731 |
-
'en' => __( 'English',
|
732 |
-
'eo' => __( 'Esperanto',
|
733 |
-
'et' => __( 'Estonian',
|
734 |
-
'fo' => __( 'Faroese',
|
735 |
-
'fi' => __( 'Finnish',
|
736 |
-
'fr' => __( 'French',
|
737 |
-
'fy' => __( 'Frisian',
|
738 |
-
'fur' => __( 'Friulian',
|
739 |
-
'fuc' => __( 'Fulah',
|
740 |
-
'gl' => __( 'Galician',
|
741 |
-
'ka' => __( 'Georgian',
|
742 |
-
'de' => __( 'German',
|
743 |
-
'el' => __( 'Greek',
|
744 |
-
'kal' => __( 'Greenlandic',
|
745 |
-
'gn' => __( 'Guaraní',
|
746 |
-
'gu' => __( 'Gujarati',
|
747 |
-
'haw' => __( 'Hawaiian',
|
748 |
-
'haz' => __( 'Hazaragi',
|
749 |
-
'he' => __( 'Hebrew',
|
750 |
-
'hi' => __( 'Hindi',
|
751 |
-
'hu' => __( 'Hungarian',
|
752 |
-
'is' => __( 'Icelandic',
|
753 |
-
'ido' => __( 'Ido',
|
754 |
-
'id' => __( 'Indonesian',
|
755 |
-
'ga' => __( 'Irish',
|
756 |
-
'it' => __( 'Italian',
|
757 |
-
'ja' => __( 'Japanese',
|
758 |
-
'jv' => __( 'Javanese',
|
759 |
-
'kab' => __( 'Kabyle',
|
760 |
-
'kn' => __( 'Kannada',
|
761 |
-
'kk' => __( 'Kazakh',
|
762 |
-
'km' => __( 'Khmer',
|
763 |
-
'kin' => __( 'Kinyarwanda',
|
764 |
-
'ky' => __( 'Kirghiz',
|
765 |
-
'ko' => __( 'Korean',
|
766 |
-
'ckb' => __( 'Kurdish',
|
767 |
-
'lo' => __( 'Lao',
|
768 |
-
'lv' => __( 'Latvian',
|
769 |
-
'li' => __( 'Limburgish',
|
770 |
-
'lin' => __( 'Lingala',
|
771 |
-
'lt' => __( 'Lithuanian',
|
772 |
-
'lb' => __( 'Luxembourgish',
|
773 |
-
'mk' => __( 'Macedonian',
|
774 |
-
'mg' => __( 'Malagasy',
|
775 |
-
'ms' => __( 'Malay',
|
776 |
-
'ml' => __( 'Malayalam',
|
777 |
-
'mri' => __( 'Maori',
|
778 |
-
'mr' => __( 'Marathi',
|
779 |
-
'xmf' => __( 'Mingrelian',
|
780 |
-
'mn' => __( 'Mongolian',
|
781 |
-
'me' => __( 'Montenegrin',
|
782 |
-
'ary' => __( 'Moroccan Arabic',
|
783 |
-
'mya' => __( 'Myanmar (Burmese)',
|
784 |
-
'ne' => __( 'Nepali',
|
785 |
-
'nb' => __( 'Norwegian (Bokmål)',
|
786 |
-
'nn' => __( 'Norwegian (Nynorsk)',
|
787 |
-
'oci' => __( 'Occitan',
|
788 |
-
'ory' => __( 'Oriya',
|
789 |
-
'os' => __( 'Ossetic',
|
790 |
-
'ps' => __( 'Pashto',
|
791 |
-
'fa' => __( 'Persian',
|
792 |
-
'pl' => __( 'Polish',
|
793 |
-
'pt' => __( 'Portuguese',
|
794 |
-
'pa' => __( 'Punjabi',
|
795 |
-
'rhg' => __( 'Rohingya',
|
796 |
-
'ro' => __( 'Romanian',
|
797 |
-
'roh' => __( 'Romansh Vallader',
|
798 |
-
'ru' => __( 'Russian',
|
799 |
-
'rue' => __( 'Rusyn',
|
800 |
-
'sah' => __( 'Sakha',
|
801 |
-
'sa' => __( 'Sanskrit',
|
802 |
-
'srd' => __( 'Sardinian',
|
803 |
-
'gd' => __( 'Scottish Gaelic',
|
804 |
-
'sr' => __( 'Serbian',
|
805 |
-
'szl' => __( 'Silesian',
|
806 |
-
'snd' => __( 'Sindhi',
|
807 |
-
'si' => __( 'Sinhala',
|
808 |
-
'sk' => __( 'Slovak',
|
809 |
-
'sl' => __( 'Slovenian',
|
810 |
-
'so' => __( 'Somali',
|
811 |
-
'azb' => __( 'South Azerbaijani',
|
812 |
-
'es' => __( 'Spanish',
|
813 |
-
'su' => __( 'Sundanese',
|
814 |
-
'sw' => __( 'Swahili',
|
815 |
-
'sv' => __( 'Swedish',
|
816 |
-
'gsw' => __( 'Swiss German',
|
817 |
-
'tl' => __( 'Tagalog',
|
818 |
-
'tah' => __( 'Tahitian',
|
819 |
-
'tg' => __( 'Tajik',
|
820 |
-
'tzm' => __( 'Tamazight',
|
821 |
-
'ta' => __( 'Tamil',
|
822 |
-
'tt' => __( 'Tatar',
|
823 |
-
'te' => __( 'Telugu',
|
824 |
-
'th' => __( 'Thai',
|
825 |
-
'bo' => __( 'Tibetan',
|
826 |
-
'tir' => __( 'Tigrinya',
|
827 |
-
'tr' => __( 'Turkish',
|
828 |
-
'tuk' => __( 'Turkmen',
|
829 |
-
'twd' => __( 'Tweants',
|
830 |
-
'ug' => __( 'Uighur',
|
831 |
-
'uk' => __( 'Ukrainian',
|
832 |
-
'ur' => __( 'Urdu',
|
833 |
-
'uz' => __( 'Uzbek',
|
834 |
-
'vi' => __( 'Vietnamese',
|
835 |
-
'wa' => __( 'Walloon',
|
836 |
-
'cy' => __( 'Welsh',
|
837 |
-
'yor' => __( 'Yoruba',
|
838 |
);
|
839 |
|
840 |
if ( empty( $code ) ) {
|
@@ -896,18 +896,18 @@ if ( ! function_exists( 'happyforms_customize_part_width_control' ) ) :
|
|
896 |
function happyforms_customize_part_width_control() {
|
897 |
?>
|
898 |
<p>
|
899 |
-
<label for="<%= instance.id %>_width"><?php _e( 'Width',
|
900 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
901 |
-
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full',
|
902 |
-
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half',
|
903 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third',
|
904 |
-
<option value="quarter"<%= (instance.width == 'quarter') ? ' selected' : '' %>><?php _e( 'Quarter',
|
905 |
-
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto',
|
906 |
</select>
|
907 |
</p>
|
908 |
<p class="width-options" style="display: none">
|
909 |
<label>
|
910 |
-
<input type="checkbox" class="checkbox apply-all-check" value="" data-apply-to="width" /> <?php _e( 'Apply to all parts',
|
911 |
</label>
|
912 |
</p>
|
913 |
<?php
|
194 |
function happyforms_admin_footer() {
|
195 |
?>
|
196 |
<span id="footer-thankyou">
|
197 |
+
<?php _e( 'Thank you for creating with', 'happyforms' ); ?> <a href="https://happyforms.me/" target="_blank">HappyForms</a>.
|
198 |
</span>
|
199 |
<?php
|
200 |
}
|
211 |
*/
|
212 |
function happyforms_get_countries() {
|
213 |
return array(
|
214 |
+
__( 'Afghanistan', 'happyforms' ),
|
215 |
+
__( 'Albania', 'happyforms' ),
|
216 |
+
__( 'Algeria', 'happyforms' ),
|
217 |
+
__( 'American Samoa', 'happyforms' ),
|
218 |
+
__( 'Andorra', 'happyforms' ),
|
219 |
+
__( 'Angola', 'happyforms' ),
|
220 |
+
__( 'Anguilla', 'happyforms' ),
|
221 |
+
__( 'Antarctica', 'happyforms' ),
|
222 |
+
__( 'Antigua and Barbuda', 'happyforms' ),
|
223 |
+
__( 'Argentina', 'happyforms' ),
|
224 |
+
__( 'Armenia', 'happyforms' ),
|
225 |
+
__( 'Aruba', 'happyforms' ),
|
226 |
+
__( 'Australia', 'happyforms' ),
|
227 |
+
__( 'Austria', 'happyforms' ),
|
228 |
+
__( 'Azerbaijan', 'happyforms' ),
|
229 |
+
__( 'Bahamas', 'happyforms' ),
|
230 |
+
__( 'Bahrain', 'happyforms' ),
|
231 |
+
__( 'Bangladesh', 'happyforms' ),
|
232 |
+
__( 'Barbados', 'happyforms' ),
|
233 |
+
__( 'Belarus', 'happyforms' ),
|
234 |
+
__( 'Belgium', 'happyforms' ),
|
235 |
+
__( 'Belize', 'happyforms' ),
|
236 |
+
__( 'Benin', 'happyforms' ),
|
237 |
+
__( 'Bermuda', 'happyforms' ),
|
238 |
+
__( 'Bhutan', 'happyforms' ),
|
239 |
+
__( 'Bolivia', 'happyforms' ),
|
240 |
+
__( 'Bosnia and Herzegowina', 'happyforms' ),
|
241 |
+
__( 'Botswana', 'happyforms' ),
|
242 |
+
__( 'Bouvet Island', 'happyforms' ),
|
243 |
+
__( 'Brazil', 'happyforms' ),
|
244 |
+
__( 'British Indian Ocean Territory', 'happyforms' ),
|
245 |
+
__( 'Brunei Darussalam', 'happyforms' ),
|
246 |
+
__( 'Bulgaria', 'happyforms' ),
|
247 |
+
__( 'Burkina Faso', 'happyforms' ),
|
248 |
+
__( 'Burundi', 'happyforms' ),
|
249 |
+
__( 'Cambodia', 'happyforms' ),
|
250 |
+
__( 'Cameroon', 'happyforms' ),
|
251 |
+
__( 'Canada', 'happyforms' ),
|
252 |
+
__( 'Cape Verde', 'happyforms' ),
|
253 |
+
__( 'Cayman Islands', 'happyforms' ),
|
254 |
+
__( 'Central African Republic', 'happyforms' ),
|
255 |
+
__( 'Chad', 'happyforms' ),
|
256 |
+
__( 'Chile', 'happyforms' ),
|
257 |
+
__( 'China', 'happyforms' ),
|
258 |
+
__( 'Christmas Island', 'happyforms' ),
|
259 |
+
__( 'Cocos (Keeling) Islands', 'happyforms' ),
|
260 |
+
__( 'Colombia', 'happyforms' ),
|
261 |
+
__( 'Comoros', 'happyforms' ),
|
262 |
+
__( 'Congo', 'happyforms' ),
|
263 |
+
__( 'Congo, the Democratic Republic of the', 'happyforms' ),
|
264 |
+
__( 'Cook Islands', 'happyforms' ),
|
265 |
+
__( 'Costa Rica', 'happyforms' ),
|
266 |
+
__( 'Ivory Coast', 'happyforms' ),
|
267 |
+
__( 'Croatia (Hrvatska)', 'happyforms' ),
|
268 |
+
__( 'Cuba', 'happyforms' ),
|
269 |
+
__( 'Cyprus', 'happyforms' ),
|
270 |
+
__( 'Czech Republic', 'happyforms' ),
|
271 |
+
__( 'Denmark', 'happyforms' ),
|
272 |
+
__( 'Djibouti', 'happyforms' ),
|
273 |
+
__( 'Dominica', 'happyforms' ),
|
274 |
+
__( 'Dominican Republic', 'happyforms' ),
|
275 |
+
__( 'East Timor', 'happyforms' ),
|
276 |
+
__( 'Ecuador', 'happyforms' ),
|
277 |
+
__( 'Egypt', 'happyforms' ),
|
278 |
+
__( 'El Salvador', 'happyforms' ),
|
279 |
+
__( 'Equatorial Guinea', 'happyforms' ),
|
280 |
+
__( 'Eritrea', 'happyforms' ),
|
281 |
+
__( 'Estonia', 'happyforms' ),
|
282 |
+
__( 'Ethiopia', 'happyforms' ),
|
283 |
+
__( 'Falkland Islands (Malvinas)', 'happyforms' ),
|
284 |
+
__( 'Faroe Islands', 'happyforms' ),
|
285 |
+
__( 'Fiji', 'happyforms' ),
|
286 |
+
__( 'Finland', 'happyforms' ),
|
287 |
+
__( 'France', 'happyforms' ),
|
288 |
+
__( 'France Metropolitan', 'happyforms' ),
|
289 |
+
__( 'French Guiana', 'happyforms' ),
|
290 |
+
__( 'French Polynesia', 'happyforms' ),
|
291 |
+
__( 'French Southern Territories', 'happyforms' ),
|
292 |
+
__( 'Gabon', 'happyforms' ),
|
293 |
+
__( 'Gambia', 'happyforms' ),
|
294 |
+
__( 'Georgia', 'happyforms' ),
|
295 |
+
__( 'Germany', 'happyforms' ),
|
296 |
+
__( 'Ghana', 'happyforms' ),
|
297 |
+
__( 'Gibraltar', 'happyforms' ),
|
298 |
+
__( 'Greece', 'happyforms' ),
|
299 |
+
__( 'Greenland', 'happyforms' ),
|
300 |
+
__( 'Grenada', 'happyforms' ),
|
301 |
+
__( 'Guadeloupe', 'happyforms' ),
|
302 |
+
__( 'Guam', 'happyforms' ),
|
303 |
+
__( 'Guatemala', 'happyforms' ),
|
304 |
+
__( 'Guinea', 'happyforms' ),
|
305 |
+
__( 'Guinea-Bissau', 'happyforms' ),
|
306 |
+
__( 'Guyana', 'happyforms' ),
|
307 |
+
__( 'Haiti', 'happyforms' ),
|
308 |
+
__( 'Heard and Mc Donald Islands', 'happyforms' ),
|
309 |
+
__( 'Holy See (Vatican City State)', 'happyforms' ),
|
310 |
+
__( 'Honduras', 'happyforms' ),
|
311 |
+
__( 'Hong Kong', 'happyforms' ),
|
312 |
+
__( 'Hungary', 'happyforms' ),
|
313 |
+
__( 'Iceland', 'happyforms' ),
|
314 |
+
__( 'India', 'happyforms' ),
|
315 |
+
__( 'Indonesia', 'happyforms' ),
|
316 |
+
__( 'Iran (Islamic Republic of)', 'happyforms' ),
|
317 |
+
__( 'Iraq', 'happyforms' ),
|
318 |
+
__( 'Ireland', 'happyforms' ),
|
319 |
+
__( 'Israel', 'happyforms' ),
|
320 |
+
__( 'Italy', 'happyforms' ),
|
321 |
+
__( 'Jamaica', 'happyforms' ),
|
322 |
+
__( 'Japan', 'happyforms' ),
|
323 |
+
__( 'Jordan', 'happyforms' ),
|
324 |
+
__( 'Kazakhstan', 'happyforms' ),
|
325 |
+
__( 'Kenya', 'happyforms' ),
|
326 |
+
__( 'Kiribati', 'happyforms' ),
|
327 |
+
__( 'Korea, Democratic People\'s Republic of', 'happyforms' ),
|
328 |
+
__( 'Korea, Republic of', 'happyforms' ),
|
329 |
+
__( 'Kuwait', 'happyforms' ),
|
330 |
+
__( 'Kyrgyzstan', 'happyforms' ),
|
331 |
+
__( 'Lao, People\'s Democratic Republic', 'happyforms' ),
|
332 |
+
__( 'Latvia', 'happyforms' ),
|
333 |
+
__( 'Lebanon', 'happyforms' ),
|
334 |
+
__( 'Lesotho', 'happyforms' ),
|
335 |
+
__( 'Liberia', 'happyforms' ),
|
336 |
+
__( 'Libyan Arab Jamahiriya', 'happyforms' ),
|
337 |
+
__( 'Liechtenstein', 'happyforms' ),
|
338 |
+
__( 'Lithuania', 'happyforms' ),
|
339 |
+
__( 'Luxembourg', 'happyforms' ),
|
340 |
+
__( 'Macau', 'happyforms' ),
|
341 |
+
__( 'Macedonia, The Former Yugoslav Republic of', 'happyforms' ),
|
342 |
+
__( 'Madagascar', 'happyforms' ),
|
343 |
+
__( 'Malawi', 'happyforms' ),
|
344 |
+
__( 'Malaysia', 'happyforms' ),
|
345 |
+
__( 'Maldives', 'happyforms' ),
|
346 |
+
__( 'Mali', 'happyforms' ),
|
347 |
+
__( 'Malta', 'happyforms' ),
|
348 |
+
__( 'Marshall Islands', 'happyforms' ),
|
349 |
+
__( 'Martinique', 'happyforms' ),
|
350 |
+
__( 'Mauritania', 'happyforms' ),
|
351 |
+
__( 'Mauritius', 'happyforms' ),
|
352 |
+
__( 'Mayotte', 'happyforms' ),
|
353 |
+
__( 'Mexico', 'happyforms' ),
|
354 |
+
__( 'Micronesia, Federated States of', 'happyforms' ),
|
355 |
+
__( 'Moldova, Republic of', 'happyforms' ),
|
356 |
+
__( 'Monaco', 'happyforms' ),
|
357 |
+
__( 'Mongolia', 'happyforms' ),
|
358 |
+
__( 'Montserrat', 'happyforms' ),
|
359 |
+
__( 'Morocco', 'happyforms' ),
|
360 |
+
__( 'Mozambique', 'happyforms' ),
|
361 |
+
__( 'Myanmar', 'happyforms' ),
|
362 |
+
__( 'Namibia', 'happyforms' ),
|
363 |
+
__( 'Nauru', 'happyforms' ),
|
364 |
+
__( 'Nepal', 'happyforms' ),
|
365 |
+
__( 'Netherlands', 'happyforms' ),
|
366 |
+
__( 'Netherlands Antilles', 'happyforms' ),
|
367 |
+
__( 'New Caledonia', 'happyforms' ),
|
368 |
+
__( 'New Zealand', 'happyforms' ),
|
369 |
+
__( 'Nicaragua', 'happyforms' ),
|
370 |
+
__( 'Niger', 'happyforms' ),
|
371 |
+
__( 'Nigeria', 'happyforms' ),
|
372 |
+
__( 'Niue', 'happyforms' ),
|
373 |
+
__( 'Norfolk Island', 'happyforms' ),
|
374 |
+
__( 'Northern Mariana Islands', 'happyforms' ),
|
375 |
+
__( 'Norway', 'happyforms' ),
|
376 |
+
__( 'Oman', 'happyforms' ),
|
377 |
+
__( 'Pakistan', 'happyforms' ),
|
378 |
+
__( 'Palau', 'happyforms' ),
|
379 |
+
__( 'Panama', 'happyforms' ),
|
380 |
+
__( 'Papua New Guinea', 'happyforms' ),
|
381 |
+
__( 'Paraguay', 'happyforms' ),
|
382 |
+
__( 'Peru', 'happyforms' ),
|
383 |
+
__( 'Philippines', 'happyforms' ),
|
384 |
+
__( 'Pitcairn', 'happyforms' ),
|
385 |
+
__( 'Poland', 'happyforms' ),
|
386 |
+
__( 'Portugal', 'happyforms' ),
|
387 |
+
__( 'Puerto Rico', 'happyforms' ),
|
388 |
+
__( 'Qatar', 'happyforms' ),
|
389 |
+
__( 'Reunion', 'happyforms' ),
|
390 |
+
__( 'Romania', 'happyforms' ),
|
391 |
+
__( 'Russian Federation', 'happyforms' ),
|
392 |
+
__( 'Rwanda', 'happyforms' ),
|
393 |
+
__( 'Saint Kitts and Nevis', 'happyforms' ),
|
394 |
+
__( 'Saint Lucia', 'happyforms' ),
|
395 |
+
__( 'Saint Vincent and the Grenadines', 'happyforms' ),
|
396 |
+
__( 'Samoa', 'happyforms' ),
|
397 |
+
__( 'San Marino', 'happyforms' ),
|
398 |
+
__( 'Sao Tome and Principe', 'happyforms' ),
|
399 |
+
__( 'Saudi Arabia', 'happyforms' ),
|
400 |
+
__( 'Senegal', 'happyforms' ),
|
401 |
+
__( 'Seychelles', 'happyforms' ),
|
402 |
+
__( 'Sierra Leone', 'happyforms' ),
|
403 |
+
__( 'Singapore', 'happyforms' ),
|
404 |
+
__( 'Slovakia (Slovak Republic)', 'happyforms' ),
|
405 |
+
__( 'Slovenia', 'happyforms' ),
|
406 |
+
__( 'Solomon Islands', 'happyforms' ),
|
407 |
+
__( 'Somalia', 'happyforms' ),
|
408 |
+
__( 'South Africa', 'happyforms' ),
|
409 |
+
__( 'South Georgia and the South Sandwich Islands', 'happyforms' ),
|
410 |
+
__( 'Spain', 'happyforms' ),
|
411 |
+
__( 'Sri Lanka', 'happyforms' ),
|
412 |
+
__( 'St. Helena', 'happyforms' ),
|
413 |
+
__( 'St. Pierre and Miquelon', 'happyforms' ),
|
414 |
+
__( 'Sudan', 'happyforms' ),
|
415 |
+
__( 'Suriname', 'happyforms' ),
|
416 |
+
__( 'Svalbard and Jan Mayen Islands', 'happyforms' ),
|
417 |
+
__( 'Swaziland', 'happyforms' ),
|
418 |
+
__( 'Sweden', 'happyforms' ),
|
419 |
+
__( 'Switzerland', 'happyforms' ),
|
420 |
+
__( 'Syrian Arab Republic', 'happyforms' ),
|
421 |
+
__( 'Taiwan, Province of China', 'happyforms' ),
|
422 |
+
__( 'Tajikistan', 'happyforms' ),
|
423 |
+
__( 'Tanzania, United Republic of', 'happyforms' ),
|
424 |
+
__( 'Thailand', 'happyforms' ),
|
425 |
+
__( 'Togo', 'happyforms' ),
|
426 |
+
__( 'Tokelau', 'happyforms' ),
|
427 |
+
__( 'Tonga', 'happyforms' ),
|
428 |
+
__( 'Trinidad and Tobago', 'happyforms' ),
|
429 |
+
__( 'Tunisia', 'happyforms' ),
|
430 |
+
__( 'Turkey', 'happyforms' ),
|
431 |
+
__( 'Turkmenistan', 'happyforms' ),
|
432 |
+
__( 'Turks and Caicos Islands', 'happyforms' ),
|
433 |
+
__( 'Tuvalu', 'happyforms' ),
|
434 |
+
__( 'Uganda', 'happyforms' ),
|
435 |
+
__( 'Ukraine', 'happyforms' ),
|
436 |
+
__( 'United Arab Emirates', 'happyforms' ),
|
437 |
+
__( 'United Kingdom', 'happyforms' ),
|
438 |
+
__( 'United States', 'happyforms' ),
|
439 |
+
__( 'United States Minor Outlying Islands', 'happyforms' ),
|
440 |
+
__( 'Uruguay', 'happyforms' ),
|
441 |
+
__( 'Uzbekistan', 'happyforms' ),
|
442 |
+
__( 'Vanuatu', 'happyforms' ),
|
443 |
+
__( 'Venezuela', 'happyforms' ),
|
444 |
+
__( 'Vietnam', 'happyforms' ),
|
445 |
+
__( 'Virgin Islands (British)', 'happyforms' ),
|
446 |
+
__( 'Virgin Islands (U.S.)', 'happyforms' ),
|
447 |
+
__( 'Wallis and Futuna Islands', 'happyforms' ),
|
448 |
+
__( 'Western Sahara', 'happyforms' ),
|
449 |
+
__( 'Yemen', 'happyforms' ),
|
450 |
+
__( 'Yugoslavia', 'happyforms' ),
|
451 |
+
__( 'Zambia', 'happyforms' ),
|
452 |
+
__( 'Zimbabwe', 'happyforms' ),
|
453 |
);
|
454 |
}
|
455 |
|
640 |
if ( ! function_exists( 'happyforms_get_message_title' ) ):
|
641 |
|
642 |
function happyforms_get_message_title( $message_id ) {
|
643 |
+
$title = sprintf( __( 'Response #%s', 'happyforms' ), $message_id );
|
644 |
|
645 |
return $title;
|
646 |
}
|
699 |
|
700 |
function happyforms_get_php_locales( $code = '' ) {
|
701 |
$locales = array(
|
702 |
+
'af' => __( 'Afrikaans', 'happyforms' ),
|
703 |
+
'ak' => __( 'Akan', 'happyforms' ),
|
704 |
+
'sq' => __( 'Albanian', 'happyforms' ),
|
705 |
+
'arq' => __( 'Algerian Arabic', 'happyforms' ),
|
706 |
+
'am' => __( 'Amharic', 'happyforms' ),
|
707 |
+
'ar' => __( 'Arabic', 'happyforms' ),
|
708 |
+
'hy' => __( 'Armenian', 'happyforms' ),
|
709 |
+
'rup' => __( 'Aromanian', 'happyforms' ),
|
710 |
+
'frp' => __( 'Arpitan', 'happyforms' ),
|
711 |
+
'as' => __( 'Assamese', 'happyforms' ),
|
712 |
+
'az' => __( 'Azerbaijani', 'happyforms' ),
|
713 |
+
'bcc' => __( 'Balochi Southern', 'happyforms' ),
|
714 |
+
'ba' => __( 'Bashkir', 'happyforms' ),
|
715 |
+
'eu' => __( 'Basque', 'happyforms' ),
|
716 |
+
'bel' => __( 'Belarusian', 'happyforms' ),
|
717 |
+
'bn' => __( 'Bengali', 'happyforms' ),
|
718 |
+
'bs' => __( 'Bosnian', 'happyforms' ),
|
719 |
+
'br' => __( 'Breton', 'happyforms' ),
|
720 |
+
'bg' => __( 'Bulgarian', 'happyforms' ),
|
721 |
+
'ca' => __( 'Catalan', 'happyforms' ),
|
722 |
+
'ceb' => __( 'Cebuano', 'happyforms' ),
|
723 |
+
'zh' => __( 'Chinese', 'happyforms' ),
|
724 |
+
'co' => __( 'Corsican', 'happyforms' ),
|
725 |
+
'hr' => __( 'Croatian', 'happyforms' ),
|
726 |
+
'cs' => __( 'Czech', 'happyforms' ),
|
727 |
+
'da' => __( 'Danish', 'happyforms' ),
|
728 |
+
'dv' => __( 'Dhivehi', 'happyforms' ),
|
729 |
+
'nl' => __( 'Dutch', 'happyforms' ),
|
730 |
+
'dzo' => __( 'Dzongkha', 'happyforms' ),
|
731 |
+
'en' => __( 'English', 'happyforms' ),
|
732 |
+
'eo' => __( 'Esperanto', 'happyforms' ),
|
733 |
+
'et' => __( 'Estonian', 'happyforms' ),
|
734 |
+
'fo' => __( 'Faroese', 'happyforms' ),
|
735 |
+
'fi' => __( 'Finnish', 'happyforms' ),
|
736 |
+
'fr' => __( 'French', 'happyforms' ),
|
737 |
+
'fy' => __( 'Frisian', 'happyforms' ),
|
738 |
+
'fur' => __( 'Friulian', 'happyforms' ),
|
739 |
+
'fuc' => __( 'Fulah', 'happyforms' ),
|
740 |
+
'gl' => __( 'Galician', 'happyforms' ),
|
741 |
+
'ka' => __( 'Georgian', 'happyforms' ),
|
742 |
+
'de' => __( 'German', 'happyforms' ),
|
743 |
+
'el' => __( 'Greek', 'happyforms' ),
|
744 |
+
'kal' => __( 'Greenlandic', 'happyforms' ),
|
745 |
+
'gn' => __( 'Guaraní', 'happyforms' ),
|
746 |
+
'gu' => __( 'Gujarati', 'happyforms' ),
|
747 |
+
'haw' => __( 'Hawaiian', 'happyforms' ),
|
748 |
+
'haz' => __( 'Hazaragi', 'happyforms' ),
|
749 |
+
'he' => __( 'Hebrew', 'happyforms' ),
|
750 |
+
'hi' => __( 'Hindi', 'happyforms' ),
|
751 |
+
'hu' => __( 'Hungarian', 'happyforms' ),
|
752 |
+
'is' => __( 'Icelandic', 'happyforms' ),
|
753 |
+
'ido' => __( 'Ido', 'happyforms' ),
|
754 |
+
'id' => __( 'Indonesian', 'happyforms' ),
|
755 |
+
'ga' => __( 'Irish', 'happyforms' ),
|
756 |
+
'it' => __( 'Italian', 'happyforms' ),
|
757 |
+
'ja' => __( 'Japanese', 'happyforms' ),
|
758 |
+
'jv' => __( 'Javanese', 'happyforms' ),
|
759 |
+
'kab' => __( 'Kabyle', 'happyforms' ),
|
760 |
+
'kn' => __( 'Kannada', 'happyforms' ),
|
761 |
+
'kk' => __( 'Kazakh', 'happyforms' ),
|
762 |
+
'km' => __( 'Khmer', 'happyforms' ),
|
763 |
+
'kin' => __( 'Kinyarwanda', 'happyforms' ),
|
764 |
+
'ky' => __( 'Kirghiz', 'happyforms' ),
|
765 |
+
'ko' => __( 'Korean', 'happyforms' ),
|
766 |
+
'ckb' => __( 'Kurdish', 'happyforms' ),
|
767 |
+
'lo' => __( 'Lao', 'happyforms' ),
|
768 |
+
'lv' => __( 'Latvian', 'happyforms' ),
|
769 |
+
'li' => __( 'Limburgish', 'happyforms' ),
|
770 |
+
'lin' => __( 'Lingala', 'happyforms' ),
|
771 |
+
'lt' => __( 'Lithuanian', 'happyforms' ),
|
772 |
+
'lb' => __( 'Luxembourgish', 'happyforms' ),
|
773 |
+
'mk' => __( 'Macedonian', 'happyforms' ),
|
774 |
+
'mg' => __( 'Malagasy', 'happyforms' ),
|
775 |
+
'ms' => __( 'Malay', 'happyforms' ),
|
776 |
+
'ml' => __( 'Malayalam', 'happyforms' ),
|
777 |
+
'mri' => __( 'Maori', 'happyforms' ),
|
778 |
+
'mr' => __( 'Marathi', 'happyforms' ),
|
779 |
+
'xmf' => __( 'Mingrelian', 'happyforms' ),
|
780 |
+
'mn' => __( 'Mongolian', 'happyforms' ),
|
781 |
+
'me' => __( 'Montenegrin', 'happyforms' ),
|
782 |
+
'ary' => __( 'Moroccan Arabic', 'happyforms' ),
|
783 |
+
'mya' => __( 'Myanmar (Burmese)', 'happyforms' ),
|
784 |
+
'ne' => __( 'Nepali', 'happyforms' ),
|
785 |
+
'nb' => __( 'Norwegian (Bokmål)', 'happyforms' ),
|
786 |
+
'nn' => __( 'Norwegian (Nynorsk)', 'happyforms' ),
|
787 |
+
'oci' => __( 'Occitan', 'happyforms' ),
|
788 |
+
'ory' => __( 'Oriya', 'happyforms' ),
|
789 |
+
'os' => __( 'Ossetic', 'happyforms' ),
|
790 |
+
'ps' => __( 'Pashto', 'happyforms' ),
|
791 |
+
'fa' => __( 'Persian', 'happyforms' ),
|
792 |
+
'pl' => __( 'Polish', 'happyforms' ),
|
793 |
+
'pt' => __( 'Portuguese', 'happyforms' ),
|
794 |
+
'pa' => __( 'Punjabi', 'happyforms' ),
|
795 |
+
'rhg' => __( 'Rohingya', 'happyforms' ),
|
796 |
+
'ro' => __( 'Romanian', 'happyforms' ),
|
797 |
+
'roh' => __( 'Romansh Vallader', 'happyforms' ),
|
798 |
+
'ru' => __( 'Russian', 'happyforms' ),
|
799 |
+
'rue' => __( 'Rusyn', 'happyforms' ),
|
800 |
+
'sah' => __( 'Sakha', 'happyforms' ),
|
801 |
+
'sa' => __( 'Sanskrit', 'happyforms' ),
|
802 |
+
'srd' => __( 'Sardinian', 'happyforms' ),
|
803 |
+
'gd' => __( 'Scottish Gaelic', 'happyforms' ),
|
804 |
+
'sr' => __( 'Serbian', 'happyforms' ),
|
805 |
+
'szl' => __( 'Silesian', 'happyforms' ),
|
806 |
+
'snd' => __( 'Sindhi', 'happyforms' ),
|
807 |
+
'si' => __( 'Sinhala', 'happyforms' ),
|
808 |
+
'sk' => __( 'Slovak', 'happyforms' ),
|
809 |
+
'sl' => __( 'Slovenian', 'happyforms' ),
|
810 |
+
'so' => __( 'Somali', 'happyforms' ),
|
811 |
+
'azb' => __( 'South Azerbaijani', 'happyforms' ),
|
812 |
+
'es' => __( 'Spanish', 'happyforms' ),
|
813 |
+
'su' => __( 'Sundanese', 'happyforms' ),
|
814 |
+
'sw' => __( 'Swahili', 'happyforms' ),
|
815 |
+
'sv' => __( 'Swedish', 'happyforms' ),
|
816 |
+
'gsw' => __( 'Swiss German', 'happyforms' ),
|
817 |
+
'tl' => __( 'Tagalog', 'happyforms' ),
|
818 |
+
'tah' => __( 'Tahitian', 'happyforms' ),
|
819 |
+
'tg' => __( 'Tajik', 'happyforms' ),
|
820 |
+
'tzm' => __( 'Tamazight', 'happyforms' ),
|
821 |
+
'ta' => __( 'Tamil', 'happyforms' ),
|
822 |
+
'tt' => __( 'Tatar', 'happyforms' ),
|
823 |
+
'te' => __( 'Telugu', 'happyforms' ),
|
824 |
+
'th' => __( 'Thai', 'happyforms' ),
|
825 |
+
'bo' => __( 'Tibetan', 'happyforms' ),
|
826 |
+
'tir' => __( 'Tigrinya', 'happyforms' ),
|
827 |
+
'tr' => __( 'Turkish', 'happyforms' ),
|
828 |
+
'tuk' => __( 'Turkmen', 'happyforms' ),
|
829 |
+
'twd' => __( 'Tweants', 'happyforms' ),
|
830 |
+
'ug' => __( 'Uighur', 'happyforms' ),
|
831 |
+
'uk' => __( 'Ukrainian', 'happyforms' ),
|
832 |
+
'ur' => __( 'Urdu', 'happyforms' ),
|
833 |
+
'uz' => __( 'Uzbek', 'happyforms' ),
|
834 |
+
'vi' => __( 'Vietnamese', 'happyforms' ),
|
835 |
+
'wa' => __( 'Walloon', 'happyforms' ),
|
836 |
+
'cy' => __( 'Welsh', 'happyforms' ),
|
837 |
+
'yor' => __( 'Yoruba', 'happyforms' ),
|
838 |
);
|
839 |
|
840 |
if ( empty( $code ) ) {
|
896 |
function happyforms_customize_part_width_control() {
|
897 |
?>
|
898 |
<p>
|
899 |
+
<label for="<%= instance.id %>_width"><?php _e( 'Width', 'happyforms' ); ?></label>
|
900 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
901 |
+
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
902 |
+
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
903 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
904 |
+
<option value="quarter"<%= (instance.width == 'quarter') ? ' selected' : '' %>><?php _e( 'Quarter', 'happyforms' ); ?></option>
|
905 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
906 |
</select>
|
907 |
</p>
|
908 |
<p class="width-options" style="display: none">
|
909 |
<label>
|
910 |
+
<input type="checkbox" class="checkbox apply-all-check" value="" data-apply-to="width" /> <?php _e( 'Apply to all parts', 'happyforms' ); ?>
|
911 |
</label>
|
912 |
</p>
|
913 |
<?php
|
core/templates/admin-form-modal.php
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
<div>
|
3 |
<select class="happyforms-dialog__select" id="happyforms-dialog-select">
|
4 |
<?php $forms = $this->get_form_data_array(); ?>
|
5 |
-
<option value=""><?php _e( 'Choose a form',
|
6 |
<?php foreach ( $forms as $form ) : ?>
|
7 |
<option value="<?php echo $form['id']; ?>"><?php echo $form['title']; ?></option>
|
8 |
<?php endforeach; ?>
|
9 |
</select>
|
10 |
</div>
|
11 |
|
12 |
-
<button class="button-primary happyforms-dialog__button"><?php _e( 'Insert',
|
13 |
-
</div>
|
2 |
<div>
|
3 |
<select class="happyforms-dialog__select" id="happyforms-dialog-select">
|
4 |
<?php $forms = $this->get_form_data_array(); ?>
|
5 |
+
<option value=""><?php _e( 'Choose a form', 'happyforms' ); ?></option>
|
6 |
<?php foreach ( $forms as $form ) : ?>
|
7 |
<option value="<?php echo $form['id']; ?>"><?php echo $form['title']; ?></option>
|
8 |
<?php endforeach; ?>
|
9 |
</select>
|
10 |
</div>
|
11 |
|
12 |
+
<button class="button-primary happyforms-dialog__button"><?php _e( 'Insert', 'happyforms' ); ?></button>
|
13 |
+
</div>
|
core/templates/admin-tracking.php
CHANGED
@@ -9,17 +9,17 @@ $status = $tracking->get_status();
|
|
9 |
<?php if ( 3 === intval( $status['status'] ) ) {
|
10 |
$tracking->print_template( 'success' );
|
11 |
} else { ?>
|
12 |
-
<h1><?php _e( 'Add your email to complete setup',
|
13 |
-
<p class="description"><?php _e( 'Let\'s set up HappyForms! Enter your email below to agree to notification and to share some data about your usage with',
|
14 |
<form action="<?php echo esc_attr( $tracking->monitor_action ); ?>" method="post" id="happyforms-tracking">
|
15 |
-
<input name="<?php echo esc_attr( $tracking->monitor_email_field ); ?>" type="email" placeholder="<?php _e( 'Email address',
|
16 |
-
<button type="submit" class="button button-primary button-hero button-block"><?php _e( 'Allow and set up HappyForms',
|
17 |
</form>
|
18 |
<?php } ?>
|
19 |
</div>
|
20 |
</div>
|
21 |
|
22 |
<?php if ( 2 === $status['status'] ) : ?>
|
23 |
-
<p class="welcome-panel-footer"><?php _e( 'Or, skip this step and ',
|
24 |
<?php endif; ?>
|
25 |
</div>
|
9 |
<?php if ( 3 === intval( $status['status'] ) ) {
|
10 |
$tracking->print_template( 'success' );
|
11 |
} else { ?>
|
12 |
+
<h1><?php _e( 'Add your email to complete setup', 'happyforms' ); ?>…</h1>
|
13 |
+
<p class="description"><?php _e( 'Let\'s set up HappyForms! Enter your email below to agree to notification and to share some data about your usage with', 'happyforms' ); ?> <a href="https://thethemefoundry.com" target="_blank">thethemefoundry.com</a>.</p>
|
14 |
<form action="<?php echo esc_attr( $tracking->monitor_action ); ?>" method="post" id="happyforms-tracking">
|
15 |
+
<input name="<?php echo esc_attr( $tracking->monitor_email_field ); ?>" type="email" placeholder="<?php _e( 'Email address', 'happyforms' ); ?>" required >
|
16 |
+
<button type="submit" class="button button-primary button-hero button-block"><?php _e( 'Allow and set up HappyForms', 'happyforms' ); ?></button>
|
17 |
</form>
|
18 |
<?php } ?>
|
19 |
</div>
|
20 |
</div>
|
21 |
|
22 |
<?php if ( 2 === $status['status'] ) : ?>
|
23 |
+
<p class="welcome-panel-footer"><?php _e( 'Or, skip this step and ', 'happyforms' ); ?> <a href="<?php echo happyforms_get_all_form_link(); ?>" id="happyforms-tracking-skip"><?php _e( 'continue', 'happyforms' ); ?></a></p>
|
24 |
<?php endif; ?>
|
25 |
</div>
|
core/templates/customize-controls/setup/alert-email-subject.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div class="customize-control" id="customize-control-<?php echo $control['field']; ?>">
|
2 |
<label for="<?php echo $control['field']; ?>" class="customize-control-title"><?php echo $control['label']; ?> <?php if ( isset( $control['tooltip'] ) ) : ?><i class="dashicons dashicons-editor-help" aria-hidden="true" data-pointer><span><?php echo $control['tooltip']; ?></span></i><?php endif; ?></label>
|
3 |
<input type="text" id="<?php echo $control['field']; ?>" value="<%= <?php echo $control['field']; ?> %>" data-attribute="<?php echo $control['field']; ?>" data-pointer-target />
|
4 |
-
<p class="description"><span></span> <?php _e( 'part value is currently used as subject',
|
5 |
</div>
|
1 |
<div class="customize-control" id="customize-control-<?php echo $control['field']; ?>">
|
2 |
<label for="<?php echo $control['field']; ?>" class="customize-control-title"><?php echo $control['label']; ?> <?php if ( isset( $control['tooltip'] ) ) : ?><i class="dashicons dashicons-editor-help" aria-hidden="true" data-pointer><span><?php echo $control['tooltip']; ?></span></i><?php endif; ?></label>
|
3 |
<input type="text" id="<?php echo $control['field']; ?>" value="<%= <?php echo $control['field']; ?> %>" data-attribute="<?php echo $control['field']; ?>" data-pointer-target />
|
4 |
+
<p class="description"><span></span> <?php _e( 'part value is currently used as subject', 'happyforms' ); ?>
|
5 |
</div>
|
core/templates/customize-controls/style/divider.php
CHANGED
@@ -7,10 +7,10 @@
|
|
7 |
<ul>
|
8 |
<li class="panel-meta customize-info accordion-section">
|
9 |
<button class="customize-panel-back" tabindex="0">
|
10 |
-
<span class="screen-reader-text"><?php _e( 'Back',
|
11 |
</button>
|
12 |
<div class="accordion-section-title">
|
13 |
-
<span class="preview-notice"><?php _e( 'You are customizing',
|
14 |
</div>
|
15 |
</li>
|
16 |
<?php if ( isset( $control['description'] ) ) : ?>
|
7 |
<ul>
|
8 |
<li class="panel-meta customize-info accordion-section">
|
9 |
<button class="customize-panel-back" tabindex="0">
|
10 |
+
<span class="screen-reader-text"><?php _e( 'Back', 'happyforms' ); ?></span>
|
11 |
</button>
|
12 |
<div class="accordion-section-title">
|
13 |
+
<span class="preview-notice"><?php _e( 'You are customizing', 'happyforms' ); ?> <strong class="panel-title"><?php echo $control['label']; ?></strong></span>
|
14 |
</div>
|
15 |
</li>
|
16 |
<?php if ( isset( $control['description'] ) ) : ?>
|
core/templates/customize-form-build.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
<script type="text/template" id="happyforms-form-build-template">
|
2 |
<div class="happyforms-stack-view">
|
3 |
<div class="customize-control">
|
4 |
-
<label for="" class="customize-control-title"><?php _e( 'Title',
|
5 |
-
<input type="text" name="post_title" value="<%= post_title %>" id="happyforms-form-name" placeholder="<?php _e( 'Add title',
|
6 |
</div>
|
7 |
|
8 |
<div class="customize-control">
|
9 |
<div class="happyforms-parts-placeholder">
|
10 |
-
<p><?php _e( 'Add parts here to appear in your form.',
|
11 |
</div>
|
12 |
<div class="happyforms-form-widgets"></div>
|
13 |
-
<button type="button" class="button add-new-widget happyforms-add-new-part"><?php _e( 'Add a Part',
|
14 |
</div>
|
15 |
</div>
|
16 |
</script>
|
1 |
<script type="text/template" id="happyforms-form-build-template">
|
2 |
<div class="happyforms-stack-view">
|
3 |
<div class="customize-control">
|
4 |
+
<label for="" class="customize-control-title"><?php _e( 'Title', 'happyforms' ); ?></label>
|
5 |
+
<input type="text" name="post_title" value="<%= post_title %>" id="happyforms-form-name" placeholder="<?php _e( 'Add title', 'happyforms' ); ?>">
|
6 |
</div>
|
7 |
|
8 |
<div class="customize-control">
|
9 |
<div class="happyforms-parts-placeholder">
|
10 |
+
<p><?php _e( 'Add parts here to appear in your form.', 'happyforms' ); ?></p>
|
11 |
</div>
|
12 |
<div class="happyforms-form-widgets"></div>
|
13 |
+
<button type="button" class="button add-new-widget happyforms-add-new-part"><?php _e( 'Add a Part', 'happyforms' ); ?></button>
|
14 |
</div>
|
15 |
</div>
|
16 |
</script>
|
core/templates/customize-form-item.php
CHANGED
@@ -15,23 +15,23 @@
|
|
15 |
<div class="happyforms-widget-content">
|
16 |
<ul class="form-actions">
|
17 |
<li>
|
18 |
-
<a href="#" data-href="form/<%= ID %>/build" class="form-action-link form-action-build-link"><?php _e( 'Add Part',
|
19 |
</li>
|
20 |
<li>
|
21 |
-
<a href="#" data-href="form/<%= ID %>" class="form-action-link form-action-setup-link"><?php _e( 'Setup',
|
22 |
</li>
|
23 |
<li>
|
24 |
-
<a href="#" data-href="form/<%= ID %>/style" class="form-action-link form-action-style-link"><?php _e( 'Style',
|
25 |
</li>
|
26 |
<li>
|
27 |
-
<a href="#" data-href="form/<%= ID %>" class="form-action-link form-action-duplicate-link"><?php _e( 'Duplicate',
|
28 |
</li>
|
29 |
</ul>
|
30 |
</div>
|
31 |
<div class="happyforms-widget-footer">
|
32 |
<div class="happyforms-widget-actions">
|
33 |
-
<a href="#" data-href="form/<%= ID %>/remove" class="happyforms-form-remove"><?php _e( 'Delete',
|
34 |
-
<a href="#" data-href="form/<%= ID %>" class="happyforms-form-preview"><?php _e( 'Preview',
|
35 |
</div>
|
36 |
</div>
|
37 |
</div>
|
15 |
<div class="happyforms-widget-content">
|
16 |
<ul class="form-actions">
|
17 |
<li>
|
18 |
+
<a href="#" data-href="form/<%= ID %>/build" class="form-action-link form-action-build-link"><?php _e( 'Add Part', 'happyforms' ); ?></a>
|
19 |
</li>
|
20 |
<li>
|
21 |
+
<a href="#" data-href="form/<%= ID %>" class="form-action-link form-action-setup-link"><?php _e( 'Setup', 'happyforms' ); ?></a>
|
22 |
</li>
|
23 |
<li>
|
24 |
+
<a href="#" data-href="form/<%= ID %>/style" class="form-action-link form-action-style-link"><?php _e( 'Style', 'happyforms' ); ?></a>
|
25 |
</li>
|
26 |
<li>
|
27 |
+
<a href="#" data-href="form/<%= ID %>" class="form-action-link form-action-duplicate-link"><?php _e( 'Duplicate', 'happyforms' ); ?></a>
|
28 |
</li>
|
29 |
</ul>
|
30 |
</div>
|
31 |
<div class="happyforms-widget-footer">
|
32 |
<div class="happyforms-widget-actions">
|
33 |
+
<a href="#" data-href="form/<%= ID %>/remove" class="happyforms-form-remove"><?php _e( 'Delete', 'happyforms' ); ?></a> |
|
34 |
+
<a href="#" data-href="form/<%= ID %>" class="happyforms-form-preview"><?php _e( 'Preview', 'happyforms' ); ?></a>
|
35 |
</div>
|
36 |
</div>
|
37 |
</div>
|
core/templates/customize-form-part-footer.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
</div>
|
2 |
<div class="happyforms-widget-actions">
|
3 |
-
<a href="#" class="happyforms-form-part-remove"><?php _e( 'Delete',
|
4 |
-
<a href="#" class="happyforms-form-part-duplicate"><?php _e( 'Duplicate',
|
5 |
-
<a href="#" class="happyforms-form-part-advanced-settings"><?php _e( 'More',
|
6 |
-
<a href="#" class="happyforms-form-part-logic"><?php _e( 'Logic',
|
7 |
</div>
|
8 |
</div>
|
9 |
</div>
|
1 |
</div>
|
2 |
<div class="happyforms-widget-actions">
|
3 |
+
<a href="#" class="happyforms-form-part-remove"><?php _e( 'Delete', 'happyforms' ); ?></a> |
|
4 |
+
<a href="#" class="happyforms-form-part-duplicate"><?php _e( 'Duplicate', 'happyforms' ); ?></a>
|
5 |
+
<a href="#" class="happyforms-form-part-advanced-settings"><?php _e( 'More', 'happyforms' ); ?></a>
|
6 |
+
<a href="#" class="happyforms-form-part-logic"><?php _e( 'Logic', 'happyforms' ); ?></a>
|
7 |
</div>
|
8 |
</div>
|
9 |
</div>
|
core/templates/customize-form-part-logic.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div class="no-parts no-parts--show no-parts--small">
|
2 |
-
<h3><?php _e( 'Logic',
|
3 |
|
4 |
-
<p class="description"><a href="https://happyforms.me/upgrade" target="_blank" class="external"><?php _e( 'Upgrade to add logic rule',
|
5 |
</div>
|
1 |
<div class="no-parts no-parts--show no-parts--small">
|
2 |
+
<h3><?php _e( 'Logic', 'happyforms' ); ?></h3>
|
3 |
|
4 |
+
<p class="description"><a href="https://happyforms.me/upgrade" target="_blank" class="external"><?php _e( 'Upgrade to add logic rule', 'happyforms' ); ?></a></p>
|
5 |
</div>
|
core/templates/customize-form-parts-drawer.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
<div id="happyforms-parts-drawer">
|
3 |
<div class="happyforms-parts-drawer-header">
|
4 |
<div class="happyforms-parts-drawer-header-search">
|
5 |
-
<input type="text" placeholder="<?php _e( 'Search parts',
|
6 |
<div class="happyforms-parts-drawer-header-search-icon"></div>
|
7 |
-
<button type="button" class="happyforms-clear-search"><span class="screen-reader-text"><?php _e( 'Clear Results',
|
8 |
</div>
|
9 |
</div>
|
10 |
<ul class="happyforms-parts-list">
|
@@ -27,7 +27,7 @@
|
|
27 |
<div class="happyforms-parts-list-item-title">
|
28 |
<h3><%= part.label %></h3>
|
29 |
<% if ( isDummy ) { %>
|
30 |
-
<a href="https://happyforms.me/upgrade" target="_blank"><?php _e( 'Upgrade',
|
31 |
<% } %>
|
32 |
</div>
|
33 |
<div class="happyforms-parts-list-item-description"><%= part.description %></div>
|
@@ -36,7 +36,7 @@
|
|
36 |
<% } %>
|
37 |
</ul>
|
38 |
<div class="happyforms-parts-drawer-not-found">
|
39 |
-
<p><?php _e( 'No parts found.',
|
40 |
</div>
|
41 |
</div>
|
42 |
-
</script>
|
2 |
<div id="happyforms-parts-drawer">
|
3 |
<div class="happyforms-parts-drawer-header">
|
4 |
<div class="happyforms-parts-drawer-header-search">
|
5 |
+
<input type="text" placeholder="<?php _e( 'Search parts', 'happyforms' ); ?>…" id="part-search">
|
6 |
<div class="happyforms-parts-drawer-header-search-icon"></div>
|
7 |
+
<button type="button" class="happyforms-clear-search"><span class="screen-reader-text"><?php _e( 'Clear Results', 'happyforms' ); ?></span></button>
|
8 |
</div>
|
9 |
</div>
|
10 |
<ul class="happyforms-parts-list">
|
27 |
<div class="happyforms-parts-list-item-title">
|
28 |
<h3><%= part.label %></h3>
|
29 |
<% if ( isDummy ) { %>
|
30 |
+
<a href="https://happyforms.me/upgrade" target="_blank"><?php _e( 'Upgrade', 'happyforms' ); ?></a>
|
31 |
<% } %>
|
32 |
</div>
|
33 |
<div class="happyforms-parts-list-item-description"><%= part.description %></div>
|
36 |
<% } %>
|
37 |
</ul>
|
38 |
<div class="happyforms-parts-drawer-not-found">
|
39 |
+
<p><?php _e( 'No parts found.', 'happyforms' ); ?></p>
|
40 |
</div>
|
41 |
</div>
|
42 |
+
</script>
|
core/templates/customize-form-setup-logic.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<div class="happyforms-setup-logic-wrap">
|
2 |
<div class="happyforms-logic-view">
|
3 |
-
<a href="https://happyforms.me/upgrade" class="external" target="_blank"><?php _e( 'Upgrade to add logic rule',
|
4 |
</div>
|
5 |
</div>
|
1 |
<div class="happyforms-setup-logic-wrap">
|
2 |
<div class="happyforms-logic-view">
|
3 |
+
<a href="https://happyforms.me/upgrade" class="external" target="_blank"><?php _e( 'Upgrade to add logic rule', 'happyforms' ); ?></a>
|
4 |
</div>
|
5 |
</div>
|
core/templates/customize-form-steps.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<script type="text/template" id="happyforms-form-steps-template">
|
2 |
<nav class="nav-tab-wrapper">
|
3 |
-
<a href="#" class="nav-tab<%= ( 'build' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="build"><?php _e( 'Build',
|
4 |
-
<a href="#" class="nav-tab<%= ( 'setup' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="setup"><?php _e( 'Setup',
|
5 |
-
<a href="#" class="nav-tab<%= ( 'email' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="email"><?php _e( 'Email',
|
6 |
-
<a href="#" class="nav-tab<%= ( 'style' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="style"><?php _e( 'Style',
|
7 |
</nav>
|
8 |
</script>
|
1 |
<script type="text/template" id="happyforms-form-steps-template">
|
2 |
<nav class="nav-tab-wrapper">
|
3 |
+
<a href="#" class="nav-tab<%= ( 'build' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="build"><?php _e( 'Build', 'happyforms' ); ?></a>
|
4 |
+
<a href="#" class="nav-tab<%= ( 'setup' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="setup"><?php _e( 'Setup', 'happyforms' ); ?></a>
|
5 |
+
<a href="#" class="nav-tab<%= ( 'email' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="email"><?php _e( 'Email', 'happyforms' ); ?></a>
|
6 |
+
<a href="#" class="nav-tab<%= ( 'style' === happyForms.currentRoute ) ? ' nav-tab-active' : '' %>" data-step="style"><?php _e( 'Style', 'happyforms' ); ?></a>
|
7 |
</nav>
|
8 |
</script>
|
core/templates/customize-header-actions.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
<div id="happyforms-save-button-wrapper" class="customize-save-button-wrapper">
|
3 |
<%
|
4 |
var buttonLabels = {
|
5 |
-
"saveNew" : "<?php _e( 'Save',
|
6 |
-
"saveExisting" : "<?php _e( 'Update',
|
7 |
-
"savedNew" : "<?php _e( 'Saved',
|
8 |
-
"savedExisting" : "<?php _e( 'Updated',
|
9 |
};
|
10 |
|
11 |
var saveLabel = buttonLabels.saveNew;
|
@@ -18,8 +18,8 @@
|
|
18 |
%>
|
19 |
<button id="happyforms-save-button" class="button-primary button" aria-label="<%= saveLabel %>" aria-expanded="false" disabled="disabled" data-text-saved="<%= savedLabel %>" data-text-default="<%= saveLabel %>"><%= saveLabel %></button>
|
20 |
</div>
|
21 |
-
<a href="<?php echo esc_url( $wp_customize->get_return_url() ); ?>" id="happyforms-close-link" data-message="<?php _e( 'The changes you made will be lost if you navigate away from this page.',
|
22 |
-
<span class="screen-reader-text"><?php _e( 'Close',
|
23 |
</a>
|
24 |
|
25 |
<div id="happyforms-steps-nav">
|
2 |
<div id="happyforms-save-button-wrapper" class="customize-save-button-wrapper">
|
3 |
<%
|
4 |
var buttonLabels = {
|
5 |
+
"saveNew" : "<?php _e( 'Save', 'happyforms' ); ?>",
|
6 |
+
"saveExisting" : "<?php _e( 'Update', 'happyforms' ); ?>",
|
7 |
+
"savedNew" : "<?php _e( 'Saved', 'happyforms' ); ?>",
|
8 |
+
"savedExisting" : "<?php _e( 'Updated', 'happyforms' ); ?>"
|
9 |
};
|
10 |
|
11 |
var saveLabel = buttonLabels.saveNew;
|
18 |
%>
|
19 |
<button id="happyforms-save-button" class="button-primary button" aria-label="<%= saveLabel %>" aria-expanded="false" disabled="disabled" data-text-saved="<%= savedLabel %>" data-text-default="<%= saveLabel %>"><%= saveLabel %></button>
|
20 |
</div>
|
21 |
+
<a href="<?php echo esc_url( $wp_customize->get_return_url() ); ?>" id="happyforms-close-link" data-message="<?php _e( 'The changes you made will be lost if you navigate away from this page.', 'happyforms' ); ?>">
|
22 |
+
<span class="screen-reader-text"><?php _e( 'Close', 'happyforms' ); ?></span>
|
23 |
</a>
|
24 |
|
25 |
<div id="happyforms-steps-nav">
|
core/templates/parts/customize-checkbox.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
<script type="text/template" id="customize-happyforms-checkbox-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
14 |
</select>
|
15 |
</p>
|
16 |
<p>
|
17 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
18 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
19 |
</p>
|
20 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
21 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
22 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
23 |
-
<option value=""><?php _e( 'Standard',
|
24 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
25 |
</select>
|
26 |
</p>
|
27 |
|
@@ -29,28 +29,28 @@
|
|
29 |
|
30 |
<div class="options">
|
31 |
<ul class="option-list"></ul>
|
32 |
-
<h3><?php _e( 'Choices',
|
33 |
-
<p class="no-options description"><?php _e( 'No choices added yet. Add one by clicking <i>Add Choice</i> below.',
|
34 |
</div>
|
35 |
<div class="options-import">
|
36 |
-
<h3><?php _e( 'Choices',
|
37 |
<textarea class="option-import-area" cols="30" rows="10" placeholder="<?php _e( 'Type or paste your choices here, adding each on a new line.' ); ?>"></textarea>
|
38 |
</div>
|
39 |
<p class="links mode-manual">
|
40 |
-
<a href="#" class="button add-option"><?php _e( 'Add choice',
|
41 |
<span class="centered">
|
42 |
-
<a href="#" class="import-options"><?php _e( 'Or, bulk add choices',
|
43 |
</span>
|
44 |
</p>
|
45 |
<p class="links mode-import">
|
46 |
-
<a href="#" class="button import-option"><?php _e( 'Add choices',
|
47 |
<span class="centered">
|
48 |
-
<a href="#" class="add-options"><?php _e( 'Cancel',
|
49 |
</span>
|
50 |
</p>
|
51 |
<p>
|
52 |
<label>
|
53 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
54 |
</label>
|
55 |
</p>
|
56 |
|
@@ -61,7 +61,7 @@
|
|
61 |
|
62 |
<p>
|
63 |
<label>
|
64 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.show_select_all ) { %>checked="checked"<% } %> data-bind="show_select_all" /> <?php _e( 'Add \'select all\' choice',
|
65 |
</label>
|
66 |
</p>
|
67 |
<p>
|
@@ -82,24 +82,24 @@
|
|
82 |
</select>
|
83 |
</p>
|
84 |
<p>
|
85 |
-
<label for="<%= instance.id %>_width"><?php _e( 'Width',
|
86 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
87 |
-
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full',
|
88 |
-
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half',
|
89 |
-
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third',
|
90 |
-
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto',
|
91 |
</select>
|
92 |
</p>
|
93 |
<p class="width-options" style="display: none">
|
94 |
<label>
|
95 |
-
<input type="checkbox" class="checkbox apply-all-check" value="" /> <?php _e( 'Apply to all parts',
|
96 |
</label>
|
97 |
</p>
|
98 |
|
99 |
<?php do_action( 'happyforms_part_customize_checkbox_after_advanced_options' ); ?>
|
100 |
|
101 |
<p>
|
102 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
103 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
104 |
</p>
|
105 |
</div>
|
@@ -117,17 +117,17 @@
|
|
117 |
<div class="happyforms-part-item-body">
|
118 |
<div class="happyforms-part-item-handle"></div>
|
119 |
<label>
|
120 |
-
<?php _e( 'Label',
|
121 |
<input type="text" class="widefat" name="label" value="<%= label %>">
|
122 |
</label>
|
123 |
<div class="happyforms-part-item-advanced">
|
124 |
<label>
|
125 |
-
<input type="checkbox" name="is_default" value="1" <% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default',
|
126 |
</label>
|
127 |
</div>
|
128 |
<div class="option-actions">
|
129 |
-
<a href="#" class="delete-option"><?php _e( 'Delete',
|
130 |
-
<a href="#" class="advanced-option"><?php _e( 'More',
|
131 |
</div>
|
132 |
</div>
|
133 |
</li>
|
1 |
<script type="text/template" id="customize-happyforms-checkbox-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
14 |
</select>
|
15 |
</p>
|
16 |
<p>
|
17 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
18 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
19 |
</p>
|
20 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
21 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
22 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
23 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
24 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
25 |
</select>
|
26 |
</p>
|
27 |
|
29 |
|
30 |
<div class="options">
|
31 |
<ul class="option-list"></ul>
|
32 |
+
<h3><?php _e( 'Choices', 'happyforms' ); ?></h3>
|
33 |
+
<p class="no-options description"><?php _e( 'No choices added yet. Add one by clicking <i>Add Choice</i> below.', 'happyforms' ); ?></p>
|
34 |
</div>
|
35 |
<div class="options-import">
|
36 |
+
<h3><?php _e( 'Choices', 'happyforms' ); ?></h3>
|
37 |
<textarea class="option-import-area" cols="30" rows="10" placeholder="<?php _e( 'Type or paste your choices here, adding each on a new line.' ); ?>"></textarea>
|
38 |
</div>
|
39 |
<p class="links mode-manual">
|
40 |
+
<a href="#" class="button add-option"><?php _e( 'Add choice', 'happyforms' ); ?></a>
|
41 |
<span class="centered">
|
42 |
+
<a href="#" class="import-options"><?php _e( 'Or, bulk add choices', 'happyforms' ); ?></a>
|
43 |
</span>
|
44 |
</p>
|
45 |
<p class="links mode-import">
|
46 |
+
<a href="#" class="button import-option"><?php _e( 'Add choices', 'happyforms' ); ?></a>
|
47 |
<span class="centered">
|
48 |
+
<a href="#" class="add-options"><?php _e( 'Cancel', 'happyforms' ); ?></a>
|
49 |
</span>
|
50 |
</p>
|
51 |
<p>
|
52 |
<label>
|
53 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
54 |
</label>
|
55 |
</p>
|
56 |
|
61 |
|
62 |
<p>
|
63 |
<label>
|
64 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.show_select_all ) { %>checked="checked"<% } %> data-bind="show_select_all" /> <?php _e( 'Add \'select all\' choice', 'happyforms' ); ?>
|
65 |
</label>
|
66 |
</p>
|
67 |
<p>
|
82 |
</select>
|
83 |
</p>
|
84 |
<p>
|
85 |
+
<label for="<%= instance.id %>_width"><?php _e( 'Width', 'happyforms' ); ?></label>
|
86 |
<select id="<%= instance.id %>_width" name="width" data-bind="width" class="widefat">
|
87 |
+
<option value="full"<%= (instance.width == 'full') ? ' selected' : '' %>><?php _e( 'Full', 'happyforms' ); ?></option>
|
88 |
+
<option value="half"<%= (instance.width == 'half') ? ' selected' : '' %>><?php _e( 'Half', 'happyforms' ); ?></option>
|
89 |
+
<option value="third"<%= (instance.width == 'third') ? ' selected' : '' %>><?php _e( 'Third', 'happyforms' ); ?></option>
|
90 |
+
<option value="auto"<%= (instance.width == 'auto') ? ' selected' : '' %>><?php _e( 'Auto', 'happyforms' ); ?></option>
|
91 |
</select>
|
92 |
</p>
|
93 |
<p class="width-options" style="display: none">
|
94 |
<label>
|
95 |
+
<input type="checkbox" class="checkbox apply-all-check" value="" /> <?php _e( 'Apply to all parts', 'happyforms' ); ?>
|
96 |
</label>
|
97 |
</p>
|
98 |
|
99 |
<?php do_action( 'happyforms_part_customize_checkbox_after_advanced_options' ); ?>
|
100 |
|
101 |
<p>
|
102 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
103 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
104 |
</p>
|
105 |
</div>
|
117 |
<div class="happyforms-part-item-body">
|
118 |
<div class="happyforms-part-item-handle"></div>
|
119 |
<label>
|
120 |
+
<?php _e( 'Label', 'happyforms' ); ?>:
|
121 |
<input type="text" class="widefat" name="label" value="<%= label %>">
|
122 |
</label>
|
123 |
<div class="happyforms-part-item-advanced">
|
124 |
<label>
|
125 |
+
<input type="checkbox" name="is_default" value="1" <% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
|
126 |
</label>
|
127 |
</div>
|
128 |
<div class="option-actions">
|
129 |
+
<a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
|
130 |
+
<a href="#" class="advanced-option"><?php _e( 'More', 'happyforms' ); ?></a>
|
131 |
</div>
|
132 |
</div>
|
133 |
</li>
|
core/templates/parts/customize-email.php
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
<script type="text/template" id="customize-happyforms-email-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Lable display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside',
|
14 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
-
<option value=""><?php _e( 'Standard',
|
25 |
-
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus',
|
26 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
-
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder',
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
@@ -35,7 +35,7 @@
|
|
35 |
|
36 |
<p>
|
37 |
<label>
|
38 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
39 |
</label>
|
40 |
</p>
|
41 |
|
@@ -46,27 +46,27 @@
|
|
46 |
|
47 |
<p style="display: <%= ( instance.suffix.length ) ? 'none' : 'block' %>">
|
48 |
<label>
|
49 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.autocomplete_domains ) { %>checked="checked"<% } %> data-bind="autocomplete_domains" /> <?php _e( 'Suggest common email domains',
|
50 |
</label>
|
51 |
</p>
|
52 |
<p>
|
53 |
<label>
|
54 |
-
<input type="checkbox" class="checkbox confirmation-checkbox" value="1" <% if ( instance.confirmation_field ) { %>checked="checked"<% } %> data-bind="confirmation_field" /> <?php _e( 'Require confirmation',
|
55 |
</label>
|
56 |
</p>
|
57 |
<div class="happyforms-nested-settings" data-trigger="confirmation_field" style="display: <%= (instance.confirmation_field == 1) ? 'block' : 'none' %>">
|
58 |
<p>
|
59 |
-
<label for="<%= instance.id %>_confirmation_field_label"><?php _e( '\'Confirmation\' label',
|
60 |
<input type="text" id="<%= instance.id %>_confirmation_field_label" class="widefat title" value="<%= instance.confirmation_field_label %>" data-bind="confirmation_field_label" />
|
61 |
</p>
|
62 |
<p>
|
63 |
-
<label for="<%= instance.id %>_confirmation_field_placeholder"><?php _e( '\'Confirmation\' placeholder',
|
64 |
<input type="text" id="<%= instance.id %>_confirmation_field_placeholder" class="widefat title" value="<%= instance.confirmation_field_placeholder %>" data-bind="confirmation_field_placeholder" />
|
65 |
</p>
|
66 |
</div>
|
67 |
|
68 |
<p>
|
69 |
-
<label for="<%= instance.id %>_suffix"><?php _e( 'Suffix',
|
70 |
<input type="text" id="<%= instance.id %>_suffix" class="widefat title" value="<%= instance.suffix %>" data-bind="suffix" maxlength="50" />
|
71 |
</p>
|
72 |
|
@@ -75,7 +75,7 @@
|
|
75 |
<?php do_action( 'happyforms_part_customize_email_after_advanced_options' ); ?>
|
76 |
|
77 |
<p>
|
78 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
79 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
80 |
</p>
|
81 |
</div>
|
1 |
<script type="text/template" id="customize-happyforms-email-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Lable display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside', 'happyforms' ); ?></option>
|
14 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
25 |
+
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus', 'happyforms' ); ?></option>
|
26 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
+
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder', 'happyforms' ); ?></label>
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
35 |
|
36 |
<p>
|
37 |
<label>
|
38 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
39 |
</label>
|
40 |
</p>
|
41 |
|
46 |
|
47 |
<p style="display: <%= ( instance.suffix.length ) ? 'none' : 'block' %>">
|
48 |
<label>
|
49 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.autocomplete_domains ) { %>checked="checked"<% } %> data-bind="autocomplete_domains" /> <?php _e( 'Suggest common email domains', 'happyforms' ); ?>
|
50 |
</label>
|
51 |
</p>
|
52 |
<p>
|
53 |
<label>
|
54 |
+
<input type="checkbox" class="checkbox confirmation-checkbox" value="1" <% if ( instance.confirmation_field ) { %>checked="checked"<% } %> data-bind="confirmation_field" /> <?php _e( 'Require confirmation', 'happyforms' ); ?>
|
55 |
</label>
|
56 |
</p>
|
57 |
<div class="happyforms-nested-settings" data-trigger="confirmation_field" style="display: <%= (instance.confirmation_field == 1) ? 'block' : 'none' %>">
|
58 |
<p>
|
59 |
+
<label for="<%= instance.id %>_confirmation_field_label"><?php _e( '\'Confirmation\' label', 'happyforms' ); ?></label>
|
60 |
<input type="text" id="<%= instance.id %>_confirmation_field_label" class="widefat title" value="<%= instance.confirmation_field_label %>" data-bind="confirmation_field_label" />
|
61 |
</p>
|
62 |
<p>
|
63 |
+
<label for="<%= instance.id %>_confirmation_field_placeholder"><?php _e( '\'Confirmation\' placeholder', 'happyforms' ); ?></label>
|
64 |
<input type="text" id="<%= instance.id %>_confirmation_field_placeholder" class="widefat title" value="<%= instance.confirmation_field_placeholder %>" data-bind="confirmation_field_placeholder" />
|
65 |
</p>
|
66 |
</div>
|
67 |
|
68 |
<p>
|
69 |
+
<label for="<%= instance.id %>_suffix"><?php _e( 'Suffix', 'happyforms' ); ?></label>
|
70 |
<input type="text" id="<%= instance.id %>_suffix" class="widefat title" value="<%= instance.suffix %>" data-bind="suffix" maxlength="50" />
|
71 |
</p>
|
72 |
|
75 |
<?php do_action( 'happyforms_part_customize_email_after_advanced_options' ); ?>
|
76 |
|
77 |
<p>
|
78 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
79 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
80 |
</p>
|
81 |
</div>
|
core/templates/parts/customize-multi-line-text.php
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
<script type="text/template" id="customize-happyforms-multi-line-text-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside',
|
14 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
-
<option value=""><?php _e( 'Standard',
|
25 |
-
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus',
|
26 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
-
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder',
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
@@ -35,7 +35,7 @@
|
|
35 |
|
36 |
<p>
|
37 |
<label>
|
38 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
39 |
</label>
|
40 |
</p>
|
41 |
|
@@ -46,30 +46,30 @@
|
|
46 |
|
47 |
<p>
|
48 |
<label>
|
49 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.limit_input ) { %>checked="checked"<% } %> data-bind="limit_input" /> <?php _e( 'Limit words/characters',
|
50 |
</label>
|
51 |
</p>
|
52 |
|
53 |
<div class="happyforms-nested-settings character-limit-settings" <% if ( ! instance.limit_input ) { %>style="display: none;"<% } %>>
|
54 |
<p>
|
55 |
-
<label for="<%= instance.id %>_character_limit"><?php _e( 'Limit',
|
56 |
<input type="number" id="<%= instance.id %>_character_limit" class="widefat title" step="1" min="1" value="<%= instance.character_limit %>" data-bind="character_limit" />
|
57 |
</p>
|
58 |
<p>
|
59 |
-
<label for="<%= instance.id %>_character_limit_mode"><?php _e( 'Count',
|
60 |
<select id="<%= instance.id %>_character_limit_mode" data-bind="character_limit_mode">
|
61 |
-
<option value="word_max"<%= (instance.character_limit_mode == 'word_max') ? ' selected' : '' %>><?php _e( 'Max words',
|
62 |
-
<option value="word_min"<%= (instance.character_limit_mode == 'word_min') ? ' selected' : '' %>><?php _e( 'Min words',
|
63 |
-
<option value="character_max"<%= (instance.character_limit_mode == 'character_max') ? ' selected' : '' %>><?php _e( 'Max characters',
|
64 |
-
<option value="character_min"<%= (instance.character_limit_mode == 'character_min') ? ' selected' : '' %>><?php _e( 'Min characters',
|
65 |
</select>
|
66 |
</p>
|
67 |
<p class="character-limit__characters-label" style="display: <%= ( 'character_min' === instance.character_limit_mode || 'character_max' === instance.character_limit_mode ) ? 'block' : 'none' %>">
|
68 |
-
<label for="<%= instance.id %>_characters_label"><?php _e( '\'Characters\' label',
|
69 |
<input type="text" id="<%= instance.id %>_characters_label" class="widefat title" value="<%= instance.characters_label %>" data-bind="characters_label" />
|
70 |
</p>
|
71 |
<p class="character-limit__words-label" style="display: <%= ( 'word_max' === instance.character_limit_mode || 'word_min' === instance.character_limit_mode ) ? 'block' : 'none' %>">
|
72 |
-
<label for="<%= instance.id %>_words_label"><?php _e( '\'Words\' label',
|
73 |
<input type="text" id="<%= instance.id %>_words_label" class="widefat title" value="<%= instance.words_label %>" data-bind="words_label" />
|
74 |
</p>
|
75 |
</div>
|
@@ -79,7 +79,7 @@
|
|
79 |
<?php do_action( 'happyforms_part_customize_multi_line_text_after_advanced_options' ); ?>
|
80 |
|
81 |
<p>
|
82 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
83 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
84 |
</p>
|
85 |
</div>
|
1 |
<script type="text/template" id="customize-happyforms-multi-line-text-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside', 'happyforms' ); ?></option>
|
14 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
25 |
+
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus', 'happyforms' ); ?></option>
|
26 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
+
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder', 'happyforms' ); ?></label>
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
35 |
|
36 |
<p>
|
37 |
<label>
|
38 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
39 |
</label>
|
40 |
</p>
|
41 |
|
46 |
|
47 |
<p>
|
48 |
<label>
|
49 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.limit_input ) { %>checked="checked"<% } %> data-bind="limit_input" /> <?php _e( 'Limit words/characters', 'happyforms' ); ?>
|
50 |
</label>
|
51 |
</p>
|
52 |
|
53 |
<div class="happyforms-nested-settings character-limit-settings" <% if ( ! instance.limit_input ) { %>style="display: none;"<% } %>>
|
54 |
<p>
|
55 |
+
<label for="<%= instance.id %>_character_limit"><?php _e( 'Limit', 'happyforms' ); ?></label>
|
56 |
<input type="number" id="<%= instance.id %>_character_limit" class="widefat title" step="1" min="1" value="<%= instance.character_limit %>" data-bind="character_limit" />
|
57 |
</p>
|
58 |
<p>
|
59 |
+
<label for="<%= instance.id %>_character_limit_mode"><?php _e( 'Count', 'happyforms' ); ?></label>
|
60 |
<select id="<%= instance.id %>_character_limit_mode" data-bind="character_limit_mode">
|
61 |
+
<option value="word_max"<%= (instance.character_limit_mode == 'word_max') ? ' selected' : '' %>><?php _e( 'Max words', 'happyforms' ); ?></option>
|
62 |
+
<option value="word_min"<%= (instance.character_limit_mode == 'word_min') ? ' selected' : '' %>><?php _e( 'Min words', 'happyforms' ); ?></option>
|
63 |
+
<option value="character_max"<%= (instance.character_limit_mode == 'character_max') ? ' selected' : '' %>><?php _e( 'Max characters', 'happyforms' ); ?></option>
|
64 |
+
<option value="character_min"<%= (instance.character_limit_mode == 'character_min') ? ' selected' : '' %>><?php _e( 'Min characters', 'happyforms' ); ?></option>
|
65 |
</select>
|
66 |
</p>
|
67 |
<p class="character-limit__characters-label" style="display: <%= ( 'character_min' === instance.character_limit_mode || 'character_max' === instance.character_limit_mode ) ? 'block' : 'none' %>">
|
68 |
+
<label for="<%= instance.id %>_characters_label"><?php _e( '\'Characters\' label', 'happyforms' ); ?></label>
|
69 |
<input type="text" id="<%= instance.id %>_characters_label" class="widefat title" value="<%= instance.characters_label %>" data-bind="characters_label" />
|
70 |
</p>
|
71 |
<p class="character-limit__words-label" style="display: <%= ( 'word_max' === instance.character_limit_mode || 'word_min' === instance.character_limit_mode ) ? 'block' : 'none' %>">
|
72 |
+
<label for="<%= instance.id %>_words_label"><?php _e( '\'Words\' label', 'happyforms' ); ?></label>
|
73 |
<input type="text" id="<%= instance.id %>_words_label" class="widefat title" value="<%= instance.words_label %>" data-bind="words_label" />
|
74 |
</p>
|
75 |
</div>
|
79 |
<?php do_action( 'happyforms_part_customize_multi_line_text_after_advanced_options' ); ?>
|
80 |
|
81 |
<p>
|
82 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
83 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
84 |
</p>
|
85 |
</div>
|
core/templates/parts/customize-number.php
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
<script type="text/template" id="happyforms-customize-number-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside',
|
14 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
-
<option value=""><?php _e( 'Standard',
|
25 |
-
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus',
|
26 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
-
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder',
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
@@ -35,17 +35,17 @@
|
|
35 |
|
36 |
<div class="min-max-wrapper">
|
37 |
<p>
|
38 |
-
<label for="<%= instance.id %>_min_value"><?php _e( 'Min number',
|
39 |
<input type="number" id="<%= instance.id %>_min_value" class="widefat title" value="<%= instance.min_value %>" data-bind="min_value" />
|
40 |
</p>
|
41 |
<p>
|
42 |
-
<label for="<%= instance.id %>_max_value"><?php _e( 'Max number',
|
43 |
<input type="number" id="<%= instance.id %>_max_value" class="widefat title" value="<%= instance.max_value %>" data-bind="max_value" />
|
44 |
</p>
|
45 |
</div>
|
46 |
<p>
|
47 |
<label>
|
48 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
49 |
</label>
|
50 |
</p>
|
51 |
|
@@ -56,47 +56,47 @@
|
|
56 |
|
57 |
<p>
|
58 |
<label>
|
59 |
-
<input type="checkbox" name="masked" class="checkbox" value="1" <% if ( instance.masked ) { %>checked="checked"<% } %> data-bind="masked" /> <?php _e( 'Use number separators',
|
60 |
</label>
|
61 |
</p>
|
62 |
<div class="happyforms-nested-settings mask-wrapper number-options number-options--numeric" data-trigger="masked" style="display: <%= (instance.masked == 1) ? 'flex' : 'none' %>">
|
63 |
<p>
|
64 |
-
<label for="<%= instance.id %>_mask_numeric_thousands_delimiter"><?php _e( 'Grouping',
|
65 |
<input type="text" id="<%= instance.id %>_mask_numeric_thousands_delimiter" class="widefat title" value="<%= instance.mask_numeric_thousands_delimiter %>" data-bind="mask_numeric_thousands_delimiter" />
|
66 |
</p>
|
67 |
<p>
|
68 |
-
<label for="<%= instance.id %>_mask_numeric_decimal_mark"><?php _e( 'Decimal',
|
69 |
<input type="text" id="<%= instance.id %>_mask_numeric_decimal_mark" class="widefat title" value="<%= instance.mask_numeric_decimal_mark %>" data-bind="mask_numeric_decimal_mark" />
|
70 |
</p>
|
71 |
</div>
|
72 |
<p>
|
73 |
<label>
|
74 |
-
<input type="checkbox" class="checkbox confirmation-checkbox" value="1" <% if ( instance.confirmation_field ) { %>checked="checked"<% } %> data-bind="confirmation_field" /> <?php _e( 'Require confirmation',
|
75 |
</label>
|
76 |
</p>
|
77 |
<div class="happyforms-nested-settings" data-trigger="confirmation_field" style="display: <%= (instance.confirmation_field == 1) ? 'block' : 'none' %>">
|
78 |
<p>
|
79 |
-
<label for="<%= instance.id %>_confirmation_field_label"><?php _e( '\'Confirmation\' label',
|
80 |
<input type="text" id="<%= instance.id %>_confirmation_field_label" class="widefat title" value="<%= instance.confirmation_field_label %>" data-bind="confirmation_field_label" />
|
81 |
</p>
|
82 |
<p>
|
83 |
-
<label for="<%= instance.id %>_confirmation_field_placeholder"><?php _e( '\'Confirmation\' placeholder',
|
84 |
<input type="text" id="<%= instance.id %>_confirmation_field_placeholder" class="widefat title" value="<%= instance.confirmation_field_placeholder %>" data-bind="confirmation_field_placeholder" />
|
85 |
</p>
|
86 |
</div>
|
87 |
<p>
|
88 |
-
<label for="<%= instance.id %>_mask_numeric_prefix"><?php _e( 'Prefix',
|
89 |
<input type="text" id="<%= instance.id %>_mask_numeric_prefix" class="widefat title" value="<%= instance.mask_numeric_prefix %>" data-bind="mask_numeric_prefix" maxlength="50" />
|
90 |
</p>
|
91 |
<p>
|
92 |
-
<label for="<%= instance.id %>_mask_numeric_suffix"><?php _e( 'Suffix',
|
93 |
<input type="text" id="<%= instance.id %>_mask_numeric_suffix" class="widefat title" value="<%= instance.mask_numeric_suffix %>" data-bind="mask_numeric_suffix" maxlength="50" />
|
94 |
</p>
|
95 |
|
96 |
<?php happyforms_customize_part_width_control(); ?>
|
97 |
|
98 |
<p>
|
99 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
100 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
101 |
</p>
|
102 |
|
1 |
<script type="text/template" id="happyforms-customize-number-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside', 'happyforms' ); ?></option>
|
14 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
25 |
+
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus', 'happyforms' ); ?></option>
|
26 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
+
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder', 'happyforms' ); ?></label>
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
35 |
|
36 |
<div class="min-max-wrapper">
|
37 |
<p>
|
38 |
+
<label for="<%= instance.id %>_min_value"><?php _e( 'Min number', 'happyforms' ); ?></label>
|
39 |
<input type="number" id="<%= instance.id %>_min_value" class="widefat title" value="<%= instance.min_value %>" data-bind="min_value" />
|
40 |
</p>
|
41 |
<p>
|
42 |
+
<label for="<%= instance.id %>_max_value"><?php _e( 'Max number', 'happyforms' ); ?></label>
|
43 |
<input type="number" id="<%= instance.id %>_max_value" class="widefat title" value="<%= instance.max_value %>" data-bind="max_value" />
|
44 |
</p>
|
45 |
</div>
|
46 |
<p>
|
47 |
<label>
|
48 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
49 |
</label>
|
50 |
</p>
|
51 |
|
56 |
|
57 |
<p>
|
58 |
<label>
|
59 |
+
<input type="checkbox" name="masked" class="checkbox" value="1" <% if ( instance.masked ) { %>checked="checked"<% } %> data-bind="masked" /> <?php _e( 'Use number separators', 'happyforms' ); ?>
|
60 |
</label>
|
61 |
</p>
|
62 |
<div class="happyforms-nested-settings mask-wrapper number-options number-options--numeric" data-trigger="masked" style="display: <%= (instance.masked == 1) ? 'flex' : 'none' %>">
|
63 |
<p>
|
64 |
+
<label for="<%= instance.id %>_mask_numeric_thousands_delimiter"><?php _e( 'Grouping', 'happyforms' ); ?></label>
|
65 |
<input type="text" id="<%= instance.id %>_mask_numeric_thousands_delimiter" class="widefat title" value="<%= instance.mask_numeric_thousands_delimiter %>" data-bind="mask_numeric_thousands_delimiter" />
|
66 |
</p>
|
67 |
<p>
|
68 |
+
<label for="<%= instance.id %>_mask_numeric_decimal_mark"><?php _e( 'Decimal', 'happyforms' ); ?></label>
|
69 |
<input type="text" id="<%= instance.id %>_mask_numeric_decimal_mark" class="widefat title" value="<%= instance.mask_numeric_decimal_mark %>" data-bind="mask_numeric_decimal_mark" />
|
70 |
</p>
|
71 |
</div>
|
72 |
<p>
|
73 |
<label>
|
74 |
+
<input type="checkbox" class="checkbox confirmation-checkbox" value="1" <% if ( instance.confirmation_field ) { %>checked="checked"<% } %> data-bind="confirmation_field" /> <?php _e( 'Require confirmation', 'happyforms' ); ?>
|
75 |
</label>
|
76 |
</p>
|
77 |
<div class="happyforms-nested-settings" data-trigger="confirmation_field" style="display: <%= (instance.confirmation_field == 1) ? 'block' : 'none' %>">
|
78 |
<p>
|
79 |
+
<label for="<%= instance.id %>_confirmation_field_label"><?php _e( '\'Confirmation\' label', 'happyforms' ); ?></label>
|
80 |
<input type="text" id="<%= instance.id %>_confirmation_field_label" class="widefat title" value="<%= instance.confirmation_field_label %>" data-bind="confirmation_field_label" />
|
81 |
</p>
|
82 |
<p>
|
83 |
+
<label for="<%= instance.id %>_confirmation_field_placeholder"><?php _e( '\'Confirmation\' placeholder', 'happyforms' ); ?></label>
|
84 |
<input type="text" id="<%= instance.id %>_confirmation_field_placeholder" class="widefat title" value="<%= instance.confirmation_field_placeholder %>" data-bind="confirmation_field_placeholder" />
|
85 |
</p>
|
86 |
</div>
|
87 |
<p>
|
88 |
+
<label for="<%= instance.id %>_mask_numeric_prefix"><?php _e( 'Prefix', 'happyforms' ); ?></label>
|
89 |
<input type="text" id="<%= instance.id %>_mask_numeric_prefix" class="widefat title" value="<%= instance.mask_numeric_prefix %>" data-bind="mask_numeric_prefix" maxlength="50" />
|
90 |
</p>
|
91 |
<p>
|
92 |
+
<label for="<%= instance.id %>_mask_numeric_suffix"><?php _e( 'Suffix', 'happyforms' ); ?></label>
|
93 |
<input type="text" id="<%= instance.id %>_mask_numeric_suffix" class="widefat title" value="<%= instance.mask_numeric_suffix %>" data-bind="mask_numeric_suffix" maxlength="50" />
|
94 |
</p>
|
95 |
|
96 |
<?php happyforms_customize_part_width_control(); ?>
|
97 |
|
98 |
<p>
|
99 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
100 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
101 |
</p>
|
102 |
|
core/templates/parts/customize-radio.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
<script type="text/template" id="customize-happyforms-radio-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
14 |
</select>
|
15 |
</p>
|
16 |
<p>
|
17 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
18 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
19 |
</p>
|
20 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
21 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
22 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
23 |
-
<option value=""><?php _e( 'Standard',
|
24 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
25 |
</select>
|
26 |
</p>
|
27 |
|
@@ -29,28 +29,28 @@
|
|
29 |
|
30 |
<div class="options">
|
31 |
<ul class="option-list"></ul>
|
32 |
-
<h3><?php _e( 'Choices',
|
33 |
-
<p class="no-options description"><?php _e( 'No choices added yet. Add one by clicking <i>Add Choice</i> below.',
|
34 |
</div>
|
35 |
<div class="options-import">
|
36 |
-
<h3><?php _e( 'Choices',
|
37 |
<textarea class="option-import-area" cols="30" rows="10" placeholder="<?php _e( 'Type or paste your choices here, adding each on a new line.' ); ?>"></textarea>
|
38 |
</div>
|
39 |
<p class="links mode-manual">
|
40 |
-
<a href="#" class="button add-option"><?php _e( 'Add choice',
|
41 |
<span class="centered">
|
42 |
-
<a href="#" class="import-options"><?php _e( 'Or, bulk add choices',
|
43 |
</span>
|
44 |
</p>
|
45 |
<p class="links mode-import">
|
46 |
-
<a href="#" class="button import-option"><?php _e( 'Add choices',
|
47 |
<span class="centered">
|
48 |
-
<a href="#" class="add-options"><?php _e( 'Cancel',
|
49 |
</span>
|
50 |
</p>
|
51 |
<p>
|
52 |
<label>
|
53 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
54 |
</label>
|
55 |
</p>
|
56 |
|
@@ -60,10 +60,10 @@
|
|
60 |
<?php do_action( 'happyforms_part_customize_radio_before_advanced_options' ); ?>
|
61 |
|
62 |
<p>
|
63 |
-
<label for="<%= instance.id %>_display_type"><?php _e( 'Choices display',
|
64 |
<select id="<%= instance.id %>_display_type" name="display_type" data-bind="display_type" class="widefat">
|
65 |
-
<option value="inline"<%= (instance.display_type == 'inline') ? ' selected' : '' %>><?php _e( 'Horizontal',
|
66 |
-
<option value="block"<%= (instance.display_type == 'block') ? ' selected' : '' %>><?php _e( 'Vertical',
|
67 |
</select>
|
68 |
</p>
|
69 |
<p class="part-options-width-setting">
|
@@ -80,7 +80,7 @@
|
|
80 |
<?php happyforms_customize_part_width_control(); ?>
|
81 |
|
82 |
<p>
|
83 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
84 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
85 |
</p>
|
86 |
|
@@ -100,17 +100,17 @@
|
|
100 |
<div class="happyforms-part-item-body">
|
101 |
<div class="happyforms-part-item-handle"></div>
|
102 |
<label>
|
103 |
-
<?php _e( 'Label',
|
104 |
<input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
|
105 |
</label>
|
106 |
<div class="happyforms-part-item-advanced">
|
107 |
<label>
|
108 |
-
<input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default',
|
109 |
</label>
|
110 |
</div>
|
111 |
<div class="option-actions">
|
112 |
-
<a href="#" class="delete-option"><?php _e( 'Delete',
|
113 |
-
<a href="#" class="advanced-option"><?php _e( 'More',
|
114 |
</div>
|
115 |
</div>
|
116 |
</li>
|
1 |
<script type="text/template" id="customize-happyforms-radio-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
14 |
</select>
|
15 |
</p>
|
16 |
<p>
|
17 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
18 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
19 |
</p>
|
20 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
21 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
22 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
23 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
24 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
25 |
</select>
|
26 |
</p>
|
27 |
|
29 |
|
30 |
<div class="options">
|
31 |
<ul class="option-list"></ul>
|
32 |
+
<h3><?php _e( 'Choices', 'happyforms' ); ?></h3>
|
33 |
+
<p class="no-options description"><?php _e( 'No choices added yet. Add one by clicking <i>Add Choice</i> below.', 'happyforms' ); ?></p>
|
34 |
</div>
|
35 |
<div class="options-import">
|
36 |
+
<h3><?php _e( 'Choices', 'happyforms' ); ?></h3>
|
37 |
<textarea class="option-import-area" cols="30" rows="10" placeholder="<?php _e( 'Type or paste your choices here, adding each on a new line.' ); ?>"></textarea>
|
38 |
</div>
|
39 |
<p class="links mode-manual">
|
40 |
+
<a href="#" class="button add-option"><?php _e( 'Add choice', 'happyforms' ); ?></a>
|
41 |
<span class="centered">
|
42 |
+
<a href="#" class="import-options"><?php _e( 'Or, bulk add choices', 'happyforms' ); ?></a>
|
43 |
</span>
|
44 |
</p>
|
45 |
<p class="links mode-import">
|
46 |
+
<a href="#" class="button import-option"><?php _e( 'Add choices', 'happyforms' ); ?></a>
|
47 |
<span class="centered">
|
48 |
+
<a href="#" class="add-options"><?php _e( 'Cancel', 'happyforms' ); ?></a>
|
49 |
</span>
|
50 |
</p>
|
51 |
<p>
|
52 |
<label>
|
53 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
54 |
</label>
|
55 |
</p>
|
56 |
|
60 |
<?php do_action( 'happyforms_part_customize_radio_before_advanced_options' ); ?>
|
61 |
|
62 |
<p>
|
63 |
+
<label for="<%= instance.id %>_display_type"><?php _e( 'Choices display', 'happyforms' ); ?></label>
|
64 |
<select id="<%= instance.id %>_display_type" name="display_type" data-bind="display_type" class="widefat">
|
65 |
+
<option value="inline"<%= (instance.display_type == 'inline') ? ' selected' : '' %>><?php _e( 'Horizontal', 'happyforms' ); ?></option>
|
66 |
+
<option value="block"<%= (instance.display_type == 'block') ? ' selected' : '' %>><?php _e( 'Vertical', 'happyforms' ); ?></option>
|
67 |
</select>
|
68 |
</p>
|
69 |
<p class="part-options-width-setting">
|
80 |
<?php happyforms_customize_part_width_control(); ?>
|
81 |
|
82 |
<p>
|
83 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
84 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
85 |
</p>
|
86 |
|
100 |
<div class="happyforms-part-item-body">
|
101 |
<div class="happyforms-part-item-handle"></div>
|
102 |
<label>
|
103 |
+
<?php _e( 'Label', 'happyforms' ); ?>:
|
104 |
<input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
|
105 |
</label>
|
106 |
<div class="happyforms-part-item-advanced">
|
107 |
<label>
|
108 |
+
<input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
|
109 |
</label>
|
110 |
</div>
|
111 |
<div class="option-actions">
|
112 |
+
<a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
|
113 |
+
<a href="#" class="advanced-option"><?php _e( 'More', 'happyforms' ); ?></a>
|
114 |
</div>
|
115 |
</div>
|
116 |
</li>
|
core/templates/parts/customize-select.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
<script type="text/template" id="customize-happyforms-select-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
14 |
</select>
|
15 |
</p>
|
16 |
<p>
|
17 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
18 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
19 |
</p>
|
20 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
21 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
22 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
23 |
-
<option value=""><?php _e( 'Standard',
|
24 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
25 |
</select>
|
26 |
</p>
|
27 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
28 |
-
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder',
|
29 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
30 |
</p>
|
31 |
|
@@ -33,28 +33,28 @@
|
|
33 |
|
34 |
<div class="options">
|
35 |
<ul class="option-list"></ul>
|
36 |
-
<h3><?php _e( 'Choices',
|
37 |
-
<p class="no-options description"><?php _e( 'No choices added yet. Add one by clicking <i>Add Choice</i> below.',
|
38 |
</div>
|
39 |
<div class="options-import">
|
40 |
-
<h3><?php _e( 'Choices',
|
41 |
<textarea class="option-import-area" cols="30" rows="10" placeholder="<?php _e( 'Type or paste your choices here, adding each on a new line.' ); ?>"></textarea>
|
42 |
</div>
|
43 |
<p class="links mode-manual">
|
44 |
-
<a href="#" class="button add-option"><?php _e( 'Add choice',
|
45 |
<span class="centered">
|
46 |
-
<a href="#" class="import-options"><?php _e( 'Or, bulk add choices',
|
47 |
</span>
|
48 |
</p>
|
49 |
<p class="links mode-import">
|
50 |
-
<a href="#" class="button import-option"><?php _e( 'Add choices',
|
51 |
<span class="centered">
|
52 |
-
<a href="#" class="add-options"><?php _e( 'Cancel',
|
53 |
</span>
|
54 |
</p>
|
55 |
<p>
|
56 |
<label>
|
57 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
58 |
</label>
|
59 |
</p>
|
60 |
|
@@ -65,7 +65,7 @@
|
|
65 |
|
66 |
<p>
|
67 |
<label>
|
68 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.allow_search ) { %>checked="checked"<% } %> data-bind="allow_search" /> <?php _e( 'Make searchable',
|
69 |
</label>
|
70 |
</p>
|
71 |
<div class="happyforms-nested-settings" data-trigger="allow_search" style="display: <%= (instance.allow_search == 1) ? 'block' : 'none' %>">
|
@@ -80,7 +80,7 @@
|
|
80 |
<?php do_action( 'happyforms_part_customize_select_after_advanced_options' ); ?>
|
81 |
|
82 |
<p>
|
83 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
84 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
85 |
</p>
|
86 |
</div>
|
@@ -98,17 +98,17 @@
|
|
98 |
<div class="happyforms-part-item-body">
|
99 |
<div class="happyforms-part-item-handle"></div>
|
100 |
<label>
|
101 |
-
<?php _e( 'Label',
|
102 |
<input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
|
103 |
</label>
|
104 |
<div class="happyforms-part-item-advanced">
|
105 |
<label>
|
106 |
-
<input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default',
|
107 |
</label>
|
108 |
</div>
|
109 |
<div class="option-actions">
|
110 |
-
<a href="#" class="delete-option"><?php _e( 'Delete',
|
111 |
-
<a href="#" class="advanced-option"><?php _e( 'More',
|
112 |
</div>
|
113 |
</div>
|
114 |
</li>
|
1 |
<script type="text/template" id="customize-happyforms-select-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
14 |
</select>
|
15 |
</p>
|
16 |
<p>
|
17 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
18 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
19 |
</p>
|
20 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
21 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
22 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
23 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
24 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
25 |
</select>
|
26 |
</p>
|
27 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
28 |
+
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder', 'happyforms' ); ?></label>
|
29 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
30 |
</p>
|
31 |
|
33 |
|
34 |
<div class="options">
|
35 |
<ul class="option-list"></ul>
|
36 |
+
<h3><?php _e( 'Choices', 'happyforms' ); ?></h3>
|
37 |
+
<p class="no-options description"><?php _e( 'No choices added yet. Add one by clicking <i>Add Choice</i> below.', 'happyforms' ); ?></p>
|
38 |
</div>
|
39 |
<div class="options-import">
|
40 |
+
<h3><?php _e( 'Choices', 'happyforms' ); ?></h3>
|
41 |
<textarea class="option-import-area" cols="30" rows="10" placeholder="<?php _e( 'Type or paste your choices here, adding each on a new line.' ); ?>"></textarea>
|
42 |
</div>
|
43 |
<p class="links mode-manual">
|
44 |
+
<a href="#" class="button add-option"><?php _e( 'Add choice', 'happyforms' ); ?></a>
|
45 |
<span class="centered">
|
46 |
+
<a href="#" class="import-options"><?php _e( 'Or, bulk add choices', 'happyforms' ); ?></a>
|
47 |
</span>
|
48 |
</p>
|
49 |
<p class="links mode-import">
|
50 |
+
<a href="#" class="button import-option"><?php _e( 'Add choices', 'happyforms' ); ?></a>
|
51 |
<span class="centered">
|
52 |
+
<a href="#" class="add-options"><?php _e( 'Cancel', 'happyforms' ); ?></a>
|
53 |
</span>
|
54 |
</p>
|
55 |
<p>
|
56 |
<label>
|
57 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
58 |
</label>
|
59 |
</p>
|
60 |
|
65 |
|
66 |
<p>
|
67 |
<label>
|
68 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.allow_search ) { %>checked="checked"<% } %> data-bind="allow_search" /> <?php _e( 'Make searchable', 'happyforms' ); ?>
|
69 |
</label>
|
70 |
</p>
|
71 |
<div class="happyforms-nested-settings" data-trigger="allow_search" style="display: <%= (instance.allow_search == 1) ? 'block' : 'none' %>">
|
80 |
<?php do_action( 'happyforms_part_customize_select_after_advanced_options' ); ?>
|
81 |
|
82 |
<p>
|
83 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
84 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
85 |
</p>
|
86 |
</div>
|
98 |
<div class="happyforms-part-item-body">
|
99 |
<div class="happyforms-part-item-handle"></div>
|
100 |
<label>
|
101 |
+
<?php _e( 'Label', 'happyforms' ); ?>:
|
102 |
<input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
|
103 |
</label>
|
104 |
<div class="happyforms-part-item-advanced">
|
105 |
<label>
|
106 |
+
<input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
|
107 |
</label>
|
108 |
</div>
|
109 |
<div class="option-actions">
|
110 |
+
<a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
|
111 |
+
<a href="#" class="advanced-option"><?php _e( 'More', 'happyforms' ); ?></a>
|
112 |
</div>
|
113 |
</div>
|
114 |
</li>
|
core/templates/parts/customize-single-line-text.php
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
<script type="text/template" id="customize-happyforms-single-line-text-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
-
<label for="<%= instance.id %>_title"><?php _e( 'Label',
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
-
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display',
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
-
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above',
|
11 |
-
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below',
|
12 |
-
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left',
|
13 |
-
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside',
|
14 |
-
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden',
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
-
<label for="<%= instance.id %>_description"><?php _e( 'Description',
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
-
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance',
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
-
<option value=""><?php _e( 'Standard',
|
25 |
-
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus',
|
26 |
-
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip',
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
-
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder',
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
@@ -35,7 +35,7 @@
|
|
35 |
|
36 |
<p>
|
37 |
<label>
|
38 |
-
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required',
|
39 |
</label>
|
40 |
</p>
|
41 |
|
@@ -45,12 +45,12 @@
|
|
45 |
<?php do_action( 'happyforms_part_customize_single_line_text_before_advanced_options' ); ?>
|
46 |
|
47 |
<p>
|
48 |
-
<label for="<%= instance.id %>_prefix"><?php _e( 'Prefix',
|
49 |
<input type="text" id="<%= instance.id %>_prefix" class="widefat title" value="<%= instance.prefix %>" data-bind="prefix" maxlength="50" />
|
50 |
</p>
|
51 |
|
52 |
<p>
|
53 |
-
<label for="<%= instance.id %>_suffix"><?php _e( 'Suffix',
|
54 |
<input type="text" id="<%= instance.id %>_suffix" class="widefat title" value="<%= instance.suffix %>" data-bind="suffix" maxlength="50" />
|
55 |
</p>
|
56 |
|
@@ -59,7 +59,7 @@
|
|
59 |
<?php do_action( 'happyforms_part_customize_single_line_text_after_advanced_options' ); ?>
|
60 |
|
61 |
<p>
|
62 |
-
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes',
|
63 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
64 |
</p>
|
65 |
</div>
|
1 |
<script type="text/template" id="customize-happyforms-single-line-text-template">
|
2 |
<?php include( happyforms_get_core_folder() . '/templates/customize-form-part-header.php' ); ?>
|
3 |
<p>
|
4 |
+
<label for="<%= instance.id %>_title"><?php _e( 'Label', 'happyforms' ); ?></label>
|
5 |
<input type="text" id="<%= instance.id %>_title" class="widefat title" value="<%= instance.label %>" data-bind="label" />
|
6 |
</p>
|
7 |
<p>
|
8 |
+
<label for="<%= instance.id %>_label_placement"><?php _e( 'Label display', 'happyforms' ); ?></label>
|
9 |
<select id="<%= instance.id %>_label_placement" data-bind="label_placement">
|
10 |
+
<option value="above"<%= (instance.label_placement == 'above') ? ' selected' : '' %>><?php _e( 'Above', 'happyforms' ); ?></option>
|
11 |
+
<option value="below"<%= (instance.label_placement == 'below') ? ' selected' : '' %>><?php _e( 'Below', 'happyforms' ); ?></option>
|
12 |
+
<option value="left"<%= (instance.label_placement == 'left') ? ' selected' : '' %>><?php _e( 'Left', 'happyforms' ); ?></option>
|
13 |
+
<option value="inside"<%= (instance.label_placement == 'inside') ? ' selected' : '' %>><?php _e( 'Inside', 'happyforms' ); ?></option>
|
14 |
+
<option value="hidden"<%= (instance.label_placement == 'hidden') ? ' selected' : '' %>><?php _e( 'Hidden', 'happyforms' ); ?></option>
|
15 |
</select>
|
16 |
</p>
|
17 |
<p>
|
18 |
+
<label for="<%= instance.id %>_description"><?php _e( 'Description', 'happyforms' ); ?></label>
|
19 |
<textarea id="<%= instance.id %>_description" data-bind="description"><%= instance.description %></textarea>
|
20 |
</p>
|
21 |
<p class="happyforms-description-options" style="display: <%= (instance.description != '') ? 'block' : 'none' %>">
|
22 |
+
<label for="<%= instance.id %>_description_mode"><?php _e( 'Description appearance', 'happyforms' ); ?></label>
|
23 |
<select id="<%= instance.id %>_description_mode" data-bind="description_mode">
|
24 |
+
<option value=""><?php _e( 'Standard', 'happyforms' ); ?></option>
|
25 |
+
<option value="focus-reveal"<%= (instance.description_mode == 'focus-reveal') ? ' selected' : '' %>><?php _e( 'Reveal on focus', 'happyforms' ); ?></option>
|
26 |
+
<option value="tooltip"<%= (instance.description_mode == 'tooltip' || instance.tooltip_description ) ? ' selected' : '' %>><?php _e( 'Tooltip', 'happyforms' ); ?></option>
|
27 |
</select>
|
28 |
</p>
|
29 |
<p class="happyforms-placeholder-option" style="display: <%= ( 'as_placeholder' !== instance.label_placement ) ? 'block' : 'none' %>">
|
30 |
+
<label for="<%= instance.id %>_placeholder"><?php _e( 'Placeholder', 'happyforms' ); ?></label>
|
31 |
<input type="text" id="<%= instance.id %>_placeholder" class="widefat title" value="<%= instance.placeholder %>" data-bind="placeholder" />
|
32 |
</p>
|
33 |
|
35 |
|
36 |
<p>
|
37 |
<label>
|
38 |
+
<input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'This is required', 'happyforms' ); ?>
|
39 |
</label>
|
40 |
</p>
|
41 |
|
45 |
<?php do_action( 'happyforms_part_customize_single_line_text_before_advanced_options' ); ?>
|
46 |
|
47 |
<p>
|
48 |
+
<label for="<%= instance.id %>_prefix"><?php _e( 'Prefix', 'happyforms' ); ?></label>
|
49 |
<input type="text" id="<%= instance.id %>_prefix" class="widefat title" value="<%= instance.prefix %>" data-bind="prefix" maxlength="50" />
|
50 |
</p>
|
51 |
|
52 |
<p>
|
53 |
+
<label for="<%= instance.id %>_suffix"><?php _e( 'Suffix', 'happyforms' ); ?></label>
|
54 |
<input type="text" id="<%= instance.id %>_suffix" class="widefat title" value="<%= instance.suffix %>" data-bind="suffix" maxlength="50" />
|
55 |
</p>
|
56 |
|
59 |
<?php do_action( 'happyforms_part_customize_single_line_text_after_advanced_options' ); ?>
|
60 |
|
61 |
<p>
|
62 |
+
<label for="<%= instance.id %>_css_class"><?php _e( 'CSS classes', 'happyforms' ); ?></label>
|
63 |
<input type="text" id="<%= instance.id %>_css_class" class="widefat title" value="<%= instance.css_class %>" data-bind="css_class" />
|
64 |
</p>
|
65 |
</div>
|
core/templates/parts/frontend-checkbox.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<label class="option-label">
|
11 |
<input type="checkbox" class="happyforms-visuallyhidden happyforms-select-all">
|
12 |
<span class="checkmark"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg></span>
|
13 |
-
<span class="label"><?php _e( 'Select all',
|
14 |
</label>
|
15 |
</div>
|
16 |
<?php endif; ?>
|
10 |
<label class="option-label">
|
11 |
<input type="checkbox" class="happyforms-visuallyhidden happyforms-select-all">
|
12 |
<span class="checkmark"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg></span>
|
13 |
+
<span class="label"><?php _e( 'Select all', 'happyforms' ); ?></span>
|
14 |
</label>
|
15 |
</div>
|
16 |
<?php endif; ?>
|
core/templates/preview-form-pencil.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<script type="text/template" id="happyforms-pencil-template">
|
2 |
<span class="customize-partial-edit-shortcut happyforms-partial-edit-shortcut">
|
3 |
-
<button aria-label="<?php _e( 'Click to edit this part.',
|
4 |
</span>
|
5 |
</script>
|
1 |
<script type="text/template" id="happyforms-pencil-template">
|
2 |
<span class="customize-partial-edit-shortcut happyforms-partial-edit-shortcut">
|
3 |
+
<button aria-label="<?php _e( 'Click to edit this part.', 'happyforms' ); ?>" title="<?php _e( 'Click to edit this part.', 'happyforms' ); ?>" class="customize-partial-edit-shortcut-button happyforms-edit-pencil"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z"></path></svg></button>
|
4 |
</span>
|
5 |
</script>
|
happyforms.php
CHANGED
@@ -4,17 +4,16 @@
|
|
4 |
* Plugin Name: HappyForms
|
5 |
* Plugin URI: https://happyforms.me
|
6 |
* Description: Your friendly drag and drop contact form builder for creating contact forms, lead generation forms, feedback forms, quote forms, survey forms and more!
|
7 |
-
* Author:
|
8 |
-
* Version: 1.9.
|
9 |
-
* Author URI: https://
|
10 |
-
* Upgrade URI: https://
|
11 |
*/
|
12 |
|
13 |
/**
|
14 |
* The current version of the plugin.
|
15 |
*/
|
16 |
-
define( 'HAPPYFORMS_VERSION', '1.9.
|
17 |
-
define( 'HAPPYFORMS_TEXT_DOMAIN', 'happyforms' );
|
18 |
|
19 |
if ( ! function_exists( 'happyforms_plugin_file' ) ):
|
20 |
/**
|
4 |
* Plugin Name: HappyForms
|
5 |
* Plugin URI: https://happyforms.me
|
6 |
* Description: Your friendly drag and drop contact form builder for creating contact forms, lead generation forms, feedback forms, quote forms, survey forms and more!
|
7 |
+
* Author: HappyForms
|
8 |
+
* Version: 1.9.9
|
9 |
+
* Author URI: https://happyforms.me
|
10 |
+
* Upgrade URI: https://happyforms.me/upgrade
|
11 |
*/
|
12 |
|
13 |
/**
|
14 |
* The current version of the plugin.
|
15 |
*/
|
16 |
+
define( 'HAPPYFORMS_VERSION', '1.9.9' );
|
|
|
17 |
|
18 |
if ( ! function_exists( 'happyforms_plugin_file' ) ):
|
19 |
/**
|
inc/assets/js/customize.js
CHANGED
@@ -151,6 +151,7 @@
|
|
151 |
},
|
152 |
|
153 |
steps: [ 'build', 'setup', 'email', 'style' ],
|
|
|
154 |
currentRoute: 'build',
|
155 |
savedStates: {
|
156 |
'build': {
|
@@ -637,6 +638,7 @@
|
|
637 |
|
638 |
onPartAddButtonClick: function( e ) {
|
639 |
e.preventDefault();
|
|
|
640 |
|
641 |
this.drawer.toggle();
|
642 |
},
|
@@ -859,14 +861,27 @@
|
|
859 |
initialize: function() {
|
860 |
classes.views.Base.prototype.initialize.apply( this, arguments );
|
861 |
|
862 |
-
$( '.wp-full-overlay-sidebar' ).on( 'click', this.
|
863 |
},
|
864 |
|
865 |
render: function() {
|
866 |
this.setElement( this.template( { parts: happyForms.parts.toJSON() } ) );
|
|
|
867 |
return this;
|
868 |
},
|
869 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
870 |
onListItemClick: function( e ) {
|
871 |
e.stopPropagation();
|
872 |
|
@@ -906,18 +921,6 @@
|
|
906 |
$( '#part-search', this.$el ).val( '' ).trigger( 'change' );
|
907 |
},
|
908 |
|
909 |
-
onSidebarClick: function( e ) {
|
910 |
-
e.stopPropagation();
|
911 |
-
|
912 |
-
var $element = $( e.target );
|
913 |
-
|
914 |
-
if ( $element.is( '.happyforms-add-new-part' ) ) {
|
915 |
-
return;
|
916 |
-
}
|
917 |
-
|
918 |
-
this.close();
|
919 |
-
},
|
920 |
-
|
921 |
toggle: function() {
|
922 |
this.$el.toggleClass( 'expanded' );
|
923 |
$( 'body' ).toggleClass( 'adding-happyforms-parts' );
|
@@ -1421,10 +1424,10 @@
|
|
1421 |
|
1422 |
pointers: {},
|
1423 |
|
1424 |
-
|
1425 |
-
'confirmation_message',
|
1426 |
-
'error_message',
|
1427 |
-
|
1428 |
|
1429 |
initialize: function() {
|
1430 |
classes.views.Base.prototype.initialize.apply( this, arguments );
|
@@ -1439,9 +1442,11 @@
|
|
1439 |
},
|
1440 |
|
1441 |
ready: function() {
|
|
|
|
|
1442 |
this.setupHelpPointers();
|
1443 |
|
1444 |
-
var
|
1445 |
tinymce: {
|
1446 |
toolbar1: 'bold,italic,strikethrough,link',
|
1447 |
setup: this.onEditorInit.bind( this ),
|
@@ -1451,13 +1456,20 @@
|
|
1451 |
}
|
1452 |
};
|
1453 |
|
1454 |
-
_.each( this.
|
1455 |
-
|
|
|
|
|
|
|
1456 |
} );
|
1457 |
|
1458 |
this.setOptionalLabelVisibility();
|
1459 |
},
|
1460 |
|
|
|
|
|
|
|
|
|
1461 |
onEditorInit: function( editor ) {
|
1462 |
var $textarea = $( '#' + editor.id, this.$el );
|
1463 |
var attribute = $textarea.data( 'attribute' );
|
@@ -1531,7 +1543,7 @@
|
|
1531 |
},
|
1532 |
|
1533 |
remove: function() {
|
1534 |
-
_.each( this.
|
1535 |
wp.editor.remove( editorId );
|
1536 |
} );
|
1537 |
|
@@ -1546,10 +1558,10 @@
|
|
1546 |
classes.views.FormEmail = classes.views.FormSetup.extend( {
|
1547 |
template: '#happyforms-form-email-template',
|
1548 |
|
1549 |
-
|
1550 |
-
'confirmation_email_content',
|
1551 |
-
'abandoned_resume_email_content'
|
1552 |
-
|
1553 |
|
1554 |
render: function() {
|
1555 |
classes.views.FormSetup.prototype.render.apply( this, arguments );
|
151 |
},
|
152 |
|
153 |
steps: [ 'build', 'setup', 'email', 'style' ],
|
154 |
+
previousRoute: '',
|
155 |
currentRoute: 'build',
|
156 |
savedStates: {
|
157 |
'build': {
|
638 |
|
639 |
onPartAddButtonClick: function( e ) {
|
640 |
e.preventDefault();
|
641 |
+
e.stopPropagation();
|
642 |
|
643 |
this.drawer.toggle();
|
644 |
},
|
861 |
initialize: function() {
|
862 |
classes.views.Base.prototype.initialize.apply( this, arguments );
|
863 |
|
864 |
+
$( '.wp-full-overlay-sidebar' ).on( 'click', this.close.bind( this ) );
|
865 |
},
|
866 |
|
867 |
render: function() {
|
868 |
this.setElement( this.template( { parts: happyForms.parts.toJSON() } ) );
|
869 |
+
this.applyConditionClasses();
|
870 |
return this;
|
871 |
},
|
872 |
|
873 |
+
applyConditionClasses: function() {
|
874 |
+
var partTypes = happyForms.form.get( 'parts' ).map( function( model ) {
|
875 |
+
return model.get( 'type' );
|
876 |
+
} );
|
877 |
+
|
878 |
+
partTypes = _.union( partTypes );
|
879 |
+
|
880 |
+
for ( var i = 0; i < partTypes.length; i++ ) {
|
881 |
+
this.$el.addClass( 'has-' + partTypes[i] );
|
882 |
+
}
|
883 |
+
},
|
884 |
+
|
885 |
onListItemClick: function( e ) {
|
886 |
e.stopPropagation();
|
887 |
|
921 |
$( '#part-search', this.$el ).val( '' ).trigger( 'change' );
|
922 |
},
|
923 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
924 |
toggle: function() {
|
925 |
this.$el.toggleClass( 'expanded' );
|
926 |
$( 'body' ).toggleClass( 'adding-happyforms-parts' );
|
1424 |
|
1425 |
pointers: {},
|
1426 |
|
1427 |
+
editors: {
|
1428 |
+
'confirmation_message' : {},
|
1429 |
+
'error_message' : {},
|
1430 |
+
},
|
1431 |
|
1432 |
initialize: function() {
|
1433 |
classes.views.Base.prototype.initialize.apply( this, arguments );
|
1442 |
},
|
1443 |
|
1444 |
ready: function() {
|
1445 |
+
var self = this;
|
1446 |
+
|
1447 |
this.setupHelpPointers();
|
1448 |
|
1449 |
+
var defaultEditorSettings = {
|
1450 |
tinymce: {
|
1451 |
toolbar1: 'bold,italic,strikethrough,link',
|
1452 |
setup: this.onEditorInit.bind( this ),
|
1456 |
}
|
1457 |
};
|
1458 |
|
1459 |
+
_.each( this.editors, function( editorSettings, editorId ) {
|
1460 |
+
var settings = _.extend( defaultEditorSettings, editorSettings );
|
1461 |
+
settings.tinymce.setup = self.onEditorInit.bind( self );
|
1462 |
+
|
1463 |
+
self.initEditor( editorId, settings );
|
1464 |
} );
|
1465 |
|
1466 |
this.setOptionalLabelVisibility();
|
1467 |
},
|
1468 |
|
1469 |
+
initEditor: function( editorId, editorSettings ) {
|
1470 |
+
wp.editor.initialize( editorId, editorSettings );
|
1471 |
+
},
|
1472 |
+
|
1473 |
onEditorInit: function( editor ) {
|
1474 |
var $textarea = $( '#' + editor.id, this.$el );
|
1475 |
var attribute = $textarea.data( 'attribute' );
|
1543 |
},
|
1544 |
|
1545 |
remove: function() {
|
1546 |
+
_.each( this.editors, function( editorSettings, editorId ) {
|
1547 |
wp.editor.remove( editorId );
|
1548 |
} );
|
1549 |
|
1558 |
classes.views.FormEmail = classes.views.FormSetup.extend( {
|
1559 |
template: '#happyforms-form-email-template',
|
1560 |
|
1561 |
+
editors: {
|
1562 |
+
'confirmation_email_content' : {},
|
1563 |
+
'abandoned_resume_email_content' : {},
|
1564 |
+
},
|
1565 |
|
1566 |
render: function() {
|
1567 |
classes.views.FormSetup.prototype.render.apply( this, arguments );
|
inc/assets/js/frontend.js
CHANGED
@@ -9,6 +9,7 @@
|
|
9 |
|
10 |
this.$input.on( 'keyup change', this.triggerChange.bind( this ) );
|
11 |
this.$input.on( 'blur', this.onBlur.bind( this ) );
|
|
|
12 |
|
13 |
this.onBlur();
|
14 |
},
|
@@ -17,6 +18,10 @@
|
|
17 |
return this.type;
|
18 |
},
|
19 |
|
|
|
|
|
|
|
|
|
20 |
onBlur: function() {
|
21 |
if ( this.$el.is( '.happyforms-part--label-as_placeholder' ) ) {
|
22 |
if ( this.isFilled() ) {
|
@@ -25,6 +30,8 @@
|
|
25 |
this.$el.removeClass( 'happyforms-part--filled' );
|
26 |
}
|
27 |
}
|
|
|
|
|
28 |
},
|
29 |
|
30 |
triggerChange: function( data ) {
|
9 |
|
10 |
this.$input.on( 'keyup change', this.triggerChange.bind( this ) );
|
11 |
this.$input.on( 'blur', this.onBlur.bind( this ) );
|
12 |
+
this.$input.on( 'focus', this.onInputFocus.bind( this ) );
|
13 |
|
14 |
this.onBlur();
|
15 |
},
|
18 |
return this.type;
|
19 |
},
|
20 |
|
21 |
+
onInputFocus: function() {
|
22 |
+
this.$el.addClass( 'focus' );
|
23 |
+
},
|
24 |
+
|
25 |
onBlur: function() {
|
26 |
if ( this.$el.is( '.happyforms-part--label-as_placeholder' ) ) {
|
27 |
if ( this.isFilled() ) {
|
30 |
this.$el.removeClass( 'happyforms-part--filled' );
|
31 |
}
|
32 |
}
|
33 |
+
|
34 |
+
this.$el.removeClass( 'focus' );
|
35 |
},
|
36 |
|
37 |
triggerChange: function( data ) {
|
inc/classes/class-happyforms.php
CHANGED
@@ -16,7 +16,7 @@ class HappyForms extends HappyForms_Core {
|
|
16 |
add_filter( 'happyforms_style_controls', array( $this, 'add_dummy_style_controls' ) );
|
17 |
add_action( 'admin_print_footer_scripts', array( $this, 'print_upgrade_modals' ) );
|
18 |
add_action( 'parse_request', array( $this, 'parse_archive_request' ) );
|
19 |
-
add_action( '
|
20 |
|
21 |
$this->register_dummy_parts();
|
22 |
$this->add_setup_logic_upgrade_links();
|
@@ -81,92 +81,92 @@ class HappyForms extends HappyForms_Core {
|
|
81 |
$controls[1450] = array(
|
82 |
'type' => 'checkbox_dummy',
|
83 |
'dummy_id' => 'shuffle_parts',
|
84 |
-
'label' => __( 'Shuffle parts',
|
85 |
-
'tooltip' => __( 'Shuffle the order of all form parts to avoid biases in your responses.',
|
86 |
);
|
87 |
|
88 |
$controls[1500] = array(
|
89 |
'type' => 'checkbox_dummy',
|
90 |
'dummy_id' => 'captcha',
|
91 |
-
'label' => __( 'Use reCAPTCHA',
|
92 |
-
'tooltip' => __( 'Protect your form against bots using your Google ReCaptcha credentials.',
|
93 |
);
|
94 |
|
95 |
$controls[1550] = array(
|
96 |
'type' => 'checkbox_dummy',
|
97 |
'dummy_id' => 'require_password',
|
98 |
-
'label' => __( 'Require password',
|
99 |
-
'tooltip' => __( 'Only users with password will be able to view and submit the form.',
|
100 |
);
|
101 |
|
102 |
$controls[1590] = array(
|
103 |
'type' => 'checkbox_dummy',
|
104 |
'dummy_id' => 'open_in_overlay_window',
|
105 |
-
'label' => __( 'Open in overlay window',
|
106 |
-
'tooltip' => __( 'Generate a link that can be clicked to open an overlay window for this form.',
|
107 |
);
|
108 |
|
109 |
$controls[1591] = array(
|
110 |
'type' => 'checkbox_dummy',
|
111 |
'dummy_id' => 'save_meta_data',
|
112 |
-
'label' => __( 'Save user\'s meta data',
|
113 |
-
'tooltip' => __( 'User meta data like IP address, browser language, local time, and platform will be saved with each submission when checked.',
|
114 |
);
|
115 |
|
116 |
$controls[1660] = array(
|
117 |
'type' => 'checkbox_dummy',
|
118 |
'dummy_id' => 'save_abandoned_responses',
|
119 |
-
'label' => __( 'Save abandoned submissions',
|
120 |
-
'tooltip' => __( 'Keep incomplete users responses stored in your WordPress database.',
|
121 |
);
|
122 |
|
123 |
$controls[1661] = array(
|
124 |
'type' => 'checkbox_dummy',
|
125 |
'dummy_id' => 'save_and_resume_submissions',
|
126 |
-
'label' => __( 'Save and resume submissions',
|
127 |
-
'tooltip' => __( 'Let users temporarily save their incomplete response and continue filling out the form at a later time.',
|
128 |
);
|
129 |
|
130 |
$controls[1690] = array(
|
131 |
'type' => 'checkbox_dummy',
|
132 |
'dummy_id' => 'use_mailchimp',
|
133 |
-
'label' => __( 'Use Mailchimp',
|
134 |
-
'tooltip' => __( 'Set which Mailchimp lists, groups and tags you want to use.',
|
135 |
);
|
136 |
|
137 |
$controls[1691] = array(
|
138 |
'type' => 'checkbox_dummy',
|
139 |
'dummy_id' => 'unique_id',
|
140 |
-
'label' => __( 'Add identifier to each submission',
|
141 |
-
'tooltip' => __( 'Tag responses with a unique, incremental identifier.',
|
142 |
);
|
143 |
|
144 |
$controls[1800] = array(
|
145 |
'type' => 'checkbox_dummy',
|
146 |
'dummy_id' => 'preview_before_submit',
|
147 |
-
'label' => __( 'Preview values before submit',
|
148 |
-
'tooltip' => __( 'Let your users review their submission before confirming it.',
|
149 |
);
|
150 |
|
151 |
$controls[1900] = array(
|
152 |
'type' => 'checkbox_dummy',
|
153 |
'dummy_id' => 'disable_submit_until_valid',
|
154 |
-
'label' => __( 'Fade submit button until valid',
|
155 |
-
'tooltip' => __( 'Reduce the opacity of the submit button until all required form parts are valid.',
|
156 |
);
|
157 |
|
158 |
$controls[2300] = array(
|
159 |
'type' => 'checkbox_dummy',
|
160 |
'dummy_id' => 'limit_responses',
|
161 |
-
'label' => __( 'Limit submissions',
|
162 |
-
'tooltip' => __( 'Set limit on number of allowed form submission in general or per user.',
|
163 |
);
|
164 |
|
165 |
$controls[3000] = array(
|
166 |
'type' => 'checkbox_dummy',
|
167 |
'dummy_id' => 'schedule_visibility',
|
168 |
-
'label' => __( 'Schedule visibility',
|
169 |
-
'tooltip' => __( 'Show or hide this form during a chosen time and day. Go to Settings > Timezone to set your city offset.',
|
170 |
);
|
171 |
|
172 |
return $controls;
|
@@ -176,28 +176,28 @@ class HappyForms extends HappyForms_Core {
|
|
176 |
$controls[450] = array(
|
177 |
'type' => 'checkbox_dummy',
|
178 |
'dummy_id' => 'email_mark_and_reply',
|
179 |
-
'label' => __( 'Include mark and reply link',
|
180 |
-
'tooltip' => __( 'Reply to your users and mark their submission as read in one click.',
|
181 |
);
|
182 |
|
183 |
$controls[451] = array(
|
184 |
'type' => 'checkbox_dummy',
|
185 |
'dummy_id' => 'alert_email_attachment_links',
|
186 |
-
'label' => __( 'Link to attachments in email',
|
187 |
-
'tooltip' => __( 'Show attachments as links instead of a simple counter.',
|
188 |
);
|
189 |
|
190 |
$controls[452] = array(
|
191 |
'type' => 'checkbox_dummy',
|
192 |
'dummy_id' => 'alert_email_hide_placeholder_parts',
|
193 |
-
'label' => __( 'Hide Placeholder parts in email',
|
194 |
);
|
195 |
|
196 |
$controls[453] = array(
|
197 |
'type' => 'checkbox_dummy',
|
198 |
'dummy_id' => 'alert_email_include_referral_url',
|
199 |
-
'label' => __( 'Include referral link',
|
200 |
-
'tooltip' => __( 'Include the page link your form was submitted from.',
|
201 |
);
|
202 |
|
203 |
$controls[454] = array(
|
@@ -228,7 +228,7 @@ class HappyForms extends HappyForms_Core {
|
|
228 |
$controls[110] = array(
|
229 |
'type' => 'checkbox_dummy',
|
230 |
'dummy_id' => 'use_theme_styles',
|
231 |
-
'label' => __( 'Use theme styles',
|
232 |
);
|
233 |
|
234 |
return $controls;
|
16 |
add_filter( 'happyforms_style_controls', array( $this, 'add_dummy_style_controls' ) );
|
17 |
add_action( 'admin_print_footer_scripts', array( $this, 'print_upgrade_modals' ) );
|
18 |
add_action( 'parse_request', array( $this, 'parse_archive_request' ) );
|
19 |
+
add_action( 'init', array( $this, 'display_notices' ) );
|
20 |
|
21 |
$this->register_dummy_parts();
|
22 |
$this->add_setup_logic_upgrade_links();
|
81 |
$controls[1450] = array(
|
82 |
'type' => 'checkbox_dummy',
|
83 |
'dummy_id' => 'shuffle_parts',
|
84 |
+
'label' => __( 'Shuffle parts', 'happyforms' ),
|
85 |
+
'tooltip' => __( 'Shuffle the order of all form parts to avoid biases in your responses.', 'happyforms' ),
|
86 |
);
|
87 |
|
88 |
$controls[1500] = array(
|
89 |
'type' => 'checkbox_dummy',
|
90 |
'dummy_id' => 'captcha',
|
91 |
+
'label' => __( 'Use reCAPTCHA', 'happyforms' ),
|
92 |
+
'tooltip' => __( 'Protect your form against bots using your Google ReCaptcha credentials.', 'happyforms' ),
|
93 |
);
|
94 |
|
95 |
$controls[1550] = array(
|
96 |
'type' => 'checkbox_dummy',
|
97 |
'dummy_id' => 'require_password',
|
98 |
+
'label' => __( 'Require password', 'happyforms' ),
|
99 |
+
'tooltip' => __( 'Only users with password will be able to view and submit the form.', 'happyforms' ),
|
100 |
);
|
101 |
|
102 |
$controls[1590] = array(
|
103 |
'type' => 'checkbox_dummy',
|
104 |
'dummy_id' => 'open_in_overlay_window',
|
105 |
+
'label' => __( 'Open in overlay window', 'happyforms' ),
|
106 |
+
'tooltip' => __( 'Generate a link that can be clicked to open an overlay window for this form.', 'happyforms' ),
|
107 |
);
|
108 |
|
109 |
$controls[1591] = array(
|
110 |
'type' => 'checkbox_dummy',
|
111 |
'dummy_id' => 'save_meta_data',
|
112 |
+
'label' => __( 'Save user\'s meta data', 'happyforms' ),
|
113 |
+
'tooltip' => __( 'User meta data like IP address, browser language, local time, and platform will be saved with each submission when checked.', 'happyforms' ),
|
114 |
);
|
115 |
|
116 |
$controls[1660] = array(
|
117 |
'type' => 'checkbox_dummy',
|
118 |
'dummy_id' => 'save_abandoned_responses',
|
119 |
+
'label' => __( 'Save abandoned submissions', 'happyforms' ),
|
120 |
+
'tooltip' => __( 'Keep incomplete users responses stored in your WordPress database.', 'happyforms' ),
|
121 |
);
|
122 |
|
123 |
$controls[1661] = array(
|
124 |
'type' => 'checkbox_dummy',
|
125 |
'dummy_id' => 'save_and_resume_submissions',
|
126 |
+
'label' => __( 'Save and resume submissions', 'happyforms' ),
|
127 |
+
'tooltip' => __( 'Let users temporarily save their incomplete response and continue filling out the form at a later time.', 'happyforms' ),
|
128 |
);
|
129 |
|
130 |
$controls[1690] = array(
|
131 |
'type' => 'checkbox_dummy',
|
132 |
'dummy_id' => 'use_mailchimp',
|
133 |
+
'label' => __( 'Use Mailchimp', 'happyforms' ),
|
134 |
+
'tooltip' => __( 'Set which Mailchimp lists, groups and tags you want to use.', 'happyforms' )
|
135 |
);
|
136 |
|
137 |
$controls[1691] = array(
|
138 |
'type' => 'checkbox_dummy',
|
139 |
'dummy_id' => 'unique_id',
|
140 |
+
'label' => __( 'Add identifier to each submission', 'happyforms' ),
|
141 |
+
'tooltip' => __( 'Tag responses with a unique, incremental identifier.', 'happyforms' ),
|
142 |
);
|
143 |
|
144 |
$controls[1800] = array(
|
145 |
'type' => 'checkbox_dummy',
|
146 |
'dummy_id' => 'preview_before_submit',
|
147 |
+
'label' => __( 'Preview values before submit', 'happyforms' ),
|
148 |
+
'tooltip' => __( 'Let your users review their submission before confirming it.', 'happyforms' ),
|
149 |
);
|
150 |
|
151 |
$controls[1900] = array(
|
152 |
'type' => 'checkbox_dummy',
|
153 |
'dummy_id' => 'disable_submit_until_valid',
|
154 |
+
'label' => __( 'Fade submit button until valid', 'happyforms' ),
|
155 |
+
'tooltip' => __( 'Reduce the opacity of the submit button until all required form parts are valid.', 'happyforms' )
|
156 |
);
|
157 |
|
158 |
$controls[2300] = array(
|
159 |
'type' => 'checkbox_dummy',
|
160 |
'dummy_id' => 'limit_responses',
|
161 |
+
'label' => __( 'Limit submissions', 'happyforms' ),
|
162 |
+
'tooltip' => __( 'Set limit on number of allowed form submission in general or per user.', 'happyforms' ),
|
163 |
);
|
164 |
|
165 |
$controls[3000] = array(
|
166 |
'type' => 'checkbox_dummy',
|
167 |
'dummy_id' => 'schedule_visibility',
|
168 |
+
'label' => __( 'Schedule visibility', 'happyforms' ),
|
169 |
+
'tooltip' => __( 'Show or hide this form during a chosen time and day. Go to Settings > Timezone to set your city offset.', 'happyforms' ),
|
170 |
);
|
171 |
|
172 |
return $controls;
|
176 |
$controls[450] = array(
|
177 |
'type' => 'checkbox_dummy',
|
178 |
'dummy_id' => 'email_mark_and_reply',
|
179 |
+
'label' => __( 'Include mark and reply link', 'happyforms' ),
|
180 |
+
'tooltip' => __( 'Reply to your users and mark their submission as read in one click.', 'happyforms' ),
|
181 |
);
|
182 |
|
183 |
$controls[451] = array(
|
184 |
'type' => 'checkbox_dummy',
|
185 |
'dummy_id' => 'alert_email_attachment_links',
|
186 |
+
'label' => __( 'Link to attachments in email', 'happyforms' ),
|
187 |
+
'tooltip' => __( 'Show attachments as links instead of a simple counter.', 'happyforms' ),
|
188 |
);
|
189 |
|
190 |
$controls[452] = array(
|
191 |
'type' => 'checkbox_dummy',
|
192 |
'dummy_id' => 'alert_email_hide_placeholder_parts',
|
193 |
+
'label' => __( 'Hide Placeholder parts in email', 'happyforms' )
|
194 |
);
|
195 |
|
196 |
$controls[453] = array(
|
197 |
'type' => 'checkbox_dummy',
|
198 |
'dummy_id' => 'alert_email_include_referral_url',
|
199 |
+
'label' => __( 'Include referral link', 'happyforms' ),
|
200 |
+
'tooltip' => __( 'Include the page link your form was submitted from.', 'happyforms' ),
|
201 |
);
|
202 |
|
203 |
$controls[454] = array(
|
228 |
$controls[110] = array(
|
229 |
'type' => 'checkbox_dummy',
|
230 |
'dummy_id' => 'use_theme_styles',
|
231 |
+
'label' => __( 'Use theme styles', 'happyforms' ),
|
232 |
);
|
233 |
|
234 |
return $controls;
|
languages/happyforms.pot
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
# Copyright (C) 2020
|
2 |
# This file is distributed under the same license as the HappyForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: HappyForms 1.9.
|
6 |
"Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
|
7 |
-
"POT-Creation-Date: 2020-04-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"Language-Team: The Theme Foundry\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
15 |
|
16 |
-
#.
|
17 |
msgid "HappyForms"
|
18 |
msgstr ""
|
19 |
|
@@ -3537,7 +3537,7 @@ msgstr ""
|
|
3537 |
msgid "For formatted site URLs."
|
3538 |
msgstr ""
|
3539 |
|
3540 |
-
#.
|
3541 |
msgid "https://happyforms.me"
|
3542 |
msgstr ""
|
3543 |
|
@@ -3546,12 +3546,4 @@ msgid ""
|
|
3546 |
"Your friendly drag and drop contact form builder for creating contact "
|
3547 |
"forms, lead generation forms, feedback forms, quote forms, survey forms and "
|
3548 |
"more!"
|
3549 |
-
msgstr ""
|
3550 |
-
|
3551 |
-
#. Author of the plugin/theme
|
3552 |
-
msgid "The Theme Foundry"
|
3553 |
-
msgstr ""
|
3554 |
-
|
3555 |
-
#. Author URI of the plugin/theme
|
3556 |
-
msgid "https://thethemefoundry.com"
|
3557 |
msgstr ""
|
1 |
+
# Copyright (C) 2020 HappyForms
|
2 |
# This file is distributed under the same license as the HappyForms package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: HappyForms 1.9.9\n"
|
6 |
"Report-Msgid-Bugs-To: https://thethemefoundry.com/support/\n"
|
7 |
+
"POT-Creation-Date: 2020-04-30 12:40:20+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Language-Team: The Theme Foundry\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
15 |
|
16 |
+
#. Author of the plugin/theme
|
17 |
msgid "HappyForms"
|
18 |
msgstr ""
|
19 |
|
3537 |
msgid "For formatted site URLs."
|
3538 |
msgstr ""
|
3539 |
|
3540 |
+
#. Author URI of the plugin/theme
|
3541 |
msgid "https://happyforms.me"
|
3542 |
msgstr ""
|
3543 |
|
3546 |
"Your friendly drag and drop contact form builder for creating contact "
|
3547 |
"forms, lead generation forms, feedback forms, quote forms, survey forms and "
|
3548 |
"more!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3549 |
msgstr ""
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: contact, contact form, email, feedback form, form, form builder, custom fo
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.4
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 1.9.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -97,6 +97,12 @@ Yep! HappyForms free isn't going anywhere but for those looking for even more yo
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= 1.9.8 =
|
101 |
* Improvement: Improved appearance and available tools in visual editors.
|
102 |
* Bugfix: Fixed Email part which was not allowing empty value even when marked as optional part.
|
@@ -599,6 +605,9 @@ Yep! HappyForms free isn't going anywhere but for those looking for even more yo
|
|
599 |
|
600 |
== Upgrade Notice ==
|
601 |
|
|
|
|
|
|
|
602 |
= 1.9.8 =
|
603 |
* Form builder improvements. Bug fixes.
|
604 |
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.4
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.9.9
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 1.9.9 =
|
101 |
+
* Improvement: Improved compatibility with latest version of Divi.
|
102 |
+
* Bugfix: Fixed appearance of Submit button when displayed in line with form part.
|
103 |
+
* Bugfix: Fixed double border issue in Style step.
|
104 |
+
* Bugfix: Fixed "Reveal on focus" description mode in parts that support Prefix and Suffix.
|
105 |
+
|
106 |
= 1.9.8 =
|
107 |
* Improvement: Improved appearance and available tools in visual editors.
|
108 |
* Bugfix: Fixed Email part which was not allowing empty value even when marked as optional part.
|
605 |
|
606 |
== Upgrade Notice ==
|
607 |
|
608 |
+
= 1.9.9 =
|
609 |
+
* Improved compatibility with themes and bugfixes.
|
610 |
+
|
611 |
= 1.9.8 =
|
612 |
* Form builder improvements. Bug fixes.
|
613 |
|