Skip to content
Merged
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
18 changes: 18 additions & 0 deletions classes/helpers/FrmStylesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,24 @@ public static function is_advanced_settings() {
return FrmAppHelper::get_param( 'section' ) === 'advanced-settings' && FrmAppHelper::get_param( 'page' ) === 'formidable-styles';
}

/**
* Get wrapper classname for style editor sections.
*
* @since x.x
*
* @param string $section_type
*
* @return string The style editor wrapper classname.
*/
public static function style_editor_get_wrapper_classname( $section_type ) {
$is_quick_settings = ( 'quick-settings' === $section_type );
$classname = 'frm-style-editor-form';
$classname .= ( ! self::is_advanced_settings() xor $is_quick_settings ) ? ' frm_hidden' : '';
$classname .= FrmAppHelper::pro_is_installed() ? ' frm-pro' : '';

return $classname;
}

/**
* Retrieve the background image URL of the submit button.
* It may be either a full URL string (used in versions prior to 6.14) or a numeric attachment ID (introduced in version 6.14).
Expand Down
8 changes: 7 additions & 1 deletion classes/views/styles/_quick-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@
'action_slug' => 'submit_bg_color',
'will_change' => array(
$frm_style->get_field_name( 'submit_bg_color' ),
$frm_style->get_field_name( 'slider_bar_color' ),
$frm_style->get_field_name( 'slider_color' ),
$frm_style->get_field_name( 'border_color_active' ),
$frm_style->get_field_name( 'submit_border_color' ),
$frm_style->get_field_name( 'progress_active_bg_color' ),
$frm_style->get_field_name( 'date_band_color' ),
$frm_style->get_field_name( 'date_head_bg_color' ),
$frm_style->get_field_name( 'toggle_on_color' ),
$frm_style->get_field_name( 'submit_active_border_color' ),
$frm_style->get_field_name( 'submit_active_bg_color' ),
$frm_style->get_field_name( 'submit_hover_bg_color' ),
$frm_style->get_field_name( 'submit_hover_border_color' ),
$frm_style->get_field_name( 'toggle_on_color' ),

),
)
);
Expand Down
4 changes: 2 additions & 2 deletions classes/views/styles/_style-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<span id="frm_style_name"><?php echo esc_html( $back_button_args['title'] ); ?></span>
</h2>

<div class="styling_settings <?php echo ! FrmStylesHelper::is_advanced_settings() ? 'frm_hidden' : ''; ?>">
<div class="styling_settings <?php echo esc_attr( FrmStylesHelper::style_editor_get_wrapper_classname( 'advanced-settings' ) ); ?>">
<?php FrmStylesController::do_accordion_sections( FrmStylesController::$screen, 'side', compact( 'style', 'frm_style' ) ); ?>
</div>

<div class="frm-quick-settings frm_grid_container <?php echo FrmStylesHelper::is_advanced_settings() ? 'frm_hidden' : ''; ?>">
<div class="frm-quick-settings frm_grid_container <?php echo esc_attr( FrmStylesHelper::style_editor_get_wrapper_classname( 'quick-settings' ) ); ?>">
<?php require_once FrmAppHelper::plugin_path() . '/classes/views/styles/_quick-settings.php'; ?>
</div>
4 changes: 3 additions & 1 deletion css/admin/style-components.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
position: relative;
height: 36px !important;
background-image: none !important;
background-color: white !important;
overflow: hidden;
}
.formidable_page_formidable-styles .frm-right-panel .frm-style-editor-form.frm-pro .frm-style-component .wp-picker-container button {
background-color: white !important;
}
Comment thread
Liviu-p marked this conversation as resolved.
.formidable_page_formidable-styles .frm-right-panel .frm-style-component .wp-picker-container:after {
content: '';
width: 20px;
Expand Down