Bug 15828 - Upload patron images is hard to read
Summary: Upload patron images is hard to read
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-16 03:03 UTC by Aleisha Amohia
Modified: 2017-06-14 22:05 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
upload patron images (14.55 KB, image/png)
2016-02-16 03:03 UTC, Aleisha Amohia
Details
Bug 15828 - Upload patron images is hard to read (5.28 KB, patch)
2016-02-16 18:04 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 15828: Upload patron images is hard to read (5.28 KB, patch)
2016-02-16 19:56 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15828: Upload patron images is hard to read (5.33 KB, patch)
2016-02-22 11:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15828: Remove the required class on label (1.38 KB, patch)
2016-02-22 11:10 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2016-02-16 03:03:39 UTC
Created attachment 48085 [details]
upload patron images

See attachment - Uses tiny text and input field. Should be bigger
Comment 1 Owen Leonard 2016-02-16 18:04:29 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-02-16 19:56:54 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-02-22 11:08:57 UTC
Comment on attachment 48149 [details] [review]
[SIGNED-OFF]Bug 15828: Upload patron images is hard to read

Review of attachment 48149 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt
@@ +129,5 @@
> +                                <li id="cardnum">
> +                            [% ELSE %]
> +                                <li id="cardnum" style="display: none">
> +                            [% END %]
> +                                <label for="cardnumber" class="required">Enter patron cardnumber: </label>

Are you sure you wanted to add the required class to the label?
Comment 4 Jonathan Druart 2016-02-22 11:10:30 UTC
Created attachment 48273 [details] [review]
Bug 15828: Upload patron images is hard to read

The styling of the patron image upload form causes the text to be
smaller than it should be for the main body of a page. This patch
revises the form style and cleans up the markup a bit.

This patch also adds client-side validation of the form so that a file
upload is required, and a card number is required if an image file is
selected.

To test, apply the patch and go to Tools -> Upload patron images.

1. Confirm that the text in the form is the correct size.
2. With "Zip file" selected, confirm that submitting the form is blocked
   and the file upload marked as required.
3. With "Image file" selected, confirm that submitting the form
   with an empty card number field is blocked and the card number
   field is marked as required.
4. Confirm that uploading zip files and single images still works
   correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2016-02-22 11:10:34 UTC
Created attachment 48274 [details] [review]
Bug 15828: Remove the required class on label

Otherwise the label is red and a bit agressive :)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Owen Leonard 2016-02-22 14:48:27 UTC
> Otherwise the label is red and a bit agressive :)

I realize it's odd to see a single label with the required class rather than one among other non-required fields, but it is the class we use for required field labels. See for example the patron entry form. I think that for consistency's sake it should be used.
Comment 7 Brendan Gallagher 2016-02-24 03:36:04 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks.