| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
?> |
| 6 |
<p class="howto"> |
| 7 |
<?php esc_html_e( 'Select a style for this form and set your button text.', 'formidable' ); ?> |
| 8 |
</p> |
| 9 |
<table class="form-table"> |
| 10 |
<tr> |
| 11 |
<td class="frm_left_label"> |
| 12 |
<label for="custom_style"> |
| 13 |
<?php esc_html_e( 'Style Template', 'formidable' ); ?> |
| 14 |
</label> |
| 15 |
</td> |
| 16 |
<td> |
| 17 |
<?php if ( $no_global_style ) { ?> |
| 18 |
<p class="howto"> |
| 19 |
<?php esc_html_e( 'The form styling has been disabled in the Global settings.', 'formidable' ); ?> |
| 20 |
</p> |
| 21 |
<input type="hidden" name="options[custom_style]" value="<?php echo esc_attr( $values['custom_style'] ); ?>" /> |
| 22 |
<?php } else { ?> |
| 23 |
<select name="options[custom_style]" id="custom_style"> |
| 24 |
<option value="1" <?php selected( $values['custom_style'], 1 ); ?>> |
| 25 |
<?php esc_html_e( 'Always use default', 'formidable' ); ?> |
| 26 |
</option> |
| 27 |
<?php foreach ( $styles as $s ) { ?> |
| 28 |
<option value="<?php echo esc_attr( $s->ID ); ?>" <?php selected( $s->ID, $values['custom_style'] ); ?>> |
| 29 |
<?php echo esc_html( $s->post_title . ( empty( $s->menu_order ) ? '' : ' (' . __( 'default', 'formidable' ) . ')' ) ); ?> |
| 30 |
</option> |
| 31 |
<?php } ?> |
| 32 |
<option value="0" |
| 33 |
<?php |
| 34 |
selected( $values['custom_style'], 0 ); |
| 35 |
selected( $values['custom_style'], '' ); |
| 36 |
?>> |
| 37 |
<?php esc_html_e( 'Do not use Formidable styling', 'formidable' ); ?> |
| 38 |
</option> |
| 39 |
</select> |
| 40 |
<?php } ?> |
| 41 |
</td> |
| 42 |
</tr> |
| 43 |
<?php do_action( 'frm_add_form_style_tab_options', $values ); ?> |
| 44 |
<tr> |
| 45 |
<td colspan="2"> |
| 46 |
<h3><?php esc_html_e( 'Buttons', 'formidable' ); ?></h3> |
| 47 |
</td> |
| 48 |
</tr> |
| 49 |
<tr> |
| 50 |
<td><label for="frm_submit_button_text"><?php esc_html_e( 'Submit Button Text', 'formidable' ); ?></label></td> |
| 51 |
<td> |
| 52 |
<input id="frm_submit_button_text" type="text" name="options[submit_value]" value="<?php echo esc_attr( $values['submit_value'] ); ?>" /> |
| 53 |
</td> |
| 54 |
</tr> |
| 55 |
<?php do_action( 'frm_add_form_button_options', $values ); ?> |
| 56 |
</table> |
| 57 |
|