| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
?> |
| 6 |
<div class="frm_wrap"> |
| 7 |
<?php |
| 8 |
FrmAppHelper::get_admin_header( |
| 9 |
array( |
| 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, |
| 13 |
) |
| 14 |
); |
| 15 |
FrmAppController::include_embed_form_icons(); |
| 16 |
?> |
| 17 |
<div class="wrap"> |
| 18 |
<?php |
| 19 |
require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php'; |
| 20 |
$wp_list_table->views(); |
| 21 |
?> |
| 22 |
|
| 23 |
<form id="posts-filter" method="get"> |
| 24 |
<input type="hidden" name="page" value="<?php echo esc_attr( FrmAppHelper::simple_get( 'page', 'sanitize_title' ) ); ?>" /> |
| 25 |
<input type="hidden" name="frm_action" value="list" /> |
| 26 |
<?php |
| 27 |
|
| 28 |
$wp_list_table->search_box( __( 'Search', 'formidable' ), 'entry' ); |
| 29 |
$wp_list_table->display(); |
| 30 |
|
| 31 |
if ( $wp_list_table->total_items === 1 && empty( $_REQUEST['s'] ) && $wp_list_table->status === '' ) { |
| 32 |
$is_default = false; |
| 33 |
foreach ( $wp_list_table->items as $item ) { |
| 34 |
$is_default = $item->form_key === 'contact-form'; |
| 35 |
} |
| 36 |
// Show no form created info if only the default form exists. |
| 37 |
if ( $is_default ) { |
| 38 |
$title = __( 'You have not created any forms yet', 'formidable' ); |
| 39 |
$info = __( 'Start collecting leads and data today.', 'formidable' ); |
| 40 |
include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_no_forms.php'; |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
?> |
| 45 |
</form> |
| 46 |
|
| 47 |
<?php do_action( 'frm_page_footer', array( 'table' => $wp_list_table ) ); ?> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
|
| 51 |
|