| @@ -6,18 +6,11 @@ | ||
| 6 | 6 | <div class="frm_wrap"> |
| 7 | 7 | <?php |
| 8 | 8 | FrmAppHelper::get_admin_header( |
| 9 | 9 | array( |
| 10 | - 'label' => __( 'Forms', 'formidable' ), | |
| 11 | - | |
| 12 | - 'import_link' => true, | |
| 13 | - 'publish' => array( | |
| 14 | - 'FrmAppHelper::add_new_item_link', | |
| 15 | - array( | |
| 16 | - 'create_form' => current_user_can( 'frm_edit_forms' ), | |
| 17 | - 'new_link' => admin_url( 'admin.php?page=' . FrmFormTemplatesController::PAGE_SLUG . '&return_page=forms' ), | |
| 18 | - ), | |
| 19 | - ), | |
| 10 | + 'label' => $params['template'] ? __( 'Templates', 'formidable' ) : __( 'Forms', 'formidable' ), | |
| 11 | + 'trigger_new_form_modal' => ! $params['template'] && current_user_can( 'frm_edit_forms' ), | |
| 12 | + 'import_link' => true, | |
| 20 | 13 | ) |
| 21 | 14 | ); |
| 22 | 15 | ?> |
| 23 | 16 | <div class="wrap"> |
| @@ -23,15 +16,13 @@ | ||
| 23 | 16 | <div class="wrap"> |
| 24 | 17 | <?php |
| 25 | 18 | require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php'; |
| 26 | 19 | $wp_list_table->views(); |
| 27 | -$form_type = FrmAppHelper::simple_get( 'form_type', 'sanitize_title', 'published' ); | |
| 28 | 20 | ?> |
| 29 | 21 | |
| 30 | 22 | <form id="posts-filter" method="get"> |
| 31 | 23 | <input type="hidden" name="page" value="<?php echo esc_attr( FrmAppHelper::simple_get( 'page', 'sanitize_title' ) ); ?>" /> |
| 32 | 24 | <input type="hidden" name="frm_action" value="list" /> |
| 33 | - <input type="hidden" name="form_type" value="<?php echo esc_attr( $form_type ); ?>" /> | |
| 34 | 25 | <?php |
| 35 | 26 | |
| 36 | 27 | $wp_list_table->search_box( __( 'Search', 'formidable' ), 'entry' ); |
| 37 | 28 | $wp_list_table->display(); |
| @@ -37,13 +28,11 @@ | ||
| 37 | 28 | $wp_list_table->display(); |
| 38 | 29 | |
| 39 | 30 | if ( $wp_list_table->total_items === 1 && empty( $_REQUEST['s'] ) && $wp_list_table->status === '' ) { |
| 40 | 31 | $is_default = false; |
| 41 | - | |
| 42 | 32 | foreach ( $wp_list_table->items as $item ) { |
| 43 | 33 | $is_default = $item->form_key === 'contact-form'; |
| 44 | 34 | } |
| 45 | - | |
| 46 | 35 | // Show no form created info if only the default form exists. |
| 47 | 36 | if ( $is_default ) { |
| 48 | 37 | $title = __( 'You have not created any forms yet', 'formidable' ); |
| 49 | 38 | $info = __( 'Start collecting leads and data today.', 'formidable' ); |