PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
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
← All changes | includes/_toolbar_ui/toolbar_ui.php +24 -868 10.10.211.8.4 View file →
@@ -1,4 +1,4 @@
1 1 <?php /**
2 2 * @version 1.1
3 3 * @package Any
4 4 * @category Toolbar. UI Elements for Admin Panel
@@ -24,110 +24,21 @@
24 24 function wpbc_ajx_bookings_toolbar( $escaped_search_request_params ) {
25 25
26 26 wpbc_clear_div();
27 27
28 - //wpbc_toolbar_search_by_id_bookings(); // Search bookings by ID - form at the top right side of the page
29 -
30 - // wpbc_toolbar_btn__view_mode(); // Vertical Buttons // FixIn: 9.8.15.2.
31 -
32 28 // Toolbar ////////////////////////////////////////////////////////////////
33 29
34 30 $default_param_values = wpbc_ajx_get__request_params__names_default( 'default' );
35 31
36 - $selected_tab = ( isset( $escaped_search_request_params['ui_usr__default_selected_toolbar'] ) )
37 - ? $escaped_search_request_params['ui_usr__default_selected_toolbar']
38 - : $default_param_values['ui_usr__default_selected_toolbar'];
39 32
40 - ?><div id="toolbar_booking_listing" class="wpbc_ajx_toolbar"><?php
33 + ?><div id="toolbar_booking_listing" class="wpbc_ajx_toolbar" style="box-shadow: none;"><?php
41 34
42 - // <editor-fold defaultstate="collapsed" desc=" T O P T A B s " >
43 -
44 - wpbc_bs_toolbar_tabs_html_container_start();
45 -
46 - wpbc_bs_display_tab( array(
47 - 'title' => '&nbsp;' . __('Filters', 'booking')
48 - , 'hint' => array( 'title' => __('Filter bookings' ,'booking') , 'position' => 'top' )
49 - , 'onclick' => "jQuery('.ui_container_toolbar').hide();"
50 - . "jQuery('.ui_container_filters').show();"
51 - . "jQuery('.wpbc_ajx_toolbar .nav-tab').removeClass('nav-tab-active');" // FixIn: 9.8.15.2.
52 - . "jQuery(this).addClass('nav-tab-active');"
53 - . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');"
54 - . "jQuery('.nav-tab-active i').addClass('icon-white');"
55 - /**
56 - * It will save such changes, and if we have selected bookings, then deselect them
57 - */
58 - // . "wpbc_ajx_booking_send_search_request_with_params( { 'ui_usr__default_selected_toolbar': 'filters' });"
59 - /**
60 - * It will save changes with NEXT search request, but not immediately
61 - * it is handy, in case if we have selected bookings,
62 - * we will not lose selection.
63 - */
64 - . "wpbc_ajx_booking_listing.search_set_param( 'ui_usr__default_selected_toolbar', 'filters' );"
65 - , 'font_icon' => 'wpbc_icn_published_with_changes' //FixIn: 9.0.1.4 'glyphicon glyphicon-random'
66 - , 'default' => ( $selected_tab == 'filters' ) ? true : false
67 - ) );
68 - wpbc_bs_display_tab( array(
69 - 'title' => __('Actions', 'booking')
70 - , 'hint' => array( 'title' => __('Manage bookings' ,'booking') , 'position' => 'top' )
71 - , 'onclick' => "jQuery('.ui_container_toolbar').hide();"
72 - . "jQuery('.ui_container_actions').show();"
73 - . "jQuery('.wpbc_ajx_toolbar .nav-tab').removeClass('nav-tab-active');" // FixIn: 9.8.15.2.
74 - . "jQuery(this).addClass('nav-tab-active');"
75 - . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');"
76 - . "jQuery('.nav-tab-active i').addClass('icon-white');"
77 - /**
78 - * It will save such changes, and if we have selected bookings, then deselect them
79 - */
80 - // . "wpbc_ajx_booking_send_search_request_with_params( { 'ui_usr__default_selected_toolbar': 'actions' });"
81 - /**
82 - * It will save changes with NEXT search request, but not immediately
83 - * it is handy, in case if we have selected bookings,
84 - * we will not lose selection.
85 - */
86 - . "wpbc_ajx_booking_listing.search_set_param( 'ui_usr__default_selected_toolbar', 'actions' );"
87 - , 'font_icon' => 'wpbc_icn_adjust' //FixIn: 9.0.1.4 'glyphicon glyphicon-fire'
88 - , 'default' => ( $selected_tab == 'actions' ) ? true : false
89 -
90 - ) );
91 -
92 - if ( class_exists( 'wpdev_bk_personal' ) ) { // FixIn: 9.6.1.5.
93 - wpbc_bs_display_tab( array(
94 - 'title' => __('Options', 'booking') // FixIn: 9.5.4.3.
95 - , 'hint' => array( 'title' => __('User Options' ,'booking') , 'position' => 'top' )
96 - , 'onclick' => "jQuery('.ui_container_toolbar').hide();"
97 - . "jQuery('.ui_container_options').show();"
98 - . "jQuery('.wpbc_ajx_toolbar .nav-tab').removeClass('nav-tab-active');" // FixIn: 9.8.15.2.
99 - . "jQuery(this).addClass('nav-tab-active');"
100 - . "jQuery('.nav-tab i.icon-white').removeClass('icon-white');"
101 - . "jQuery('.nav-tab-active i').addClass('icon-white');"
102 - /**
103 - * It will save such changes, and if we have selected bookings, then deselect them
104 - */
105 - // . "wpbc_ajx_booking_send_search_request_with_params( { 'ui_usr__default_selected_toolbar': 'options' });"
106 - /**
107 - * It will save changes with NEXT search request, but not immediately
108 - * it is handy, in case if we have selected bookings,
109 - * we will not lose selection.
110 - */
111 - . "wpbc_ajx_booking_listing.search_set_param( 'ui_usr__default_selected_toolbar', 'options' );"
112 - , 'font_icon' => 'wpbc_icn_tune' //FixIn: 9.0.1.4 'glyphicon glyphicon-fire'
113 - , 'default' => ( $selected_tab == 'options' ) ? true : false
114 - //, 'position' => 'right'
115 -
116 - ) );
117 - }
118 - wpbc_bs_dropdown_menu_help();
119 -
120 - wpbc_bs_toolbar_tabs_html_container_end();
121 -
122 - // </editor-fold>
123 -
124 35 // -------------------------------------------------------------------------------------------------------------
125 36 // Filters
126 37 // -------------------------------------------------------------------------------------------------------------
127 38 ?><div><?php //Required for bottom border radius in container
128 39
129 - ?><div class="ui_container ui_container_toolbar ui_container_filters ui_container_filter_row_1" style="<?php echo ( $selected_tab == 'filters' ) ? 'display: flex' : 'display: none' ?>;"><?php
40 + ?><div class="ui_container ui_container_toolbar ui_container_filters ui_container_filter_row_1" style="display: flex;background: transparent;padding: 6px 0;border: 0;"><?php
130 41
131 42 ?><div class="ui_group ui_group__dates_status ui_search_fields_group_1"><?php // array( 'class' => 'group_nowrap' ) // Elements at Several or One Line
132 43
133 44 wpbc_ajx__ui__booked_dates( $escaped_search_request_params, $default_param_values );
@@ -137,9 +48,19 @@
137 48 ?></div><?php
138 49
139 50 ?><div class="ui_group ui_group__keyword ui_search_fields_group_2"><?php // array( 'class' => 'group_nowrap' ) // Elements at Several or One Line
140 51
141 - wpbc_ajx_toolbar_keyword_search( $escaped_search_request_params, $default_param_values );
52 + wpbc_ajx__ui__booking_resources( $escaped_search_request_params, $default_param_values );
53 +
54 + /**
55 + * Render extension filters after the Booking Resource selector.
56 + *
57 + * @param array<string,mixed> $escaped_search_request_params Sanitized current filter values.
58 + * @param array<string,mixed> $default_param_values Default filter values.
59 + */
60 + do_action( 'wpbc_booking_listing_toolbar_after_resources', $escaped_search_request_params, $default_param_values );
61 +
62 + wpbc_ajx_toolbar_keyword_search( $escaped_search_request_params, $default_param_values );
142 63
143 64 wpbc_ajx_toolbar_clear_keyword_search( $escaped_search_request_params, $default_param_values ); // FixIn: 9.7.2.3.
144 65
145 66 wpbc_ajx_toolbar_force_reload_button( $escaped_search_request_params, $default_param_values );
@@ -148,14 +69,14 @@
148 69
149 70 ?></div><?php
150 71
151 72
152 - ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_filters ui_container_filter_row_2" style="<?php echo ( $selected_tab == 'filters' ) ? 'display: flex' : 'display: none' ?>;"><?php
73 + ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_filters ui_container_filter_row_2" style="display: flex;background: transparent;padding: 6px 0;border: 0;"><?php
153 74
154 75 ?><div class="ui_group ui_group__statuses ui_search_fields_group_1"><?php // array( 'class' => 'group_nowrap' ) // Elements at Several or One Line
155 76
156 - wpbc_ajx__ui__booking_resources( $escaped_search_request_params, $default_param_values );
157 77
78 +
158 79 wpbc_ajx__ui__existing_or_trash( $escaped_search_request_params, $default_param_values );
159 80
160 81 wpbc_ajx__ui__all_or_new( $escaped_search_request_params, $default_param_values );
161 82
@@ -173,180 +94,13 @@
173 94
174 95 ?></div><?php //Required for bottom border radius in container
175 96
176 97
177 - // <editor-fold defaultstate="collapsed" desc=" A c t i o n s t o o l b a r " >
178 -
179 - // -------------------------------------------------------------------------------------------------------------
180 - // Actions
181 - // -------------------------------------------------------------------------------------------------------------
182 -
183 - ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_actions ui_container_actions_row_1" style="<?php echo ( $selected_tab == 'actions' ) ? 'display: flex' : 'display: none' ?>;"><?php
184 -
185 - ?><div class="ui_group"><?php
186 -
187 - // Approve // Pending
188 - ?><div class="ui_element hide_button_if_no_selection"><?php
189 - wpbc_ajx__ui__action_button__approve( $escaped_search_request_params );
190 - wpbc_ajx__ui__action_button__pending( $escaped_search_request_params );
191 - ?></div><?php
192 -
193 - // Trash / Reject // Restore // Delete
194 - ?><div class="ui_element hide_button_if_no_selection"><?php
195 - wpbc_ajx__ui__action_button__trash( $escaped_search_request_params );
196 - wpbc_ajx__ui__action_button__restore( $escaped_search_request_params );
197 - wpbc_ajx__ui__action_button__delete( $escaped_search_request_params );
198 - wpbc_ajx__ui__action_text__delete_reason( $escaped_search_request_params );
199 - ?></div><?php
200 -
201 - // Empty Trash
202 - ?><div class="ui_element"><?php
203 - wpbc_ajx__ui__action_button__empty_trash( $escaped_search_request_params );
204 - ?></div><?php
205 -
206 - // Read All // Read // Unread
207 - ?><div class="ui_element"><?php
208 - wpbc_ajx__ui__action_button__readall( $escaped_search_request_params );
209 - wpbc_ajx__ui__action_button__read( $escaped_search_request_params );
210 - wpbc_ajx__ui__action_button__unread( $escaped_search_request_params );
211 - ?></div><?php
212 -
213 - // Print
214 - ?><div class="ui_element"><?php
215 - wpbc_ajx__ui__action_button__print( $escaped_search_request_params );
216 - ?></div><?php
217 -
218 - // Import
219 - ?><div class="ui_element"><?php
220 - wpbc_ajx__ui__action_button__import( $escaped_search_request_params );
221 - ?></div><?php
222 -
223 - // Export page to CSV // Export all pages to CSV
224 - ?><div class="ui_element"><?php
225 - wpbc_ajx__ui__action_button__export_csv( $escaped_search_request_params );
226 - // wpbc_ajx__ui__action_button__export_csv_page( $escaped_search_request_params );
227 - // wpbc_ajx__ui__action_button__export_csv_all( $escaped_search_request_params );
228 - ?></div><?php
229 -
230 - ?></div><?php
231 -
232 - ?></div><?php
233 - // </editor-fold>
234 -
235 -
236 - // <editor-fold defaultstate="collapsed" desc=" O p t i o n s t o o l b a r " >
237 -
238 - // -------------------------------------------------------------------------------------------------------------
239 - // Options
240 - // -------------------------------------------------------------------------------------------------------------
241 - if ( class_exists( 'wpdev_bk_personal' ) ) { // FixIn: 9.6.1.5.
242 - ?><div class="ui_container ui_container_toolbar ui_container_small ui_container_options ui_container_options_row_1" style="<?php echo ( $selected_tab == 'options' ) ? 'display: flex' : 'display: none' ?>;"><?php
243 -
244 - ?><div class="ui_group"><?php
245 -
246 - /*
247 - // Is send Emails // FixIn: 9.6.1.5.
248 - ?><div class="ui_element"><?php
249 - wpbc_ajx__ui__options_checkbox__send_emails( $escaped_search_request_params, $default_param_values );
250 - ?></div><?php
251 - */
252 -
253 - if ( class_exists( 'wpdev_bk_personal' ) ) {
254 - // Is Expand Notes
255 - ?><div class="ui_element"><?php
256 -
257 - wpbc_ajx__ui__options_checkbox__is_expand_remarks( $escaped_search_request_params, $default_param_values );
258 -
259 - ?></div><?php
260 - }
261 -
262 - ?></div><?php
263 -
264 - ?></div><?php
265 - }
266 - // </editor-fold>
267 -
268 98 ?></div><?php
269 99 }
270 100
271 -/**
272 - * Sorting
273 - *
274 - * @param $escaped_search_request_params - escaped search request parameters array
275 - * @param $defaults - default parameters values
276 - */
277 -function wpbc_ajx__ui__booking_sorting( $escaped_search_request_params, $defaults ){
278 101
279 - $params_addon = array(
280 - 'type' => 'span'
281 - , 'html' => ''// '<i class="menu_icon icon-1x wpbc_icn_event"></i>' //'<strong>' . esc_html__( 'Dates', 'booking ' ) . '</strong>'
282 - , 'icon' => array( 'icon_font' => 'wpbc_icn_swap_vert', 'position' => 'right', 'icon_img' => '' )
283 - , 'class' => 'wpbc_ui_button inactive'
284 - , 'style' => ''
285 - , 'attr' => array()
286 - );
287 102
288 - $select_options = array (
289 - 'booking_id__asc' => __( 'ID', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>',
290 - 'booking_id__desc' => __( 'ID', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>',
291 - 'divider1' => array( 'type' => 'html', 'html' => '<hr/>' ),
292 - 'dates__asc' => __( 'Dates', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>',
293 - 'dates__desc' => __( 'Dates', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>',
294 - );
295 - if ( class_exists( 'wpdev_bk_personal' ) ) {
296 - $select_options['divider2'] = array( 'type' => 'html', 'html' => '<hr/>' );
297 - $select_options['resource__asc'] = __( 'Resource', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>';
298 - $select_options['resource__desc'] = __( 'Resource', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>';
299 -
300 - }
301 - if ( class_exists( 'wpdev_bk_biz_s' ) ) {
302 - $select_options['divider3'] = array( 'type' => 'html', 'html' => '<hr/>' );
303 - $select_options['cost__asc'] = __( 'Cost', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-up-short"></i>';
304 - $select_options['cost__desc'] = __( 'Cost', 'booking' ) . ' <i class="menu_icon icon-1x wpbc-bi-arrow-down-short"></i>';
305 - }
306 -
307 - $params = array(
308 - 'id' => 'wh_sort'
309 - , 'default' => isset( $escaped_search_request_params['wh_sort'] ) ? $escaped_search_request_params['wh_sort'] : $defaults['wh_sort']
310 - , 'label' => ''//__('Sort by', 'booking') . ':'
311 - , 'title' => __('Sort by', 'booking')
312 - , 'hint' => array( 'title' => __('Sort bookings by' ,'booking') , 'position' => 'top' )
313 - , 'li_options' => $select_options
314 - );
315 -
316 - ?><div class="wpbc_ajx_toolbar wpbc_buttons_row">
317 - <div class="ui_container ui_container_small">
318 - <div class="ui_group">
319 - <div class="ui_element"><?php
320 -
321 - //wpbc_flex_addon( $params_addon );
322 -
323 - wpbc_flex_dropdown( $params );
324 -
325 - ?></div></div></div></div><?php
326 -}
327 -
328 -
329 -/**
330 - * Is email sending option - loacted inside of the page -- under the toolbar
331 - *
332 - * @param $escaped_search_request_params - escaped search request parameters array
333 - * @param $defaults - default parameters values
334 - */
335 -function wpbc_ajx__ui__booking__no_toolbar__is_email_sending( $escaped_search_request_params, $defaults ) { // FixIn: 9.6.1.5.
336 -
337 - ?><div class="wpbc_ajx_toolbar wpbc_no_borders wpbc_not_toolbar_is_send_emails"><?php
338 - ?><div class="ui_container ui_container_micro"><?php
339 - ?><div class="ui_group"><?php
340 - ?><div class="ui_element"><?php
341 - wpbc_ajx__ui__options_checkbox__send_emails( $escaped_search_request_params, $defaults );
342 - ?></div><?php
343 - ?></div><?php
344 - ?></div><?php
345 - ?></div><?php
346 -}
347 -
348 -
349 103 // <editor-fold defaultstate="collapsed" desc=" T o o l b a r F i l t e r B u t t o n s " >
350 104
351 105 // ---------------------------------------------------------------------------------------------------------------------
352 106 /// 1st row
@@ -820,9 +574,9 @@
820 574
821 575 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
822 576 if ( ( ! empty( $_REQUEST['overwrite'] ) ) && ( ! empty( $_REQUEST['keyword'] ) ) ) {
823 577
824 - // Searching for booking(s) from URL: http://beta/wp-admin/admin.php?page=wpbc&view_mode=vm_booking_listing&keyword=id:2&overwrite=1 .
578 + // Searching for booking(s) from URL: http://beta/wp-admin/admin.php?page=wpbc&tab=vm_booking_listing&keyword=id:2&overwrite=1 .
825 579
826 580 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
827 581 $default_value = wpbc_sanitize_text( $_REQUEST['keyword'] );
828 582
@@ -933,8 +687,12 @@
933 687 if ( ! class_exists( 'wpdev_bk_personal' ) ) {
934 688 return false;
935 689 }
936 690
691 + wpbc_bo_listing__resource_choosen( $escaped_search_request_params, $defaults );
692 +
693 + return; //TODO: 2025-04-29 relpace it.
694 +
937 695 $params_button = array(
938 696 'type' => 'button' ,
939 697 'title' => '',//__( 'Reset', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
940 698 'hint' => array( 'title' => __( 'Remove all booking resources', 'booking' ), 'position' => 'top' ), // Hint
@@ -1680,13 +1438,13 @@
1680 1438 'hint' => array( 'title' => __( 'Reload bookings listing', 'booking' ), 'position' => 'top' ), // Hint
1681 1439 'link' => 'javascript:void(0)', // Direct link or skip it
1682 1440 'action' => "wpbc_ajx_booking_send_search_request_with_params( { } );", // Some JavaScript
1683 1441 'icon' => array(
1684 - 'icon_font' => 'wpbc_icn_rotate_right wpbc_spin', //'wpbc_icn_rotate_left',
1442 + 'icon_font' => 'wpbc_icn_refresh wpbc_spin', //'wpbc_icn_rotate_left',
1685 1443 'position' => 'left',
1686 1444 'icon_img' => ''
1687 1445 ),
1688 - 'class' => 'wpbc_ui_button wpbc_ui_button_primary', // '' | 'wpbc_ui_button_primary'
1446 + 'class' => 'wpbc_ui_button wpbc_ui_button_primary0', // '' | 'wpbc_ui_button_primary'
1689 1447 'style' => '', // Any CSS class here
1690 1448 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
1691 1449 'attr' => array( 'id' => 'wpbc_booking_listing_reload_button')
1692 1450 );
@@ -1698,612 +1456,10 @@
1698 1456
1699 1457 // </editor-fold>
1700 1458
1701 1459
1702 -// <editor-fold defaultstate="collapsed" desc=" T o o l b a r A c t i o n B u t t o n s " >
1703 1460
1704 1461 // ---------------------------------------------------------------------------------------------------------------------
1705 -// T o o l b a r A C T I O N S UI elements
1706 -// ---------------------------------------------------------------------------------------------------------------------
1707 -
1708 - function wpbc_ajx__ui__action_button__approve( $escaped_search_request_params ){
1709 -
1710 - $booking_action = 'set_booking_approved';
1711 -
1712 - $el_id = 'ui_btn_' . $booking_action;
1713 -
1714 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1715 - return false;
1716 - }
1717 -
1718 - $params = array(
1719 - 'type' => 'button' ,
1720 - 'title' => __( 'Approve', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1721 - 'hint' => array( 'title' => __( 'Approve selected bookings', 'booking' ), 'position' => 'top' ), // Hint
1722 - 'link' => 'javascript:void(0)', // Direct link or skip it
1723 - 'action' => "wpbc_ajx_booking_ajax_action_request( {
1724 - 'booking_action' : '{$booking_action}',
1725 - 'booking_id' : wpbc_get_selected_row_id(),
1726 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1727 - 'ui_clicked_element_id': '{$el_id}'
1728 - } );
1729 - wpbc_button_enable_loading_icon( this ); " ,
1730 - 'icon' => array(
1731 - 'icon_font' => 'wpbc_icn_check_circle_outline',
1732 - 'position' => 'right',
1733 - 'icon_img' => ''
1734 - ),
1735 - 'class' => 'wpbc_ui_button_primary hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
1736 - 'style' => '', // Any CSS class here
1737 - 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
1738 - 'attr' => array( 'id' => $el_id )
1739 - );
1740 -
1741 - wpbc_flex_button( $params );
1742 - }
1743 -
1744 - function wpbc_ajx__ui__action_button__pending( $escaped_search_request_params ){
1745 -
1746 - $booking_action = 'set_booking_pending';
1747 -
1748 - $el_id = 'ui_btn_' . $booking_action;
1749 -
1750 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1751 - return false;
1752 - }
1753 -
1754 - $params = array(
1755 - 'type' => 'button' ,
1756 - 'title' => __( 'Pending', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1757 - 'hint' => array( 'title' => __( 'Set selected bookings as pending', 'booking' ), 'position' => 'top' ), // Hint
1758 - 'link' => 'javascript:void(0)', // Direct link or skip it
1759 - 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to set booking as pending ?', 'booking' ) ) . "') ) {
1760 - wpbc_ajx_booking_ajax_action_request( {
1761 - 'booking_action' : '{$booking_action}',
1762 - 'booking_id' : wpbc_get_selected_row_id(),
1763 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1764 - 'ui_clicked_element_id': '{$el_id}'
1765 - } );
1766 - wpbc_button_enable_loading_icon( this );
1767 - }" ,
1768 - 'icon' => array(
1769 - 'icon_font' => 'wpbc_icn_block',
1770 - 'position' => 'right',
1771 - 'icon_img' => ''
1772 - ),
1773 - 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
1774 - 'style' => '', // Any CSS class here
1775 - 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
1776 - 'attr' => array( 'id' => $el_id )
1777 - );
1778 -
1779 - wpbc_flex_button( $params );
1780 - }
1781 -
1782 - function wpbc_ajx__ui__action_button__trash( $escaped_search_request_params ){
1783 -
1784 - $booking_action = 'move_booking_to_trash';
1785 -
1786 - $el_id = 'ui_btn_' . $booking_action;
1787 -
1788 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1789 - return false;
1790 - }
1791 -
1792 - $params = array(
1793 - 'type' => 'button' ,
1794 - 'title' => __( 'Trash / Reject', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1795 - 'hint' => array( 'title' => __( 'Reject booking - move selected bookings to trash', 'booking' ), 'position' => 'top' ), // Hint
1796 - 'link' => 'javascript:void(0)', // Direct link or skip it
1797 - 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) {
1798 - wpbc_ajx_booking_ajax_action_request( {
1799 - 'booking_action' : '{$booking_action}',
1800 - 'booking_id' : wpbc_get_selected_row_id(),
1801 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1802 - 'ui_clicked_element_id': '{$el_id}'
1803 - } );
1804 - wpbc_button_enable_loading_icon( this );
1805 - }" ,
1806 - 'icon' => array(
1807 - 'icon_font' => 'wpbc_icn_delete_outline',
1808 - 'position' => 'right',
1809 - 'icon_img' => ''
1810 - ),
1811 - 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
1812 - 'style' => '', // Any CSS class here
1813 - 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
1814 - 'attr' => array( 'id' => $el_id )
1815 - );
1816 -
1817 - wpbc_flex_button( $params );
1818 - }
1819 -
1820 - function wpbc_ajx__ui__action_button__restore( $escaped_search_request_params ){
1821 -
1822 - $booking_action = 'restore_booking_from_trash';
1823 -
1824 - $el_id = 'ui_btn_' . $booking_action;
1825 -
1826 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1827 - return false;
1828 - }
1829 -
1830 - $params = array(
1831 - 'type' => 'button' ,
1832 - 'title' => __( 'Restore', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1833 - 'hint' => array( 'title' => __( 'Restore selected bookings', 'booking' ), 'position' => 'top' ), // Hint
1834 - 'link' => 'javascript:void(0)', // Direct link or skip it
1835 - 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) {
1836 - wpbc_ajx_booking_ajax_action_request( {
1837 - 'booking_action' : '{$booking_action}',
1838 - 'booking_id' : wpbc_get_selected_row_id(),
1839 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1840 - 'ui_clicked_element_id': '{$el_id}'
1841 - } );
1842 - wpbc_button_enable_loading_icon( this );
1843 - }" ,
1844 - 'icon' => array(
1845 - 'icon_font' => 'wpbc_icn_rotate_left',
1846 - 'position' => 'right',
1847 - 'icon_img' => ''
1848 - ),
1849 - 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
1850 - 'style' => '', // Any CSS class here
1851 - 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
1852 - 'attr' => array( 'id' => $el_id )
1853 - );
1854 -
1855 - wpbc_flex_button( $params );
1856 - }
1857 -
1858 - function wpbc_ajx__ui__action_button__delete( $escaped_search_request_params ){
1859 -
1860 - $booking_action = 'delete_booking_completely';
1861 -
1862 - $el_id = 'ui_btn_' . $booking_action;
1863 -
1864 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1865 - return false;
1866 - }
1867 -
1868 - $params = array(
1869 - 'type' => 'button' ,
1870 - 'title' => __( 'Delete', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1871 - 'hint' => array( 'title' => __( 'Delete selected bookings', 'booking' ), 'position' => 'top' ), // Hint
1872 - 'link' => 'javascript:void(0)', // Direct link or skip it
1873 - 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to delete selected booking(s) ?', 'booking' ) ) . "') ) {
1874 - wpbc_ajx_booking_ajax_action_request( {
1875 - 'booking_action' : '{$booking_action}',
1876 - 'booking_id' : wpbc_get_selected_row_id(),
1877 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1878 - 'ui_clicked_element_id': '{$el_id}'
1879 - } );
1880 - wpbc_button_enable_loading_icon( this );
1881 - }" ,
1882 - 'icon' => array(
1883 - 'icon_font' => 'wpbc_icn_close',
1884 - 'position' => 'right',
1885 - 'icon_img' => ''
1886 - ),
1887 - 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
1888 - 'style' => '', // Any CSS class here
1889 - 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
1890 - 'attr' => array( 'id' => $el_id )
1891 - );
1892 -
1893 - wpbc_flex_button( $params );
1894 - }
1895 -
1896 - function wpbc_ajx__ui__action_text__delete_reason( $escaped_search_request_params ){
1897 -
1898 - $params = array(
1899 - 'type' => 'text'
1900 - , 'id' => 'reason_of_action'
1901 - , 'name' => 'reason_of_action'
1902 - , 'label' => ''
1903 - , 'disabled' => false
1904 - , 'class' => 'hide_button_if_no_selection'
1905 - , 'style' => ''
1906 - , 'placeholder' => __( 'Reason of action', 'booking' )
1907 - , 'attr' => array()
1908 - , 'value' => ''
1909 - , 'onfocus' => ''
1910 - );
1911 - wpbc_flex_text( $params );
1912 - }
1913 -
1914 - function wpbc_ajx__ui__action_button__readall( $escaped_search_request_params ){
1915 -
1916 - $booking_action = 'set_booking_as_read';
1917 -
1918 - $el_id = 'ui_btn_all_' . $booking_action;
1919 -
1920 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1921 - return false;
1922 - }
1923 -
1924 - $params = array(
1925 - 'type' => 'button' ,
1926 - 'title' => __( 'Read All', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1927 - 'hint' => array( 'title' => __( 'Mark as read all bookings', 'booking' ), 'position' => 'top' ), // Hint
1928 - 'link' => 'javascript:void(0)', // Direct link or skip it
1929 - 'action' => "wpbc_ajx_booking_ajax_action_request( {
1930 - 'booking_action' : '{$booking_action}',
1931 - 'booking_id' : '-1',
1932 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1933 - 'ui_clicked_element_id': '{$el_id}'
1934 - } );
1935 - wpbc_button_enable_loading_icon( this ); " ,
1936 - 'icon' => array(
1937 - 'icon_font' => 'wpbc_icn_disabled_visible',
1938 - 'position' => 'right',
1939 - 'icon_img' => ''
1940 - ),
1941 - 'class' => '', // '' | 'wpbc_ui_button_primary'
1942 - 'style' => '', // Any CSS class here
1943 - 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size).
1944 - 'attr' => array( 'id' => $el_id )
1945 - );
1946 -
1947 - wpbc_flex_button( $params );
1948 - }
1949 -
1950 - function wpbc_ajx__ui__action_button__read( $escaped_search_request_params ){
1951 -
1952 - $booking_action = 'set_booking_as_read';
1953 -
1954 - $el_id = 'ui_btn_' . $booking_action;
1955 -
1956 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1957 - return false;
1958 - }
1959 -
1960 - $params = array(
1961 - 'type' => 'button' ,
1962 - 'title' => __( 'Read', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1963 - 'hint' => array( 'title' => __( 'Mark as read selected bookings', 'booking' ), 'position' => 'top' ), // Hint
1964 - 'link' => 'javascript:void(0)', // Direct link or skip it
1965 - 'action' => "wpbc_ajx_booking_ajax_action_request( {
1966 - 'booking_action' : '{$booking_action}',
1967 - 'booking_id' : wpbc_get_selected_row_id(),
1968 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
1969 - 'ui_clicked_element_id': '{$el_id}'
1970 - } );
1971 - wpbc_button_enable_loading_icon( this ); " ,
1972 - 'icon' => array(
1973 - 'icon_font' => 'wpbc_icn_visibility_off',
1974 - 'position' => 'right',
1975 - 'icon_img' => ''
1976 - ),
1977 - 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
1978 - 'style' => '', // Any CSS class here
1979 - 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size).
1980 - 'attr' => array( 'id' => $el_id )
1981 - );
1982 -
1983 - wpbc_flex_button( $params );
1984 - }
1985 -
1986 - function wpbc_ajx__ui__action_button__unread( $escaped_search_request_params ){
1987 -
1988 - $booking_action = 'set_booking_as_unread';
1989 -
1990 - $el_id = 'ui_btn_' . $booking_action;
1991 -
1992 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
1993 - return false;
1994 - }
1995 -
1996 - $params = array(
1997 - 'type' => 'button' ,
1998 - 'title' => __( 'Unread', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
1999 - 'hint' => array( 'title' => __( 'Mark as Unread selected bookings', 'booking' ), 'position' => 'top' ), // Hint
2000 - 'link' => 'javascript:void(0)', // Direct link or skip it
2001 - 'action' => "wpbc_ajx_booking_ajax_action_request( {
2002 - 'booking_action' : '{$booking_action}',
2003 - 'booking_id' : wpbc_get_selected_row_id(),
2004 - 'reason_of_action' : jQuery( '#reason_of_action' ).val(),
2005 - 'ui_clicked_element_id': '{$el_id}'
2006 - } );
2007 - wpbc_button_enable_loading_icon( this ); " ,
2008 - 'icon' => array(
2009 - 'icon_font' => 'wpbc_icn_visibility',
2010 - 'position' => 'right',
2011 - 'icon_img' => ''
2012 - ),
2013 - 'class' => 'hide_button_if_no_selection', // '' | 'wpbc_ui_button_primary'
2014 - 'style' => '', // Any CSS class here
2015 - 'mobile_show_text' => !true, // Show or hide text, when viewing on Mobile devices (small window size).
2016 - 'attr' => array( 'id' => $el_id )
2017 - );
2018 -
2019 - wpbc_flex_button( $params );
2020 - }
2021 -
2022 - function wpbc_ajx__ui__action_button__print( $escaped_search_request_params ){
2023 - $user_bk_id = 1;
2024 - $params = array(
2025 - 'type' => 'button',
2026 - 'title' => __( 'Print', 'booking' ) . '&nbsp;&nbsp;',
2027 - 'hint' => array(
2028 - 'title' => __( 'Print bookings listing', 'booking' ),
2029 - 'position' => 'top'
2030 - ),
2031 - 'link' => 'javascript:void(0)',
2032 - 'action' => "wpbc_print_dialog__show();",
2033 - 'icon' => array(
2034 - 'icon_font' => 'wpbc_icn_print',
2035 - 'position' => 'right',
2036 - 'icon_img' => ''
2037 - ),
2038 - 'class' => '',
2039 - 'style' => '',
2040 - 'attr' => array(),
2041 - 'mobile_show_text' => true
2042 - );
2043 - wpbc_flex_button( $params );
2044 - }
2045 -
2046 - function wpbc_ajx__ui__action_button__import( $escaped_search_request_params ){
2047 -
2048 - $booking_action = 'import_google_calendar';
2049 -
2050 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
2051 - return false;
2052 - }
2053 -
2054 -
2055 - $booking_gcal_feed = get_bk_option( 'booking_gcal_feed');
2056 -
2057 - if ( ( ! class_exists( 'wpdev_bk_personal' ) ) && ( $booking_gcal_feed == '' ) ) {
2058 - $is_this_btn_disabled = true;
2059 - } else {
2060 - $is_this_btn_disabled = false;
2061 - }
2062 -
2063 - $params = array(
2064 - 'type' => 'button',
2065 - 'title' => __( 'Import', 'booking' ) . '&nbsp;&nbsp;',
2066 - 'hint' => array(
2067 - 'title' => __( 'Import Google Calendar Events', 'booking' ),
2068 - 'position' => 'top'
2069 - ),
2070 - 'link' => 'javascript:void(0)',
2071 - 'action' => " if ( 'function' === typeof( jQuery('#wpbc_modal__import_google_calendar__section').wpbc_my_modal ) ) {
2072 - jQuery('#wpbc_modal__import_google_calendar__section').wpbc_my_modal('show');
2073 - } else {
2074 - alert( 'Warning! wpbc_my_modal module has not found. Please, recheck about any conflicts by deactivating other plugins.');
2075 - }",
2076 - 'icon' => array(
2077 - 'icon_font' => 'wpbc_icn_event',
2078 - 'position' => 'right',
2079 - 'icon_img' => ''
2080 - ),
2081 - 'class' => '',//( $is_this_btn_disabled ? ' disabled' : '' ),
2082 - 'style' => '',
2083 - 'attr' => array(),
2084 - 'mobile_show_text' => true
2085 - );
2086 - wpbc_flex_button( $params );
2087 - }
2088 -
2089 - function wpbc_ajx__ui__action_button__export_csv( $escaped_search_request_params ){
2090 -
2091 - if ( ! class_exists( 'wpdev_bk_personal' ) ) {
2092 - return false;
2093 - }
2094 -
2095 - $booking_action = 'export_csv';
2096 - $el_id = 'ui_btn_' . $booking_action;
2097 -
2098 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
2099 - return false;
2100 - }
2101 -
2102 - $params = array(
2103 - 'type' => 'button',
2104 - 'title' => __( 'Export to CSV', 'booking' ) . '&nbsp;&nbsp;',
2105 - 'hint' => array(
2106 - 'title' => __( 'Export bookings to CSV format', 'booking' ),
2107 - 'position' => 'top'
2108 - ),
2109 - 'link' => 'javascript:void(0)',
2110 - //'action' => wpbc_csv_get_url_for_button( 'page' ),
2111 - 'action' => "if ( 'function' === typeof( jQuery('#wpbc_modal__export_csv__section').wpbc_my_modal ) ) {
2112 - jQuery('#wpbc_modal__export_csv__section').wpbc_my_modal('show');
2113 - } else {
2114 - alert( 'Warning! wpbc_my_modal module has not found. Please, recheck about any conflicts by deactivating other plugins.');
2115 - }",
2116 - 'icon' => array(
2117 - 'icon_font' => 'wpbc_icn_file_upload',
2118 - 'position' => 'right',
2119 - 'icon_img' => ''
2120 - ),
2121 - 'class' => '',
2122 - 'style' => '',
2123 - 'attr' => array( 'id' => $el_id ),
2124 - 'mobile_show_text' => true
2125 - );
2126 - wpbc_flex_button( $params );
2127 - }
2128 -
2129 - function wpbc_ajx__ui__action_button__export_csv_page( $escaped_search_request_params ){
2130 -
2131 - if ( ! class_exists( 'wpdev_bk_personal' ) ) {
2132 - return false;
2133 - }
2134 -
2135 - $booking_action = 'export_csv';
2136 - $el_id = 'ui_btn_' . $booking_action;
2137 -
2138 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
2139 - return false;
2140 - }
2141 -
2142 - $params = array(
2143 - 'type' => 'button',
2144 - 'title' => __( 'Export page to CSV', 'booking' ) . '&nbsp;&nbsp;',
2145 - 'hint' => array(
2146 - 'title' => __( 'Export only current page of bookings to CSV format', 'booking' ),
2147 - 'position' => 'top'
2148 - ),
2149 - 'link' => 'javascript:void(0)',
2150 - //'action' => wpbc_csv_get_url_for_button( 'page' ),
2151 - 'action' => "wpbc_ajx_booking__ui_click__export_csv( {
2152 - 'booking_action' : '{$booking_action}',
2153 - 'ui_clicked_element_id': '{$el_id}',
2154 - 'export_type': 'csv_page'
2155 - } );",
2156 - 'icon' => array(
2157 - 'icon_font' => 'wpbc_icn_file_upload',
2158 - 'position' => 'right',
2159 - 'icon_img' => ''
2160 - ),
2161 - 'class' => '',
2162 - 'style' => '',
2163 - 'attr' => array( 'id' => $el_id ),
2164 - 'mobile_show_text' => true
2165 - );
2166 - wpbc_flex_button( $params );
2167 - }
2168 -
2169 - function wpbc_ajx__ui__action_button__export_csv_all( $escaped_search_request_params ){
2170 -
2171 - if ( ! class_exists( 'wpdev_bk_personal' ) ) {
2172 - return false;
2173 - }
2174 -
2175 - $booking_action = 'export_csv';
2176 - $el_id = 'ui_btn_' . $booking_action . '_all';
2177 -
2178 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
2179 - return false;
2180 - }
2181 -
2182 - $params = array(
2183 - 'type' => 'button',
2184 - 'title' => __( 'Export all pages to CSV', 'booking' ) . '&nbsp;&nbsp;',
2185 - 'hint' => array(
2186 - 'title' => __( 'Export All bookings to CSV format', 'booking' ),
2187 - 'position' => 'top'
2188 - ),
2189 - 'link' => 'javascript:void(0)',
2190 - //'action' => wpbc_csv_get_url_for_button( 'all' ),
2191 - 'action' => "wpbc_ajx_booking__ui_click__export_csv( {
2192 - 'booking_action' : '{$booking_action}',
2193 - 'ui_clicked_element_id': '{$el_id}',
2194 - 'export_type': 'csv_all'
2195 - } );",
2196 -
2197 - 'icon' => array(
2198 - 'icon_font' => 'wpbc_icn_publish',
2199 - 'position' => 'right',
2200 - 'icon_img' => ''
2201 - ),
2202 - 'class' => '',
2203 - 'style' => '',
2204 - 'attr' => array( 'id' => $el_id ),
2205 - 'mobile_show_text' => true
2206 - );
2207 - wpbc_flex_button( $params );
2208 - }
2209 -
2210 - function wpbc_ajx__ui__action_button__empty_trash( $escaped_search_request_params ){
2211 -
2212 - $booking_action = 'empty_trash';
2213 -
2214 - $el_id = 'ui_btn_' . $booking_action;
2215 -
2216 - if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) {
2217 - return false;
2218 - }
2219 -
2220 - $params = array(
2221 - 'type' => 'button' ,
2222 - 'title' => __( 'Empty Trash', 'booking' ) . '&nbsp;&nbsp;', // Title of the button
2223 - 'hint' => array( 'title' => __( 'Empty Trash', 'booking' ), 'position' => 'top' ), // Hint
2224 - 'link' => 'javascript:void(0)', // Direct link or skip it
2225 - 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) {
2226 - wpbc_ajx_booking_ajax_action_request( {
2227 - 'booking_action' : '{$booking_action}',
2228 - 'ui_clicked_element_id': '{$el_id}'
2229 - } );
2230 - wpbc_button_enable_loading_icon( this );
2231 - }" ,
2232 - 'icon' => array(
2233 - 'icon_font' => 'wpbc_icn_delete_forever',
2234 - 'position' => 'right',
2235 - 'icon_img' => ''
2236 - ),
2237 - 'class' => '', // '' | 'wpbc_ui_button_primary'
2238 - 'style' => '', // Any CSS class here
2239 - 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size).
2240 - 'attr' => array( 'id' => $el_id )
2241 - );
2242 -
2243 - wpbc_flex_button( $params );
2244 - }
2245 -// </editor-fold>
2246 -
2247 -
2248 -// <editor-fold defaultstate="collapsed" desc=" T o o l b a r O p t i o n s B u t t o n s " >
2249 -
2250 -
2251 -function wpbc_ajx__ui__options_checkbox__send_emails( $escaped_search_request_params, $defaults ){
2252 -
2253 - $el_id = 'ui_usr__send_emails';
2254 -
2255 - $el_value = isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ];
2256 -
2257 - $params_checkbox = array(
2258 - 'id' => $el_id // HTML ID of element
2259 - , 'name' => $el_id
2260 - , 'label' => array( 'title' => __( 'Emails sending', 'booking' ) , 'position' => 'right' ) // FixIn: 9.6.1.5.
2261 - , 'style' => '' // CSS of select element
2262 - , 'class' => '' // CSS Class of select element
2263 - , 'disabled' => false
2264 - , 'attr' => array() // Any additional attributes, if this radio | checkbox element
2265 - , 'legend' => '' // aria-label parameter
2266 - , 'value' => $el_value // Some Value from optins array that selected by default
2267 - , 'selected' => ( ( 'send' == $el_value ) ? true : false ) // Selected or not
2268 - //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code
2269 - , 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( {'ui_usr__send_emails': (jQuery( this ).is(':checked') ? 'send' : 'not_send') } );" // JavaScript code
2270 - //, 'hint' => array( 'title' => __('Filter bookings by booking status' ,'booking') , 'position' => 'top' )
2271 - );
2272 -
2273 - wpbc_flex_toggle( $params_checkbox );
2274 -}
2275 -
2276 -
2277 -function wpbc_ajx__ui__options_checkbox__is_expand_remarks( $escaped_search_request_params, $defaults ){
2278 -
2279 - $el_id = 'ui_usr__is_expand_remarks';
2280 -
2281 - $el_value = isset( $escaped_search_request_params[ $el_id ] ) ? $escaped_search_request_params[ $el_id ] : $defaults[ $el_id ];
2282 -
2283 - $params_checkbox = array(
2284 - 'id' => $el_id // HTML ID of element
2285 - , 'name' => $el_id
2286 - , 'label' => array( 'title' => __( 'Show / hide notes', 'booking' ) , 'position' => 'left' )
2287 - , 'legend' => __('Check this box if you want to open notes section by default in Booking Listing page.' ,'booking')
2288 - , 'style' => '' // CSS of select element
2289 - , 'class' => '' // CSS Class of select element
2290 - , 'disabled' => false
2291 - , 'attr' => array() // Any additional attributes, if this radio | checkbox element
2292 - , 'legend' => '' // aria-label parameter
2293 - , 'value' => $el_value // Some Value from optins array that selected by default
2294 - , 'selected' => ( ( 'On' == $el_value ) ? true : false ) // Selected or not
2295 - //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code
2296 - , 'onchange' => "wpbc_ajx_booking_send_search_request_with_params( {'ui_usr__is_expand_remarks': (jQuery( this ).is(':checked') ? 'On' : 'Off') } );" // JavaScript code
2297 - );
2298 -
2299 - wpbc_flex_toggle( $params_checkbox );
2300 -}
2301 -// </editor-fold>
2302 -
2303 -
2304 -
2305 -// ---------------------------------------------------------------------------------------------------------------------
2306 1462 // JS & CSS Loading
2307 1463 // ---------------------------------------------------------------------------------------------------------------------
2308 1464
2309 1465 /**
@@ -2314,9 +1470,9 @@
2314 1470 function wpbc_ajx_toolbar_enqueue_css_files( $where_to_load ) {
2315 1471
2316 1472 if ( ( is_admin() ) && ( in_array( $where_to_load, array( 'admin', 'both' ) ) ) ) {
2317 1473
2318 - wp_enqueue_style( 'wpbc-flex-toolbar', wpbc_plugin_url( '/includes/_toolbar_ui/_src/toolbar_ui.css' ), array(), WP_BK_VERSION_NUM );
1474 + wp_enqueue_style( 'wpbc-flex-toolbar', wpbc_plugin_url( '/includes/_toolbar_ui/_out/toolbar_ui.css' ), array(), WP_BK_VERSION_NUM );
2319 1475 }
2320 1476 }
2321 1477 add_action( 'wpbc_enqueue_css_files', 'wpbc_ajx_toolbar_enqueue_css_files', 50 );
2322 1478
@@ -2346,5 +1502,5 @@
2346 1502 }
2347 1503 add_action( 'wpbc_enqueue_js_files', 'wpbc_ajx_toolbar_enqueue_js_files', 50 );
2348 1504
2349 1505
2350 -// 2024-08-13
1506 +// 2024-08-13