← All changes
|
classes/views/styles/components/templates/slider.php
+27
-27
6.26
→
trunk
View file →
| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | <div class="<?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> > |
| 7 | 7 | <div class="frm-slider-component frm-has-multiple-values frm-group-sliders" data-display-sliders="top,bottom" data-type="vertical" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 8 | 8 | <div class="frm-flex-justify"> |
| 9 | 9 | <div class="frm-slider-container"> |
| 10 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-top-bottom' ); ?> | |
| 10 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-top-bottom' ); ?> | |
| 11 | 11 | <span class="frm-slider" tabindex="0"> |
| 12 | 12 | <span class="frm-slider-active-track"> |
| 13 | 13 | <span class="frm-slider-bullet"> |
| 14 | 14 | <span class="frm-slider-value-label"><?php echo (int) $component['vertical']['value']; ?></span> |
| @@ -16,10 +16,10 @@ | ||
| 16 | 16 | </span> |
| 17 | 17 | </span> |
| 18 | 18 | </div> |
| 19 | 19 | <div class="frm-slider-value"> |
| 20 | - <input aria-label="<?php echo esc_attr__( 'Vertical value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['vertical']['value'] ); ?>" /> | |
| 21 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 20 | + <input aria-label="<?php esc_attr_e( 'Vertical value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['vertical']['value'] ); ?>" /> | |
| 21 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 22 | 22 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 23 | 23 | <option <?php selected( $component['vertical']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 24 | 24 | <?php endforeach; ?> |
| 25 | 25 | </select> |
| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | </div> |
| 29 | 29 | <div class="frm-slider-component frm-has-multiple-values frm_hidden" data-type="top" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 30 | 30 | <div class="frm-flex-justify"> |
| 31 | 31 | <div class="frm-slider-container"> |
| 32 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-top' ); ?> | |
| 32 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-top' ); ?> | |
| 33 | 33 | <span class="frm-slider" tabindex="0"> |
| 34 | 34 | <span class="frm-slider-active-track"> |
| 35 | 35 | <span class="frm-slider-bullet"> |
| 36 | 36 | <span class="frm-slider-value-label"><?php echo (int) $component['top']['value']; ?></span> |
| @@ -38,10 +38,10 @@ | ||
| 38 | 38 | </span> |
| 39 | 39 | </span> |
| 40 | 40 | </div> |
| 41 | 41 | <div class="frm-slider-value"> |
| 42 | - <input aria-label="<?php echo esc_attr__( 'Top value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['top']['value'] ); ?>" /> | |
| 43 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 42 | + <input aria-label="<?php esc_attr_e( 'Top value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['top']['value'] ); ?>" /> | |
| 43 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 44 | 44 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 45 | 45 | <option <?php selected( $component['top']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 46 | 46 | <?php endforeach; ?> |
| 47 | 47 | </select> |
| @@ -50,9 +50,9 @@ | ||
| 50 | 50 | </div> |
| 51 | 51 | <div class="frm-slider-component frm-has-multiple-values frm_hidden" data-type="bottom" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 52 | 52 | <div class="frm-flex-justify"> |
| 53 | 53 | <div class="frm-slider-container"> |
| 54 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-bottom' ); ?> | |
| 54 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-bottom' ); ?> | |
| 55 | 55 | <span class="frm-slider" tabindex="0"> |
| 56 | 56 | <span class="frm-slider-active-track"> |
| 57 | 57 | <span class="frm-slider-bullet"> |
| 58 | 58 | <span class="frm-slider-value-label"><?php echo (int) $component['bottom']['value']; ?></span> |
| @@ -60,10 +60,10 @@ | ||
| 60 | 60 | </span> |
| 61 | 61 | </span> |
| 62 | 62 | </div> |
| 63 | 63 | <div class="frm-slider-value"> |
| 64 | - <input aria-label="<?php echo esc_attr__( 'Bottom value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['bottom']['value'] ); ?>" /> | |
| 65 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 64 | + <input aria-label="<?php esc_attr_e( 'Bottom value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['bottom']['value'] ); ?>" /> | |
| 65 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 66 | 66 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 67 | 67 | <option <?php selected( $component['bottom']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 68 | 68 | <?php endforeach; ?> |
| 69 | 69 | </select> |
| @@ -72,9 +72,9 @@ | ||
| 72 | 72 | </div> |
| 73 | 73 | <div class="frm-slider-component frm-has-multiple-values frm-group-sliders" data-display-sliders="left,right" data-type="horizontal" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 74 | 74 | <div class="frm-flex-justify"> |
| 75 | 75 | <div class="frm-slider-container"> |
| 76 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-left-right' ); ?> | |
| 76 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-left-right' ); ?> | |
| 77 | 77 | <span class="frm-slider" tabindex="0"> |
| 78 | 78 | <span class="frm-slider-active-track"> |
| 79 | 79 | <span class="frm-slider-bullet"> |
| 80 | 80 | <span class="frm-slider-value-label"><?php echo (int) $component['horizontal']['value']; ?></span> |
| @@ -82,10 +82,10 @@ | ||
| 82 | 82 | </span> |
| 83 | 83 | </span> |
| 84 | 84 | </div> |
| 85 | 85 | <div class="frm-slider-value"> |
| 86 | - <input aria-label="<?php echo esc_attr__( 'Horizontal value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['horizontal']['value'] ); ?>" /> | |
| 87 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 86 | + <input aria-label="<?php esc_attr_e( 'Horizontal value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['horizontal']['value'] ); ?>" /> | |
| 87 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 88 | 88 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 89 | 89 | <option <?php selected( $component['horizontal']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 90 | 90 | <?php endforeach; ?> |
| 91 | 91 | </select> |
| @@ -94,9 +94,9 @@ | ||
| 94 | 94 | </div> |
| 95 | 95 | <div class="frm-slider-component frm-has-multiple-values frm_hidden" data-type="left" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 96 | 96 | <div class="frm-flex-justify"> |
| 97 | 97 | <div class="frm-slider-container"> |
| 98 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-left' ); ?> | |
| 98 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-left' ); ?> | |
| 99 | 99 | <span class="frm-slider" tabindex="0"> |
| 100 | 100 | <span class="frm-slider-active-track"> |
| 101 | 101 | <span class="frm-slider-bullet"> |
| 102 | 102 | <span class="frm-slider-value-label"><?php echo (int) $component['left']['value']; ?></span> |
| @@ -104,10 +104,10 @@ | ||
| 104 | 104 | </span> |
| 105 | 105 | </span> |
| 106 | 106 | </div> |
| 107 | 107 | <div class="frm-slider-value"> |
| 108 | - <input aria-label="<?php echo esc_attr__( 'Left value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['left']['value'] ); ?>" /> | |
| 109 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 108 | + <input aria-label="<?php esc_attr_e( 'Left value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['left']['value'] ); ?>" /> | |
| 109 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 110 | 110 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 111 | 111 | <option <?php selected( $component['left']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 112 | 112 | <?php endforeach; ?> |
| 113 | 113 | </select> |
| @@ -116,9 +116,9 @@ | ||
| 116 | 116 | </div> |
| 117 | 117 | <div class="frm-slider-component frm-has-multiple-values frm_hidden" data-type="right" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 118 | 118 | <div class="frm-flex-justify"> |
| 119 | 119 | <div class="frm-slider-container"> |
| 120 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-right' ); ?> | |
| 120 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-right' ); ?> | |
| 121 | 121 | <span class="frm-slider" tabindex="0"> |
| 122 | 122 | <span class="frm-slider-active-track"> |
| 123 | 123 | <span class="frm-slider-bullet"> |
| 124 | 124 | <span class="frm-slider-value-label"><?php echo (int) $component['right']['value']; ?></span> |
| @@ -126,10 +126,10 @@ | ||
| 126 | 126 | </span> |
| 127 | 127 | </span> |
| 128 | 128 | </div> |
| 129 | 129 | <div class="frm-slider-value"> |
| 130 | - <input aria-label="<?php echo esc_attr__( 'Right value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['right']['value'] ); ?>" /> | |
| 131 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 130 | + <input aria-label="<?php esc_attr_e( 'Right value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['right']['value'] ); ?>" /> | |
| 131 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 132 | 132 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 133 | 133 | <option <?php selected( $component['right']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 134 | 134 | <?php endforeach; ?> |
| 135 | 135 | </select> |
| @@ -155,11 +155,11 @@ | ||
| 155 | 155 | </span> |
| 156 | 156 | </span> |
| 157 | 157 | </div> |
| 158 | 158 | <div class="frm-slider-value"> |
| 159 | - <input aria-label="<?php echo esc_attr__( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['value_label'] ); ?>" /> | |
| 159 | + <input aria-label="<?php esc_attr_e( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['value_label'] ); ?>" /> | |
| 160 | 160 | <input type="hidden" <?php echo esc_attr( $field_name ); ?> value="<?php echo esc_attr( $field_value ); ?>" id="<?php echo esc_attr( $component['id'] ); ?>" /> |
| 161 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 161 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 162 | 162 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 163 | 163 | <option <?php selected( $component['unit_measurement'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 164 | 164 | <?php endforeach; ?> |
| 165 | 165 | </select> |
| @@ -170,9 +170,9 @@ | ||
| 170 | 170 | <div class="<?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> > |
| 171 | 171 | <div class="frm-slider-component frm-group-sliders frm-has-independent-fields" data-display-sliders="top,bottom" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 172 | 172 | <div class="frm-flex-justify"> |
| 173 | 173 | <div class="frm-slider-container"> |
| 174 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-top-bottom' ); ?> | |
| 174 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-top-bottom' ); ?> | |
| 175 | 175 | <span class="frm-slider" tabindex="0"> |
| 176 | 176 | <span class="frm-slider-active-track"> |
| 177 | 177 | <span class="frm-slider-bullet"> |
| 178 | 178 | <span class="frm-slider-value-label"><?php echo (int) $field_value; ?></span> |
| @@ -180,10 +180,10 @@ | ||
| 180 | 180 | </span> |
| 181 | 181 | </span> |
| 182 | 182 | </div> |
| 183 | 183 | <div class="frm-slider-value"> |
| 184 | - <input aria-label="<?php echo esc_attr__( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['value_label'] ); ?>" /> | |
| 185 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 184 | + <input aria-label="<?php esc_attr_e( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['value_label'] ); ?>" /> | |
| 185 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 186 | 186 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 187 | 187 | <option <?php selected( $component['unit_measurement'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 188 | 188 | <?php endforeach; ?> |
| 189 | 189 | </select> |
| @@ -189,9 +189,9 @@ | ||
| 189 | 189 | </select> |
| 190 | 190 | </div> |
| 191 | 191 | </div> |
| 192 | 192 | |
| 193 | - <?php | |
| 193 | + <?php | |
| 194 | 194 | foreach ( $component['independent_fields'] as $field ) : |
| 195 | 195 | ?> |
| 196 | 196 | <div class="frm-slider-component frm-independent-slider-field frm_hidden" data-type="<?php echo esc_attr( $field['type'] ); ?>" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 197 | 197 | <div class="frm-flex-justify"> |
| @@ -196,9 +196,9 @@ | ||
| 196 | 196 | <div class="frm-slider-component frm-independent-slider-field frm_hidden" data-type="<?php echo esc_attr( $field['type'] ); ?>" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 197 | 197 | <div class="frm-flex-justify"> |
| 198 | 198 | <div class="frm-slider-container"> |
| 199 | 199 | <?php if ( ! empty( $component['icon'] ) ) : ?> |
| 200 | - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm-margin-' . $field['type'] ); ?> | |
| 200 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-' . $field['type'] ); ?> | |
| 201 | 201 | <?php endif; ?> |
| 202 | 202 | <span class="frm-slider" tabindex="0"> |
| 203 | 203 | <span class="frm-slider-active-track"> |
| 204 | 204 | <span class="frm-slider-bullet"> |
| @@ -207,11 +207,11 @@ | ||
| 207 | 207 | </span> |
| 208 | 208 | </span> |
| 209 | 209 | </div> |
| 210 | 210 | <div class="frm-slider-value"> |
| 211 | - <input aria-label="<?php echo esc_attr__( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo empty( $component['unit_measurement'] ) ? esc_attr( $field['value'] ) : (int) $field['value']; ?>" /> | |
| 211 | + <input aria-label="<?php esc_attr_e( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo ! empty( $component['unit_measurement'] ) ? (int) $field['value'] : esc_attr( $field['value'] ); ?>" /> | |
| 212 | 212 | <input type="hidden" name="<?php echo esc_attr( $field['name'] ); ?>" value="<?php echo esc_attr( $field['value'] ); ?>" id="<?php echo esc_attr( $field['id'] ); ?>" /> |
| 213 | - <select aria-label="<?php echo esc_attr__( 'Value unit', 'formidable' ); ?>"> | |
| 213 | + <select aria-label="<?php esc_attr_e( 'Value unit', 'formidable' ); ?>"> | |
| 214 | 214 | <?php foreach ( $component['units'] as $unit ) : ?> |
| 215 | 215 | <option <?php selected( $component['unit_measurement'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 216 | 216 | <?php endforeach; ?> |
| 217 | 217 | </select> |