diff options
author | Erik Kristensen <ekristen@pfsense.org> | 2005-08-30 01:55:59 +0000 |
---|---|---|
committer | Erik Kristensen <ekristen@pfsense.org> | 2005-08-30 01:55:59 +0000 |
commit | 9e2a4fcefad0e1cb4a74de6b8f8240a6f4d3e737 (patch) | |
tree | 85064e21a75d4384d214ec16f70c76f19cf41507 | |
parent | 698f5500cadf649b29c8acb451d8c2bb8b9a5a07 (diff) | |
download | pfsense-9e2a4fcefad0e1cb4a74de6b8f8240a6f4d3e737.zip pfsense-9e2a4fcefad0e1cb4a74de6b8f8240a6f4d3e737.tar.gz |
progress.php needed to only be called upon upload not download or reinstall of packages
-rwxr-xr-x | usr/local/www/diag_backup.php | 129 | ||||
-rw-r--r-- | usr/local/www/javascript/diag_backup/diag_backup.js | 11 |
2 files changed, 73 insertions, 67 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 4f9fec1..b6a4938 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -185,78 +185,73 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <p class="pgtitle"><?=$pgtitle?></p> - <form action="diag_backup.php" method="post" enctype="multipart/form-data" onSubmit="window.open('progress.php?conffile=<?=$id?>','UploadMeter','width=370,height=115', true); return true; "> - <?php if ($input_errors) print_input_errors($input_errors); ?> - <?php if ($savemsg) print_info_box($savemsg); ?> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr><td> + +<form action="diag_backup.php" method="post" enctype="multipart/form-data" onSubmit="check_upload_status(<?= $id; ?>);"> +<?php if ($input_errors) print_input_errors($input_errors); ?> +<?php if ($savemsg) print_info_box($savemsg); ?> +<table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td> <?php - $tab_array = array(); - $tab_array[0] = array("Local", true, "diag_backup.php"); - $tab_array[1] = array("Remote", false, "diag_confbak.php"); - display_top_tabs($tab_array); + $tab_array = array(); + $tab_array[0] = array("Local", true, "diag_backup.php"); + $tab_array[1] = array("Remote", false, "diag_confbak.php"); + display_top_tabs($tab_array); ?> - </ul></td></tr> - <tr><td> - <div id="mainarea"> - <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td colspan="2" class="listtopic">Backup configuration</td> - </tr> - <tr> - <td width="22%" valign="baseline" class="vncell"> </td> - <td width="78%" class="vtable"> - <p> Click this button to download the system configuration - in XML format.<br> - <br> - Backup area: <?php spit_out_select_items("backuparea"); ?> - <p> - <input name="nopackages" type="checkbox" class="formcheckbox" id="nopackages">Do not backup package information.<p> - <input name="Submit" type="submit" class="formbtn" id="download" value="Download configuration"></td> - </tr> - <tr> - <td colspan="2" class="list" height="12"></td> - </tr> - <tr> - <td colspan="2" class="listtopic">Restore configuration</td> + </td> + </tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td colspan="2" class="listtopic">Backup configuration</td> + </tr> + <tr> + <td width="22%" valign="baseline" class="vncell"> </td> + <td width="78%" class="vtable"> + <p>Click this button to download the system configuration in XML format.<br /><br /> Backup area: <?php spit_out_select_items("backuparea"); ?></p> + <p><input name="nopackages" type="checkbox" class="formcheckbox" id="nopackages">Do not backup package information.</p> + <p><input name="Submit" type="submit" class="formbtn" id="download" value="Download configuration"></p> + </td> + </tr> + <tr> + <td colspan="2" class="list" height="12"> </td> </tr> <tr> - <td width="22%" valign="baseline" class="vncell"> </td> - <td width="78%" class="vtable"> - Open a pfSense configuration XML file and click the button - below to restore the configuration.<br> - <br> - Restore area: <?php spit_out_select_items("restorearea"); ?> - <p> - <input name="conffile" type="file" class="formfld" id="conffile" size="40"> - <p> - <input name="Submit" type="submit" class="formbtn" id="restore" value="Restore configuration"> - <p> - <strong><span class="red">Note:</span></strong><br> - The firewall will reload the settings after restoring the configuration.<br> - </td> - </tr> - <?php if($config['installedpackages']['package'] != "") { ?> - <tr> - <td colspan="2" class="list" height="12"></td> - </tr> - <tr> - <td colspan="2" class="listtopic">Reinstall packages</td> - </tr> - <tr> - <td width="22%" valign="baseline" class="vncell"> </td> - <td width="78%" class="vtable"> - <p> Click this button to reinstall all system packages. This may take a while.<br> - <br> - <input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="Reinstall packages"></td> - </tr> - <?php } ?> - </table> - </div> + <td colspan="2" class="listtopic">Restore configuration</td> + </tr> + <tr> + <td width="22%" valign="baseline" class="vncell"> </td> + <td width="78%" class="vtable"> + Open a pfSense configuration XML file and click the button below to restore the configuration. <br /><br /> Restore area: <?php spit_out_select_items("restorearea"); ?> + <p><input name="conffile" type="file" class="formfld" id="conffile" size="40"></p> + <p><input name="Submit" type="submit" class="formbtn" id="restore" value="Restore configuration"></p> + <p><strong><span class="red">Note:</span></strong><br />The firewall will reload the settings after restoring the configuration.<br /></p> + </td> + </tr> + <?php if($config['installedpackages']['package'] != "") { ?> + <tr> + <td colspan="2" class="list" height="12"> </td> + </tr> + <tr> + <td colspan="2" class="listtopic">Reinstall packages</td> + </tr> + <tr> + <td width="22%" valign="baseline" class="vncell"> </td> + <td width="78%" class="vtable"> + <p>Click this button to reinstall all system packages. This may take a while. <br /><br /> + <input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="Reinstall packages"> + </td> + </tr> + <?php } ?> + </table> + </div> </td> - </tr> - </table> - </form> + </tr> +</table> +</form> + <?php include("fend.inc"); ?> </body> </html> diff --git a/usr/local/www/javascript/diag_backup/diag_backup.js b/usr/local/www/javascript/diag_backup/diag_backup.js new file mode 100644 index 0000000..d9ca4f6 --- /dev/null +++ b/usr/local/www/javascript/diag_backup/diag_backup.js @@ -0,0 +1,11 @@ + +function check_upload_status(id) { + + if (document.getElementById("restore").value == 'Restore configuration') { + window.open('progress.php?conffile=' + id,'UploadMeter','width=370,height=115', true); + return true; + } else { + return false; + } + +}
\ No newline at end of file |