Keep collapsible blocks open if there is any form error.

By default the collapsible blocks will be hidden after saving or from preview.
When there is a form error inside one of these blocks, the block is hidden and the user does not know where the form errors are located.
pull/1269/head
Salvador Faria 2015-05-04 22:00:32 -04:00
rodzic 0fb4880acf
commit f19623b401
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -331,7 +331,7 @@ function initCollapsibleBlocks() {
$('.object.multi-field.collapsible').each(function() {
var $li = $(this);
var $fieldset = $li.find('fieldset');
if ($li.hasClass('collapsed')) {
if ($li.hasClass('collapsed') && $li.find('.error-message').length == 0) {
$fieldset.hide();
}