PluginProbe
Booking Calendar / 11.3
Booking Calendar v11.3
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
booking / includes / ui_modal__shortcodes / sh_tpl_booking_other.php

sh_tpl_booking_other.php in Booking Calendar 11.3, at includes/ui_modal__shortcodes/sh_tpl_booking_other.php

232 lines 12.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @version 1.0
4 * @package Booking Calendar Shortcodes Config
5 * @subpackage Shortcodes Content - Shortcodes such as: [bookingedit] , [bookingcustomerlisting] , [bookingresource type=6 show='capacity'] , [booking_confirm]
6 * @category Shortcodes
7 *
8 * @author wpdevelop
9 * @link https://wpbookingcalendar.com/
10 * @email info@wpbookingcalendar.com
11 *
12 * @modified 2024-03-08
13 */
14
15 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly // FixIn: 9.9.0.15.
16
17
18
19 // =====================================================================================================================
20 // Shortcodes such as: [bookingedit] , [bookingcustomerlisting] , [bookingresource type=6 show='capacity'] , [booking_confirm]
21 // =====================================================================================================================
22
23 /**
24 * Content of PopUp - for shortcode [bookingsearch]
25 *
26 * @return void
27 */
28 function wpbc_shortcode_config__content__bookingother() {
29
30 $shortcode_name = 'bookingother';
31
32 ?><div id="wpbc_sc_container__shortcode_<?php echo esc_attr( $shortcode_name ); ?>" class="wpbc_sc_container__shortcode wpbc_sc_container__shortcode_<?php echo esc_attr( $shortcode_name ); ?>"><?php
33
34 wpbc_shortcode_config__bookingother__top_tabs();
35
36 // 'General' --------------------------------------------------------------------------------------------------
37 ?><div class="wpbc_sc_container__shortcode_section wpbc_sc_container__shortcode_section__general">
38 <table class="form-table"><tbody><?php
39
40 // Select 'Search Form' | 'Search Results'
41 wpbc_shortcode_config_fields__select_other_shortcodes( $shortcode_name . '_wpbc_shortcode_type', $shortcode_name );
42
43 ?></tbody></table>
44 <div class="bookingother_section_additional bookingother_section_booking_confirm"><?php
45 wpbc_show_message_in_settings(
46 /* translators: 1: ... */
47 sprintf( __( 'This shortcode %s is used on a confirmation booking page to display booking details and confirmation after a successful booking.', 'booking' ), '<code>[booking_confirm]</code>', '<strong>', '</strong>', '<strong>', '</strong>', '<strong>', '</strong>' )
48 /* translators: 1: ... */
49 . '<br/>' . sprintf( __( 'The content of field %1$s on the %2$sgeneral booking settings page%3$s at %4$s section must link to this page.', 'booking' )
50 , '<strong>' . esc_html__( 'Confirmation Page URL', 'booking' ) .'</strong>'
51 , '<a href="' . esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_booking_confirmation_tab">'
52 , '</a>'
53 , '<strong>' .__( 'Booking Confirmation', 'booking' ) . ' > '
54 . __( 'Redirect to thank you page', 'booking' ).'</strong>'
55 )
56 , 'info', '' );
57 ?></div>
58 <div class="bookingother_section_additional bookingother_section_bookingedit"><?php
59 wpbc_show_message_in_settings(
60 /* translators: 1: ... */
61 sprintf( __( 'This shortcode %1$s is used on a page, where visitors can %2$smodify%3$s their own booking(s), %4$scancel%5$s or make %6$spayment%7$s after receiving an admin email payment request', 'booking' ), '<code>[bookingedit]</code>', '<strong>', '</strong>', '<strong>', '</strong>', '<strong>', '</strong>' )
62 /* translators: 1: ... */
63 . '<br/>' . sprintf( __( 'The content of field %1$sURL to edit bookings%2$s on the %3$sgeneral booking settings page%4$s must link to this page', 'booking' ), '<i>"', '"</i>', '<a href="' . esc_url( wpbc_get_settings_url() ) . '">', '</a>' )
64 /* translators: 1: ... */
65 . '<br/>' . sprintf( __( 'Email templates, which use shortcodes: %s, will be linked to this page', 'booking' ), '<code>[visitorbookingediturl]</code>, <code>[visitorbookingcancelurl]</code>, <code>[visitorbookingpayurl]</code>' )
66 , 'info', '' );
67 ?></div>
68 <div class="bookingother_section_additional bookingother_section_bookingcustomerlisting"><?php
69 wpbc_show_message_in_settings(
70 /* translators: 1: ... */
71 sprintf( __( 'This shortcode %1$s is used on a page, where visitors can %2$sview listing%3$s of their own booking(s)', 'booking' ), '<code>[bookingcustomerlisting]</code>', '<strong>', '</strong>', '<strong>', '</strong>', '<strong>', '</strong>' )
72 /* translators: 1: ... */
73 . '<br/>' . sprintf( __( 'The content of field %1$sURL of page for customer bookings listing%2$s on the %3$sgeneral booking settings page%4$s must link to this page', 'booking' ), '<i>"', '"</i>', '<a href="' . esc_url( wpbc_get_settings_url() ) . '">', '</a>' )
74 /* translators: 1: ... */
75 . '<br/>' . sprintf( __( 'Email templates, which use shortcodes: %s, will be linked to this page', 'booking' ), '<code>[visitorbookingslisting]</code>' )
76 /* translators: 1: ... */
77 . '<br/>' . sprintf( __( '%1$s You can use in this shortcode the same parameters as for %2$s shortcode', 'booking' ), '<strong>' . esc_html__('Trick', 'booking') . '.</strong> ', '<code>[bookingtimeline ... ]</code>' )
78 , 'info', '' );
79
80 ?></div>
81 <div class="bookingother_section_additional bookingother_section_bookingresource">
82 <table class="form-table"><tbody><?php
83
84 // Booking Resource
85 wpbc_shortcode_config_fields__select_resource( $shortcode_name . '_wpbc_resource_id', $shortcode_name );
86
87
88 // What to Show
89 $bookingresource_show_options = array( 'title' => __( 'Title', 'booking' ) );
90 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
91 $bookingresource_show_options['cost'] = __( 'Cost', 'booking' );
92 }
93 if ( class_exists( 'wpdev_bk_biz_l' ) ) {
94 $bookingresource_show_options['capacity'] = __( 'Capacity', 'booking' );
95 }
96 WPBC_Settings_API::field_select_row_static( $shortcode_name . '_wpbc_resource_show' // 'wpbc_bookingresource_show'
97 , array(
98 'type' => 'select'
99 , 'title' => __('Show', 'booking')
100 , 'description' => __('Select type of info to show.' ,'booking')
101 , 'description_tag' => 'span'
102 , 'label' => ''
103 , 'multiple' => false
104 , 'group' => $shortcode_name . '_section_bookingresource'
105 , 'tr_class' => 'wpbc_shortcode_bookingresource wpbc_shortcode_bookingother'
106 , 'class' => ''
107 , 'css' => 'margin-right:10px;'
108 , 'only_field' => false
109 , 'attr' => array()
110 , 'value' => 'title'
111 , 'options' => $bookingresource_show_options
112 )
113 );
114
115 ?></tbody></table>
116 </div>
117 </div><?php
118
119
120 ?>
121 <div class="wpbc_shortcode_config_content_toolbar__next_prior">
122 <a href="javascript:void(0)" onclick="javascript:wpbc_shortcode_config_content_toolbar__next_prior(this,'prior');" class="button">
123 <span class="in-button-text">&lsaquo;</span>
124 </a>
125 <a href="javascript:void(0)" onclick="javascript:wpbc_shortcode_config_content_toolbar__next_prior(this,'next');" class="button">
126 <span class="in-button-text">&rsaquo;</span>
127 </a>
128 </div>
129 <?php
130
131 ?></div><?php
132
133 wpbc_clear_div();
134 }
135
136
137 /**
138 * Top Tabs for shortcode [booking ...]
139 * @return void
140 */
141 function wpbc_shortcode_config__bookingother__top_tabs(){
142
143 $shortcode_name = 'booking';
144
145 wpbc_bs_toolbar_tabs_html_container_start();
146
147 $js = "jQuery(this).parents( '.wpbc_sc_container__shortcode' ).find( '.nav-tab' ).removeClass('nav-tab-active');"
148 . "jQuery(this).addClass('nav-tab-active');"
149 . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');"
150 . "jQuery('.nav-tab-active i').addClass('icon-white');"
151 . "jQuery('.wpbc_sc_container__shortcode_" . $shortcode_name . " .wpbc_sc_container__shortcode_section').hide();";
152
153 wpbc_bs_display_tab( array(
154 'title' => __('Booking Support Shortcodes', 'booking')
155 // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' )
156 , 'onclick' => $js . "jQuery('.wpbc_sc_container__shortcode_" . $shortcode_name . " .wpbc_sc_container__shortcode_section__general').show();"
157 , 'font_icon' => 'menu_icon icon-1x wpbc_icn_adjust'
158 , 'default' => true
159 ) );
160 // wpbc_bs_display_tab( array(
161 // 'title' => __('Advanced', 'booking')
162 // // , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' )
163 // , 'onclick' => $js . "jQuery('.wpbc_sc_container__shortcode_" . $shortcode_name . " .wpbc_sc_container__shortcode_section__other').show();"
164 // , 'font_icon' => 'wpbc_icn_tune'
165 // , 'default' => false
166 //
167 // ) );
168
169 wpbc_bs_toolbar_tabs_html_container_end();
170 }
171
172
173
174 // =====================================================================================================================
175 // Fields
176 // =====================================================================================================================
177
178
179 /**
180 * Shortcode Fields: View Mode:
181 *
182 * @param $id
183 * @param $group_key
184 *
185 * @return void
186 */
187 function wpbc_shortcode_config_fields__select_other_shortcodes( $id , $group_key ){
188
189 $optiopns_for_radio = array();
190 $optiopns_for_radio['booking_confirm'] = array(
191 'title' => __( 'Show booking confirmation message', 'booking' ),
192 'attr' => array( 'id' => 'wpbc_shortcode__bookingresource' )
193 );
194
195 if ( class_exists( 'wpdev_bk_personal' ) ) {
196
197 $optiopns_for_radio['bookingedit'] = array(
198 'title' => __( ' Manage Booking. Required for booking Edit / Cancel / Payment Request.', 'booking' ),
199 'attr' => array( 'id' => 'wpbc_shortcode__bookingedit' )
200 );
201 $optiopns_for_radio['bookingcustomerlisting'] = array(
202 'title' => __( 'Show listing of customer bookings', 'booking' ),
203 'attr' => array( 'id' => 'wpbc_shortcode__bookingcustomerlisting' )
204 );
205 $optiopns_for_radio['bookingresource'] = array(
206 'title' => __( 'Show info about Booking Resource', 'booking' ),
207 'attr' => array( 'id' => 'wpbc_shortcode__bookingresource' )
208 );
209 }
210
211
212 WPBC_Settings_API::field_radio_row_static( $id
213 , array(
214 'type' => 'radio'
215 , 'title' => __('Select type of shortcode', 'booking')
216 , 'description' => ''//__('Select type of view format.' ,'booking')
217 , 'description_tag' => 'span'
218 , 'label' => ''
219 , 'multiple' => false
220 , 'group' => $group_key
221 , 'tr_class' => $group_key . '_standard_section wpbc_sub_settings_grayed0 ' . $id . '_other_shortcodes'
222 , 'class' => ''
223 , 'css' => 'margin-right:10px;'
224 , 'only_field' => false
225 , 'attr' => array()
226 , 'value' => 'booking_confirm'
227 , 'options' => $optiopns_for_radio
228 )
229 );
230 }
231
232