| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) { |
| 2 |
die( 'You are not allowed to call this page directly.' ); |
| 3 |
} |
| 4 |
?> |
| 5 |
<div class="<?php echo esc_attr( $component_class ); ?>"> |
| 6 |
<div class="frm-radio-container frm-flex-box frm-flex-justify"> |
| 7 |
<?php |
| 8 |
$alignments = array( 'left', 'center', 'right' ); |
| 9 |
|
| 10 |
foreach ( $alignments as $align ) : |
| 11 |
if ( empty( $component['options'] ) || in_array( $align, $component['options'], true ) ) : |
| 12 |
$radio_id = 'frm-align-' . $align . '-' . esc_attr( $field_name ); |
| 13 |
?> |
| 14 |
|
| 15 |
<input id="<?php echo esc_attr( $radio_id ); ?>" <?php checked( $field_value, $align ); ?> type="radio" <?php echo esc_attr( $field_name ); ?> value="<?php echo esc_attr( $align ); ?>" /> |
| 16 |
<label class="frm-flex-center" for="<?php echo esc_attr( $radio_id ); ?>" tabindex="0"> |
| 17 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm-align-' . $align ); ?> |
| 18 |
</label> |
| 19 |
|
| 20 |
<?php |
| 21 |
endif; |
| 22 |
endforeach; |
| 23 |
?> |
| 24 |
<span class="frm-radio-active-tracker"></span> |
| 25 |
</div> |
| 26 |
</div> |