| @@ -1,66 +1,50 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 5 | -?> | |
| 6 | -<div id="frm_form_editor_container" class="frm-m-12 <?php echo ( $has_fields ? 'frm-has-fields' : '' ); ?>"> | |
| 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="" /> | |
| 7 | 4 | |
| 8 | - <?php | |
| 9 | - if ( $has_fields ) { | |
| 10 | - // Add form messages. | |
| 11 | - require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); | |
| 12 | - } | |
| 13 | - ?> | |
| 5 | +<div id="frm_form_editor_container"> | |
| 14 | 6 | |
| 15 | - <div id="frm-fake-page" class="frm_hidden"> | |
| 16 | - <div class="frm-page-break"> | |
| 17 | - <div class="frm-collapse-page button frm-button-secondary frm-button-sm"> | |
| 18 | - <?php | |
| 19 | - /* translators: %s: The page number */ | |
| 20 | - printf( esc_html__( 'Page %s', 'formidable' ), '<span class="frm-page-num">1</span>' ); | |
| 21 | - ?> | |
| 22 | - <?php FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) ); ?> | |
| 23 | - </div> | |
| 24 | - </div> | |
| 7 | +<div class="postbox"> | |
| 8 | + <div id="titlediv" class="inside"> | |
| 9 | + <input type="text" name="name" value="<?php echo esc_attr( $form->name ); ?>" id="title" placeholder="<?php esc_attr_e( 'Enter title here', 'formidable' ); ?>" /> | |
| 25 | 10 | </div> |
| 26 | 11 | |
| 27 | - <ul id="frm-show-fields" class="frm_sorting inside"> | |
| 28 | - <?php | |
| 29 | - if ( ! empty( $values['fields'] ) ) { | |
| 30 | - $grid_helper = new FrmFieldGridHelper(); | |
| 31 | - $values['count'] = 0; | |
| 32 | - foreach ( $values['fields'] as $field ) { | |
| 33 | - $values['count']++; | |
| 34 | - $grid_helper->set_field( $field ); | |
| 35 | - $grid_helper->maybe_begin_field_wrapper(); | |
| 36 | - FrmFieldsController::load_single_field( $field, $values ); | |
| 37 | - $grid_helper->sync_list_size(); | |
| 38 | - unset( $field ); | |
| 39 | - } | |
| 40 | - $grid_helper->force_close_field_wrapper(); | |
| 41 | - unset( $grid_helper ); | |
| 42 | - } | |
| 43 | - ?> | |
| 44 | - </ul> | |
| 12 | + <div class="frm_no_fields <?php echo ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) ? 'frm_hidden' : ''; ?>"> | |
| 13 | + <div class="alignleft sketch1"> | |
| 14 | + <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png' ); ?>" alt="" /> | |
| 15 | + </div> | |
| 16 | + <div class="alignleft sketch1_text"> | |
| 17 | + <?php esc_html_e( '1. Name your form', 'formidable' ) ?> | |
| 18 | + </div> | |
| 45 | 19 | |
| 46 | - <p id="frm-form-button"> | |
| 47 | - <button class="frm_button_submit" disabled="disabled"> | |
| 48 | - <?php echo esc_attr( isset( $form->options['submit_value'] ) ? $form->options['submit_value'] : __( 'Submit', 'formidable' ) ); ?> | |
| 49 | - </button> | |
| 50 | - </p> | |
| 20 | + <div class="alignright sketch2"> | |
| 21 | + <?php esc_html_e( '2. Click or drag a field to add it to your form', 'formidable' ); ?> | |
| 22 | + <div class="clear"></div> | |
| 23 | + <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow2.png' ); ?>" alt="" /> | |
| 24 | + </div> | |
| 25 | + <div class="clear"></div> | |
| 51 | 26 | |
| 52 | - <div class="frm_no_fields"> | |
| 27 | + <div class="frm_drag_inst"><?php esc_html_e( 'Add Fields Here', 'formidable' ) ?></div> | |
| 53 | 28 | |
| 54 | - <div class="frm_drag_inst"> | |
| 55 | - <?php esc_html_e( 'Add Fields Here', 'formidable' ); ?> | |
| 56 | - </div> | |
| 57 | - <p> | |
| 58 | - <?php esc_html_e( 'Click or drag a field from the sidebar to add it to your form', 'formidable' ); ?> | |
| 59 | - </p> | |
| 60 | - <div class="clear"></div> | |
| 61 | - </div> | |
| 29 | + <div class="alignleft sketch3"> | |
| 30 | + <div class="alignright"><?php esc_html_e( '3. Save your form', 'formidable' ) ?></div> | |
| 31 | + <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow3.png' ); ?>" alt="" /> | |
| 32 | + </div> | |
| 33 | + <div class="clear"></div> | |
| 34 | + </div> | |
| 35 | +<ul id="new_fields" class="frm_sorting inside"> | |
| 36 | +<?php | |
| 37 | +if ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) { | |
| 38 | + $values['count'] = 0; | |
| 39 | + foreach ( $values['fields'] as $field ) { | |
| 40 | + $values['count']++; | |
| 41 | + FrmFieldsController::load_single_field( $field, $values ); | |
| 42 | + unset( $field ); | |
| 43 | + } | |
| 44 | +} | |
| 45 | +?> | |
| 46 | +</ul> | |
| 47 | +<input type="hidden" name="frm_end" value="1" /> | |
| 48 | +</div> | |
| 62 | 49 | |
| 63 | - <?php do_action( 'frm_page_footer', array( 'table' => 'form-builder' ) ); ?> | |
| 64 | 50 | </div> |
| 65 | -<?php | |
| 66 | -FrmFieldsHelper::bulk_options_overlay(); | |