summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-03-20 16:06:02 +0545
committerPhil Davis <phil.davis@inf.org>2016-03-20 16:06:02 +0545
commit347c0214388bae18616a9003adf84d7be509fa86 (patch)
tree7f9bd3f0093719a7a34eb2c63024345ba713abf9 /src/usr/local/www/interfaces.php
parent7cb01159934f0fa24c0c0050917cef1ad9bb9f2b (diff)
downloadpfsense-347c0214388bae18616a9003adf84d7be509fa86.zip
pfsense-347c0214388bae18616a9003adf84d7be509fa86.tar.gz
Reengineer Form_Button setAttribute
As per what was done for https://github.com/pfsense/pfsense/pull/2765 - do it to the rest of them. Seems to work OK.
Diffstat (limited to 'src/usr/local/www/interfaces.php')
-rw-r--r--src/usr/local/www/interfaces.php26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 45835c4..6adb66a 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -1759,7 +1759,7 @@ $btnmymac = new Form_Button(
'fa-clone'
);
-$btnmymac->addClass('btn-success btn-sm');
+$btnmymac->setAttribute('type','button')->addClass('btn-success btn-sm');
$group = new Form_Group('MAC controls');
$group->add($macaddress);
@@ -1819,7 +1819,7 @@ $group->add(new Form_Button(
'Add a new gateway',
null,
'fa-plus'
-))->addClass('btn-success')->setAttribute('data-target', '#newgateway')->setAttribute('data-toggle', 'modal');
+))->setAttribute('type','button')->addClass('btn-success')->setAttribute('data-target', '#newgateway')->setAttribute('data-toggle', 'modal');
$group->setHelp('If this interface is an Internet connection, select an existing Gateway from the list or add a new one using the "Add" button.' . '<br />' .
'On local LANs the upstream gateway should be "none".' .
@@ -1852,7 +1852,7 @@ $group->add(new Form_Button(
'Add a new gateway',
null,
'fa-plus'
-))->addClass('btn-success')->setAttribute('data-target', '#newgateway6')->setAttribute('data-toggle', 'modal');
+))->setAttribute('type','button')->addClass('btn-success')->setAttribute('data-target', '#newgateway6')->setAttribute('data-toggle', 'modal');
$group->setHelp('If this interface is an Internet connection, select an existing Gateway from the list or add a new one using the "Add" button.' . '<br />' .
'On local LANs the upstream gateway should be "none". ');
@@ -1896,7 +1896,7 @@ $btnaddgw6 = new Form_Button(
'fa-plus'
);
-$btnaddgw6->addClass('btn-success');
+$btnaddgw6->setAttribute('type','button')->addClass('btn-success');
$btncnxgw6 = new Form_Button(
'cnx6',
@@ -1905,7 +1905,7 @@ $btncnxgw6 = new Form_Button(
'fa-undo'
);
-$btncnxgw6->addClass('btn-warning');
+$btncnxgw6->setAttribute('type','button')->addClass('btn-warning');
$modal->addInput(new Form_StaticText(
null,
@@ -2561,7 +2561,7 @@ $section->addInput(new Form_Button(
'Advanced PPP',
isset($pconfig['pppid']) ? 'interfaces_ppps_edit.php?id=' . htmlspecialchars($pconfig['pppid']) : 'interfaces_ppps_edit.php',
'fa-cog'
-))->addClass('btn-info')->setAttribute('id')->setHelp('Create a new PPP configuration');
+))->setAttribute('type','button')->addClass('btn-info')->setAttribute('id')->setHelp('Create a new PPP configuration');
$form->add($section);
@@ -2687,7 +2687,7 @@ $section->addInput(new Form_Button(
'Advanced and MLPPP',
isset($pconfig['pppid']) ? 'interfaces_ppps_edit.php?id=' . htmlspecialchars($pconfig['pppid']) : 'interfaces_ppps_edit.php',
'fa-cog'
-))->addClass('btn-info')->setAttribute('id')->setHelp('Click for additional PPPoE configuration options. Save first if changes have been made.');
+))->setAttribute('type','button')->addClass('btn-info')->setAttribute('id')->setHelp('Click for additional PPPoE configuration options. Save first if changes have been made.');
$form->add($section);
@@ -2750,7 +2750,7 @@ $section->addInput(new Form_Button(
'Advanced and MLPPP',
isset($pconfig['pppid']) ? 'interfaces_ppps_edit.php?id=' . htmlspecialchars($pconfig['pppid']) : 'interfaces_ppps_edit.php',
'fa-cog'
-))->addClass('btn-info')->setAttribute('id')->setHelp($mlppp_text . 'Click for additional PPTP and L2TP configuration options. Save first if changes have been made.');
+))->setAttribute('type','button')->addClass('btn-info')->setAttribute('id')->setHelp($mlppp_text . 'Click for additional PPTP and L2TP configuration options. Save first if changes have been made.');
$form->add($section);
@@ -3203,7 +3203,7 @@ $btnaddgw = new Form_Button(
'fa-plus'
);
-$btnaddgw->addClass('btn-success');
+$btnaddgw->setAttribute('type','button')->addClass('btn-success');
$btncnxgw = new Form_Button(
'cnx',
@@ -3212,7 +3212,7 @@ $btncnxgw = new Form_Button(
'fa-undo'
);
-$btncnxgw->addClass('btn-warning');
+$btncnxgw->setAttribute('type','button')->addClass('btn-warning');
$modal->addInput(new Form_StaticText(
null,
@@ -3592,12 +3592,6 @@ events.push(function() {
updateType($('#type').val());
updateTypeSix($('#type6').val());
show_reset_settings($('#pppoe-reset-type').val());
- $("#add").prop('type', 'button');
- $("#cnx").prop('type', 'button');
- $("#addgw").prop('type', 'button');
- $("#add6").prop('type', 'button');
- $("#cnx6").prop('type', 'button');
- $("#addgw6").prop('type', 'button');
hideClass('dhcp6advanced', true);
hideClass('dhcpadvanced', true);
show_dhcp6adv();
OpenPOWER on IntegriCloud