improved form

This commit is contained in:
andmironov 2016-12-15 15:21:14 +03:00
parent a9fca6022a
commit 2611824eff
1 changed files with 2 additions and 4 deletions

View File

@ -323,15 +323,12 @@
groups: mc.getGroups(), groups: mc.getGroups(),
highlight: function(element, errorClass, validClass) { highlight: function(element, errorClass, validClass) {
shakeForm()
showErrorMessage()
}, },
// Place a field's inline error HTML // Place a field's inline error HTML
errorPlacement: function(error, element) { errorPlacement: function(error, element) {
$('.email-form__error-message').html(error);
enableInputs(); enableInputs();
showErrorMessage();
}, },
invalidHandler: function() { invalidHandler: function() {
@ -342,6 +339,7 @@
showErrors: function(errorMap, errorList) { showErrors: function(errorMap, errorList) {
var content = errorMap.EMAIL; var content = errorMap.EMAIL;
showErrorMessage(content); showErrorMessage(content);
shakeForm()
}, },
// Submit the form via ajax (see: jQuery Form plugin) // Submit the form via ajax (see: jQuery Form plugin)