From 54c8d6d74add54d7f280ea5bc85c1576743e32af Mon Sep 17 00:00:00 2001 From: wrongecho Date: Thu, 5 Sep 2024 17:26:28 +0100 Subject: [PATCH] Portal - allow adding contacts --- portal/contact_add.php | 96 +++++++++++++++++++++++++++++++++++++++++ portal/contact_edit.php | 4 +- portal/contacts.php | 90 ++++++++++++++++++++------------------ portal/portal_post.php | 17 +++++++- 4 files changed, 162 insertions(+), 45 deletions(-) create mode 100644 portal/contact_add.php diff --git a/portal/contact_add.php b/portal/contact_add.php new file mode 100644 index 00000000..c63eac2b --- /dev/null +++ b/portal/contact_add.php @@ -0,0 +1,96 @@ + + + + +
+
+ + + + +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+ +
+
+ +
+ +
+
+ + +
+
+ + + - + @@ -73,7 +73,7 @@ if ($row) {
- + diff --git a/portal/contacts.php b/portal/contacts.php index eb8ee768..66f7a3cb 100644 --- a/portal/contacts.php +++ b/portal/contacts.php @@ -16,57 +16,63 @@ if ($session_contact_primary == 0 && !$session_contact_is_technical_contact) { $contacts_sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_email, contact_primary, contact_technical, contact_billing FROM contacts WHERE contact_client_id = $session_client_id AND contacts.contact_archived_at IS NULL ORDER BY contact_created_at"); ?> -

Contacts

-
+
+

Contacts

+ +
-
+
- - - - - - - - - - - +
+
NameEmailRoles
+ - - - + + + + + - + -
NameEmailRoles
+ $contact_roles_display = '-'; + if ($contact_primary) { + $contact_roles_display = 'Primary contact'; + } else if ($contact_technical && $contact_billing) { + $contact_roles_display = 'Technical & Billing'; + } else if ($contact_technical) { + $contact_roles_display = 'Technical'; + } else if ($contact_billing) { + $contact_roles_display = 'Billing'; + } + + ?> + + + + + + + + + + + + +
-
-