diff --git a/assets/css/admin.scss b/assets/css/admin.scss index 325510358..d657272c2 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -9306,13 +9306,21 @@ .everest-forms_page_evf-settings { .everest-forms { padding: 20px; + overflow: hidden; } } .everest-forms { .everest-forms-settings { padding: 0 !important; - background: #ffffff; - box-shadow: 0px 6px 26px 0px rgba(10, 10, 10, .08); + gap: 24px; + background: transparent; + + &-wrapper { + box-shadow: 0px 6px 26px 0px rgba(10, 10, 10, .08); + background: #ffffff; + flex: 1; + display: flex; + } .everest-forms-header { display: flex; @@ -9322,6 +9330,7 @@ padding: 32px 0 20px; width: 300px; max-width: 100%; + transition: all .3s; &--top { text-align: center; @@ -9499,6 +9508,12 @@ } } } + + .ps__rail { + &-x { + display: none; + } + } } } @@ -9534,9 +9549,35 @@ } .everest-forms-settings-container { - padding: 26px 20px 52px 32px; + padding: 32px 20px 52px 32px; box-shadow: none; + .everest-forms-settings-main { + position: relative; + + .everest-forms-toggle-wrapper { + position: absolute; + right: 0; + top: 6px; + display: flex; + align-items: center; + gap: 6px; + + .evf-toggle-section { + .everest-forms-toggle-form { + margin: 0; + } + } + + .everest-forms-toggle-text { + font-size: 14px; + line-height: 24px; + color: #383838; + font-weight: 500; + } + } + } + .everest-forms-options-header { margin-bottom: 32px; @@ -9893,6 +9934,103 @@ } } + &-premium { + &-sidebar { + width: 300px; + max-width: 100%; + padding: 18px 10px 26px 10px; + transition: all .3s; + + h2 { + color: #222222; + font-size: 18px; + font-weight: 600; + line-height: 140%; + margin: 0; + padding-bottom: 16px; + margin-bottom: 20px; + border-bottom: 1px solid #EEE8F7; + } + + p { + margin: 0; + color: #383838; + font-size: 15px; + font-style: normal; + font-weight: 400; + line-height: 24px; + } + + h3 { + color: #383838; + font-size: 16px; + font-weight: 600; + line-height: 24px; + margin-top: 20px; + margin-bottom: 12px; + } + + ul { + margin: 0; + margin-bottom: 16px; + display: flex; + flex-direction: column; + gap: 12px; + + li { + color: #383838; + font-size: 15px; + font-weight: 400; + line-height: 23px; + margin-bottom: 0; + padding-left: 26px; + position: relative; + + &::before { + content: ""; + background-image: url("../images/icons/premium-list-check-icon.svg"); + background-repeat: no-repeat; + background-position: center; + background-size: 100%; + width: 18px; + height: 18px; + position: absolute; + left: 0; + top: 2px; + } + } + } + + a { + border-radius: 3px; + border: 1px solid #7545BB; + background: #7545BB; + padding: 10px 16px; + display: block; + color: #ffffff; + font-size: 14px; + font-style: normal; + font-weight: 500; + line-height: 24px; + text-decoration: none; + letter-spacing: .05px; + width: max-content; + margin: 20px 0; + transition: all .3s; + + &:hover { + background: #9159e3; + border-color: #9159e3; + } + } + + &.everest-forms-hidden { + margin-right: -325px; + display: unset; + } + } + } + .submit { margin: 0; padding: 0; diff --git a/assets/images/icons/premium-list-check-icon.svg b/assets/images/icons/premium-list-check-icon.svg new file mode 100644 index 000000000..ad1ceddcd --- /dev/null +++ b/assets/images/icons/premium-list-check-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/settings-icons/geolocation.svg b/assets/images/settings-icons/geolocation.svg index c58378a67..72022fd29 100644 --- a/assets/images/settings-icons/geolocation.svg +++ b/assets/images/settings-icons/geolocation.svg @@ -1,4 +1,11 @@ - - - + + + + + + + + + + diff --git a/assets/js/admin/admin.js b/assets/js/admin/admin.js index 3d11608b6..21036e627 100644 --- a/assets/js/admin/admin.js +++ b/assets/js/admin/admin.js @@ -32,8 +32,36 @@ $(document).on('change click', '#everest_forms_entries_reporting_frequency', handleReportingFrequencyChange); }); + // Function to handle changes in the premium sidebar. + $(document).ready(function () { + function handlePremiumSidebar() { + var isCheckboxChecked = $('#everest-forms-enable-premium-sidebar').is(':checked'); + localStorage.setItem('isPremiumSidebarEnabled', isCheckboxChecked); + document.cookie = 'isPremiumSidebarEnabled=' + isCheckboxChecked + '; path=/;'; + if (isCheckboxChecked) { + $('#everest-forms-settings-premium-sidebar').addClass('everest-forms-hidden'); + $('.everest-forms-toggle-text').text('Show Sidebar'); + } else { + $('#everest-forms-settings-premium-sidebar').removeClass('everest-forms-hidden'); + $('.everest-forms-toggle-text').text('Hide Sidebar'); + } + } + + var isPremiumSidebarEnabled = localStorage.getItem('isPremiumSidebarEnabled') === 'true'; + $('#everest-forms-enable-premium-sidebar').prop('checked', isPremiumSidebarEnabled); + if (isPremiumSidebarEnabled) { + $('#everest-forms-settings-premium-sidebar').addClass('everest-forms-hidden'); + $('.everest-forms-toggle-text').text('Show Sidebar'); + } else { + $('#everest-forms-settings-premium-sidebar').removeClass('everest-forms-hidden'); + $('.everest-forms-toggle-text').text('Hide Sidebar'); + } + handlePremiumSidebar(); + $(document).on('change', '#everest-forms-enable-premium-sidebar', handlePremiumSidebar); + }); + // Enable Perfect Scrollbar. $( document ).on( 'init_perfect_scrollbar', function() { var nav_wrapper = $( 'nav.evf-nav-tab-wrapper' ); diff --git a/changelog.txt b/changelog.txt index 342a4f5de..407bf4fe3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ == Changelog == += 3.0.1 - xx-xx-2024 +* Enhancement - Global Setting Premium Sidebar. + = 3.0.0.1 - 27-05-2024 * Fix - Form builder loading when recaptcha is enabled. * Tweak - Captcha name change to math captcha. diff --git a/includes/admin/views/html-admin-settings.php b/includes/admin/views/html-admin-settings.php index 4aca531c7..0c4d2f681 100644 --- a/includes/admin/views/html-admin-settings.php +++ b/includes/admin/views/html-admin-settings.php @@ -7,12 +7,17 @@ defined( 'ABSPATH' ) || exit; -$tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'everest_forms_sections_' . $current_tab ) || has_action( 'everest_forms_settings_' . $current_tab ); -$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : ''; +$tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'everest_forms_sections_' . $current_tab ) || has_action( 'everest_forms_settings_' . $current_tab ); +$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : ''; +$is_premium_sidebar_enabled = isset( $_COOKIE['isPremiumSidebarEnabled'] ) ? sanitize_text_field( wp_unslash( $_COOKIE['isPremiumSidebarEnabled'] ) ) : ''; +$is_premium_sidebar_class = $is_premium_sidebar_enabled ? 'everest-forms-hidden' : ''; if ( ! $tab_exists ) { wp_safe_redirect( admin_url( 'admin.php?page=evf-settings' ) ); exit; } + + + ?>
@@ -20,60 +25,113 @@

-
-
-
+ +
+
+ +
+
+ + + - - +
+ Hide Sidebar +
+ + +

+ + + + +

- -
- +
+ +
+ array( + 'href' => array(), + 'target' => array(), + ), + 'h2' => array(), + 'p' => array(), + 'h3' => array(), + 'ul' => array(), + 'li' => array(), + '!--' => array(), + ); - do_action( 'everest_forms_settings_' . $current_tab ); - ?> -

- - - - -

+ $content = '

Get Even More from Everest Forms with the Premium Plan

+

The free version of Everest Forms is just the start. Upgrade to our Pro version for everything you need for advanced form building.

+

Premium Benefits:

+
    +
  • Instant access to 35+ unique addons
  • +
  • Attention grabbing forms with advanced style customizer
  • +
  • Form security with custom captcha
  • +
  • Multiple payment options (PayPal, Stripe, etc.)
  • +
  • Interactive multi-step forms, and quizzes
  • +
  • Tables and graphics in Entries
  • +
  • Priority support for premium users
  • +
+

To enjoy all the benefits of Everest Forms Pro...

+ Get the Everest Forms Pro +

Thank you for choosing Everest Forms 😊

'; + $content = apply_filters( 'everest_forms_cta_promotiona_content', $content ); + echo wp_kses( $content, $allowed_html ); + ?>
+