summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-05-04 16:10:18 +0000
committerErmal <eri@pfsense.org>2010-05-04 16:10:18 +0000
commit34a3694b096be79311b48f70eab80ec0943e1415 (patch)
treef4573fa559fc1013f695d14d22ca4f955a8c7921 /etc
parent96cbc5aa79398f0e1dba04a1d487f9425315b60d (diff)
downloadpfsense-34a3694b096be79311b48f70eab80ec0943e1415.zip
pfsense-34a3694b096be79311b48f70eab80ec0943e1415.tar.gz
Fix displaying the Enable/Disable checkbox. Previously after a save button click it will show the old saved value.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/shaper.inc40
1 files changed, 36 insertions, 4 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index dd2c072..96712bf 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -513,7 +513,7 @@ class altq_root_queue {
* this->queues[$qkey]->build_rule();
*/
function build_rules() {
- if (count($this->queues) > 0 && $this->GetEnabled()) {
+ if (count($this->queues) > 0 && $this->GetEnabled() == "on") {
$rules = " altq on " . get_real_interface($this->GetInterface());
if ($this->GetScheduler())
$rules .= " ".strtolower($this->GetScheduler());
@@ -593,7 +593,15 @@ class altq_root_queue {
* to the user like the traffic wizard does.
*/
function build_form() {
- $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br>";
+ $form .= "Enable/Disable";
+ $form .= "</td><td class=\"vncellreq\">";
+ $form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
+ if ($this->GetEnabled() == "on")
+ $form .= " CHECKED";
+ $form .= " ><span class=\"vexpl\"> Enable/Disable discipline and its childs</span>";
+ $form .= "</td></tr>";
+ $form .= "<tr><td valign=\"top\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<strong>".$this->GetQname()."</strong>";
$form .= "</td></tr>";
@@ -1067,6 +1075,14 @@ class priq_queue {
* need to update it.
*/
function build_form() {
+ $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br>";
+ $form .= "Enable/Disable";
+ $form .= "</td><td class=\"vncellreq\">";
+ $form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
+ if ($this->GetEnabled() == "on")
+ $form .= " CHECKED";
+ $form .= " ><span class=\"vexpl\"> Enable/Disable queue and its childs</span>";
+ $form .= "</td></tr>";
$form .= "<tr>";
$form .= "<td width=\"22%\" valign=\"top\" class=\"vncellreq\">";
$form .= "Queue Name</td><td width=\"78%\" class=\"vtable\">";
@@ -2907,7 +2923,15 @@ class dnpipe_class extends dummynet_class {
}
function build_form() {
- $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br>";
+ $form .= "Enable/Disable";
+ $form .= "</td><td class=\"vncellreq\">";
+ $form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
+ if ($this->GetEnabled() == "on")
+ $form .= " CHECKED";
+ $form .= " ><span class=\"vexpl\"> Enable/Disable limiter and its childs</span>";
+ $form .= "</td></tr>";
+ $form .= "<tr><td valign=\"top\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"name\" name=\"name\" value=\"";
$form .= $this->GetQname()."\">";
@@ -3142,7 +3166,15 @@ class dnqueue_class extends dummynet_class {
}
function build_form() {
- $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
+ $form = "<tr><td valign=\"top\" class=\"vncellreq\"><br>";
+ $form .= "Enable/Disable";
+ $form .= "</td><td class=\"vncellreq\">";
+ $form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\"";
+ if ($this->GetEnabled() == "on")
+ $form .= " CHECKED";
+ $form .= " ><span class=\"vexpl\"> Enable/Disable queue and its childs</span>";
+ $form .= "</td></tr>";
+ $form .= "<tr><td valign=\"top\" class=\"vncellreq\"><br><span class=\"vexpl\">Name</span></td>";
$form .= "<td class=\"vncellreq\">";
$form .= "<input type=\"text\" id=\"name\" name=\"name\" value=\"";
$form .= $this->GetQname()."\">";
OpenPOWER on IntegriCloud