From 6bc8621f84196c4528b8db6ae157631af7727b07 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 30 Jun 2016 14:00:09 +0930 Subject: Rationalize System Update GUI messages At present, when doing a System Update, there is a message box that says: "Please wait while the installation of completes. This may take several minutes." Between "of" and "completes" is the package name, which is blank in the case of a System Update. This should fix that issue by defining $pkg_wait_txt appropriately for the $firmwareupdate case. Note: It was also easy to refactor out a couple of special "if firmwareupdate" tests, as the code "fell out" nicely by defining the other *_txt variables to suitable strings for the $firmwareupdate case. --- src/usr/local/www/pkg_mgr_install.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 6d266d4..b080943 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -401,7 +401,12 @@ if ($_POST) { } } -if ($pkgmode == 'delete') { +if ($firmwareupdate) { + $panel_heading_txt = gettext("Updating System"); + $pkg_success_txt = gettext('System update successfully completed.'); + $pkg_fail_txt = gettext('System update failed!'); + $pkg_wait_txt = gettext('Please wait while the system update completes.'); +} else if ($pkgmode == 'delete') { $panel_heading_txt = gettext("Package Removal"); $pkg_success_txt = sprintf(gettext('%1$s removal successfully completed.'), $pkgname); $pkg_fail_txt = sprintf(gettext('%1$s removal failed!'), $pkgname); @@ -445,17 +450,7 @@ if ($confirmed):
- -

-

-
@@ -554,11 +549,7 @@ function setProgress(barName, percent, transition) { function show_success() { $('#final').removeClass("alert-info").addClass("alert-success"); if ("" != "reinstallall") { - if ("") { - $('#final').html(""); - } else { - $('#final').html(""); - } + $('#final').html(""); } else { $('#final').html(""); } -- cgit v1.1