import_steps
9 months ago
_table_body.php
9 months ago
edit_form.php
1 year ago
import_csv_modal.php
9 months ago
import_load_step.php
9 months ago
index.php
4 months ago
inline_edit_form.php
1 year ago
mini_profile.php
1 year ago
new_form.php
1 year ago
query_for_booking_form.php
1 year ago
quick_edit.php
4 months ago
view_customer_log.php
1 year ago
inline_edit_form.php
52 lines
| 1 | <?php |
| 2 | /* @var $order OsOrderModel */ |
| 3 | /* @var $selected_customer OsCustomerModel */ |
| 4 | /* @var $default_fields_for_customer array */ |
| 5 | |
| 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | exit; // Exit if accessed directly |
| 8 | } |
| 9 | |
| 10 | |
| 11 | // This form is used inside of a quick order form, when you edit the customer |
| 12 | ?> |
| 13 | <div class="os-row"> |
| 14 | <div class="os-col-6"> |
| 15 | <?php if($default_fields_for_customer['first_name']['active']) echo OsFormHelper::text_field('customer[first_name]', __('First Name', 'latepoint'), $selected_customer->first_name, ['theme' => 'simple', 'validate' => $selected_customer->get_validations_for_property('first_name')]); ?> |
| 16 | </div> |
| 17 | <div class="os-col-6"> |
| 18 | <?php if($default_fields_for_customer['last_name']['active']) echo OsFormHelper::text_field('customer[last_name]', __('Last Name', 'latepoint'), $selected_customer->last_name, ['theme' => 'simple', 'validate' => $selected_customer->get_validations_for_property('last_name')]); ?> |
| 19 | </div> |
| 20 | </div> |
| 21 | <div class="os-row"> |
| 22 | <div class="os-col-12"> |
| 23 | <?php echo OsFormHelper::text_field('customer[email]', __('Email Address', 'latepoint'), $selected_customer->email, ['theme' => 'simple', 'validate' => $selected_customer->get_validations_for_property('email')]); ?> |
| 24 | </div> |
| 25 | </div> |
| 26 | <div class="os-row"> |
| 27 | <div class="os-col-12"> |
| 28 | <?php if($default_fields_for_customer['phone']['active']) echo OsFormHelper::phone_number_field('customer[phone]', __('Telephone Number', 'latepoint'), $selected_customer->phone, ['theme' => 'simple', 'validate' => $selected_customer->get_validations_for_property('phone')] ); ?> |
| 29 | </div> |
| 30 | </div> |
| 31 | <div class="os-row"> |
| 32 | <div class="os-col-12"> |
| 33 | <?php if($default_fields_for_customer['notes']['active']) echo OsFormHelper::textarea_field('customer[notes]', __('Customer Notes', 'latepoint'), $selected_customer->notes, ['rows' => 1, 'theme' => 'simple', 'validate' => $selected_customer->get_validations_for_property('notes'), 'placeholder' => '']); ?> |
| 34 | </div> |
| 35 | </div> |
| 36 | <div class="os-row"> |
| 37 | <div class="os-col-12"> |
| 38 | <?php echo OsFormHelper::textarea_field('customer[admin_notes]', __('Notes only visible to admins', 'latepoint'), $selected_customer->admin_notes, ['rows' => 1, 'theme' => 'simple', 'placeholder' => '']); ?> |
| 39 | </div> |
| 40 | </div> |
| 41 | <?php |
| 42 | /** |
| 43 | * Content that goes after inline customer edit form on an order form |
| 44 | * |
| 45 | * @since 5.0.0 |
| 46 | * @hook latepoint_customer_inline_edit_form_after |
| 47 | * |
| 48 | * @param {OsCustomerModel} $customer Customer object that is being edited |
| 49 | */ |
| 50 | do_action('latepoint_customer_inline_edit_form_after', $selected_customer); ?> |
| 51 | |
| 52 | <?php echo OsFormHelper::hidden_field('order[customer_id]', $selected_customer->id); ?> |