diff --git a/usr/local/www/jquery/pfSense.js b/usr/local/www/jquery/pfSense.js index d7c34dd488..c4c3d3ad00 100644 --- a/usr/local/www/jquery/pfSense.js +++ b/usr/local/www/jquery/pfSense.js @@ -43,70 +43,4 @@ $(function() { // Trigger change to open currently selected item selects.trigger('change'); }; -}); - -// Custom handler for data-toggle=disable -+function ($) { - 'use strict'; - - var Disable = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Disable.DEFAULTS, options) - this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]') - this.transitioning = null - } - - Disable.VERSION = '1.0' - - Disable.DEFAULTS = { - trigger: '[data-toggle="disable"]' - } - - Disable.prototype.show = function () { - this.$element - .prop('disabled', false); - } - - Disable.prototype.hide = function () { - this.$element - .prop('disabled', true); - } - - Disable.prototype.toggle = function () { - this[this.$element.prop('disabled') ? 'show' : 'hide']() - } - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('disable') - var options = $.extend({}, Disable.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('disable', (data = new Disable(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.disable - - $.fn.disable = Plugin - $.fn.disable.Constructor = Disable - - $.fn.disable.noConflict = function () { - $.fn.disable = old - return this - } - - $(document).on('click.disable.data-api', '[data-toggle="disable"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = $($this.attr('data-target')) - var data = $target.data('disable') - var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this }) - - Plugin.call($target, option) - }) - -}(jQuery); \ No newline at end of file +}); \ No newline at end of file diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php index 7301dae9cc..180ade4363 100644 --- a/usr/local/www/system_advanced_admin.php +++ b/usr/local/www/system_advanced_admin.php @@ -302,7 +302,7 @@ $group->add(new Form_Checkbox( 'HTTP', ($pconfig['webguiproto']=='http'), 'http' -))->displayAsRadio()->setAttribute('data-toggle', 'disable')->setAttribute('data-target', '#ssl-certificate'); +))->displayAsRadio()->setAttribute('data-toggle', 'collapse')->setAttribute('data-target', '#ssl-certificate'); $group->add($input = new Form_Checkbox( 'protocol', @@ -310,7 +310,7 @@ $group->add($input = new Form_Checkbox( 'HTTPS', ($pconfig['webguiproto']=='https'), 'https' -))->displayAsRadio()->setAttribute('data-toggle', 'disable')->setAttribute('data-target', '#ssl-certificate'); +))->displayAsRadio()->setAttribute('data-toggle', 'collapse')->setAttribute('data-target', '#ssl-certificate'); $section->add($group); @@ -333,7 +333,7 @@ if (!$certs_available) )); if ($pconfig['webguiproto'] == 'http') - $input->setAttribute('disabled'); + $input->addClass('collapse'); } $section->addInput(new Form_Input(