edit-field.php
6 years ago
final-integration-form-delete.php
6 years ago
modal-integration.php
6 years ago
modal-migrate-ctct.php
6 years ago
modal-settings-edit-palette.php
6 years ago
optin-fields.php
6 years ago
preview-dialog.php
6 years ago
remove-active-integration.php
6 years ago
optin-fields.php
141 lines
| 1 | <?php |
| 2 | $fields = [ |
| 3 | 'name' => [ |
| 4 | 'icon' => 'profile-male', |
| 5 | 'label' => __( 'Name', 'wordpress-popup' ), |
| 6 | ], |
| 7 | 'email' => [ |
| 8 | 'icon' => 'mail', |
| 9 | 'label' => __( 'Email', 'wordpress-popup' ), |
| 10 | ], |
| 11 | 'phone' => [ |
| 12 | 'icon' => 'phone', |
| 13 | 'label' => __( 'Phone', 'wordpress-popup' ), |
| 14 | ], |
| 15 | 'address' => [ |
| 16 | 'icon' => 'pin', |
| 17 | 'label' => __( 'Address', 'wordpress-popup' ), |
| 18 | ], |
| 19 | 'url' => [ |
| 20 | 'icon' => 'web-globe-world', |
| 21 | 'label' => __( 'Website', 'wordpress-popup' ), |
| 22 | ], |
| 23 | 'text' => [ |
| 24 | 'icon' => 'style-type', |
| 25 | 'label' => __( 'Text', 'wordpress-popup' ), |
| 26 | ], |
| 27 | 'number' => [ |
| 28 | 'icon' => 'element-number', |
| 29 | 'label' => __( 'Number', 'wordpress-popup' ), |
| 30 | ], |
| 31 | 'datepicker' => [ |
| 32 | 'icon' => 'calendar', |
| 33 | 'label' => __( 'Datepicker', 'wordpress-popup' ), |
| 34 | ], |
| 35 | 'timepicker' => [ |
| 36 | 'icon' => 'clock', |
| 37 | 'label' => __( 'Timepicker', 'wordpress-popup' ), |
| 38 | ], |
| 39 | 'recaptcha' => [ |
| 40 | 'icon' => 'recaptcha', |
| 41 | 'label' => __( 'reCaptcha', 'wordpress-popup' ), |
| 42 | 'single' => true, |
| 43 | ], |
| 44 | 'gdpr' => [ |
| 45 | 'icon' => 'gdpr', |
| 46 | 'label' => __( 'GDPR Approval', 'wordpress-popup' ), |
| 47 | 'single' => true, |
| 48 | ], |
| 49 | 'hidden' => [ |
| 50 | 'icon' => 'eye-hide', |
| 51 | 'label' => __( 'Hidden Field', 'wordpress-popup' ), |
| 52 | ], |
| 53 | ]; |
| 54 | |
| 55 | ?> |
| 56 | <div id="hustle-dialog--optin-fields" class="sui-dialog" aria-hidden="true" tabindex="-1"> |
| 57 | |
| 58 | <div class="sui-dialog-overlay sui-fade-out"></div> |
| 59 | |
| 60 | <div role="dialog" |
| 61 | class="sui-dialog-content sui-bounce-out" |
| 62 | aria-labelledby="dialogTitle" |
| 63 | aria-describedby="dialogDescription"> |
| 64 | |
| 65 | <div class="sui-box" role="document"> |
| 66 | |
| 67 | <div class="sui-box-header"> |
| 68 | |
| 69 | |
| 70 | <h3 class="sui-box-title" id="dialogTitle"><?php esc_html_e( 'Insert Fields', 'wordpress-popup' ); ?></h3> |
| 71 | |
| 72 | <div class="sui-actions-right"> |
| 73 | |
| 74 | <button class="hustle-cancel-insert-fields sui-dialog-close"> |
| 75 | <span class="sui-screen-reader-text"><?php esc_html_e( 'Close this dialog window', 'wordpress-popup' ); ?></span> |
| 76 | </button> |
| 77 | |
| 78 | </div> |
| 79 | |
| 80 | </div> |
| 81 | |
| 82 | <div class="sui-box-body"> |
| 83 | |
| 84 | <p><?php esc_html_e( 'Choose which fields you want to insert into your opt-in form.', 'wordpress-popup' ); ?></p> |
| 85 | |
| 86 | </div> |
| 87 | |
| 88 | <div class="sui-box-selectors sui-box-selectors-col-5"> |
| 89 | |
| 90 | <ul class="sui-spacing-slim"> |
| 91 | |
| 92 | <?php foreach ( $fields as $field_type => $data ) : ?> |
| 93 | |
| 94 | <li><label for="hustle-optin-insert-field--<?php echo esc_attr( $field_type ); ?>" class="sui-box-selector sui-box-selector-vertical <?php echo empty( $data['single'] ) ? '' : 'hustle-skip'; ?>"> |
| 95 | <input |
| 96 | id="hustle-optin-insert-field--<?php echo esc_attr( $field_type ); ?>" |
| 97 | type="checkbox" |
| 98 | value="<?php echo esc_attr( $field_type ); ?>" |
| 99 | name="optin_fields" |
| 100 | <?php |
| 101 | if ( ! empty( $data['single'] ) ) { |
| 102 | disabled( array_key_exists( $field_type, $form_elements ) ); |
| 103 | checked( array_key_exists( $field_type, $form_elements ) ); |
| 104 | } |
| 105 | ?> |
| 106 | /> |
| 107 | <span> |
| 108 | <i class="sui-icon-<?php echo esc_attr( $data['icon'] ); ?>" aria-hidden="true"></i> |
| 109 | <?php echo esc_html( $data['label'] ); ?> |
| 110 | </span> |
| 111 | </label></li> |
| 112 | |
| 113 | <?php endforeach; ?> |
| 114 | |
| 115 | </ul> |
| 116 | |
| 117 | </div> |
| 118 | |
| 119 | <div class="sui-box-footer"> |
| 120 | |
| 121 | <button class="sui-button sui-button-ghost hustle-cancel-insert-fields"> |
| 122 | <?php esc_attr_e( 'Cancel', 'wordpress-popup' ); ?> |
| 123 | </button> |
| 124 | |
| 125 | <div class="sui-actions-right"> |
| 126 | |
| 127 | <button id="hustle-insert-fields" class="sui-button sui-button-blue"> |
| 128 | <span class="sui-loading-text"><?php esc_attr_e( 'Insert Fields', 'wordpress-popup'); ?></span> |
| 129 | <i class="sui-icon-loader sui-loading" aria-hidden="true"></i> |
| 130 | </button> |
| 131 | |
| 132 | </div> |
| 133 | |
| 134 | </div> |
| 135 | |
| 136 | </div> |
| 137 | |
| 138 | </div> |
| 139 | |
| 140 | </div> |
| 141 |