Summary: | Use input type "email" for email preferences | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | System Administration | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | amitddng135, fridolin.somers, gmcharlt |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch modifies the global system preferences interface so that fields which ask for an email address have the correct HTML attribute type: email. This allows some basic email address validation by the browser and can enable different keyboard options on devices with onscreen keyboards.
|
Version(s) released in: |
21.05.00
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 31376 | ||
Attachments: |
Bug 27805: Use input type "email" for email preferences
Bug 27805: Use input type "email" for email preferences Bug 27805: (follow-up) Update more instances Bug 27805: Use input type "email" for email preferences Bug 27805: (follow-up) Update more instances |
Description
Owen Leonard
2021-02-26 12:42:06 UTC
Created attachment 117733 [details] [review] 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. Created attachment 118712 [details] [review] Bug 27805: Use input type "email" for email preferences 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. Hi Owen, this works for most, but I found some we still need to set the email class for: NoticeBcc ILLDefaultStaffEmail PayPalUser EmailSMSSendDriverFromAddress Could we deal with those in a follow-up please? Created attachment 118952 [details] [review] Bug 27805: (follow-up) Update more instances This patch updates some preferences I missed in the first round: - NoticeBcc - ILLDefaultStaffEmail - PayPalUser - EmailSMSSendDriverFromAddress I've also modified the preferences CSS so that fields with type "email" are styled the same as fields with the "long" class to give more room for email addresses. Created attachment 119155 [details] [review] 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> Created attachment 119156 [details] [review] Bug 27805: (follow-up) Update more instances This patch updates some preferences I missed in the first round: - NoticeBcc - ILLDefaultStaffEmail - PayPalUser - EmailSMSSendDriverFromAddress I've also modified the preferences CSS so that fields with type "email" are styled the same as fields with the "long" class to give more room for email addresses. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! Enhancement not pushed to 20.11.x |