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();
|
||||
});
|
||||
}
|
||||
|
||||
/* 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');
|
||||
|
|
|
@ -5,7 +5,7 @@ from django.contrib import messages
|
|||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.contrib.auth.decorators import permission_required
|
||||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.vary import vary_on_headers
|
||||
|
||||
from wagtail.wagtailadmin.edit_handlers import TabbedInterface, ObjectList
|
||||
|
|
Ładowanie…
Reference in New Issue