diff --git a/wcs/qommon/static/css/dc2/admin.scss b/wcs/qommon/static/css/dc2/admin.scss index 045aa0af6..4166fc92c 100644 --- a/wcs/qommon/static/css/dc2/admin.scss +++ b/wcs/qommon/static/css/dc2/admin.scss @@ -2462,6 +2462,11 @@ div.timetable-widget { content: "\f1f8"; // trash } } + &-single { + .remove-button { + visibility: hidden; + } + } } .pk-blocks-zebra { diff --git a/wcs/qommon/static/js/qommon.forms.js b/wcs/qommon/static/js/qommon.forms.js index f1e97f13b..fe412c567 100644 --- a/wcs/qommon/static/js/qommon.forms.js +++ b/wcs/qommon/static/js/qommon.forms.js @@ -728,6 +728,9 @@ $(function() { $('.BlockSubWidget button.remove-button').each(function(i, elem) { if ($(this).parents('.BlockWidget').find('.BlockSubWidget').length == 1) { $(this).prop('disabled', true); + $(this).parents('.BlockWidget').addClass('wcs-block-with-remove-button-single'); + } else { + $(this).parents('.BlockWidget').removeClass('wcs-block-with-remove-button-single'); } }); }