| @@ -1,52 +1,44 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 5 | -?> | |
| 6 | 1 | <div id="frm_builder_page" class="frm_wrap"> |
| 7 | - <div class="frm_page_container"> | |
| 2 | + <div id="poststuff" class="frm_page_container"> | |
| 8 | 3 | |
| 4 | + <div id="post-body" class="metabox-holder columns-2"> | |
| 5 | + <div id="post-body-content"> | |
| 6 | + | |
| 9 | 7 | <?php |
| 10 | 8 | FrmAppHelper::get_admin_header( |
| 11 | 9 | array( |
| 12 | - 'label' => __( 'Build Form', 'formidable' ), | |
| 10 | + 'label' => ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build Form', 'formidable' ) ), | |
| 11 | + 'is_template' => $values['is_template'], | |
| 13 | 12 | 'form' => $form, |
| 13 | + 'new_link' => '?page=formidable&frm_action=new', | |
| 14 | 14 | 'hide_title' => true, |
| 15 | - 'publish' => array( 'FrmFormsController::form_publish_button', compact( 'values' ) ), | |
| 16 | 15 | ) |
| 17 | 16 | ); |
| 17 | + | |
| 18 | + // Add form messages | |
| 19 | + require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); | |
| 18 | 20 | ?> |
| 19 | 21 | |
| 20 | - <div class="columns-2"> | |
| 21 | - <?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_field_links.php' ); ?> | |
| 22 | - <div id="post-body-content"> | |
| 22 | + <div class="frm_form_builder with_frm_style"> | |
| 23 | 23 | |
| 24 | - <div class="frm_form_builder with_frm_style"> | |
| 24 | + <p class="frm_hidden frm-no-margin"> | |
| 25 | + <input type="button" value="<?php esc_attr_e( 'Update', 'formidable' ) ?>" class="frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary" /> | |
| 26 | + <span class="frm-loading-img"></span> | |
| 27 | + </p> | |
| 25 | 28 | |
| 26 | - <p class="frm_hidden frm-no-margin"> | |
| 27 | - <button class="frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary"> | |
| 28 | - <?php esc_attr_e( 'Update', 'formidable' ); ?>" | |
| 29 | - </button> | |
| 30 | - </p> | |
| 29 | + <form method="post" id="frm_build_form"> | |
| 30 | + <input type="hidden" name="frm_action" value="update" /> | |
| 31 | + <input type="hidden" name="action" value="update" /> | |
| 32 | + <input type="hidden" name="id" id="form_id" value="<?php echo (int) $id; ?>" /> | |
| 31 | 33 | |
| 32 | - <form method="post"> | |
| 33 | - <?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/form.php' ); ?> | |
| 34 | - </form> | |
| 34 | + <?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/form.php' ); ?> | |
| 35 | 35 | |
| 36 | - </div> | |
| 37 | - </div> | |
| 36 | + </form> | |
| 37 | + <?php FrmFormsHelper::builder_submit_button( $values ); ?> | |
| 38 | 38 | |
| 39 | - </div> | |
| 40 | - </div> | |
| 41 | -</div> | |
| 42 | -<div class="frm_hidden"> | |
| 43 | - <svg id="frm_break_field_group_svg" class="frmsvg"> | |
| 44 | - <use xlink:href="#frm_break_field_group_icon"></use> | |
| 45 | - </svg> | |
| 46 | - <svg id="frm_gear_svg" class="frmsvg"> | |
| 47 | - <use xlink:href="#frm_settings_icon"></use> | |
| 48 | - </svg> | |
| 49 | - <svg id="frm_trash_svg" class="frmsvg"> | |
| 50 | - <use xlink:href="#frm_delete_icon"></use> | |
| 51 | - </svg> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + <?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_field_links.php' ); ?> | |
| 42 | + </div> | |
| 43 | + </div> | |
| 52 | 44 | </div> |