From a297b8d6d8379ae90f2501531f3dccf6fe2f18c2 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 5 Nov 2025 01:39:22 -0500 Subject: [PATCH] Migrate many admin Add modals to the new ajax-modal --- admin/ai_model.php | 3 +- admin/ai_provider.php | 3 +- admin/api_keys.php | 289 +++++++++-------- admin/custom_link.php | 3 +- admin/modals/ai/ai_model_add.php | 144 ++++----- admin/modals/ai/ai_provider_add.php | 102 +++--- admin/modals/api/api_key_add.php | 233 +++++++------- admin/modals/custom_link/custom_link_add.php | 161 +++++----- .../payment_method/payment_method_add.php | 69 +++-- .../payment_provider/payment_provider_add.php | 201 ++++++------ .../project_template/project_template_add.php | 78 ++--- .../project_template_edit.php | 92 +++--- .../project_template_ticket_template_add.php | 123 ++++---- admin/modals/role/role_add.php | 112 +++---- admin/modals/tag/tag_add.php | 1 + admin/modals/tax/tax_add.php | 51 +-- .../ticket_status/ticket_status_add.php | 65 ++-- admin/modals/user/user_add.php | 292 ++++++++++-------- admin/modals/user/user_all_reset_password.php | 58 ++-- admin/modals/user/user_edit.php | 23 +- admin/modals/user/user_invite.php | 86 +++--- admin/payment_method.php | 3 +- admin/payment_provider.php | 3 +- admin/project_template.php | 17 +- admin/project_template_details.php | 7 +- admin/roles.php | 4 +- admin/tax.php | 151 +++++---- admin/ticket_status.php | 8 +- admin/users.php | 16 +- agent/ajax.php | 2 +- agent/modals/contact/contact_add.php | 16 +- agent/modals/contact/contact_edit.php | 16 +- 32 files changed, 1243 insertions(+), 1189 deletions(-) diff --git a/admin/ai_model.php b/admin/ai_model.php index cca1f863..a231ce5c 100644 --- a/admin/ai_model.php +++ b/admin/ai_model.php @@ -16,7 +16,7 @@ $num_rows = mysqli_num_rows($sql);

AI Models

- +
@@ -104,5 +104,4 @@ $num_rows = mysqli_num_rows($sql);

AI Providers

- +
@@ -105,5 +105,4 @@ $num_rows = mysqli_num_rows($sql);
-
-
-

API Keys

-
- -
-
- -
- -
-
- -
-
- -
- -
-
-
- -
-
- -
-
- -
- -
-
- -
- -
- - - - "> - - - - - - - - - - - - All Clients"; - } else { - $api_key_client = nullable_htmlentities($row['client_name']); - } - - ?> - - - - - - - - - - - - - - - - - - - - -
-
- -
-
- - Name - - - - Client - - - - Secret - - - - Created - - - - Expires - - Action
-
- -
-
- -
- -
- -
- +
+
+

API Keys

+
+
- +
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+ +
+ + + + "> + + + + + + + + + + + + All Clients"; + } else { + $api_key_client = nullable_htmlentities($row['client_name']); + } + + ?> + + + + + + + + + + + + + + +
+
+ +
+
+ + Name + + + + Client + + + + Secret + + + + Created + + + + Expires + + Action
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +

Custom Links

- +
@@ -145,5 +145,4 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- +$sql = mysqli_query($mysqli, "SELECT * FROM project_templates WHERE project_template_id = $project_template_id LIMIT 1"); +$row = mysqli_fetch_array($sql); +$project_template_name = nullable_htmlentities($row['project_template_name']); +$project_template_description = nullable_htmlentities($row['project_template_description']); + +ob_start(); + +?> + + +
+ + + + + + +
+ + - - + +
+ + + + +
+ + - - +?> + +
+ + + +
+ + diff --git a/admin/modals/tax/tax_add.php b/admin/modals/tax/tax_add.php index d2ac58b2..57bceba7 100644 --- a/admin/modals/tax/tax_add.php +++ b/admin/modals/tax/tax_add.php @@ -1,30 +1,35 @@ -
@@ -87,7 +87,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?> - +
@@ -109,7 +109,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - +
- Users
-
@@ -233,15 +233,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); ?>
-
- +
-
@@ -313,22 +313,14 @@ ob_start();