PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.0.9
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.0.9
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / includes / builder / modal / modal.php

modal.php in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 3.0.9, at includes/builder/modal/modal.php

102 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="usk-modal-overlay" id="ultimate-builder-kit-builder-modal" style="display: none">
2 <div id="ultimate-builder-kit-builder-modal-wrapper">
3 <div class="usk-template-modal-header">
4 <div class="usk-modal-logo-wrap">
5 <img class="usk-modal-logo" src="<?php echo esc_attr( BDTUSK_ADM_ASSETS_URL . '/images/logo.svg' ) ?>"
6 alt="">
7 <span class="usk-logo-text"><?php esc_html_e( 'New Template', 'ultimate-store-kit' ); ?></span>
8 </div>
9 <div class="usk-modal-close-button">
10 <a href="javascript:void(0)">
11 <span class="dashicons dashicons-no-alt"></span>
12 </a>
13 </div>
14 </div>
15 <div class="usk-template-modal-main-wrap">
16 <div class="usk-modal-content-wrap">
17 <h3 class="usk-modal-title">
18 <?php
19 echo wp_kses(
20 sprintf(
21 /* translators: 1: Opening span tag, 2: Closing span tag. */
22 __( 'Templates Help You %1$sWork Efficiently%2$s', 'ultimate-store-kit' ),
23 '<span>',
24 '</span>'
25 ),
26 [
27 'span' => [],
28 ]
29 );
30 ?>
31 </h3>
32 <div class="usk-modal-desc">
33 <?php esc_html_e( 'Use templates to create the different pieces of your site, and reuse them with one click whenever needed.', 'ultimate-store-kit' ); ?>
34 </div>
35 </div>
36 <div class="usk-modal-form-wrap">
37 <form class="usk-modal-form" method="post">
38 <input type="hidden" name="template_id" value="" class="template_id" />
39 <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('usk-builder'); ?>" />
40 <div class="usk-form-title"><?php esc_html_e( 'Choose Template Type', 'ultimate-store-kit' ); ?></div>
41 <label for="template_type"><?php esc_html_e( 'Select the type of template you want to work on', 'ultimate-store-kit' ); ?></label>
42 <select name="template_type" id="template_type">
43 <option value=""><?php esc_html_e( 'select', 'ultimate-store-kit' ); ?></option>
44 <?php
45
46 $templates = \UltimateStoreKit\Includes\Builder\Builder_Template_Helper::templateForSelectDropdown();
47 $separator = \UltimateStoreKit\Includes\Builder\Builder_Template_Helper::separator();
48
49 // It is single
50 if ( count( $templates ) == 1 ) {
51 $templateKey = array_key_last( $templates );
52 $template = $templates[ $templateKey ];
53 foreach ( $template as $key => $item ) :
54 $selectValue = "{$templateKey}{$separator}{$key}";
55 ?>
56 <option value="<?php echo esc_attr( $selectValue ) ?>"><?php echo esc_attr( $item ) ?></option>
57 <?php
58 endforeach;
59 }
60
61 if ( count( $templates ) > 1 ) {
62 foreach ( $templates as $keys => $items ) :
63 $label = ucwords( str_replace( [ '-', '_' ], [ ' ' ], $keys ) );
64 if ( is_array( $items ) ) {
65 ?>
66 <optgroup label="<?php echo esc_attr( $label ) ?>"><?php
67 foreach ( $items as $key => $item ) :
68 $itemValue = "{$keys}{$separator}{$key}"
69 ?>
70 <option value="<?php echo esc_attr( $itemValue ) ?>"><?php echo esc_attr( $item ) ?></option>
71 <?php
72 endforeach;
73 ?>
74 </optgroup>
75 <?php
76 }
77 endforeach;
78 }
79 ?>
80 </select>
81 <label for="fname"><?php esc_html_e( 'Name your template', 'ultimate-store-kit' ); ?></label>
82 <input type="text" name="template_name" id="template_name" placeholder="<?php echo esc_attr__( 'Enter template name', 'ultimate-store-kit' ); ?>">
83 <div class="usk-template-status-switcher-wrap">
84 <input type="hidden" name="template_status" id="usk_template_status" value="1">
85 <div class="usk-template-status-switcher usk-active" id="usk_template_status_switcher" role="switch" aria-checked="true" tabindex="0">
86 <span class="usk-switcher-slider"></span>
87 </div>
88 <span class="usk-switcher-status-text"><?php esc_html_e( 'Active', 'ultimate-store-kit' ); ?></span>
89 </div>
90 <input class="usk-modal-submit-btn" type="submit" value="<?php echo esc_attr__( 'Create Template', 'ultimate-store-kit' ); ?>">
91 </form>
92 </div>
93 </div>
94 </div>
95 </div>
96
97 <style>
98 .input-error {
99 border: 1px solid red !important;
100 }
101 </style>
102