Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - Forms table design #1374

Open
wants to merge 1 commit into
base: pre-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions assets/css/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10223,3 +10223,80 @@ body {
#evf-edit-form-name {
width: 100%;
}

.everest-forms-form-listing__header {
display: flex;
width: 100%;
padding: 0 24px;
align-items: center;
gap: 30px;
border-bottom: 1px solid #E2E8F0;
background: var(--white, #FFF);
margin-left: -20px;
margin-top: -10px;
margin-bottom: 40px;

div#everest-forms-header__logo {
display: flex;
align-items: center;
gap: 2px;
height: 74px;
}

button#evf-form-listing__screen-options {
color: #222222;
font-size: 14px;
line-height: 21px;
border-color: #eaeaea;
border-radius: 4px;
padding: 8px 16px;
margin-left: 79%;
background: #eaeaea;
}

button#show-settings-link{
display: none;
}

span#everest-forms-logo__separator {
padding-left: 20px;
color: #e2e8f0;
font-size: 40px;
font-weight: 100;
}

a#everest-forms-form-listing__heading {
font-size: 16px;
text-decoration: none;
font-weight: 600;
color: #222222;
}
}

#everest-forms-list-table__container {
background-color: #ffffff;
padding: 24px;
margin: 25px auto;
border-radius: 7px;

table.forms{
border-radius: 5px;
}

div.everest-forms-list-table-container__header{
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 15px;

a{
color: #7545BB;
border-color: #7545BB;
}
}

}

button#show-settings-link{
display: none;
}
5 changes: 5 additions & 0 deletions assets/js/admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@

// Add an event listener for changes and on the click in the reporting frequency
$(document).on('change click', '#everest_forms_entries_reporting_frequency', handleReportingFrequencyChange);


$('#evf-form-listing__screen-options').on('click', function() {
$("#show-settings-link").click();
});
});

// Function to handle changes in the premium sidebar.
Expand Down
58 changes: 40 additions & 18 deletions includes/admin/class-evf-admin-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,46 @@ public static function table_list_output() {
$forms_table_list->prepare_items();
?>
<div class="wrap">
<h1 class="wp-heading-inline"><?php esc_html_e( 'All Forms', 'everest-forms' ); ?></h1>
<?php if ( current_user_can( 'everest_forms_create_forms' ) ) : ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-builder&create-form=1' ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New', 'everest-forms' ); ?></a>
<?php endif; ?>
<hr class="wp-header-end">

<?php settings_errors(); ?>

<form id="form-list" method="post">
<input type="hidden" name="page" value="everest-forms"/>
<?php
$forms_table_list->views();
$forms_table_list->search_box( __( 'Search Forms', 'everest-forms' ), 'everest-forms' );
$forms_table_list->display();

wp_nonce_field( 'save', 'everest-forms_nonce' );
?>
</form>
<div class="everest-forms-form-listing__header">
<div id="everest-forms-header__logo">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="26" viewBox="0 0 32 26" fill="none">
<path d="M25.8984 0H19.6016L21.5313 3.24999H27.8282L25.8984 0Z" fill="#5317AA"/>
<path d="M29.8594 6.49988H23.5625L25.5938 9.74987H31.8906L29.8594 6.49988Z" fill="#5317AA"/>
<path d="M29.7579 22.75H28.8438H26.0001H5.78907L15.8438 6.29686L20.0079 13H19.0938H15.8438L13.9141 16.25H15.8438H17.1641H25.7969L15.8438 0.203094L0 26H2.84375H28.8438H31.7891L29.7579 22.75Z" fill="#5317AA"/>
</svg>
<span id="everest-forms-logo__separator">|</span>
</div>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-builder' ) ); ?>" id="everest-forms-form-listing__heading"><?php esc_html_e( 'All Forms', 'everest-forms' ); ?></a>
<button class="button" id="evf-form-listing__screen-options">
<?php esc_html_e( 'Screen Options', 'everest-forms' ); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
<path d="M6 8.75C5.85 8.75 5.75 8.7 5.65 8.6L1.15 4.1C0.95 3.9 0.95 3.6 1.15 3.4C1.35 3.2 1.65 3.2 1.85 3.4L6 7.55L10.15 3.4C10.35 3.2 10.65 3.2 10.85 3.4C11.05 3.6 11.05 3.9 10.85 4.1L6.35 8.6C6.25 8.7 6.15 8.75 6 8.75Z" fill="#383838"/>
</svg>
</button>
</div>

<div id="everest-forms-list-table__container">
<div class="everest-forms-list-table-container__header">
<h2 class="wp-heading-inline"><?php esc_html_e( 'All Forms', 'everest-forms' ); ?></h2>
<?php if ( current_user_can( 'everest_forms_create_forms' ) ) : ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-builder&create-form=1' ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New', 'everest-forms' ); ?></a>
<?php endif; ?>
</div>
<hr class="wp-header-end">

<?php settings_errors(); ?>

<form id="form-list" method="post">
<input type="hidden" name="page" value="everest-forms"/>
<?php
$forms_table_list->views();
$forms_table_list->search_box( __( 'Search Forms', 'everest-forms' ), 'everest-forms' );
$forms_table_list->display();

wp_nonce_field( 'save', 'everest-forms_nonce' );
?>
</form>
</div>
</div>
<?php
}
Expand Down
Loading