| @@ -1,65 +1,65 @@ | ||
| 1 | -<table class="form-table"> | |
| 2 | - <tr class="wpuf-redirect-to"> | |
| 3 | - <th><?php esc_html_e( 'Redirect To', 'weforms' ); ?></th> | |
| 4 | - <td> | |
| 5 | - <select v-model="settings.redirect_to"> | |
| 6 | - <?php | |
| 7 | - $redirect_options = [ | |
| 8 | - 'same' => __( 'Same Page', 'weforms' ), | |
| 9 | - 'page' => __( 'To a page', 'weforms' ), | |
| 10 | - 'url' => __( 'To a custom URL', 'weforms' ), | |
| 11 | - ]; | |
| 12 | - foreach ($redirect_options as $to => $label) { | |
| 13 | - printf( '<option value="%s"%s>%s</option>', esc_html( $to ), '', esc_html( $label ) ); | |
| 14 | - } | |
| 15 | - ?> | |
| 16 | - </select> | |
| 17 | - <p class="description"> | |
| 18 | - <?php esc_html_e( 'After successful submit, where the page will redirect to. This redirect option will not work if Show Report in Frontend option is enabled.', 'weforms' ) ?> | |
| 19 | - </p> | |
| 20 | - </td> | |
| 21 | - </tr> | |
| 22 | - | |
| 23 | - <tr class="wpuf-same-page" v-show="settings.redirect_to == 'same'"> | |
| 24 | - <th><?php esc_html_e( 'Message to show', 'weforms' ); ?></th> | |
| 25 | - <td> | |
| 26 | - <textarea rows="3" cols="40" v-model="settings.message"></textarea> | |
| 27 | - </td> | |
| 28 | - </tr> | |
| 29 | - | |
| 30 | - <tr class="wpuf-page-id" v-show="settings.redirect_to == 'page'"> | |
| 31 | - <th><?php esc_html_e( 'Page', 'weforms' ); ?></th> | |
| 32 | - <td> | |
| 33 | - <?php $dropdown = wp_dropdown_pages( [ | |
| 34 | - 'name' => 'wpuf_settings[page_id]', | |
| 35 | - 'show_option_none' => wp_kses_post( __('— Select a page —', 'weforms') ), | |
| 36 | - 'echo' => false | |
| 37 | - ] ); | |
| 38 | - | |
| 39 | - echo str_replace('<select', '<select v-model="settings.page_id"', $dropdown ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped | |
| 40 | - | |
| 41 | - ?> | |
| 42 | - </td> | |
| 43 | - </tr> | |
| 44 | - | |
| 45 | - <tr class="wpuf-url" v-show="settings.redirect_to == 'url'"> | |
| 46 | - <th><?php esc_html_e( 'Custom URL', 'weforms' ); ?></th> | |
| 47 | - <td> | |
| 48 | - <input type="url" v-model="settings.url" class="regular-text"> | |
| 49 | - </td> | |
| 50 | - </tr> | |
| 51 | - | |
| 52 | - <tr class="wpuf-submit-text"> | |
| 53 | - <th><?php esc_html_e( 'Submit Button text', 'weforms' ); ?></th> | |
| 54 | - <td> | |
| 55 | - <input type="text" v-model="settings.submit_text" class="regular-text"> | |
| 56 | - </td> | |
| 57 | - </tr> | |
| 58 | - | |
| 59 | - <?php | |
| 60 | - /** | |
| 61 | - * @since 1.1.0 | |
| 62 | - */ | |
| 63 | - do_action( 'weforms_form_settings_form' ); | |
| 64 | - ?> | |
| 65 | -</table> | |
| 1 | +<table class="form-table"> | |
| 2 | + <tr class="wpuf-redirect-to"> | |
| 3 | + <th><?php _e( 'Redirect To', 'weforms' ); ?></th> | |
| 4 | + <td> | |
| 5 | + <select v-model="settings.redirect_to"> | |
| 6 | + <?php | |
| 7 | + $redirect_options = array( | |
| 8 | + 'same' => __( 'Same Page', 'weforms' ), | |
| 9 | + 'page' => __( 'To a page', 'weforms' ), | |
| 10 | + 'url' => __( 'To a custom URL', 'weforms' ) | |
| 11 | + ); | |
| 12 | + | |
| 13 | + foreach ($redirect_options as $to => $label) { | |
| 14 | + printf('<option value="%s"%s>%s</option>', $to, '', $label ); | |
| 15 | + } | |
| 16 | + ?> | |
| 17 | + </select> | |
| 18 | + <p class="description"> | |
| 19 | + <?php _e( 'After successfull submit, where the page will redirect to', 'weforms' ) ?> | |
| 20 | + </p> | |
| 21 | + </td> | |
| 22 | + </tr> | |
| 23 | + | |
| 24 | + <tr class="wpuf-same-page" v-show="settings.redirect_to == 'same'"> | |
| 25 | + <th><?php _e( 'Message to show', 'weforms' ); ?></th> | |
| 26 | + <td> | |
| 27 | + <textarea rows="3" cols="40" v-model="settings.message"></textarea> | |
| 28 | + </td> | |
| 29 | + </tr> | |
| 30 | + | |
| 31 | + <tr class="wpuf-page-id" v-show="settings.redirect_to == 'page'"> | |
| 32 | + <th><?php _e( 'Page', 'weforms' ); ?></th> | |
| 33 | + <td> | |
| 34 | + <?php $dropdown = wp_dropdown_pages( array( | |
| 35 | + 'name' => 'wpuf_settings[page_id]', | |
| 36 | + 'show_option_none' => __( '— Select a page —', 'weforms' ), | |
| 37 | + 'echo' => false | |
| 38 | + ) ); | |
| 39 | + | |
| 40 | + echo str_replace('<select', '<select v-model="settings.page_id"', $dropdown ); | |
| 41 | + ?> | |
| 42 | + </td> | |
| 43 | + </tr> | |
| 44 | + | |
| 45 | + <tr class="wpuf-url" v-show="settings.redirect_to == 'url'"> | |
| 46 | + <th><?php _e( 'Custom URL', 'weforms' ); ?></th> | |
| 47 | + <td> | |
| 48 | + <input type="url" v-model="settings.url" class="regular-text"> | |
| 49 | + </td> | |
| 50 | + </tr> | |
| 51 | + | |
| 52 | + <tr class="wpuf-submit-text"> | |
| 53 | + <th><?php _e( 'Submit Button text', 'weforms' ); ?></th> | |
| 54 | + <td> | |
| 55 | + <input type="text" v-model="settings.submit_text" class="regular-text"> | |
| 56 | + </td> | |
| 57 | + </tr> | |
| 58 | + | |
| 59 | + <?php | |
| 60 | + /** | |
| 61 | + * @since 1.1.0 | |
| 62 | + */ | |
| 63 | + do_action( 'weforms_form_settings_form' ); | |
| 64 | + ?> | |
| 65 | +</table> | |