| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) { |
| 2 |
die( 'You are not allowed to call this page directly.' ); |
| 3 |
} |
| 4 |
|
| 5 |
if ( $component['has-multiple-values'] ) : ?> |
| 6 |
<div class="<?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> > |
| 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 |
<div class="frm-flex-justify"> |
| 9 |
<div class="frm-slider-container"> |
| 10 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-top-bottom' ); ?> |
| 11 |
<span class="frm-slider" tabindex="0"> |
| 12 |
<span class="frm-slider-active-track"> |
| 13 |
<span class="frm-slider-bullet"> |
| 14 |
<span class="frm-slider-value-label"><?php echo (int) $component['vertical']['value']; ?></span> |
| 15 |
</span> |
| 16 |
</span> |
| 17 |
</span> |
| 18 |
</div> |
| 19 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 23 |
<option <?php selected( $component['vertical']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 24 |
<?php endforeach; ?> |
| 25 |
</select> |
| 26 |
</div> |
| 27 |
</div> |
| 28 |
</div> |
| 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 |
<div class="frm-flex-justify"> |
| 31 |
<div class="frm-slider-container"> |
| 32 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-top' ); ?> |
| 33 |
<span class="frm-slider" tabindex="0"> |
| 34 |
<span class="frm-slider-active-track"> |
| 35 |
<span class="frm-slider-bullet"> |
| 36 |
<span class="frm-slider-value-label"><?php echo (int) $component['top']['value']; ?></span> |
| 37 |
</span> |
| 38 |
</span> |
| 39 |
</span> |
| 40 |
</div> |
| 41 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 45 |
<option <?php selected( $component['top']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 46 |
<?php endforeach; ?> |
| 47 |
</select> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
</div> |
| 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 |
<div class="frm-flex-justify"> |
| 53 |
<div class="frm-slider-container"> |
| 54 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-bottom' ); ?> |
| 55 |
<span class="frm-slider" tabindex="0"> |
| 56 |
<span class="frm-slider-active-track"> |
| 57 |
<span class="frm-slider-bullet"> |
| 58 |
<span class="frm-slider-value-label"><?php echo (int) $component['bottom']['value']; ?></span> |
| 59 |
</span> |
| 60 |
</span> |
| 61 |
</span> |
| 62 |
</div> |
| 63 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 67 |
<option <?php selected( $component['bottom']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 68 |
<?php endforeach; ?> |
| 69 |
</select> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 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 |
<div class="frm-flex-justify"> |
| 75 |
<div class="frm-slider-container"> |
| 76 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-left-right' ); ?> |
| 77 |
<span class="frm-slider" tabindex="0"> |
| 78 |
<span class="frm-slider-active-track"> |
| 79 |
<span class="frm-slider-bullet"> |
| 80 |
<span class="frm-slider-value-label"><?php echo (int) $component['horizontal']['value']; ?></span> |
| 81 |
</span> |
| 82 |
</span> |
| 83 |
</span> |
| 84 |
</div> |
| 85 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 89 |
<option <?php selected( $component['horizontal']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 90 |
<?php endforeach; ?> |
| 91 |
</select> |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
</div> |
| 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 |
<div class="frm-flex-justify"> |
| 97 |
<div class="frm-slider-container"> |
| 98 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-left' ); ?> |
| 99 |
<span class="frm-slider" tabindex="0"> |
| 100 |
<span class="frm-slider-active-track"> |
| 101 |
<span class="frm-slider-bullet"> |
| 102 |
<span class="frm-slider-value-label"><?php echo (int) $component['left']['value']; ?></span> |
| 103 |
</span> |
| 104 |
</span> |
| 105 |
</span> |
| 106 |
</div> |
| 107 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 111 |
<option <?php selected( $component['left']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 112 |
<?php endforeach; ?> |
| 113 |
</select> |
| 114 |
</div> |
| 115 |
</div> |
| 116 |
</div> |
| 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 |
<div class="frm-flex-justify"> |
| 119 |
<div class="frm-slider-container"> |
| 120 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-right' ); ?> |
| 121 |
<span class="frm-slider" tabindex="0"> |
| 122 |
<span class="frm-slider-active-track"> |
| 123 |
<span class="frm-slider-bullet"> |
| 124 |
<span class="frm-slider-value-label"><?php echo (int) $component['right']['value']; ?></span> |
| 125 |
</span> |
| 126 |
</span> |
| 127 |
</span> |
| 128 |
</div> |
| 129 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 133 |
<option <?php selected( $component['right']['unit'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 134 |
<?php endforeach; ?> |
| 135 |
</select> |
| 136 |
</div> |
| 137 |
</div> |
| 138 |
</div> |
| 139 |
<input type="hidden" <?php echo esc_attr( $field_name ); ?> value="<?php echo esc_attr( $field_value ); ?>" id="<?php echo esc_attr( $component['id'] ); ?>" /> |
| 140 |
</div> |
| 141 |
<?php else : ?> |
| 142 |
<div> |
| 143 |
<?php if ( empty( $component['independent_fields'] ) ) : ?> |
| 144 |
<div class="frm-slider-component <?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> data-display-sliders="top,bottom" data-type="vertical" data-max-value="<?php echo (int) $component['max_value']; ?>"> |
| 145 |
<div class="frm-flex-justify"> |
| 146 |
<div class="frm-slider-container"> |
| 147 |
<?php if ( ! empty( $component['icon'] ) ) : ?> |
| 148 |
<?php FrmAppHelper::icon_by_class( $component['icon'] ); ?> |
| 149 |
<?php endif; ?> |
| 150 |
<span class="frm-slider" tabindex="0"> |
| 151 |
<span class="frm-slider-active-track"> |
| 152 |
<span class="frm-slider-bullet"> |
| 153 |
<span class="frm-slider-value-label"><?php echo (int) $field_value; ?></span> |
| 154 |
</span> |
| 155 |
</span> |
| 156 |
</span> |
| 157 |
</div> |
| 158 |
<div class="frm-slider-value"> |
| 159 |
<input aria-label="<?php esc_attr_e( 'Field value', 'formidable' ); ?>" type="text" value="<?php echo esc_attr( $component['value_label'] ); ?>" /> |
| 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 esc_attr_e( 'Value unit', 'formidable' ); ?>"> |
| 162 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 163 |
<option <?php selected( $component['unit_measurement'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 164 |
<?php endforeach; ?> |
| 165 |
</select> |
| 166 |
</div> |
| 167 |
</div> |
| 168 |
</div> |
| 169 |
<?php else : ?> |
| 170 |
<div class="<?php echo esc_attr( $component_class ); ?>" <?php echo esc_attr( $component_attr ); ?> > |
| 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 |
<div class="frm-flex-justify"> |
| 173 |
<div class="frm-slider-container"> |
| 174 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-top-bottom' ); ?> |
| 175 |
<span class="frm-slider" tabindex="0"> |
| 176 |
<span class="frm-slider-active-track"> |
| 177 |
<span class="frm-slider-bullet"> |
| 178 |
<span class="frm-slider-value-label"><?php echo (int) $field_value; ?></span> |
| 179 |
</span> |
| 180 |
</span> |
| 181 |
</span> |
| 182 |
</div> |
| 183 |
<div class="frm-slider-value"> |
| 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 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 187 |
<option <?php selected( $component['unit_measurement'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 188 |
<?php endforeach; ?> |
| 189 |
</select> |
| 190 |
</div> |
| 191 |
</div> |
| 192 |
|
| 193 |
<?php |
| 194 |
foreach ( $component['independent_fields'] as $field ) : |
| 195 |
?> |
| 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 |
<div class="frm-flex-justify"> |
| 198 |
<div class="frm-slider-container"> |
| 199 |
<?php if ( ! empty( $component['icon'] ) ) : ?> |
| 200 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-margin-' . $field['type'] ); ?> |
| 201 |
<?php endif; ?> |
| 202 |
<span class="frm-slider" tabindex="0"> |
| 203 |
<span class="frm-slider-active-track"> |
| 204 |
<span class="frm-slider-bullet"> |
| 205 |
<span class="frm-slider-value-label"><?php echo (int) $field['value']; ?></span> |
| 206 |
</span> |
| 207 |
</span> |
| 208 |
</span> |
| 209 |
</div> |
| 210 |
<div class="frm-slider-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 |
<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 esc_attr_e( 'Value unit', 'formidable' ); ?>"> |
| 214 |
<?php foreach ( $component['units'] as $unit ) : ?> |
| 215 |
<option <?php selected( $component['unit_measurement'], $unit ); ?> value="<?php echo esc_attr( $unit ); ?>"><?php echo esc_html( $unit ); ?></option> |
| 216 |
<?php endforeach; ?> |
| 217 |
</select> |
| 218 |
</div> |
| 219 |
</div> |
| 220 |
</div> |
| 221 |
<?php endforeach; ?> |
| 222 |
</div> |
| 223 |
</div> |
| 224 |
<?php endif; ?> |
| 225 |
</div> |
| 226 |
<?php endif; ?> |