Bug 27412

Summary: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Staff interfaceAssignee: James O'Keeffe <jamespfk>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, caroline.cyr-la-rose, gmcharlt, jamespfk
Version: MainKeywords: Academy
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 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2
Bug 27412: Update tools/overduerules.tt to adhere to ACC2

Description Martin Renvoize 2021-01-12 10:26:34 UTC
Inputs of type="number" need updating to adhere to ACC2 on intranet-tmpl/prog/en/modules/tools/overduerules.tt
Comment 1 Aleisha Amohia 2021-01-18 03:11:57 UTC
Hi Martin, I tried to find more information on this and was probably searching for the wrong thing. Can you please provide a resource for ACC2?
Comment 2 Aleisha Amohia 2021-01-18 03:13:04 UTC
(In reply to Aleisha Amohia from comment #1)
> Hi Martin, I tried to find more information on this and was probably
> searching for the wrong thing. Can you please provide a resource for ACC2?

Never mind, just saw the comment on Bug 26926 :)
Comment 3 Martin Renvoize 2021-01-18 09:02:50 UTC
Sorry, I should have linked to the Guidelines.. https://wiki.koha-community.org/wiki/Coding_Guidelines#ACC2:_Input_type_.22number.22_should_be_avoided

Splitting them up into lots of tiny bugs as requested by Katrin took me a little while and I didn't think to add the link to all bugs.
Comment 4 James O'Keeffe 2021-01-20 01:09:14 UTC Comment hidden (obsolete)
Comment 5 Catherine 2021-01-20 01:46:35 UTC Comment hidden (obsolete)
Comment 6 Catherine 2021-01-20 01:52:00 UTC
Created attachment 115395 [details] [review]
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2

This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*"

Test plan:
Open the file and ensure that no other inputs of type="number
were missed.
Comment 7 Owen Leonard 2021-01-20 17:03:46 UTC
There is more to do when converting a "type='number'" input: If present, the "step," "max," and "min" attributes should be removed too. They are invalid if applied to a standard text input. Example errors from the w3c validator:

Error: Attribute step not allowed on element input at this point.
Error: Attribute min not allowed on element input at this point.
Comment 8 James O'Keeffe 2021-01-20 20:35:33 UTC
Created attachment 115455 [details] [review]
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2

This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*"
The "min" attribute has also been removed (Thanks Owen)

Test plan:
Open the file and ensure that no other inputs of type="number
were missed.
Comment 9 Owen Leonard 2021-01-21 00:10:04 UTC
Created attachment 115479 [details] [review]
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2

This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*"
The "min" attribute has also been removed (Thanks Owen)

Test plan:
Open the file and ensure that no other inputs of type="number
were missed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Martin Renvoize 2021-01-21 10:14:26 UTC
Created attachment 115519 [details] [review]
Bug 27412: Update intranet-tmpl/prog/en/modules/tools/overduerules.tt to adhere to ACC2

This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*"
The "min" attribute has also been removed (Thanks Owen)

Test plan:
Open the file and ensure that no other inputs of type="number
were missed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2021-01-21 10:15:16 UTC
Great work, thank James.

Passing QA
Comment 12 Jonathan Druart 2021-01-21 14:55:52 UTC
Created attachment 115557 [details] [review]
Bug 27412: Update tools/overduerules.tt to adhere to ACC2

This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*"
The "min" attribute has also been removed (Thanks Owen)

Test plan:
Open the file and ensure that no other inputs of type="number
were missed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Jonathan Druart 2021-01-21 15:25:35 UTC
Pushed to master for 21.05, thanks to everybody involved!