diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-09-09 13:19:23 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-09-09 13:19:23 -0400 |
commit | 239b51616c206f89fe727f062fcb0ad748cd855a (patch) | |
tree | fac31e33fbeff8478c22a415095e8bd64280a7c9 /src/usr/local/www/firewall_aliases_edit.php | |
parent | 309e8f8f08b23eacbd40f6f99572d7116124f1d7 (diff) | |
download | pfsense-239b51616c206f89fe727f062fcb0ad748cd855a.zip pfsense-239b51616c206f89fe727f062fcb0ad748cd855a.tar.gz |
firewall_asliases_edit: minor edits to display hint text on page load
head.inc: Fixes to notification system
pkg_mgr: Removed calls to dicontinued function. Removed obsolete table columns, corrected description display
Diffstat (limited to 'src/usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-x | src/usr/local/www/firewall_aliases_edit.php | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php index 90c00b9..8aecd17 100755 --- a/src/usr/local/www/firewall_aliases_edit.php +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -880,10 +880,30 @@ events.push(function(){ setMasks(); } + function typechange() { + var tab = $('#type').find('option:selected').val(); + $("[id^='address_subnet']").prop("disabled", (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports')); + + // Set the help text to match the tab + var helparray = <?php echo json_encode($help); ?>; + $('.helptext').html(helparray[tab]); + + // Set the section heading by tab type + var sectionstr = <?php echo json_encode($section_str); ?>; + $('.panel-title:last').text(sectionstr[tab]); + + // Set the input field label by tab + var labelstr = <?php echo json_encode($label_str); ?>; + $('.repeatable:first').find('label').text(labelstr[tab]); + } + // These are action buttons, not submit buttons $('[id^=addrow]').prop('type','button'); $('[id^=delete]').prop('type','button'); + // On load . . + typechange(); + // on click . . $('[id^=addrow]').click(function() { add_row(); @@ -899,20 +919,7 @@ events.push(function(){ }); $('#type').on('change', function() { - var tab = $(this).find('option:selected').val(); - $("[id^='address_subnet']").prop("disabled", (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports')); - - // Set the help text to match the tab - var helparray = <?php echo json_encode($help); ?>; - $('.helptext').html(helparray[tab]); - - // Set the section heading by tab type - var sectionstr = <?php echo json_encode($section_str); ?>; - $('.panel-title:last').text(sectionstr[tab]); - - // Set the input field label by tab - var labelstr = <?php echo json_encode($label_str); ?>; - $('.repeatable:first').find('label').text(labelstr[tab]); + typechange(); }); // Disable address_subnet if type == 'host' |