nikku/jquery-bootstrap-scripting

Enter key is not submitting the login form

Opened this issue · 0 comments

where should i made changes.
var Login = function () {
var e = function () {
$(".login-form").validate({
errorElement: "span",
errorClass: "help-block",
focusInvalid: !1,
rules: {username: {required: !0}, password: {required: !0}, remember: {required: !1}},
messages: {username: {required: "Username is required."}, password: {required: "Password is required."}},
invalidHandler: function (e, r) {
$(".alert-danger", $(".login-form")).show()
},
highlight: function (e) {
$(e).closest(".form-group").addClass("has-error")
},
success: function (e) {
e.closest(".form-group").removeClass("has-error"), e.remove()
},
errorPlacement: function (e, r) {
e.insertAfter(r.closest(".input-icon"))
},
submitHandler: function (e) {
e.submit()
}
}), $(".login-form input").onkeypress(function (e) {
return 13 == e.which ? ($(".login-form").validate().form() && $(".login-form").submit(), !1) : void();
})
}, r = function () {
$(".forget-form").validate({
errorElement: "span",
errorClass: "help-block",
focusInvalid: !1,
ignore: "",
rules: {email: {required: !0, email: !0}},
messages: {email: {required: "Email is required."}},
invalidHandler: function (e, r) {
},
highlight: function (e) {
$(e).closest(".form-group").addClass("has-error")
},
success: function (e) {
e.closest(".form-group").removeClass("has-error"), e.remove()
},
errorPlacement: function (e, r) {
e.insertAfter(r.closest(".input-icon"))
},
submitHandler: function (e) {
e.submit()
}
}), $(".forget-form input").onkeypress(function (e) {
return 13 == e.which ? ($(".forget-form").validate().form() && $(".forget-form").submit(), !1) : void();
}), jQuery("#forget-password").click(function () {
jQuery(".login-form").hide(), jQuery(".forget-form").show()
}), jQuery("#back-btn").click(function () {
jQuery(".login-form").show(), jQuery(".forget-form").hide()
})
},