From 347c0214388bae18616a9003adf84d7be509fa86 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 20 Mar 2016 16:06:02 +0545 Subject: 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. --- src/usr/local/www/firewall_rules_edit.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/usr/local/www/firewall_rules_edit.php') 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(' ' + text); } - $('#btnadvopts').prop('type', 'button'); - $('#btnadvopts').click(function(event) { show_advopts(); }); @@ -1963,9 +1961,6 @@ events.push(function() { show_source_port_range(); - // Make it a regular button, not a submit - $("#btnsrcadv").prop('type','button'); - // on click . . $('#srcbeginport').on('change', function() { src_rep_change(); -- cgit v1.1