| 1 |
<?php wp_nonce_field('frm_save_form_nonce', 'frm_save_form'); ?> |
| 2 |
<input type="hidden" name="status" value="<?php echo esc_attr( $values['status'] ); ?>" /> |
| 3 |
<input type="hidden" name="new_status" value="" /> |
| 4 |
|
| 5 |
<div id="frm_form_editor_container"> |
| 6 |
<div id="titlediv"> |
| 7 |
<input type="text" name="name" value="<?php echo esc_attr($form->name); ?>" id="title" placeholder="<?php esc_attr_e( 'Enter title here') ?>" /> |
| 8 |
<div id="edit-slug-box" class="hide-if-no-js"> |
| 9 |
<div id="frm_form_key_box" class="alignright"> |
| 10 |
<strong><?php esc_html_e( 'Form Key:', 'formidable' ) ?></strong> |
| 11 |
<div id="editable-post-name" class="frm_ipe_form_key" title="<?php esc_attr_e( 'Click to edit.', 'formidable' ) ?>"><?php echo esc_html( $form->form_key ); ?></div> |
| 12 |
</div> |
| 13 |
<div id="frm_form_desc" class="frm_ipe_form_desc alignleft"><?php echo ( $form->description == '' ) ? esc_html__( '(Click to add description)', 'formidable' ) : wp_kses_post( force_balance_tags( $form->description ) ); ?></div> |
| 14 |
<div class="frm_clear"></div> |
| 15 |
</div> |
| 16 |
</div> |
| 17 |
|
| 18 |
<div class="postbox"> |
| 19 |
<div class="frm_no_fields <?php echo ( isset($values['fields']) && ! empty($values['fields']) ) ? 'frm_hidden' : ''; ?>"> |
| 20 |
<div class="alignleft sketch1"> |
| 21 |
<img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png' ); ?>" alt="" /> |
| 22 |
</div> |
| 23 |
<div class="alignleft sketch1_text"> |
| 24 |
<?php esc_html_e( '1. Name your form', 'formidable' ) ?> |
| 25 |
</div> |
| 26 |
|
| 27 |
<div class="alignright sketch2"> |
| 28 |
<?php esc_html_e( '2. Click or drag a field to add it to your form', 'formidable' ); ?> |
| 29 |
<div class="clear"></div> |
| 30 |
<img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow2.png' ); ?>" alt="" /> |
| 31 |
</div> |
| 32 |
<div class="clear"></div> |
| 33 |
|
| 34 |
<div class="frm_drag_inst"><?php esc_html_e( 'Add Fields Here', 'formidable' ) ?></div> |
| 35 |
<p id="frm_create_template_form"> |
| 36 |
<?php esc_html_e( 'Or load fields from a template', 'formidable' ); ?> |
| 37 |
<select id="frm_create_template_dropdown"> |
| 38 |
<?php foreach ( $all_templates as $temp ) { ?> |
| 39 |
<option value="<?php echo esc_attr( $temp->id ) ?>"><?php echo FrmAppHelper::truncate( $temp->name, 40 ) ?></option> |
| 40 |
<?php } ?> |
| 41 |
</select> |
| 42 |
<input type="button" id="frm_create_template_button" class="button-secondary" value="<?php esc_attr_e( 'Load Template', 'formidable' ) ?>" /> |
| 43 |
</p> |
| 44 |
|
| 45 |
<div class="alignleft sketch3"> |
| 46 |
<div class="alignright"><?php esc_html_e( '3. Save your form', 'formidable' ) ?></div> |
| 47 |
<img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow3.png' ); ?>" alt="" /> |
| 48 |
</div> |
| 49 |
<div class="clear"></div> |
| 50 |
</div> |
| 51 |
<ul id="new_fields" class="frm_sorting inside"> |
| 52 |
<?php |
| 53 |
if ( isset($values['fields']) && ! empty($values['fields']) ) { |
| 54 |
$count = 0; |
| 55 |
foreach ( $values['fields'] as $field ) { |
| 56 |
$count++; |
| 57 |
$field_name = 'item_meta[' . $field['id'] . ']'; |
| 58 |
$html_id = FrmFieldsHelper::get_html_id($field); |
| 59 |
require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_field.php' ); |
| 60 |
unset($field, $field_name); |
| 61 |
} |
| 62 |
unset($count); |
| 63 |
} |
| 64 |
?> |
| 65 |
</ul> |
| 66 |
</div> |
| 67 |
|
| 68 |
</div> |
| 69 |
|