Fixes toggling of component status box. Fixes #1792

This commit is contained in:
James Brooks
2016-05-24 15:07:36 +01:00
parent 6997e0c451
commit 4f886e15ed

View File

@@ -120,12 +120,12 @@ $(function() {
var $option = $(this).find('option:selected');
var $componentStatus = $('#component-status');
if ($option.val() !== '') {
if (parseInt($option.val(), 10) !== 0) {
if ($componentStatus.hasClass('hidden')) {
$componentStatus.removeClass('hidden');
} else {
$componentStatus.addClass('hidden');
}
} else {
$componentStatus.addClass('hidden');
}
});