PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.4.1
JetFormBuilder — Dynamic Blocks Form Builder v3.4.1
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / compatibility / jet-engine / blocks / map-field / block-template.php
jetformbuilder / compatibility / jet-engine / blocks / map-field Last commit date
assets 1 year ago block-asset.php 1 year ago block-parser.php 1 year ago block-render.php 1 year ago block-template.php 1 year ago block-type.php 1 year ago block.json 1 year ago tools.php 1 year ago
block-template.php
70 lines
1 <?php
2 /**
3 * @var Jet_Form_Builder\Blocks\Render\Base $this
4 * @var array $args
5 */
6
7 use Jet_Form_Builder\Classes\Tools;
8
9 // If this file is called directly, abort.
10 if ( ! defined( 'WPINC' ) ) {
11 die;
12 }
13
14 $name = $args['name'] ?? '';
15
16 $this->add_attribute( 'type', 'hidden' );
17 $this->add_attribute( 'name', $this->block_type->get_field_name() );
18 $this->add_attribute( 'data-field-name', $args['name'] ?? '' );
19 $this->add_attribute(
20 'data-settings',
21 Tools::esc_attr( $this->block_type->get_field_settings() )
22 );
23 $this->add_attribute( 'required', $this->block_type->get_required_val() );
24 $this->add_attribute( 'value', $args['default']['self'] ?? '' );
25 $this->add_attribute( 'class', 'jet-form-builder__field' );
26 $this->add_attribute( 'class', $args['class_name'] );
27 $this->add_attribute( 'data-jfb-sync' );
28 ?>
29 <div class="jet-fb-map-field">
30 <div class="jet-fb-map-field__preview">
31 <address class="jet-fb-map-field__position"></address>
32 <div class="jet-fb-map-field__reset" role="button">
33 × <?php echo esc_html__( 'Reset location', 'jet-form-builder' ); ?></div>
34 </div>
35 <?php if ( $this->block_type->get_repeater_name() ) : ?>
36 <div class="jet-fb-map-field__description">
37 <p><strong><?php echo esc_html__( 'Lat and Lng are separately stored in the following fields', 'jet-form-builder' ); ?>:</strong> <i><?php echo esc_html( $args['name'] ); ?>_lat, <?php echo esc_html( $args['name'] ); ?>_lng</i></p>
38 </div>
39 <?php endif; ?>
40 <?php if ( ! empty( $args['autocomplete'] ) ) : ?>
41 <?php wp_enqueue_script( 'jet-fb-compat-jet-engine-map-field-autocomplete' ); ?>
42 <?php wp_enqueue_style( 'jet-fb-compat-jet-engine-map-field-autocomplete' ); ?>
43 <div class="jet-fb-map-field__search">
44 <input type="text" placeholder="<?php esc_html_e( 'Search...', 'jet-form-builder' ); ?>">
45 <div class="jet-fb-map-field__search-loader"></div>
46 <ul class="jet-fb-map-field__search-list"></ul>
47 </div>
48 <?php endif; ?>
49 <div class="jet-fb-map-field__frame" style="height: <?php echo absint( $args['height'] ?? 300 ) . 'px'; ?>"></div>
50 <input <?php $this->render_attributes_string(); ?> />
51 <input
52 type="hidden"
53 name=" <?php echo esc_attr( $this->block_type->get_field_name( $name . '_lat' ) ); ?>"
54 value="<?php echo esc_attr( $args['default']['lat'] ?? '' ); ?>"
55 data-map-field="lat"
56 />
57 <input
58 type="hidden"
59 name="<?php echo esc_attr( $this->block_type->get_field_name( $name . '_lng' ) ); ?>"
60 value="<?php echo esc_attr( $args['default']['lng'] ?? '' ); ?>"
61 data-map-field="lng"
62 />
63 <input
64 type="hidden"
65 name="<?php echo esc_attr( $this->block_type->get_field_name( $name . '_hash' ) ); ?>"
66 data-map-field="hash"
67 />
68 </div>
69 <?php
70