summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_reboot.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-01-26 08:29:57 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-01-26 08:29:57 -0500
commitbe17381d9acb30b74a2dbebc1ef48eabaaeda9f4 (patch)
tree2060071e57fa3d0375197d412cf027d8db9c82d4 /src/usr/local/www/diag_reboot.php
parent34c73fc1b5d6ff7883eba9af3c9e69d60fff6cb2 (diff)
downloadpfsense-be17381d9acb30b74a2dbebc1ef48eabaaeda9f4.zip
pfsense-be17381d9acb30b74a2dbebc1ef48eabaaeda9f4.tar.gz
Revise reload countdown for internaionalization
Diffstat (limited to 'src/usr/local/www/diag_reboot.php')
-rwxr-xr-xsrc/usr/local/www/diag_reboot.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/usr/local/www/diag_reboot.php b/src/usr/local/www/diag_reboot.php
index b347d30..7faf6b2 100755
--- a/src/usr/local/www/diag_reboot.php
+++ b/src/usr/local/www/diag_reboot.php
@@ -94,7 +94,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
//<![CDATA[
events.push(function() {
- var timeoutmsg = '<h4><?=gettext("Rebooting");?><br /><?=gettext("Page will automatically reload in ");?>';
+ var timeoutmsg = '<h4><?=sprintf(gettext("Rebooting%sPage will automatically reload in %s seconds"), "<br />", "<span id=\"secs\"></span>");?></h4>';
var time = 0;
function checkonline() {
@@ -109,12 +109,17 @@ events.push(function() {
function startCountdown() {
setInterval(function() {
+ if (time == "<?=$guitimeout?>") {
+ $('#countdown').html(timeoutmsg);
+ }
+
if (time > 0) {
- $('#countdown').html(timeoutmsg + time + ' <?=gettext("seconds");?>.</h4>');
+ $('#secs').html(time);
time--;
} else {
time = "<?=$guiretry?>";
- timeoutmsg = '<h4><?=gettext("Not yet ready");?><br /><?=gettext("Retrying in another ");?>';
+ $('#countdown').html('<h4><?=sprintf(gettext("Not yet ready%s Retrying in another %s seconds"), "<br />", "<span id=\"secs\"></span>");?></h4>');
+ $('#secs').html(time);
checkonline();
}
}, 1000);
OpenPOWER on IntegriCloud