_booking_form_params.php
9 months ago
_booking_form_summary_panel.php
9 months ago
_booking_summary.php
1 year ago
_cart_clear.php
1 year ago
_cart_summary.php
9 months ago
_contact_form.php
2 months ago
_limit_reached.php
1 year ago
_monthly_calendar_days.php
1 year ago
_order_summary.php
1 year ago
_contact_form.php
47 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | |
| 6 | /** @var $customer_verification_info array */ |
| 7 | /** @var $default_fields_for_customer array */ |
| 8 | /** @var $customer OsCustomerModel */ |
| 9 | /** @var $booking OsBookingModel */ |
| 10 | ?> |
| 11 | <div class="os-row"> |
| 12 | <?php |
| 13 | if($default_fields_for_customer['first_name']['active']){ |
| 14 | echo OsFormHelper::text_field('customer[first_name]', __('First Name', 'latepoint'), $customer->first_name, array('validate' => $customer->get_validations_for_property('first_name'), 'class' => $default_fields_for_customer['first_name']['required'] ? 'required' : '', 'autocomplete' => 'given-name'), array('class' => $default_fields_for_customer['first_name']['width'])); |
| 15 | } |
| 16 | if($default_fields_for_customer['last_name']['active']){ |
| 17 | echo OsFormHelper::text_field('customer[last_name]', __('Last Name', 'latepoint'), $customer->last_name, array('validate' => $customer->get_validations_for_property('last_name'), 'class' => $default_fields_for_customer['last_name']['required'] ? 'required' : '', 'autocomplete' => 'family-name'), array('class' => $default_fields_for_customer['last_name']['width'])); |
| 18 | } |
| 19 | if($default_fields_for_customer['phone']['active']){ |
| 20 | echo '<div class="os-verifiable-field-wrapper '.esc_attr($default_fields_for_customer['phone']['width']).' os-col-sm-12">'; |
| 21 | if($customer_verification_info && $customer_verification_info['data']['contact_type'] == 'phone' && $customer_verification_info['data']['contact_value'] == $customer->phone){ |
| 22 | echo '<div class="os-verified-badge"><i class="latepoint-icon latepoint-icon-checkmark"></i></div>'; |
| 23 | } |
| 24 | echo OsFormHelper::phone_number_field('customer[phone]', __('Phone Number', 'latepoint'), $customer->phone, array('validate' => $customer->get_validations_for_property('phone'), 'class' => $default_fields_for_customer['phone']['required'] ? 'required' : '', 'autocomplete' => 'tel')); |
| 25 | echo '</div>'; |
| 26 | } |
| 27 | if($default_fields_for_customer['email']['active']) { |
| 28 | echo '<div class="os-verifiable-field-wrapper ' . esc_attr( $default_fields_for_customer['email']['width'] ) . ' os-col-sm-12">'; |
| 29 | if ( $customer_verification_info && $customer_verification_info['data']['contact_type'] == 'email' && $customer_verification_info['data']['contact_value'] == $customer->email ) { |
| 30 | echo '<div class="os-verified-badge"><i class="latepoint-icon latepoint-icon-checkmark"></i></div>'; |
| 31 | } |
| 32 | echo OsFormHelper::text_field( 'customer[email]', __( 'Email Address', 'latepoint' ), $customer->email, array( |
| 33 | 'validate' => $customer->get_validations_for_property( 'email' ), |
| 34 | 'class' => 'required', |
| 35 | 'autocomplete' => 'email', |
| 36 | ) ); |
| 37 | echo '</div>'; |
| 38 | } |
| 39 | if(OsSettingsHelper::is_on('steps_require_setting_password') && OsAuthHelper::is_customer_auth_enabled() && !OsAuthHelper::is_customer_logged_in() && ($customer->is_new_record() || $customer->is_guest)){ |
| 40 | echo OsFormHelper::password_field('customer[password]', __('Password', 'latepoint'), '', array('class' => 'required', 'autocomplete' => 'new-password'), array('class' => 'os-col-6')); |
| 41 | echo OsFormHelper::password_field('customer[password_confirmation]', __('Confirm Password', 'latepoint'), '', array('class' => 'required', 'autocomplete' => 'new-password'), array('class' => 'os-col-6')); |
| 42 | } |
| 43 | if($default_fields_for_customer['notes']['active']){ |
| 44 | echo OsFormHelper::textarea_field('customer[notes]', __('Add Comments', 'latepoint'), $customer->notes, array('validate' => $customer->get_validations_for_property('notes'), 'class' => $default_fields_for_customer['notes']['required'] ? 'required' : '', 'autocomplete' => 'off'), array('class' => $default_fields_for_customer['notes']['width'])); |
| 45 | } |
| 46 | do_action('latepoint_booking_steps_contact_after', $customer, $booking); ?> |
| 47 | </div> |