Skip to content
Snippets Groups Projects
Commit bbfd0413 authored by Kurt Trowbridge's avatar Kurt Trowbridge Committed by David Valdez
Browse files

Issue #3215875 by gnuget, KurtTrowbridge, cedewey, mlncn, s.perilhou,...

Issue #3215875 by gnuget, KurtTrowbridge, cedewey, mlncn, s.perilhou, greggles, ShaunDychko: Entire comments form can be hidden by Comment Notify's JavaScript
parent 7c9d6f89
No related branches found
No related tags found
1 merge request!5Issue #3215875: Entire comments form can be hidden by Comment Notify's JavaScript
(function ($, Drupal) {
'use strict';
"use strict";
Drupal.behaviors.commentNotify = {
attach: function (context) {
$('.comment-notify', context)
.bind('change', function() {
var checkbox = $(this);
var form = checkbox.closest('.comment-notify-form');
if (form.length > 0) {
var radios = $('.comment-notify-type', form);
if (radios.length > 0) {
var radiosHolder = radios.parent().parent();
if (checkbox.is(':checked')) {
radiosHolder.show();
}
else {
radiosHolder.hide();
}
}
}
$("#edit-notify, [id^='edit-notify--']", context)
.bind("change", function () {
$("#edit-notify-type, [id^='edit-notify-type--']", context)
[this.checked ? "show" : "hide"]()
})
.trigger('change');
}
.trigger("change");
},
};
})(jQuery, Drupal);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment