From 170d6dd7e568137535a922436024b98a1eabf356 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 23 Aug 2025 18:48:21 -0400 Subject: [PATCH] Consolidate alot of modals to modals/ENTITY removed ajax_ and _modal prefixes from file names and use new ajax-modal syntax --- user/ajax/ajax_service_details.php | 4 +- user/asset_details.php | 19 ++--- user/assets.php | 2 +- user/client_overview.php | 5 +- user/contact_details.php | 15 ++-- user/contacts.php | 24 +++--- user/credentials.php | 11 +-- .../{tickets_kanban.css => ticket_kanban.css} | 0 ...ument_details.php => document_details.php} | 39 +++++----- user/{client_documents.php => documents.php} | 73 ++++++++----------- user/{client_files.php => files.php} | 47 ++++-------- user/global_search.php | 6 +- user/includes/client_side_nav.php | 6 +- user/modals/asset/asset_details.php | 7 +- .../contact_add.php} | 0 .../contact_archive.php} | 0 .../contact_bulk_assign_location.php} | 0 .../contact_bulk_assign_tags.php} | 0 .../contact_bulk_edit_department.php} | 0 .../contact_bulk_edit_phone.php} | 0 .../contact_bulk_edit_role.php} | 0 .../contact_bulk_email.php} | 0 .../contact_create_note.php} | 0 .../contact/contact_details.php} | 10 +-- .../contact/contact_edit.php} | 4 +- .../contact_export.php} | 0 .../contact_import.php} | 0 .../contact_invite.php} | 0 .../contact/contact_link_asset.php} | 4 +- .../contact/contact_link_credential.php} | 4 +- .../contact/contact_link_document.php} | 4 +- .../contact/contact_link_file.php} | 4 +- .../contact/contact_link_service.php} | 4 +- .../contact/contact_link_software.php} | 4 +- .../contact/contact_note_create.php} | 4 +- .../document_add.php} | 0 .../document_add_file_relation.php} | 0 .../document_add_from_template.php} | 0 .../document_bulk_move.php} | 0 .../document/document_edit.php} | 4 +- .../document_edit_visibility.php} | 0 .../document_link_asset.php} | 0 .../document_link_contact.php} | 0 .../document_link_file.php} | 0 .../document_link_software.php} | 0 .../document_link_vendor.php} | 0 .../document/document_move.php} | 4 +- .../document/document_rename.php} | 4 +- .../document/document_version_view.php} | 6 +- .../document/document_view.php} | 7 +- .../file_bulk_move.php} | 0 .../file_delete.php} | 0 .../file_link_asset.php} | 0 .../file/file_move.php} | 4 +- .../file/file_rename.php} | 4 +- .../file_upload.php} | 0 .../file_view.php} | 0 .../folder_add.php} | 0 .../folder/folder_rename.php} | 5 +- .../rack_add.php} | 0 .../rack/rack_device_add.php} | 4 +- .../rack/rack_edit.php} | 4 +- .../ticket_add.php} | 0 .../ticket_add_v2.php} | 0 .../ticket_add_watcher.php} | 0 .../ticket/ticket_assign.php} | 4 +- .../ticket/ticket_billable.php} | 4 +- .../ticket_bulk_add_project.php} | 0 .../ticket_bulk_assign.php} | 0 .../ticket_bulk_edit_category.php} | 0 .../ticket_bulk_edit_priority.php} | 0 .../ticket_bulk_merge.php} | 0 .../ticket_bulk_reply.php} | 0 .../ticket_bulk_resolve.php} | 0 .../ticket_change_client.php} | 0 .../ticket/ticket_contact.php} | 4 +- .../ticket/ticket_edit.php} | 4 +- .../ticket_edit_asset.php} | 0 .../ticket_edit_schedule.php} | 0 .../ticket_edit_vendor.php} | 0 .../ticket_export.php} | 0 .../ticket_invoice_add.php} | 0 .../ticket_merge.php} | 0 .../ticket/ticket_priority.php} | 4 +- .../ticket/ticket_reply_edit.php} | 4 +- .../ticket/ticket_reply_redact.php} | 4 +- .../ticket/ticket_task_edit.php} | 4 +- user/post/document.php | 4 +- user/project_details.php | 21 +++--- user/{client_racks.php => racks.php} | 16 ++-- user/{ => reports}/report_budget.php | 0 .../report_clients_with_balance.php | 0 .../report_credential_rotation.php | 0 .../report_expense_by_vendor.php | 0 user/{ => reports}/report_expense_summary.php | 0 .../{ => reports}/report_income_by_client.php | 0 user/{ => reports}/report_income_summary.php | 0 user/{ => reports}/report_overview.php | 0 user/{ => reports}/report_profit_loss.php | 0 .../report_recurring_by_client.php | 0 user/{ => reports}/report_tax_summary.php | 0 .../{ => reports}/report_ticket_by_client.php | 0 user/{ => reports}/report_ticket_summary.php | 0 .../{ => reports}/report_tickets_unbilled.php | 0 user/{ => reports}/report_time_by_tech.php | 0 user/ticket.php | 72 +++++++----------- .../{tickets_kanban.php => ticket_kanban.php} | 2 +- user/{tickets_list.php => ticket_list.php} | 34 ++++----- user/tickets.php | 14 ++-- 109 files changed, 231 insertions(+), 310 deletions(-) rename user/css/{tickets_kanban.css => ticket_kanban.css} (100%) rename user/{client_document_details.php => document_details.php} (92%) rename user/{client_documents.php => documents.php} (87%) rename user/{client_files.php => files.php} (94%) rename user/modals/{contact_add_modal.php => contact/contact_add.php} (100%) rename user/modals/{contact_archive_modal.php => contact/contact_archive.php} (100%) rename user/modals/{contact_bulk_assign_location_modal.php => contact/contact_bulk_assign_location.php} (100%) rename user/modals/{contact_bulk_assign_tags_modal.php => contact/contact_bulk_assign_tags.php} (100%) rename user/modals/{contact_bulk_edit_department_modal.php => contact/contact_bulk_edit_department.php} (100%) rename user/modals/{contact_bulk_edit_phone_modal.php => contact/contact_bulk_edit_phone.php} (100%) rename user/modals/{contact_bulk_edit_role_modal.php => contact/contact_bulk_edit_role.php} (100%) rename user/modals/{contact_bulk_email_modal.php => contact/contact_bulk_email.php} (100%) rename user/modals/{contact_create_note_modal.php => contact/contact_create_note.php} (100%) rename user/{ajax/ajax_contact_details.php => modals/contact/contact_details.php} (99%) rename user/{ajax/ajax_contact_edit.php => modals/contact/contact_edit.php} (99%) rename user/modals/{contact_export_modal.php => contact/contact_export.php} (100%) rename user/modals/{contact_import_modal.php => contact/contact_import.php} (100%) rename user/modals/{contact_invite_modal.php => contact/contact_invite.php} (100%) rename user/{ajax/ajax_contact_link_asset.php => modals/contact/contact_link_asset.php} (95%) rename user/{ajax/ajax_contact_link_credential.php => modals/contact/contact_link_credential.php} (95%) rename user/{ajax/ajax_contact_link_document.php => modals/contact/contact_link_document.php} (96%) rename user/{ajax/ajax_contact_link_file.php => modals/contact/contact_link_file.php} (96%) rename user/{ajax/ajax_contact_link_service.php => modals/contact/contact_link_service.php} (96%) rename user/{ajax/ajax_contact_link_software.php => modals/contact/contact_link_software.php} (96%) rename user/{ajax/ajax_contact_note_create.php => modals/contact/contact_note_create.php} (94%) rename user/modals/{client_document_add_modal.php => document/document_add.php} (100%) rename user/modals/{client_document_add_file_relation_modal.php => document/document_add_file_relation.php} (100%) rename user/modals/{client_document_add_from_template_modal.php => document/document_add_from_template.php} (100%) rename user/modals/{client_document_bulk_move_modal.php => document/document_bulk_move.php} (100%) rename user/{ajax/ajax_document_edit.php => modals/document/document_edit.php} (96%) rename user/modals/{document_edit_visibility_modal.php => document/document_edit_visibility.php} (100%) rename user/modals/{client_document_link_asset_modal.php => document/document_link_asset.php} (100%) rename user/modals/{client_document_link_contact_modal.php => document/document_link_contact.php} (100%) rename user/modals/{client_document_link_file_modal.php => document/document_link_file.php} (100%) rename user/modals/{client_document_link_software_modal.php => document/document_link_software.php} (100%) rename user/modals/{client_document_link_vendor_modal.php => document/document_link_vendor.php} (100%) rename user/{ajax/ajax_document_move.php => modals/document/document_move.php} (97%) rename user/{ajax/ajax_document_rename.php => modals/document/document_rename.php} (94%) rename user/{ajax/ajax_document_version_view.php => modals/document/document_version_view.php} (87%) rename user/{ajax/ajax_document_view.php => modals/document/document_view.php} (86%) rename user/modals/{client_file_bulk_move_modal.php => file/file_bulk_move.php} (100%) rename user/modals/{client_file_delete_modal.php => file/file_delete.php} (100%) rename user/modals/{client_file_link_asset_modal.php => file/file_link_asset.php} (100%) rename user/{ajax/ajax_file_move.php => modals/file/file_move.php} (98%) rename user/{ajax/ajax_file_rename.php => modals/file/file_rename.php} (96%) rename user/modals/{client_file_upload_modal.php => file/file_upload.php} (100%) rename user/modals/{client_file_view_modal.php => file/file_view.php} (100%) rename user/modals/{folder_create_modal.php => folder/folder_add.php} (100%) rename user/{ajax/ajax_folder_rename.php => modals/folder/folder_rename.php} (93%) rename user/modals/{client_rack_add_modal.php => rack/rack_add.php} (100%) rename user/{ajax/ajax_rack_device_add.php => modals/rack/rack_device_add.php} (97%) rename user/{ajax/ajax_rack_edit.php => modals/rack/rack_edit.php} (98%) rename user/modals/{ticket_add_modal.php => ticket/ticket_add.php} (100%) rename user/modals/{ticket_add_modal_v2.php => ticket/ticket_add_v2.php} (100%) rename user/modals/{ticket_add_watcher_modal.php => ticket/ticket_add_watcher.php} (100%) rename user/{ajax/ajax_ticket_assign.php => modals/ticket/ticket_assign.php} (96%) rename user/{ajax/ajax_ticket_billable.php => modals/ticket/ticket_billable.php} (94%) rename user/modals/{ticket_bulk_add_project_modal.php => ticket/ticket_bulk_add_project.php} (100%) rename user/modals/{ticket_bulk_assign_modal.php => ticket/ticket_bulk_assign.php} (100%) rename user/modals/{ticket_bulk_edit_category_modal.php => ticket/ticket_bulk_edit_category.php} (100%) rename user/modals/{ticket_bulk_edit_priority_modal.php => ticket/ticket_bulk_edit_priority.php} (100%) rename user/modals/{ticket_bulk_merge_modal.php => ticket/ticket_bulk_merge.php} (100%) rename user/modals/{ticket_bulk_reply_modal.php => ticket/ticket_bulk_reply.php} (100%) rename user/modals/{ticket_bulk_resolve_modal.php => ticket/ticket_bulk_resolve.php} (100%) rename user/modals/{ticket_change_client_modal.php => ticket/ticket_change_client.php} (100%) rename user/{ajax/ajax_ticket_contact.php => modals/ticket/ticket_contact.php} (97%) rename user/{ajax/ajax_ticket_edit.php => modals/ticket/ticket_edit.php} (99%) rename user/modals/{ticket_edit_asset_modal.php => ticket/ticket_edit_asset.php} (100%) rename user/modals/{ticket_edit_schedule_modal.php => ticket/ticket_edit_schedule.php} (100%) rename user/modals/{ticket_edit_vendor_modal.php => ticket/ticket_edit_vendor.php} (100%) rename user/modals/{ticket_export_modal.php => ticket/ticket_export.php} (100%) rename user/modals/{ticket_invoice_add_modal.php => ticket/ticket_invoice_add.php} (100%) rename user/modals/{ticket_merge_modal.php => ticket/ticket_merge.php} (100%) rename user/{ajax/ajax_ticket_priority.php => modals/ticket/ticket_priority.php} (95%) rename user/{ajax/ajax_ticket_reply_edit.php => modals/ticket/ticket_reply_edit.php} (96%) rename user/{ajax/ajax_ticket_reply_redact.php => modals/ticket/ticket_reply_redact.php} (92%) rename user/{ajax/ajax_ticket_task_edit.php => modals/ticket/ticket_task_edit.php} (95%) rename user/{client_racks.php => racks.php} (97%) rename user/{ => reports}/report_budget.php (100%) rename user/{ => reports}/report_clients_with_balance.php (100%) rename user/{ => reports}/report_credential_rotation.php (100%) rename user/{ => reports}/report_expense_by_vendor.php (100%) rename user/{ => reports}/report_expense_summary.php (100%) rename user/{ => reports}/report_income_by_client.php (100%) rename user/{ => reports}/report_income_summary.php (100%) rename user/{ => reports}/report_overview.php (100%) rename user/{ => reports}/report_profit_loss.php (100%) rename user/{ => reports}/report_recurring_by_client.php (100%) rename user/{ => reports}/report_tax_summary.php (100%) rename user/{ => reports}/report_ticket_by_client.php (100%) rename user/{ => reports}/report_ticket_summary.php (100%) rename user/{ => reports}/report_tickets_unbilled.php (100%) rename user/{ => reports}/report_time_by_tech.php (100%) rename user/{tickets_kanban.php => ticket_kanban.php} (98%) rename user/{tickets_list.php => ticket_list.php} (92%) diff --git a/user/ajax/ajax_service_details.php b/user/ajax/ajax_service_details.php index 5099a9a3..e8884b00 100644 --- a/user/ajax/ajax_service_details.php +++ b/user/ajax/ajax_service_details.php @@ -234,7 +234,7 @@ ob_start(); while ($row = mysqli_fetch_array($sql_contacts)) { $contact_id = intval($row['contact_id']); $contact_name = nullable_htmlentities($row['contact_name']); - echo "
  • $contact_name
  • "; + echo "
  • $contact_name
  • "; } echo ""; } @@ -298,7 +298,7 @@ ob_start(); while ($row = mysqli_fetch_array($sql_docs)) { $document_id = intval($row['document_id']); $document_name = nullable_htmlentities($row['document_name']); - echo "
  • $document_name
  • "; + echo "
  • $document_name
  • "; } echo ""; } diff --git a/user/asset_details.php b/user/asset_details.php index 1d023151..0466119d 100644 --- a/user/asset_details.php +++ b/user/asset_details.php @@ -798,7 +798,7 @@ if (isset($_GET['asset_id'])) {

    Documents

    -
    @@ -832,19 +832,16 @@ if (isset($_GET['asset_id'])) { -
    +
    - + data-modal-url="modals/document/document_view.php?id="> @@ -882,7 +879,7 @@ if (isset($_GET['asset_id'])) { } ?>
    - @@ -1237,10 +1234,10 @@ require_once "modals/asset/asset_interface_add.php"; require_once "modals/asset/asset_interface_multiple_add.php"; require_once "modals/asset/asset_interface_import.php"; require_once "modals/asset/asset_interface_export.php"; -require_once "modals/ticket_add_modal.php"; +require_once "modals/ticket/ticket_add.php"; require_once "modals/recurring_ticket_add_modal.php"; require_once "modals/credential_add_modal.php"; -require_once "modals/client_document_add_modal.php"; -require_once "modals/client_file_upload_modal.php"; +require_once "modals/document/document_add.php"; +require_once "modals/file/file_upload.php"; require_once "../includes/footer.php"; diff --git a/user/assets.php b/user/assets.php index aa8fadee..c5da6b73 100644 --- a/user/assets.php +++ b/user/assets.php @@ -548,7 +548,7 @@ if (mysqli_num_rows($os_sql) > 0) { } $contact_name = nullable_htmlentities($row['contact_name']); if ($contact_name) { - $contact_name_display = "$contact_name $contact_archive_display"; + $contact_name_display = "$contact_name $contact_archive_display"; } else { $contact_name_display = "-"; } diff --git a/user/client_overview.php b/user/client_overview.php index e883b887..cd5ff799 100644 --- a/user/client_overview.php +++ b/user/client_overview.php @@ -237,10 +237,9 @@ $sql_asset_retired = mysqli_query( ?> - + data-modal-url="modals/contact/contact_details.php?id=">
    diff --git a/user/contact_details.php b/user/contact_details.php index 967f0e3a..81652418 100644 --- a/user/contact_details.php +++ b/user/contact_details.php @@ -966,19 +966,16 @@ if (isset($_GET['contact_id'])) { -
    +
    - + data-modal-url="modals/document/document_view.php?id="> @@ -1205,11 +1202,11 @@ if (isset($_GET['contact_id'])) { contact_id="> Details - + Make Note - + Edit @@ -545,12 +545,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
    - - - - - - + + + + + + @@ -598,10 +598,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); + data-modal-url='modals/contact/contact_details.php?id=$credential_contact_id'> "; } else { $credential_contact_display = ''; } if ($credential_asset_id) { - $credential_asset_display = " @@ -163,12 +163,9 @@ $page_title = $row['document_name'];
    -
    @@ -370,18 +367,20 @@ while ($folder_id > 0) { LIMIT 1" ); $row = mysqli_fetch_array($sql_shared); - $item_id = intval($row['item_id']); - $item_active = nullable_htmlentities($row['item_active']); - $item_key = nullable_htmlentities($row['item_key']); - $item_type = nullable_htmlentities($row['item_type']); - $item_related_id = intval($row['item_related_id']); - $item_note = nullable_htmlentities($row['item_note']); - $item_recipient = nullable_htmlentities($row['item_recipient']); - $item_views = nullable_htmlentities($row['item_views']); - $item_view_limit = nullable_htmlentities($row['item_view_limit']); - $item_created_at = nullable_htmlentities($row['item_created_at']); - $item_expire_at = nullable_htmlentities($row['item_expire_at']); - $item_expire_at_human = timeAgo($row['item_expire_at']); + if($row) { + $item_id = intval($row['item_id']); + $item_active = nullable_htmlentities($row['item_active']); + $item_key = nullable_htmlentities($row['item_key']); + $item_type = nullable_htmlentities($row['item_type']); + $item_related_id = intval($row['item_related_id']); + $item_note = nullable_htmlentities($row['item_note']); + $item_recipient = nullable_htmlentities($row['item_recipient']); + $item_views = nullable_htmlentities($row['item_views']); + $item_view_limit = nullable_htmlentities($row['item_view_limit']); + $item_created_at = nullable_htmlentities($row['item_created_at']); + $item_expire_at = nullable_htmlentities($row['item_expire_at']); + $item_expire_at_human = timeAgo($row['item_expire_at']); + } ?> @@ -392,7 +391,7 @@ while ($folder_id > 0) {
    - +
    @@ -417,21 +416,15 @@ while ($folder_id > 0) { - + @@ -492,6 +479,6 @@ while ($folder_id > 0) { 0) { @@ -351,18 +348,12 @@ while ($folder_id > 0) { )"> Share - + Rename - + Move @@ -385,7 +376,7 @@ while ($folder_id > 0) {
    @@ -556,18 +547,12 @@ while ($folder_id > 0) { )"> Share - + Rename - + Move @@ -588,7 +573,7 @@ while ($folder_id > 0) { @@ -596,7 +581,7 @@ while ($folder_id > 0) {
    - + @@ -635,7 +620,7 @@ function prevFile() { - + - + @@ -460,7 +460,7 @@ if (isset($_GET['query'])) { - + diff --git a/user/includes/client_side_nav.php b/user/includes/client_side_nav.php index 1e64499a..86a67ef5 100644 --- a/user/includes/client_side_nav.php +++ b/user/includes/client_side_nav.php @@ -182,7 +182,7 @@
    diff --git a/user/modals/contact_export_modal.php b/user/modals/contact/contact_export.php similarity index 100% rename from user/modals/contact_export_modal.php rename to user/modals/contact/contact_export.php diff --git a/user/modals/contact_import_modal.php b/user/modals/contact/contact_import.php similarity index 100% rename from user/modals/contact_import_modal.php rename to user/modals/contact/contact_import.php diff --git a/user/modals/contact_invite_modal.php b/user/modals/contact/contact_invite.php similarity index 100% rename from user/modals/contact_invite_modal.php rename to user/modals/contact/contact_invite.php diff --git a/user/ajax/ajax_contact_link_asset.php b/user/modals/contact/contact_link_asset.php similarity index 95% rename from user/ajax/ajax_contact_link_asset.php rename to user/modals/contact/contact_link_asset.php index cbf4c641..ca0b8807 100644 --- a/user/ajax/ajax_contact_link_asset.php +++ b/user/modals/contact/contact_link_asset.php @@ -1,6 +1,6 @@ diff --git a/user/ajax/ajax_contact_link_credential.php b/user/modals/contact/contact_link_credential.php similarity index 95% rename from user/ajax/ajax_contact_link_credential.php rename to user/modals/contact/contact_link_credential.php index 7a3e6608..20905205 100644 --- a/user/ajax/ajax_contact_link_credential.php +++ b/user/modals/contact/contact_link_credential.php @@ -1,6 +1,6 @@ diff --git a/user/ajax/ajax_contact_link_document.php b/user/modals/contact/contact_link_document.php similarity index 96% rename from user/ajax/ajax_contact_link_document.php rename to user/modals/contact/contact_link_document.php index 684ef54f..e5df893a 100644 --- a/user/ajax/ajax_contact_link_document.php +++ b/user/modals/contact/contact_link_document.php @@ -1,6 +1,6 @@ diff --git a/user/ajax/ajax_contact_link_file.php b/user/modals/contact/contact_link_file.php similarity index 96% rename from user/ajax/ajax_contact_link_file.php rename to user/modals/contact/contact_link_file.php index fd6108d3..3cdd4400 100644 --- a/user/ajax/ajax_contact_link_file.php +++ b/user/modals/contact/contact_link_file.php @@ -1,6 +1,6 @@ diff --git a/user/ajax/ajax_contact_note_create.php b/user/modals/contact/contact_note_create.php similarity index 94% rename from user/ajax/ajax_contact_note_create.php rename to user/modals/contact/contact_note_create.php index a2c931e0..72a5d4b8 100644 --- a/user/ajax/ajax_contact_note_create.php +++ b/user/modals/contact/contact_note_create.php @@ -1,6 +1,6 @@ set('Cache.DefinitionImpl', null); // Disable cache by setting a non-existent directory or an invalid one @@ -36,4 +36,4 @@ ob_start(); set('Cache.DefinitionImpl', null); // Disable cache by setting a non-existent directory or an invalid one @@ -36,5 +36,4 @@ ob_start(); $document_name created from template"); - redirect("client_document_details.php?client_id=$client_id&document_id=$document_id"); + redirect("document_details.php?client_id=$client_id&document_id=$document_id"); } @@ -116,7 +116,7 @@ if (isset($_POST['edit_document'])) { flash_alert("Document $name edited, previous version kept"); - redirect("client_document_details.php?client_id=$client_id&document_id=$document_id"); + redirect("document_details.php?client_id=$client_id&document_id=$document_id"); } if (isset($_POST['move_document'])) { diff --git a/user/project_details.php b/user/project_details.php index 2326d1ea..04305f04 100644 --- a/user/project_details.php +++ b/user/project_details.php @@ -215,11 +215,8 @@ if (isset($_GET['project_id'])) { - - - - - - + + + + + +
    @@ -544,7 +541,7 @@ if (isset($_GET['project_id'])) { require_once "modals/project_link_ticket_modal.php"; require_once "modals/project_link_closed_ticket_modal.php"; -require_once "modals/ticket_add_modal.php"; +require_once "modals/ticket/ticket_add.php"; } diff --git a/user/client_racks.php b/user/racks.php similarity index 97% rename from user/client_racks.php rename to user/racks.php index 4fe57b0f..aa18c7ea 100644 --- a/user/client_racks.php +++ b/user/racks.php @@ -98,19 +98,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));