summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-06-30 14:00:09 +0930
committerGitHub <noreply@github.com>2016-06-30 14:00:09 +0930
commit6bc8621f84196c4528b8db6ae157631af7727b07 (patch)
treefc6efc835f5ea94715d351aa4c0b6196d06984f6 /src
parent9a8b5401c4ca4ead4542fd9b7184d8ed6a040f30 (diff)
downloadpfsense-6bc8621f84196c4528b8db6ae157631af7727b07.zip
pfsense-6bc8621f84196c4528b8db6ae157631af7727b07.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/pkg_mgr_install.php23
1 files changed, 7 insertions, 16 deletions
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('<b>%1$s</b> removal successfully completed.'), $pkgname);
$pkg_fail_txt = sprintf(gettext('<b>%1$s</b> removal failed!'), $pkgname);
@@ -445,17 +450,7 @@ if ($confirmed):
<br />
<div class="panel panel-default">
<div class="panel-heading">
-<?php
- if ($firmwareupdate):
-?>
- <h2 class="panel-title" id="status"><?=gettext("Updating System")?></h2>
-<?php
- else:
-?>
<h2 class="panel-title" id="status"><?=$panel_heading_txt?></h2>
-<?php
- endif;
-?>
</div>
<div class="panel-body">
@@ -554,11 +549,7 @@ function setProgress(barName, percent, transition) {
function show_success() {
$('#final').removeClass("alert-info").addClass("alert-success");
if ("<?=$pkgmode?>" != "reinstallall") {
- if ("<?=$firmwareupdate?>") {
- $('#final').html("<?=gettext('System update successfully completed.')?>");
- } else {
- $('#final').html("<?=$pkg_success_txt?>");
- }
+ $('#final').html("<?=$pkg_success_txt?>");
} else {
$('#final').html("<?=gettext('Reinstallation of all packages successfully completed.')?>");
}
OpenPOWER on IntegriCloud