Bugzilla – Attachment 119155 Details for
Bug 27805
Use input type "email" for email preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27805: Use input type "email" for email preferences
Bug-27805-Use-input-type-email-for-email-preferenc.patch (text/plain), 1.88 KB, created by
Katrin Fischer
on 2021-04-03 14:14:20 UTC
(
hide
)
Description:
Bug 27805: Use input type "email" for email preferences
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-04-03 14:14:20 UTC
Size:
1.88 KB
patch
obsolete
>From ebda36c876697428af3bc066150bd4c7ba2ec8c5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 26 Feb 2021 12:43:28 +0000 >Subject: [PATCH] Bug 27805: Use input type "email" for email preferences > >This patch changes the way input fields are output in the system >preferences template for preferences which have an "email" class. The >input type will now be "email" instead of "text." > >Email type inputs are "loosely" validated. Mozilla's documentation says >valid patterns are "username@domain or username@domain.tld," so Koha's >default "root@localhost" will still work. > >The other advantage of an "email" type input is that it typically >triggers different keyboard options in mobile devices. > >To test, apply the patch and go to Administration -> Global system >preferences. > >- Search system preferences for "email." >- Test the email type preferences you find (e.g. KohaAdminEmailAddress, > ReplytoDefault, SendAllEmailsTo), confirming that email > addresses like username@domain or username@domain.tld work correctly. >- Confirm that any other value triggers a validation error. > >Signed-off-by: Amit Gupta <amitddng135@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/preferences.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index dc4bc0b5d3..20f9f6f4cd 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -72,6 +72,8 @@ sub _get_chunk { > > if ( $options{'class'} && $options{'class'} eq 'password' ) { > $chunk->{'input_type'} = 'password'; >+ } elsif ( $options{'class'} && $options{'class'} eq 'email' ) { >+ $chunk->{'input_type'} = 'email'; > } elsif ( $options{'class'} && $options{'class'} eq 'date' ) { > $chunk->{'dateinput'} = 1; > } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { >-- >2.11.0
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 27805
:
117733
|
118712
|
118952
| 119155 |
119156