diff options
author | Phil Davis <phil.davis@inf.org> | 2016-03-20 16:06:02 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-03-20 16:06:02 +0545 |
commit | 347c0214388bae18616a9003adf84d7be509fa86 (patch) | |
tree | 7f9bd3f0093719a7a34eb2c63024345ba713abf9 /src/usr/local/www/firewall_rules_edit.php | |
parent | 7cb01159934f0fa24c0c0050917cef1ad9bb9f2b (diff) | |
download | pfsense-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/firewall_rules_edit.php')
-rw-r--r-- | src/usr/local/www/firewall_rules_edit.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 21e719a..01312cc 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1366,7 +1366,7 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) { 'Display Advanced', null, 'fa-cog' - ))->addClass('btn-info btn-sm'); + ))->setAttribute('type','button')->addClass('btn-info btn-sm'); } $portValues = ['' => gettext('(other)'), 'any' => gettext('any')]; @@ -1448,7 +1448,7 @@ $btnadv = new Form_Button( 'fa-cog' ); -$btnadv->addClass('btn-info btn-sm'); +$btnadv->setAttribute('type','button')->addClass('btn-info btn-sm'); $section->addInput(new Form_StaticText( 'Advanced Options', @@ -1767,8 +1767,6 @@ events.push(function() { $('#btnadvopts').html('<i class="fa fa-cog"></i> ' + text); } - $('#btnadvopts').prop('type', 'button'); - $('#btnadvopts').click(function(event) { show_advopts(); }); @@ -1963,9 +1961,6 @@ events.push(function() { show_source_port_range(); <?php endif; ?> - // Make it a regular button, not a submit - $("#btnsrcadv").prop('type','button'); - // on click . . $('#srcbeginport').on('change', function() { src_rep_change(); |