summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_backup.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-20 21:14:21 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-20 21:14:21 +0545
commit40f146c5929de5a041e76e0f3a536f227c1cef68 (patch)
tree02e5fae66aab45b1fbb8435faa9829356bca02c2 /src/usr/local/www/diag_backup.php
parent72eaefaf1fc991d5949daadbac5ae50ed1d3ad5f (diff)
downloadpfsense-40f146c5929de5a041e76e0f3a536f227c1cef68.zip
pfsense-40f146c5929de5a041e76e0f3a536f227c1cef68.tar.gz
Only enable Restore Configuration if a file is selected
If the user clicks "Choose File" and then cancels the file selection dialog, disable the "Restore Configuration" button.
Diffstat (limited to 'src/usr/local/www/diag_backup.php')
-rw-r--r--src/usr/local/www/diag_backup.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index 3aaff07..6a3b637 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -799,7 +799,11 @@ events.push(function() {
});
$('#conffile').change(function () {
- $('.restore').prop('disabled', false);
+ if (document.getElementById("conffile").value) {
+ $('.restore').prop('disabled', false);
+ } else {
+ $('.restore').prop('disabled', true);
+ }
});
// ---------- On initial page load ------------------------------------------------------------
OpenPOWER on IntegriCloud