kopia lustrzana https://github.com/wagtail/wagtail
Prevent spinner from spinning on required form entry
rodzic
b39ff4a134
commit
7de9b51f6f
|
@ -46,6 +46,7 @@ Changelog
|
|||
* Fix: Redirects no longer fail when both a site-specific and generic redirect exist for the same URL path (Nick Smith, João Luiz Lorencetti)
|
||||
* Fix: Wagtail now checks that Group is registered with the Django admin before unregistering it (Jason Morrison)
|
||||
* Fix: Previewing inaccessible pages no longer fails with `ALLOWED_HOSTS = ['*']` (Robert Rollins)
|
||||
* Fix: The submit button 'spinner' no longer activates if the form has client-side validation errors (Jack Paine, Matt Westcott)
|
||||
|
||||
|
||||
1.4.3 (04.04.2016)
|
||||
|
|
|
@ -20,3 +20,4 @@ Bug fixes
|
|||
* Redirects no longer fail when both a site-specific and generic redirect exist for the same URL path (Nick Smith, João Luiz Lorencetti)
|
||||
* Wagtail now checks that Group is registered with the Django admin before unregistering it (Jason Morrison)
|
||||
* Previewing inaccessible pages no longer fails with ``ALLOWED_HOSTS = ['*']`` (Robert Rollins)
|
||||
* The submit button 'spinner' no longer activates if the form has client-side validation errors (Jack Paine, Matt Westcott)
|
||||
|
|
|
@ -223,6 +223,13 @@ $(function() {
|
|||
var reEnableAfter = 30;
|
||||
var dataName = 'disabledtimeout'
|
||||
|
||||
// Check the form this submit button belongs to (if any)
|
||||
var form = $self.closest('form').get(0);
|
||||
if (form && form.checkValidity && (form.checkValidity() == false)) {
|
||||
// ^ Check form.checkValidity returns something as it may not be browser compatible
|
||||
return;
|
||||
}
|
||||
|
||||
// Disabling a button prevents it submitting the form, so disabling
|
||||
// must occur on a brief timeout only after this function returns.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue