kopia lustrzana https://github.com/wagtail/wagtail
Fix #94. Panels are now hidden on page load if they are marked as
deleted after a form validation failure.stable/0.3.x
rodzic
2d7a276b83
commit
a5072c768d
|
@ -181,6 +181,17 @@ function InlinePanel(opts) {
|
||||||
self.updateMoveButtonDisabledStates();
|
self.updateMoveButtonDisabledStates();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide container on page load if it is marked as deleted. Remove the error
|
||||||
|
message so that it doesn't count towards the number of errors on the tab at the
|
||||||
|
top of the page. */
|
||||||
|
if ( $('#' + deleteInputId).val() === "1" ) {
|
||||||
|
$('#' + childId).hide(0, function() {
|
||||||
|
self.updateMoveButtonDisabledStates();
|
||||||
|
self.setHasContent();
|
||||||
|
});
|
||||||
|
$('#' + childId).find(".error-message").remove();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.formsUl = $('#' + opts.formsetPrefix + '-FORMS');
|
self.formsUl = $('#' + opts.formsetPrefix + '-FORMS');
|
||||||
|
|
Ładowanie…
Reference in New Issue