'group_nowrap' ) // Elements at Several or One Line // Resource select-box here. Defined as template at: private function template_toolbar_select_booking_resource(){ ?>
'group_nowrap' ) // Elements at Several or One Line wpbc_ajx_avy__ui__info( $escaped_search_request_params, $default_param_values ); ?>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////// // C a l e n d a r S e t t i n g s //////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
?>
'span' /* translators: 1: ... */ , 'html' => sprintf( __( '%1$sSelect days%2$s in calendar then select %3$sAvailable%4$s / %5$sUnavailable%6$s status and click %7$sApply%8$s availability button.', 'booking' ) , '', ' ' , ' ', ' ' , ' ', ' ' , ' ', ' ' ) //, 'icon' => array( 'icon_font' => 'wpbc_icn_info_outline', 'position' => 'left', 'icon_img' => '' ) , 'class' => 'wpbc_help_text' , 'style' => 'height:auto;' //, 'hint' => array( 'title' => __('Filter bookings by booking dates' ,'booking') , 'position' => 'top' ) , 'attr' => array() ); ?>
'border-left: 4px solid #11be4c;' ) ); // Green line ?> $el_id // HTML ID of element , 'name' => $booking_action , 'label' => array( 'title' => __('Available' ,'booking') , 'position' => 'right' ) , 'style' => 'margin:1px 0 0;' // CSS of select element , 'class' => 'wpbc_radio__set_days_availability' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => 'available' // Some Value from options array that selected by default , 'selected' => !false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code ); wpbc_flex_radio( $params_radio ); ?> 'border-left: 4px solid #e43939;' ) ); // Green line ?> $el_id // HTML ID of element , 'name' => $booking_action , 'label' => array( 'title' => __('Unavailable' ,'booking') , 'position' => 'right' ) , 'style' => 'margin:1px 0 0;' // CSS of select element , 'class' => 'wpbc_radio__set_days_availability' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => 'unavailable' // Some Value from options array that selected by default , 'selected' => !false // Selected or not //, 'onfocus' => "console.log( 'ON FOCUS:', jQuery( this ).is(':checked') , 'in element:' , jQuery( this ) );" // JavaScript code //, 'onchange' => "console.log( 'ON CHANGE:', jQuery( this ).val() , 'in element:' , jQuery( this ) );" // JavaScript code ); wpbc_flex_radio( $params_radio ); ?> 'button' , 'title' => __( 'Apply', 'booking' ) // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' ,'booking') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => //"console.log( 'ON CLICK:', jQuery( '[name=\"set_days_availability\"]:checked' ).val() , jQuery( 'textarea[id^=\"date_booking\"]' ).val() );" // Some JavaScript to execure, for example run the function " wpbc_ajx_availability__send_request_with_params( { 'do_action': 'set_availability' , 'dates_availability': jQuery( '[name=\"set_days_availability\"]:checked' ).val() , 'dates_selection': jQuery( 'textarea[id^=\"date_booking\"]' ).val() , 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); wpbc_admin_show_message_processing( '' ); " , 'class' => 'wpbc_ui_button_primary' // wpbc_ui_button | wpbc_ui_button_primary //, 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'icon' => array( 'icon_font' => 'wpbc_icn_check', // 'wpbc_icn_check_circle_outline', 'position' => 'left', 'icon_img' => '' ) , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params_button ); } /** * Reset button - init to default options * */ function wpbc_avy__ui__toolbar_reset_button(){ $params = array( 'type' => 'button' , 'title' => __( 'Reset', 'booking' ) . '  ', // Title of the button 'hint' => array( 'title' => __( 'Reset selected options to default values', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "wpbc_ajx_availability__send_request_with_params( { 'do_action': 'make_reset' } ); wpbc_button_enable_loading_icon( this );", // JavaScript 'icon' => array( 'icon_font' => 'wpbc_icn_settings_backup_restore', //'wpbc_icn_rotate_left', 'position' => 'left', 'icon_img' => '' ), 'class' => 'wpbc_ui_button', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array() ); wpbc_flex_button( $params ); } function wpbc_avy__ui__toolbar_erase_availability_button(){ $booking_action = 'erase_availability'; $el_id = 'ui_btn_' . $booking_action; // if ( ! wpbc_is_user_can( $booking_action, wpbc_get_current_user_id() ) ) { // return false; // } $params = array( 'type' => 'button' , 'title' => __( 'Reset availability', 'booking' ) . '  ', // Title of the button 'hint' => array( 'title' => __( 'Remove all unavailable dates for this calendar', 'booking' ), 'position' => 'top' ), // Hint 'link' => 'javascript:void(0)', // Direct link or skip it 'action' => "if ( wpbc_are_you_sure('" . esc_attr( __( 'Do you really want to do this ?', 'booking' ) ) . "') ) { wpbc_ajx_availability__send_request_with_params( { 'do_action': '{$booking_action}', 'ui_clicked_element_id': '{$el_id}' } ); wpbc_button_enable_loading_icon( this ); }" , 'icon' => array( 'icon_font' => 'wpbc_icn_close', 'position' => 'right', 'icon_img' => '' ), 'class' => 'wpbc_ui_button_danger', // '' | 'wpbc_ui_button_primary' 'style' => '', // Any CSS class here 'mobile_show_text' => true, // Show or hide text, when viewing on Mobile devices (small window size). 'attr' => array( 'id' => $el_id ) ); wpbc_flex_button( $params ); }