Bug 28134

Summary: Replace use of input type number in onboarding templates
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, caroline.cyr-la-rose, fridolin.somers, gmcharlt, jamespfk, jonathan.druart, martin.renvoize, testopia
Version: Main   
Hardware: All   
OS: All   
URL: https://wiki.koha-community.org/wiki/Coding_Guidelines#ACC2:_Input_type_.22number.22_should_be_avoided
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Bug Depends on:    
Bug Blocks: 26926    
Attachments: Bug 28134: Replace use of input type number in onboarding templates
Bug 28134: Replace use of input type number in onboarding templates
Bug 28134: Replace use of input type number in onboarding templates

Description Owen Leonard 2021-04-12 10:13:06 UTC
Inputs of type="number" need updating to adhere to ACC2 in onboarding templates

koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt                                                
koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt
Comment 1 Owen Leonard 2021-04-12 10:58:44 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-04-12 11:35:35 UTC
Created attachment 119451 [details] [review]
Bug 28134: Replace use of input type number in onboarding templates

This patch changes the instances of input of type="number" to input
type="text" with attributes inputmode="numeric" and pattern="[0-9]*"

To test, apply the patch and run through the process of installing Koha.
When you reach onboarding step 2, "Create a patron category," check the
enrollment period -> "In months" field. The field should not accept any
input except numbers.

Continue onboarding until step 5, "Create a new circulation rule." On
this page, check that these fields accept only numbers:

 - Current checkouts allowed
 - Loan period
 - Renewals allowed
 - Renewals period
 - Holds allowed (total)
 - Holds allowed (daily)
 - Holds per record (count)
Comment 3 Martin Renvoize 2021-05-04 10:40:10 UTC
Created attachment 120435 [details] [review]
Bug 28134: Replace use of input type number in onboarding templates

This patch changes the instances of input of type="number" to input
type="text" with attributes inputmode="numeric" and pattern="[0-9]*"

To test, apply the patch and run through the process of installing Koha.
When you reach onboarding step 2, "Create a patron category," check the
enrollment period -> "In months" field. The field should not accept any
input except numbers.

Continue onboarding until step 5, "Create a new circulation rule." On
this page, check that these fields accept only numbers:

 - Current checkouts allowed
 - Loan period
 - Renewals allowed
 - Renewals period
 - Holds allowed (total)
 - Holds allowed (daily)
 - Holds per record (count)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2021-05-04 10:40:37 UTC
Catches all cases and works as expected.. Signing off.
Comment 5 Martin Renvoize 2021-05-04 10:53:40 UTC
I think we can safely use my SO as a PQA. This is a trivial fix on a set of integer inputs so no ambiguity around decimal handling.

PQA
Comment 6 Jonathan Druart 2021-05-04 13:25:06 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 7 Fridolin Somers 2021-05-11 13:56:49 UTC
Enhancement not pushed to 20.11.x