summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_misc.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-04-04 17:59:42 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-04-04 18:00:03 -0400
commit669343a2d37534fec4a41c3b2c6c8cd1bf4e1170 (patch)
treee4725f4eaaff824b278ddf836f0a7452a5f5d76b /src/usr/local/www/system_advanced_misc.php
parent2dced82fc8b5e2f71563b4c33d198ffdeeeacf7e (diff)
downloadpfsense-669343a2d37534fec4a41c3b2c6c8cd1bf4e1170.zip
pfsense-669343a2d37534fec4a41c3b2c6c8cd1bf4e1170.tar.gz
Fixed #6068
Diffstat (limited to 'src/usr/local/www/system_advanced_misc.php')
-rw-r--r--src/usr/local/www/system_advanced_misc.php36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php
index ddec186..50c2e8d 100644
--- a/src/usr/local/www/system_advanced_misc.php
+++ b/src/usr/local/www/system_advanced_misc.php
@@ -114,7 +114,6 @@ $thermal_hardware_modules = array(
'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor"));
if ($_POST) {
-
unset($input_errors);
$pconfig = $_POST;
@@ -525,8 +524,8 @@ $section->addInput(new Form_Checkbox(
($pconfig['use_mfs_tmpvar'] || $g['platform'] != $g['product_name'])
))->setHelp('Set this to use /tmp and /var as RAM disks (memory file '.
'system disks) on a full install rather than use the hard disk. Setting this will '.
- 'cause the data in /tmp and /var to be lost at reboot, including log data. RRD '.
- 'and DHCP Leases will be retained.');
+ 'cause the data in /tmp and /var to be lost, including log data. RRD '.
+ 'and DHCP Leases will be retained. Changing this setting will cause the firewall to reboot after clicking "Save".');
$section->addInput(new Form_Input(
'use_mfs_tmp_size',
@@ -598,4 +597,35 @@ $form->add($section);
print $form;
+$ramdisk_msg = gettext('The \"Use Ramdisk\" setting has been changed. This will cause the firewall\nto reboot immediately after the new setting is saved.\n\nPlease confirm.');?>
+
+<script>
+//<![CDATA[
+events.push(function() {
+ // Record the state of the Ue Ramsidk checkbox on page load
+ use_ramdisk = $('#use_mfs_tmpvar').prop('checked');
+
+ $('form').submit(function(event) {
+ // Has the Use ramdisk checkbox changes state?
+ if ($('#use_mfs_tmpvar').prop('checked') != use_ramdisk) {
+ if (confirm("<?=$ramdisk_msg?>")) {
+ $('form').append('<input type="hidden" name="doreboot" id="doreboot" value="yes"/>');
+ } else {
+ event.preventDefault();
+ }
+ }
+ });
+
+ drb = "<?=$pconfig['doreboot']?>";
+
+ if (drb == "yes") {
+ $('form').append("<input type=\"hidden\" name=\"override\" value=\"yes\" />");
+ $('form').get(0).setAttribute('action', 'diag_reboot.php');
+ $(form).submit();
+ }
+});
+//]]>
+</script>
+
+<?php
include("foot.inc");
OpenPOWER on IntegriCloud