Fix #94. Panels are now hidden on page load if they are marked as

deleted after a form validation failure.
stable/0.3.x
Tom Talbot 2014-05-29 15:02:56 +01:00 zatwierdzone przez Matt Westcott
rodzic 2d7a276b83
commit a5072c768d
2 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -181,6 +181,17 @@ function InlinePanel(opts) {
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');