Skip to content

Commit

Permalink
Merge branch 'pre-develop' into EVF-1026-fix/everest-forms-block-desi…
Browse files Browse the repository at this point in the history
…gn-all-messed-up-when-viewed-in-block-editor
  • Loading branch information
riteelama committed Jun 28, 2024
2 parents 085ab88 + e578fb4 commit 51d32d5
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 52 deletions.
144 changes: 141 additions & 3 deletions assets/css/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -9322,6 +9330,7 @@
padding: 32px 0 20px;
width: 300px;
max-width: 100%;
transition: all .3s;

&--top {
text-align: center;
Expand Down Expand Up @@ -9499,6 +9508,12 @@
}
}
}

.ps__rail {
&-x {
display: none;
}
}
}
}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions assets/images/icons/premium-list-check-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions assets/images/settings-icons/geolocation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions assets/js/admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading

0 comments on commit 51d32d5

Please sign in to comment.