PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.4
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / solutions / _import.php

_import.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.4, at classes/views/solutions/_import.php

69 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5 ?>
6 <div class="frm_image_options frm_form_field" style="--image-size:<?php echo esc_attr( $width ); ?>px">
7 <div class="frm_opt_container">
8 <?php
9 foreach ( $options as $info ) {
10 if ( ! empty( $xml ) && isset( $info['url'] ) && $info['url'] === 'auto' ) {
11 $info['url'] = $xml;
12 }
13
14 $disabled = isset( $imported[ $info['form'] ] ) ? ' disabled' : '';
15 $url = isset( $info['url'] ) ? $info['url'] : '';
16 $value = $importing === 'form' ? $info['form'] : $info['key'];
17 if ( ! isset( $info['img'] ) ) {
18 ?>
19 <input type="hidden" name="<?php echo esc_attr( $importing ); ?>[<?php echo esc_attr( $info['form'] ); ?>]" value="<?php echo esc_attr( $value ); ?>" <?php echo esc_attr( $disabled ); ?>/>
20 <?php
21 continue;
22 }
23
24 $hide_views = $importing === 'view' && ( ( $selected && $info['form'] !== $selected ) || isset( $imported[ $info['form'] ] ) );
25 ?>
26 <div class="frm_radio radio-inline radio frm_image_option<?php echo esc_attr( $importing === 'view' ? ' show_sub_opt show_' . $info['form'] : '' ); ?>" style="<?php echo esc_attr( $hide_views ? 'display:none' : '' ); ?>">
27 <?php if ( $importing === 'form' ) { ?>
28 <input type="hidden" name="xml[<?php echo esc_attr( $info['form'] ); ?>]" value="<?php echo esc_attr( $url ); ?>" <?php echo esc_attr( $disabled ); ?>/>
29 <?php } ?>
30 <label>
31 <input type="radio" name="<?php echo esc_attr( $importing . ( $importing === 'view' ? '[' . $info['form'] . ']' : '' ) ); ?>" value="<?php echo esc_attr( $value ); ?>"
32 <?php
33 echo esc_attr( $disabled );
34 if ( ! $selected && empty( $disabled ) ) {
35 echo ' checked="checked"';
36 $selected = $info['form'];
37 }
38 ?>
39 <?php if ( $importing === 'form' ) { ?>
40 onchange="frm_show_div('show_sub_opt',this.checked,false,'.');frm_show_div('show_<?php echo esc_attr( $info['form'] ); ?>',this.checked,true,'.')"
41 <?php } ?>
42 />
43 <div class="frm_image_option_container frm_label_with_image">
44 <?php echo FrmAppHelper::kses( $info['img'], array( 'svg', 'rect', 'path' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
45 <span class="frm_text_label_for_image">
46 <?php
47 if ( ! empty( $disabled ) ) {
48 FrmAppHelper::icon_by_class(
49 'frmfont frm_step_complete_icon',
50 array(
51 'aria-label' => __( 'Imported', 'formidable' ),
52 )
53 );
54 }
55
56 if ( $importing === 'form' && $disabled ) {
57 echo FrmAppHelper::kses( FrmFormsHelper::edit_form_link( $imported[ $info['form'] ] ), array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
58 } else {
59 echo esc_html( $info['name'] );
60 }
61 ?>
62 </span>
63 </div>
64 </label>
65 </div>
66 <?php } ?>
67 </div>
68 </div>
69