partials
22 hours ago
_booking__agents.php
9 months ago
_booking__datepicker.php
9 months ago
_booking__services.php
2 weeks ago
_confirmation.php
22 hours ago
_customer.php
4 months ago
_payment__methods.php
1 year ago
_payment__pay.php
1 year ago
_payment__portions.php
1 year ago
_payment__processors.php
1 year ago
_payment__times.php
1 year ago
_verify.php
1 year ago
load_step.php
1 year ago
preset_slot_not_available.php
1 year ago
start.php
1 year ago
start_instant.php
1 year ago
start.php
130 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var $booking OsBookingModel |
| 4 | * @var $all_steps \LatePoint\Misc\Step[] |
| 5 | * @var $steps \LatePoint\Misc\Step[] |
| 6 | * @var $current_step \LatePoint\Misc\Step |
| 7 | * @var $current_step_code string |
| 8 | * @var $show_next_btn bool |
| 9 | * @var $restrictions array |
| 10 | * @var $presets array |
| 11 | * @var $cart OsCartModel |
| 12 | * @var $booking_element_type string |
| 13 | * @var $booking_element_styles array |
| 14 | */ |
| 15 | |
| 16 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | exit; // Exit if accessed directly |
| 18 | } |
| 19 | |
| 20 | |
| 21 | ?> |
| 22 | |
| 23 | <?php |
| 24 | $element_classes = []; |
| 25 | $element_classes[] = ($booking_element_type == 'lightbox') ? 'latepoint-lightbox-form' : 'latepoint-inline-form'; |
| 26 | $element_classes[] = empty($booking_element_styles['hide_summary']) ? 'latepoint-with-summary' : 'latepoint-without-summary'; |
| 27 | $element_classes[] = empty($booking_element_styles['hide_side_panel']) ? 'latepoint-show-side-panel' : 'latepoint-hide-side-panel'; |
| 28 | $element_classes[] = ((!$cart->is_empty() || $booking->is_ready_for_summary()) && $current_step_code != 'confirmation') ? 'latepoint-summary-is-open' : ''; |
| 29 | ?> |
| 30 | <div class="latepoint-w <?php echo esc_attr(implode(' ', $element_classes)); ?>"> |
| 31 | <div class="latepoint-booking-form-element current-step-<?php echo esc_attr($current_step->code); ?> <?php echo $booking->is_bundle_scheduling() ? 'is-bundle-scheduling' : ''; ?> <?php echo ( !$show_next_btn ? 'hidden-buttons' : ''); ?> latepoint-color-<?php echo esc_attr(OsSettingsHelper::get_booking_form_color_scheme()); ?> latepoint-border-radius-<?php echo esc_attr(OsSettingsHelper::get_booking_form_border_radius()); ?> <?php echo esc_attr(implode( ' ', apply_filters( 'latepoint_booking_form_classes', [] ) )); ?>"> |
| 32 | <div class="latepoint-side-panel"> |
| 33 | <?php OsStepsHelper::show_step_progress( $all_steps, $current_step ); ?> |
| 34 | <div class="latepoint-step-desc-w"> |
| 35 | <div class="latepoint-step-desc"> |
| 36 | <?php if ( $current_step->is_using_custom_image_for_side_panel() ) { ?> |
| 37 | <div class="latepoint-desc-media img-w" |
| 38 | style="background-image: url(<?php echo esc_url($current_step->get_image_url_for_side_panel()); ?>)"></div> |
| 39 | <?php } else { |
| 40 | echo '<div class="latepoint-desc-media svg-w">' . $current_step->get_default_image_html_for_side_panel() . '</div>'; |
| 41 | } ?> |
| 42 | <h3 class="latepoint-desc-title"><?php echo wp_kses_post($current_step->side_panel_heading); ?></h3> |
| 43 | <div class="latepoint-desc-content"><?php echo stripcslashes( $current_step->side_panel_description ); ?></div> |
| 44 | </div> |
| 45 | <?php |
| 46 | foreach ( $all_steps as $index => $step ) { ?> |
| 47 | <div data-step-code="<?php echo esc_attr($step->code); ?>" |
| 48 | class="latepoint-step-desc-library <?php if ( $current_step->code == $step->code ) { |
| 49 | echo ' active '; |
| 50 | } ?>"> |
| 51 | <?php if ( $step->is_using_custom_image_for_side_panel() ) { ?> |
| 52 | <div class="latepoint-desc-media img-w" |
| 53 | style="background-image: url(<?php echo esc_url($step->get_image_url_for_side_panel()); ?>)"></div> |
| 54 | <?php } else { |
| 55 | echo '<div class="latepoint-desc-media svg-w">' . $step->get_default_image_html_for_side_panel() . '</div>'; |
| 56 | } ?> |
| 57 | <h3 class="latepoint-desc-title"><?php echo esc_html($step->side_panel_heading); ?></h3> |
| 58 | <div class="latepoint-desc-content"><?php echo $step->side_panel_description; ?></div> |
| 59 | </div> |
| 60 | <?php } ?> |
| 61 | </div> |
| 62 | <div class="latepoint-questions"><?php echo OsSettingsHelper::get_steps_support_text(); ?></div> |
| 63 | |
| 64 | <?php |
| 65 | |
| 66 | /** |
| 67 | * Triggered at the bottom of side panel content |
| 68 | * |
| 69 | * @param {\LatePoint\Misc\Step} $current_step active step |
| 70 | * |
| 71 | * @since 4.7.0 |
| 72 | * @hook latepoint_steps_side_panel_after |
| 73 | * |
| 74 | */ |
| 75 | do_action( 'latepoint_steps_side_panel_after', $current_step ); ?> |
| 76 | </div> |
| 77 | <div class="latepoint-form-w"> |
| 78 | <form class="latepoint-form" |
| 79 | data-selected-label="<?php esc_attr_e( 'Selected', 'latepoint' ); ?>" |
| 80 | data-route-name="<?php echo esc_attr(OsRouterHelper::build_route_name( 'steps', 'load_step' )); ?>" |
| 81 | action="#"> |
| 82 | <div class="latepoint-heading-w"> |
| 83 | <h3 class="os-heading-text"><?php echo esc_html($current_step->main_panel_heading); ?></h3> |
| 84 | <?php foreach ( $all_steps as $index => $step ) { ?> |
| 85 | <div data-step-code="<?php echo esc_attr($step->code); ?>" |
| 86 | class="os-heading-text-library <?php if ( $current_step->code == $step->code ) { |
| 87 | echo ' active '; |
| 88 | } ?>"><?php echo esc_html($step->main_panel_heading); ?></div> |
| 89 | <?php } ?> |
| 90 | <a href="#" class="latepoint-lightbox-close" tabindex="0"><i class="latepoint-icon-common-01"></i></a> |
| 91 | <?php if ( $cart->is_empty() ) { ?> |
| 92 | <a href="#" class="latepoint-lightbox-summary-trigger"><i class="latepoint-icon-shopping-cart"></i></a> |
| 93 | <?php } else { ?> |
| 94 | <a href="#" class="latepoint-lightbox-summary-trigger"><i |
| 95 | class="latepoint-icon-shopping-cart"></i><span><?php echo count( $cart->get_items() ); ?></span></a> |
| 96 | <?php } ?> |
| 97 | </div> |
| 98 | <div class="latepoint-body"> |
| 99 | <?php if ( ! empty( $step_codes_to_preload ) ) { |
| 100 | foreach ( $step_codes_to_preload as $step_code_to_preload ) { |
| 101 | do_action( 'latepoint_load_step', $step_code_to_preload, 'html', [] ); |
| 102 | } |
| 103 | } |
| 104 | ?> |
| 105 | <?php do_action( 'latepoint_load_step', $current_step->code, 'html', [] ); ?> |
| 106 | </div> |
| 107 | <div class="latepoint-footer"> |
| 108 | <a href="#" class="latepoint-btn latepoint-btn-white latepoint-prev-btn disabled" tabindex="0" role="button"><i |
| 109 | class="latepoint-icon-arrow-2-left"></i> |
| 110 | <span><?php esc_html_e( 'Back', 'latepoint' ); ?></span></a> |
| 111 | <?php OsStepsHelper::show_step_progress( $all_steps, $current_step ); ?> |
| 112 | <a href="#" tabindex="0" |
| 113 | class="latepoint-btn latepoint-btn-primary latepoint-next-btn <?php echo ( $show_next_btn ) ? '' : 'disabled'; ?>" role="button" |
| 114 | data-pre-last-step-label="<?php esc_attr_e( 'Submit', 'latepoint' ); ?>" |
| 115 | data-label="<?php esc_attr_e( 'Next', 'latepoint' ); ?>"><span><?php esc_html_e( 'Next', 'latepoint' ); ?></span> <i class="latepoint-icon-arrow-2-right"></i></a> |
| 116 | <?php if ( $current_step_code != 'confirmation' ) { |
| 117 | include 'partials/_booking_form_params.php'; |
| 118 | } ?> |
| 119 | </div> |
| 120 | </form> |
| 121 | </div> |
| 122 | <div class="latepoint-summary-w"> |
| 123 | <div class="os-summary-contents"> |
| 124 | <?php if ( $current_step_code != 'confirmation' ) { |
| 125 | include( 'partials/_booking_form_summary_panel.php' ); |
| 126 | } ?> |
| 127 | </div> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |