summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-08 10:20:03 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-08 10:21:41 -0500
commit5605a0c434220e5abfbaadc3c4c160f409d94236 (patch)
treedb80c5f9d77c48f0a3d87c18343a8748e2f1a11a /src
parentb37adaed58f5bab4f8269be0c291c933b26d90f9 (diff)
downloadpfsense-5605a0c434220e5abfbaadc3c4c160f409d94236.zip
pfsense-5605a0c434220e5abfbaadc3c4c160f409d94236.tar.gz
Fixed #5540
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/shaper.inc33
-rw-r--r--src/usr/local/www/firewall_shaper.php27
2 files changed, 43 insertions, 17 deletions
diff --git a/src/etc/inc/shaper.inc b/src/etc/inc/shaper.inc
index e1897a7..6fcafc1 100644
--- a/src/etc/inc/shaper.inc
+++ b/src/etc/inc/shaper.inc
@@ -1310,7 +1310,12 @@ class priq_queue {
function build_form() {
- $sform = new Form();
+ $sform = new Form(new Form_Button(
+ 'Submit',
+ 'Save'
+ ));
+
+ $sform->setAction("firewall_shaper.php");
$section = new Form_Section("");
@@ -1323,13 +1328,20 @@ class priq_queue {
));
$section->addInput(new Form_Input(
- 'name',
+ 'newname',
'Name',
'text',
$this->GetQname()
))->setHelp('Enter the name of the queue here. Do not use spaces and limit the size to 15 characters.');
$section->addInput(new Form_Input(
+ 'name',
+ null,
+ 'hidden',
+ $this->GetQname()
+ ));
+
+ $section->addInput(new Form_Input(
'priority',
'Priority',
'number',
@@ -1351,7 +1363,8 @@ class priq_queue {
'default',
null,
null,
- $this->GetDefault()
+ $this->GetDefault(),
+ 'default'
))->setHelp('Default Queue');
}
@@ -1394,14 +1407,21 @@ class priq_queue {
$this->GetDescription()
));
- $section->addInput(new Form_Input(
+ $sform->add($section);
+
+ $sform->addGlobal(new Form_Input(
'interface',
null,
'hidden',
$this->GetInterface()
));
- $sform->add($section);
+ $sform->addGlobal(new Form_Input(
+ 'name',
+ null,
+ 'hidden',
+ $this->GetQname()
+ ));
return($sform);
}
@@ -3810,6 +3830,7 @@ EOD;
$sform = new Form();
+ $sform->setAction("firewall_shaper.php");
$section = new Form_Section('Limiters');
@@ -4132,7 +4153,7 @@ class dnqueue_class extends dummynet_class {
$sform = new Form();
-
+ $sform->setAction("firewall_shaper.php");
$section = new Form_Section('Limiters');
$section->addInput(new Form_Checkbox(
diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php
index 9783808..1a9b9a9 100644
--- a/src/usr/local/www/firewall_shaper.php
+++ b/src/usr/local/www/firewall_shaper.php
@@ -120,7 +120,6 @@ if ($interface) {
}
}
-
$dontshow = false;
$newqueue = false;
$dfltmsg = false;
@@ -204,16 +203,23 @@ if ($_GET) {
$q = new altq_root_queue();
} else {
$input_errors[] = gettext("Could not create new queue/discipline!");
- }
+ }
- if ($q) {
- $q->SetInterface($interface);
- $sform = $q->build_form();
- $newjavascript = $q->build_javascript();
- unset($q);
- $newqueue = true;
- }
- break;
+ if ($q) {
+ $q->SetInterface($interface);
+ $sform = $q->build_form();
+ $sform->addGlobal(new Form_Input(
+ 'parentqueue',
+ null,
+ 'hidden',
+ $qname
+ ));
+
+ $newjavascript = $q->build_javascript();
+ unset($q);
+ $newqueue = true;
+ }
+ break;
case "show":
if ($queue) {
$sform = $queue->build_form();
@@ -493,7 +499,6 @@ if (!$dfltmsg) {
}
- // Print the form
print($sform);
}
?>
OpenPOWER on IntegriCloud