| @@ -6,15 +6,16 @@ | ||
| 6 | 6 | <div class="frm_wrap"> |
| 7 | 7 | <?php |
| 8 | 8 | FrmAppHelper::get_admin_header( |
| 9 | 9 | array( |
| 10 | - 'label' => __( 'Forms', 'formidable' ), | |
| 10 | + 'label' => __( 'Forms', 'formidable' ), | |
| 11 | 11 | |
| 12 | - 'import_link' => true, | |
| 13 | - 'publish' => array( | |
| 12 | + 'import_link' => true, | |
| 13 | + 'publish' => array( | |
| 14 | 14 | 'FrmAppHelper::add_new_item_link', |
| 15 | 15 | array( |
| 16 | - 'trigger_new_form_modal' => current_user_can( 'frm_edit_forms' ), | |
| 16 | + 'create_form' => current_user_can( 'frm_edit_forms' ), | |
| 17 | + 'new_link' => admin_url( 'admin.php?page=' . FrmFormTemplatesController::PAGE_SLUG . '&return_page=forms' ), | |
| 17 | 18 | ), |
| 18 | 19 | ), |
| 19 | 20 | ) |
| 20 | 21 | ); |
| @@ -36,11 +37,13 @@ | ||
| 36 | 37 | $wp_list_table->display(); |
| 37 | 38 | |
| 38 | 39 | if ( $wp_list_table->total_items === 1 && empty( $_REQUEST['s'] ) && $wp_list_table->status === '' ) { |
| 39 | 40 | $is_default = false; |
| 41 | + | |
| 40 | 42 | foreach ( $wp_list_table->items as $item ) { |
| 41 | 43 | $is_default = $item->form_key === 'contact-form'; |
| 42 | 44 | } |
| 45 | + | |
| 43 | 46 | // Show no form created info if only the default form exists. |
| 44 | 47 | if ( $is_default ) { |
| 45 | 48 | $title = __( 'You have not created any forms yet', 'formidable' ); |
| 46 | 49 | $info = __( 'Start collecting leads and data today.', 'formidable' ); |
| @@ -53,5 +56,4 @@ | ||
| 53 | 56 | |
| 54 | 57 | <?php do_action( 'frm_page_footer', array( 'table' => $wp_list_table ) ); ?> |
| 55 | 58 | </div> |
| 56 | 59 | </div> |
| 57 | - | |