From dd1071f93f5dc4dbbe33763b99f74c3e744ab668 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 13 Jul 2015 16:51:24 +0800 Subject: Bug 1182500: Clearing group flag doesn't work when also moving bug to a different component --- extensions/BugModal/web/bug_modal.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'extensions/BugModal') diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index 1a7f7ea81..462e7cff6 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -952,9 +952,20 @@ $(function() { }); // update groups + var dirtyGroups = []; + $('#module-security').find('input[name=groups]').each(function() { + var that = $(this); + var defaultChecked = !!that.attr('checked'); + if (defaultChecked !== that.is(':checked')) { + dirtyGroups.push({ name: that.val(), value: that.is(':checked') }); + } + }); $('#module-security .module-content') .html(data.groups) .addClass('attention'); + $.each(dirtyGroups, function() { + $('#module-security').find('input[value=' + this.name + ']').prop('checked', this.value); + }); }, function() { $('#product-throbber').hide(); -- cgit v1.2.3-24-g4f1b