From f998b68566b499af552d8b464f7a02d50a748fb9 Mon Sep 17 00:00:00 2001 From: "vivi-the-going-merry[bot]" <308115520+vivi-the-going-merry[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:17:35 -0600 Subject: [PATCH 01/14] Fix Style builder labels pointing at hidden color-picker/slider inputs Color pickers: wpColorPicker() hides the original input and shows a .wp-color-result button instead, but nothing repointed the label's `for` to follow it - clicking a color swatch's own label did nothing. Fix this once in style.js for every color picker, right after init. Single-value sliders: the visible text input next to the slider handle had no id at all, so every label's `for` targeted the slider's hidden "real" input instead - same dead-click problem. Give that input an `{id}-value` id and repoint the corresponding labels. Scope: only sliders whose value is always a single number (font sizes, widths, heights, border widths/radii). Padding/margin sliders render as either a single input or a 4-way group depending on the currently saved value (FrmSliderStyleComponent::get_values()), so a static `for` can't target the right element either way - left out of scope, needs the component itself to own the association rather than the caller. Fixes #3439 (partial - see PR description for the excluded scope) --- classes/views/styles/_buttons.php | 10 +++++----- classes/views/styles/_check-box-radio-fields.php | 2 +- classes/views/styles/_field-colors.php | 4 ++-- classes/views/styles/_field-description.php | 2 +- classes/views/styles/_field-labels.php | 4 ++-- classes/views/styles/_field-sizes.php | 8 ++++---- classes/views/styles/_form-description.php | 2 +- classes/views/styles/_form-messages.php | 4 ++-- classes/views/styles/_form-title.php | 2 +- classes/views/styles/_general.php | 4 ++-- classes/views/styles/_quick-settings.php | 4 ++-- .../views/styles/components/templates/slider.php | 2 +- js/admin/style.js | 16 ++++++++++++++++ 13 files changed, 40 insertions(+), 24 deletions(-) diff --git a/classes/views/styles/_buttons.php b/classes/views/styles/_buttons.php index f2b9413f5a..a7c7145a3d 100644 --- a/classes/views/styles/_buttons.php +++ b/classes/views/styles/_buttons.php @@ -53,7 +53,7 @@ class="frm-style-item-heading">
@@ -89,7 +89,7 @@ class="frm-style-item-heading">
@@ -108,7 +108,7 @@ class="frm-style-item-heading">
@@ -145,7 +145,7 @@ class="frm-style-item-heading">
@@ -181,7 +181,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_check-box-radio-fields.php b/classes/views/styles/_check-box-radio-fields.php index df144b735b..94e602c663 100644 --- a/classes/views/styles/_check-box-radio-fields.php +++ b/classes/views/styles/_check-box-radio-fields.php @@ -23,7 +23,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_field-colors.php b/classes/views/styles/_field-colors.php index e01ca1b79a..2cb662bba4 100644 --- a/classes/views/styles/_field-colors.php +++ b/classes/views/styles/_field-colors.php @@ -75,7 +75,7 @@ class="frm-style-item-heading">
@@ -309,7 +309,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_field-description.php b/classes/views/styles/_field-description.php index 6de066c648..a2b0134d15 100644 --- a/classes/views/styles/_field-description.php +++ b/classes/views/styles/_field-description.php @@ -23,7 +23,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_field-labels.php b/classes/views/styles/_field-labels.php index 18fc1e79b8..fa476ee687 100644 --- a/classes/views/styles/_field-labels.php +++ b/classes/views/styles/_field-labels.php @@ -37,7 +37,7 @@ class="frm-style-item-heading">
@@ -109,7 +109,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_field-sizes.php b/classes/views/styles/_field-sizes.php index 65890b3223..5da73a0cf1 100644 --- a/classes/views/styles/_field-sizes.php +++ b/classes/views/styles/_field-sizes.php @@ -5,7 +5,7 @@ ?>
@@ -41,7 +41,7 @@ class="frm-style-item-heading">
@@ -58,7 +58,7 @@ class="frm-style-item-heading">
@@ -111,7 +111,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_form-description.php b/classes/views/styles/_form-description.php index 3608094cae..6e834f0d38 100644 --- a/classes/views/styles/_form-description.php +++ b/classes/views/styles/_form-description.php @@ -6,7 +6,7 @@
diff --git a/classes/views/styles/_form-messages.php b/classes/views/styles/_form-messages.php index 99bf728d1f..23211b0752 100644 --- a/classes/views/styles/_form-messages.php +++ b/classes/views/styles/_form-messages.php @@ -73,7 +73,7 @@ class="frm-style-item-heading">
@@ -149,7 +149,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_form-title.php b/classes/views/styles/_form-title.php index be28362bdc..0b1f34cc5c 100644 --- a/classes/views/styles/_form-title.php +++ b/classes/views/styles/_form-title.php @@ -23,7 +23,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_general.php b/classes/views/styles/_general.php index 01e1ee83a0..5508b9d080 100644 --- a/classes/views/styles/_general.php +++ b/classes/views/styles/_general.php @@ -65,7 +65,7 @@ class="frm-style-item-heading">
@@ -102,7 +102,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/_quick-settings.php b/classes/views/styles/_quick-settings.php index af08997ba6..a86ece648e 100644 --- a/classes/views/styles/_quick-settings.php +++ b/classes/views/styles/_quick-settings.php @@ -161,7 +161,7 @@ class="frm-style-item-heading">
@@ -207,7 +207,7 @@ class="frm-style-item-heading">
diff --git a/classes/views/styles/components/templates/slider.php b/classes/views/styles/components/templates/slider.php index 072c15ffbb..5a6dd376c7 100644 --- a/classes/views/styles/components/templates/slider.php +++ b/classes/views/styles/components/templates/slider.php @@ -129,7 +129,7 @@ print_range_input( __( 'Field value', 'formidable' ), $component['value_label'], $component['unit_measurement'] ); ?>
- is_measured_unit( $component['unit_measurement'] ) ); ?> /> + is_measured_unit( $component['unit_measurement'] ) ); ?> /> value="" id="" /> is_measured_unit( $component['vertical']['unit'] ) ); ?> /> + is_measured_unit( $component['vertical']['unit'] ) ); ?> /> is_measured_unit( $component['unit_measurement'] ) ); ?> /> + is_measured_unit( $component['unit_measurement'] ) ); ?> /> - + // Updated via JavaScript when Base Font Size changes. Otherwise, preserve the font sizes in Advanced Settings. + ?> + get_field_name( 'base_font_size' ), $style->post_content['base_font_size'], array( - 'id' => 'frm_base_font_size', - 'max_value' => 100, - 'not_show_in' => 'advanced-settings', - 'classname' => 'frm-base-font-size', + 'id' => 'frm_base_font_size', + 'max_value' => 100, + 'classname' => 'frm-base-font-size', ) ); ?>
+
diff --git a/classes/views/styles/components/templates/align.php b/classes/views/styles/components/templates/align.php index bcc76ddadc..e14ff6bf45 100644 --- a/classes/views/styles/components/templates/align.php +++ b/classes/views/styles/components/templates/align.php @@ -6,14 +6,19 @@
__( 'Left', 'formidable' ), + 'center' => __( 'Center', 'formidable' ), + 'right' => __( 'Right', 'formidable' ), + ); foreach ( $alignments as $align ) : if ( empty( $component['options'] ) || in_array( $align, $component['options'], true ) ) : - $radio_id = 'frm-align-' . $align . '-' . esc_attr( $field_name ); + $radio_id = ! empty( $component['id'] ) ? $component['id'] . '-' . $align : 'frm-align-' . $align . '-' . $field_name; ?> - type="radio" value="" /> -