PluginProbe ʕ •ᴥ•ʔ
LatePoint – Calendar Booking Plugin for Appointments and Events / trunk
LatePoint – Calendar Booking Plugin for Appointments and Events vtrunk
5.6.5 5.6.4 5.6.3 5.6.2 5.6.1 5.6.0 5.5.2 5.5.1 5.5.0 5.4.2 trunk 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.91 5.1.92 5.1.93 5.1.94 5.2.0 5.2.1 5.2.10 5.2.11 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1
latepoint / lib / views / steps / _customer.php
latepoint / lib / views / steps Last commit date
partials 1 day ago _booking__agents.php 9 months ago _booking__datepicker.php 9 months ago _booking__services.php 2 weeks ago _confirmation.php 1 day 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
_customer.php
101 lines
1 <?php
2 /**
3 * @var $current_step_code string
4 * @var $booking OsBookingModel
5 * @var $restrictions array
6 * @var $presets array
7 * @var $customer OsCustomerModel
8 * @var $customer_contact_verified_via bool
9 * @var $auth_action string
10 * @var $selected_auth_method string
11 * @var $enabled_contact_types_for_customer_auth array
12 */
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly
16 }
17
18
19 ?>
20 <div class="step-customer-w latepoint-step-content" data-step-code="<?php echo esc_attr( $current_step_code ); ?>" data-next-btn-label="<?php echo esc_attr( OsStepsHelper::get_next_btn_label_for_step( $current_step_code ) ); ?>">
21 <?php
22 do_action( 'latepoint_before_step_content', $current_step_code );
23 echo OsStepsHelper::get_formatted_extra_step_content( $current_step_code, 'before' );
24 echo '<div class="latepoint-customer-otp-input-container"></div>';
25 ?>
26 <?php
27 if ( OsAuthHelper::is_customer_auth_disabled() ) {
28 // JUST THE FORM, NO LOGIN/REGISTER TABS
29 include( 'partials/_contact_form.php' );
30 } else {
31 if ( OsAuthHelper::is_customer_logged_in() ) {
32 // ALREADY LOGGED IN, SHOW DATA FORM
33 ?>
34 <div class="hide-when-entering-otp">
35 <div class="step-customer-logged-in-header-w">
36 <div><?php esc_html_e( 'Contact Information', 'latepoint' ); ?></div>
37 <span><?php esc_html_e( 'Not You?', 'latepoint' ); ?></span><a
38 data-btn-action="<?php echo esc_attr( OsRouterHelper::build_route_name( 'auth', 'logout_customer' ) ); ?>"
39 data-nonce="<?php echo esc_attr( wp_create_nonce( 'auth_nonce' ) ); ?>"
40 href="#"
41 class="step-customer-logout-btn"><?php esc_html_e( 'Logout', 'latepoint' ); ?></a>
42 </div>
43 <?php include( 'partials/_contact_form.php' ); ?>
44 </div>
45 <?php
46 } else {
47 // NOT LOGGED IN, SHOW AUTH OPTIONS
48 if ( OsAuthHelper::is_classic_auth_flow() ) {
49 // CLASSIC AUTH FLOW
50 ?>
51 <div class="os-step-tabs-w latepoint-customer-auth-options-wrapper hide-when-entering-otp <?php echo $auth_action == 'otp_requested' ? 'os-hidden' : ''; ?>">
52 <div class="os-step-tabs">
53 <div class="os-step-tab active" data-auth-action="register" data-next-btn="show" data-target=".os-step-new-customer-w"><?php esc_html_e( 'New Customer', 'latepoint' ); ?></div>
54 <div class="os-step-tab" data-auth-action="login" data-target=".os-step-existing-customer-login-w"><?php esc_html_e( 'Already have an account?', 'latepoint' ); ?></div>
55 </div>
56 <div class="os-step-tab-content os-step-new-customer-w">
57 <?php include( 'partials/_contact_form.php' ); ?>
58 </div>
59 <div class="os-step-tab-content os-step-existing-customer-login-w" style="display: none;">
60 <?php echo OsAuthHelper::auth_form_html( true, $customer, $selected_auth_method ); ?>
61 </div>
62 <div class="os-password-reset-form-holder"></div>
63 </div>
64 <?php if ( apply_filters( 'latepoint_customer_login_show_other_options', false ) ) { ?>
65 <div class="os-social-or"><span><?php _e( 'OR', 'latepoint' ); ?></span></div>
66 <?php } ?>
67 <?php
68 do_action( 'latepoint_after_customer_login_form' );
69 } else {
70 // MODERN AUTH FLOW
71 if($customer_contact_verified_via){
72 include( 'partials/_contact_form.php' );
73 }else{
74 echo OsAuthHelper::auth_form_html( false, $customer, $selected_auth_method );
75 if ( apply_filters( 'latepoint_customer_login_show_other_options', false ) || in_array( 'email', $enabled_contact_types_for_customer_auth ) || in_array( 'phone', $enabled_contact_types_for_customer_auth ) ) { ?>
76 <div class="os-social-or"><span><?php _e( 'OR', 'latepoint' ); ?></span></div>
77 <?php
78 }
79 if ( in_array( 'email', $enabled_contact_types_for_customer_auth ) ) { ?>
80 <div class="alternative-login-option <?php echo ( $selected_auth_method == 'email' ) ? 'os-hidden' : ''; ?>" data-auth-via="email" data-otp-delivery-method="email">
81 <i class="latepoint-icon latepoint-icon-mail"></i>
82 <span><?php _e( 'Continue with Email', 'latepoint' ); ?></span>
83 </div>
84 <?php
85 }
86 if ( in_array( 'phone', $enabled_contact_types_for_customer_auth ) ) { ?>
87 <div class="alternative-login-option <?php echo ( $selected_auth_method == 'phone' ) ? 'os-hidden' : ''; ?>" data-auth-via="phone" data-otp-delivery-method="sms">
88 <i class="latepoint-icon latepoint-icon-smartphone"></i>
89 <span><?php _e( 'Continue with Phone', 'latepoint' ); ?></span>
90 </div>
91 <?php
92 }
93 do_action( 'latepoint_after_customer_login_form' );
94 }
95 }
96 }
97 }
98 echo OsStepsHelper::get_formatted_extra_step_content( $current_step_code, 'after' );
99 do_action( 'latepoint_after_step_content', $current_step_code );
100 ?>
101 </div>