diff options
Diffstat (limited to 'src/usr/local')
-rwxr-xr-x | src/usr/local/www/diag_reboot.php | 11 |
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); |