From 872640c46d773750995e619d47ad381126a35818 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 28 May 2021 15:39:14 +0200 Subject: [PATCH] [1081] Frontend hiding of fields --- application/controllers/Appointments.php | 7 +++++++ application/views/appointments/book.php | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/application/controllers/Appointments.php b/application/controllers/Appointments.php index 67a0dc66..7f173cc7 100755 --- a/application/controllers/Appointments.php +++ b/application/controllers/Appointments.php @@ -168,6 +168,7 @@ class Appointments extends EA_Controller { 'time_format' => $time_format, 'first_weekday' => $first_weekday, 'require_phone_number' => $require_phone_number, + 'show_field' => $show_field, 'appointment_data' => $appointment, 'provider_data' => $provider, 'customer_data' => $customer, @@ -438,6 +439,12 @@ class Appointments extends EA_Controller { $appointment = $post_data['appointment']; $customer = $post_data['customer']; + if (!array_key_exists('address', $customer)){ $customer['address'] = ""; } + if (!array_key_exists('city', $customer)){ $customer['city'] = ""; } + if (!array_key_exists('zip_code', $customer)){ $customer['zip_code'] = ""; } + if (!array_key_exists('notes', $customer)){ $customer['notes'] = ""; } + if (!array_key_exists('phone_number', $customer)){ $customer['address'] = ""; } + // Check appointment availability before registering it to the database. $appointment['id_users_provider'] = $this->check_datetime_availability(); diff --git a/application/views/appointments/book.php b/application/views/appointments/book.php index 772eaa82..7ab88663 100755 --- a/application/views/appointments/book.php +++ b/application/views/appointments/book.php @@ -268,6 +268,7 @@ +
+
+
+ +
+ +
+ +
+