Bug 27410 - Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2
Summary: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks: 28168 26926
  Show dependency treegraph
 
Reported: 2021-01-12 10:24 UTC by Martin Renvoize
Modified: 2021-04-21 10:01 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00


Attachments
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 (1.90 KB, patch)
2021-01-20 01:51 UTC, Mazen Khallaf
Details | Diff | Splinter Review
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 (1.88 KB, patch)
2021-01-20 22:32 UTC, Mazen Khallaf
Details | Diff | Splinter Review
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 (1.93 KB, patch)
2021-01-21 14:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27410: (follow-up) Updates to accommodate currency entry (2.10 KB, patch)
2021-01-21 14:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 (1.98 KB, patch)
2021-02-18 18:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 27410: (follow-up) Updates to accommodate currency entry (2.15 KB, patch)
2021-02-18 18:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 27410: (follow-up) Updates to accommodate currency entry (2.26 KB, patch)
2021-03-04 12:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2 (2.03 KB, patch)
2021-03-04 12:32 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27410: (follow-up) Updates to accommodate currency entry (2.21 KB, patch)
2021-03-04 12:33 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-01-12 10:24:18 UTC
Inputs of type="number" need updating to adhere to ACC2 in intranet-tmpl/prog/en/modules/members/maninvoice.tt
Comment 1 Mazen Khallaf 2021-01-20 01:51:59 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2021-01-20 16:52:00 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 3 Mazen Khallaf 2021-01-20 22:32:34 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2021-01-21 00:34:56 UTC
I didn't predict this when I was testing before: The regex validating the modified field doesn't allow for currency-formatted values like "1.00" because of the dot.
Comment 5 Owen Leonard 2021-01-21 14:42:39 UTC
Created attachment 115551 [details] [review]
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2

Test Plan:
1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt
2. Search for instances of 'input type="number"'
3. If none are found then patch was successful

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2021-01-21 14:42:42 UTC
Created attachment 115553 [details] [review]
Bug 27410: (follow-up) Updates to accommodate currency entry

This patch makes two modifications in order to allow the entry of
currency strings (e.g. 1.25).

 - Inputmode changed to "decimal"
 - Regex pattern changed to "^\d+(\.\d{2})?$" as found in
   admin/debit_types.tt

To test, apply the patch and test entry of various strings in the manual
invoice "amount" field. Confirm that the field only accepts digits or
digits followed by a decimal and two digits.
Comment 7 David Nind 2021-02-18 18:16:39 UTC
Created attachment 117012 [details] [review]
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2

Test Plan:
1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt
2. Search for instances of 'input type="number"'
3. If none are found then patch was successful

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2021-02-18 18:16:42 UTC
Created attachment 117013 [details] [review]
Bug 27410: (follow-up) Updates to accommodate currency entry

This patch makes two modifications in order to allow the entry of
currency strings (e.g. 1.25).

 - Inputmode changed to "decimal"
 - Regex pattern changed to "^\d+(\.\d{2})?$" as found in
   admin/debit_types.tt

To test, apply the patch and test entry of various strings in the manual
invoice "amount" field. Confirm that the field only accepts digits or
digits followed by a decimal and two digits.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2021-03-04 12:27:55 UTC
Created attachment 117700 [details] [review]
Bug 27410: (follow-up) Updates to accommodate currency entry

This patch makes two modifications in order to allow the entry of
currency strings (e.g. 1.25).

 - Inputmode changed to "decimal"
 - Regex pattern changed to "^\d+(\.\d{2})?$" as found in
   admin/debit_types.tt

To test, apply the patch and test entry of various strings in the manual
invoice "amount" field. Confirm that the field only accepts digits or
digits followed by a decimal and two digits.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2021-03-04 12:28:21 UTC
I am personally very happy about these changes because we had to maintain them as local changes for a long time :)
Comment 11 Katrin Fischer 2021-03-04 12:32:56 UTC
Created attachment 117705 [details] [review]
Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2

Test Plan:
1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt
2. Search for instances of 'input type="number"'
3. If none are found then patch was successful

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-03-04 12:33:00 UTC
Created attachment 117706 [details] [review]
Bug 27410: (follow-up) Updates to accommodate currency entry

This patch makes two modifications in order to allow the entry of
currency strings (e.g. 1.25).

 - Inputmode changed to "decimal"
 - Regex pattern changed to "^\d+(\.\d{2})?$" as found in
   admin/debit_types.tt

To test, apply the patch and test entry of various strings in the manual
invoice "amount" field. Confirm that the field only accepts digits or
digits followed by a decimal and two digits.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2021-03-05 12:51:49 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 14 Fridolin Somers 2021-03-12 07:51:21 UTC
I've dediced not pushed to 20.11.x changes for ACC2
Comment 15 Katrin Fischer 2021-03-13 13:49:32 UTC
(In reply to Fridolin Somers from comment #14)
> I've dediced not pushed to 20.11.x changes for ACC2

Why not? These are very atomic and accessibility fixes are really more bug fixes than enhancements.
Comment 16 Fridolin Somers 2021-03-15 13:07:57 UTC
(In reply to Katrin Fischer from comment #15)
> (In reply to Fridolin Somers from comment #14)
> > I've dediced not pushed to 20.11.x changes for ACC2
> 
> Why not? These are very atomic and accessibility fixes are really more bug
> fixes than enhancements.

Ah OK.
I'll try to find time to pick them.
Comment 17 Peter Vashchuk 2021-04-21 09:09:15 UTC
Patch 117706 "Bug 27410: (follow-up) Updates to accommodate currency entry" doesn't take into consideration regional settings:
    inputmode="decimal" pattern="^\d+(\.\d{2})?$"
this never will let comma-separated values to pass (in Finland, for example, coma is used as separator), i.e. "0,00" won't pass.

Also there is another requirement from librarians - to have field completely empty if it's 0, so they could just paste amount (as they usually do) without the need to clear the field first. And anyway if you save the form with 0.00 value, it won't accept it saying "Debit amount passed is not positive" so in my opinion there's no point to preset it with zeroes to begin with.
Comment 18 Peter Vashchuk 2021-04-21 10:01:03 UTC
Let's continue discussion in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28168