| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) { |
| 2 |
die( 'You are not allowed to call this page directly.' ); |
| 3 |
} |
| 4 |
?> |
| 5 |
<div class="frm5 frm_form_field"><label class="frm-style-item-heading"><?php echo esc_html( $component['title'] ); ?></label></div> |
| 6 |
<div class="frm7 frm_form_field"> |
| 7 |
<div class="frm-style-component frm-background-image-component"> |
| 8 |
<div class="frm-h-stack-xs frm-flex-wrap" tabindex="0"> |
| 9 |
<input type="text" <?php echo esc_attr( $field_name ); ?> id="<?php echo esc_attr( $component['id'] ); ?>" class="hex" value="<?php echo esc_attr( $field_value ); ?>" size="4" <?php do_action( 'frm_style_settings_input_atts', $component['action_slug'] ); ?> /> |
| 10 |
<?php |
| 11 |
/** |
| 12 |
* Prompt Pro to load the upload button along with its functionalities. |
| 13 |
* Before it was loaded via frm_style_settings_general_section_after_background action hook. |
| 14 |
* |
| 15 |
* @since 6.14 |
| 16 |
*/ |
| 17 |
do_action( |
| 18 |
'frm_style_settings_bg_image_component_upload_button', |
| 19 |
array( |
| 20 |
'frm_style' => $component['frm_style'], |
| 21 |
'style' => $component['style'], |
| 22 |
'image_id_input_name' => $component['image_id_input_name'], |
| 23 |
) |
| 24 |
); |
| 25 |
|
| 26 |
if ( ! FrmAppHelper::pro_is_installed() ) { |
| 27 |
$image_preview_wrapper_attrs = array( |
| 28 |
'class' => 'frm_image_preview_wrapper', |
| 29 |
'data-upgrade' => __( 'Background image styles', 'formidable' ), |
| 30 |
'data-message' => __( 'Elevate your form\'s design by adding full-width background images to your forms.', 'formidable' ), |
| 31 |
'data-upsell-image' => FrmAppHelper::plugin_url() . '/images/upsell/background-image-styles-preview.webp', |
| 32 |
'data-medium' => 'background-image', |
| 33 |
'data-learn-more' => FrmAppHelper::get_doc_url( 'visual-form-styler/#kb-add-a-background-image', 'form-styler' ), |
| 34 |
); |
| 35 |
?> |
| 36 |
<div <?php FrmAppHelper::array_to_html_params( $image_preview_wrapper_attrs, true ); ?>> |
| 37 |
<button type="button" class="frm_choose_image_box frm_button frm-flex-center frm_no_style_button frm_noallow" tabindex="0"> |
| 38 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm_upload_icon' ); ?> |
| 39 |
<?php esc_attr_e( 'Upload background image', 'formidable' ); ?> |
| 40 |
</button> |
| 41 |
</div> |
| 42 |
<?php |
| 43 |
}//end if |
| 44 |
?> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
</div> |
| 48 |
<?php |
| 49 |
if ( ! empty( $component['include_additional_settings'] ) ) { |
| 50 |
/** |
| 51 |
* Prompt Pro to load the additional background image options like "Image Opacity". |
| 52 |
*/ |
| 53 |
do_action( |
| 54 |
'frm_style_settings_general_section_after_background', |
| 55 |
array( |
| 56 |
'frm_style' => $component['frm_style'], |
| 57 |
'style' => $component['style'], |
| 58 |
) |
| 59 |
); |
| 60 |
} |
| 61 |
|