Bugzilla – Attachment 105574 Details for
Bug 25680
When adding a new patron and missing to fill a field, on saving, the invalidFocus should show the focused field clearly in view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
$("#entryform").validate focuses invalid field clearly in view.
entryformvalidate-focuses-invalid-field-clearly-in.patch (text/plain), 1.18 KB, created by
Timothy Alexis Vass
on 2020-06-05 11:30:28 UTC
(
hide
)
Description:
$("#entryform").validate focuses invalid field clearly in view.
Filename:
MIME Type:
Creator:
Timothy Alexis Vass
Created:
2020-06-05 11:30:28 UTC
Size:
1.18 KB
patch
obsolete
>From 89fca86f1a2e2c8202ed3ee4faf895579154e046 Mon Sep 17 00:00:00 2001 >From: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se> >Date: Fri, 5 Jun 2020 13:29:08 +0200 >Subject: [PATCH] $("#entryform").validate focuses invalid field clearly in > view. > >https://bugs.koha-community.org/show_bug.cgi?id=25680 >--- > koha-tmpl/intranet-tmpl/prog/js/members.js | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 1e102f1be7..c0eadb57d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -326,6 +326,15 @@ $(document).ready(function(){ > jQuery.validator.messages.phone); > > $("#entryform").validate({ >+ focusInvalid: false, >+ invalidHandler: function(form, validator) { >+ var errors = validator.numberOfInvalids(); >+ if (errors) { >+ window.scrollTo(0, 0); >+ validator.errorList[0].element.focus(); >+ window.scrollBy(0,$(window).height()/1.618); >+ } >+ }, > rules: { > email: { > email: true >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25680
:
105571
|
105574
|
105575
|
105576
|
105577
|
105619
|
105774