From 484a1e87024353e2ede24c9ea6de68cbfd94b42e Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 24 Nov 2023 18:10:16 +0000 Subject: [PATCH] Cleanup template, fix timing of js execution --- app/js/custom.js | 11 ++++---- templates/about.php | 65 +++++++-------------------------------------- 2 files changed, 15 insertions(+), 61 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index b2dd65b3..3a99eaa7 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -308,16 +308,17 @@ $('#chkupdateModal').on('shown.bs.modal', function (e) { }); }); -$('#js-sys-check-update').click(function() { +$('#performUpdate').on('submit', function(event) { + event.preventDefault(); + var csrfToken = $('meta[name=csrf_token]').attr('content'); + $.post('ajax/system/sys_perform_update.php',{ + 'csrf_token': csrfToken + }) $('#chkupdateModal').modal('hide'); $('#performupdateModal').modal('show'); }); $('#performupdateModal').on('shown.bs.modal', function (e) { - var csrfToken = $('meta[name=csrf_token]').attr('content'); - $.post('ajax/system/sys_perform_update.php',{ - 'csrf_token': csrfToken, - }) fetchUpdateResponse(); }); diff --git a/templates/about.php b/templates/about.php index 74a53c52..8e1be914 100755 --- a/templates/about.php +++ b/templates/about.php @@ -41,66 +41,19 @@ require_once 'app/lib/Parsedown.php'; - - -