summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_backup.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/diag_backup.php')
-rw-r--r--src/usr/local/www/diag_backup.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index 7e75e7e..4b5f453 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -372,7 +372,7 @@ if ($_POST) {
/* this will be picked up by /index.php */
conf_mount_rw();
mark_subsystem_dirty("restore");
- touch("/conf/needs_package_sync");
+ touch("/conf/needs_package_sync_after_reboot");
/* remove cache, we will force a config reboot */
if (file_exists("{$g['tmp_path']}/config.cache")) {
unlink("{$g['tmp_path']}/config.cache");
@@ -608,16 +608,18 @@ function build_area_list($showall) {
$pgtitle = array(gettext("Diagnostics"), gettext("Backup/Restore"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
if (is_subsystem_dirty('restore')):
?>
<br/>
- <form action="reboot.php" method="post">
+ <form action="diag_reboot.php" method="post">
<input name="Submit" type="hidden" value="Yes" />
<?=print_info_box(gettext("The firewall configuration has been changed.") . "<br />" . gettext("The firewall is now rebooting."))?>
<br />
@@ -736,7 +738,7 @@ $group = new Form_Group('');
$group->add(new Form_Button(
'Submit',
'Restore Configuration'
-))->setHelp('The firewall will reboot after restoring the configuration.')->removeClass('btn-primary')->addClass('btn-danger');
+))->setHelp('The firewall will reboot after restoring the configuration.')->removeClass('btn-primary')->addClass('btn-danger restore');
$section->add($group);
@@ -750,7 +752,7 @@ if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("pack
$group->add(new Form_Button(
'Submit',
'Reinstall Packages'
- ))->setHelp('Click this button to reinstall all system packages. This may take a while.')->removeClass('btn-primary')->addClass('btn-danger');
+ ))->setHelp('Click this button to reinstall all system packages. This may take a while.')->removeClass('btn-primary')->addClass('btn-success');
$section->add($group);
}
@@ -772,7 +774,7 @@ print($form);
?>
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// ------- Show/hide sections based on checkbox settings --------------------------------------
@@ -791,7 +793,7 @@ events.push(function(){
hideInput('decrypt_passconf', decryptHide);
}
- // ---------- Click checkbox handlers ---------------------------------------------------------
+ // ---------- Click handlers ------------------------------------------------------------------
$('input[name="encrypt"]').on('change', function() {
hidePasswords();
@@ -801,9 +803,13 @@ events.push(function(){
hidePasswords();
});
+ $('#conffile').change(function () {
+ $('.restore').prop('disabled', false);
+ });
// ---------- On initial page load ------------------------------------------------------------
hideSections();
+ $('.restore').prop('disabled', true);
});
//]]>
</script>
OpenPOWER on IntegriCloud