Koha/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc
The Minh Luong 327be4a704 Bug 28576: Update the maximum size of an image.
This patch modifies the maximum size of a patron's image, from 500KB to
2MB. Also, in Home/Patrons/anyPatron, when you try to add an image to a
patron, you can now see the supported file types AND the maximum size.

The following places are affected by this patch:
- Home/Patrons/anyPatron
- Home/Tools/Upload patron images
- Home/Tools/Patron card creator/Images

To test:
1)Search for any patron and go to his page.
2)Hover over the image area on the left and click on the "Add" button.
3)Notice that the message above the choose file button only specifies
file types without the maximum size.
4)Add an image bigger than 500KB.
5)Nothing happens. (This is because the maximum size is 5KB)
6)Apply the patch.
7)Repeat steps from 1 to 3.
8)Notice that the message now includes the maximum size.
9)Add an image bigger than 500KB, but smaller than 2MB.
10)The image is succesfully uploaded.
11)Add an image bigger than 2MB.
12)Nothing happens. (The maximum size is now 2MB)
13)Repeat the steps 9 to 12 in "Home/Tools/Upload patron images" and
"Home/Tools/Patron card creator/Images".
14)Notice that the maximum size is updated.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-14 21:41:38 -10:00

57 lines
4.1 KiB
HTML

[% BLOCK asksysadmin %]<span>Please have your system administrator check the error log for details.</span>[% END %]
[% BLOCK b_batch %]<span>Batch: </span>[% END %]
[% BLOCK b_patronlist %]<span>Patron list: </span>[% END %]
[% BLOCK b_patronnumber %]<span>Patron number: </span>[% END %]
[% BLOCK b_layout %]<span>Layout: </span>[% END %]
[% BLOCK b_template %]<span>Template: </span>[% END %]
[% IF ( error || error_pdferr ) %]
<div class="dialog alert">
<p>
<strong>WARNING:</strong>
[% IF error_pdferr %]<span>Error while creating PDF file. </span>
[% IF error_errnocards %]<span>No cards created (empty batch or list?) </span>[% END %]
[% IF error_errba %][% INCLUDE b_batch %]<span class="ex">[%- error_errba | html -%]</span>[% END %]
[% IF error_errpl %][% INCLUDE b_patronlist %]<span class="ex">[%- error_errpl | html -%]</span>][% END %]
[% IF error_errpt %][% INCLUDE b_patronnumber %]<span class="ex">[%- error_errpt | html -%]</span>[% END %]
[% IF error_errlo %][% INCLUDE b_layout %]<span class="ex">[%- error_errlo | html -%]</span>[% END %]
[% IF error_errtpl %][% INCLUDE b_template %]<span class="ex">[%- error_errtpl | html -%]</span>[% END %]
[% INCLUDE asksysadmin %]
[% END %]
[% IF ( error == 101 ) %]
[% IF ( card_element ) %]<span>The database returned an error while saving [% card_element | html %] [% element_id | html %]. </span>
[% ELSE %]<span>The database returned an error while attempting a save operation. </span>[% END %][% INCLUDE asksysadmin %]
[% ELSIF ( error == 102 ) %]
[% IF ( card_element ) %]<span>The database returned an error while deleting [% card_element | html %] [% element_id | html %]. </span>
[% ELSIF ( image_ids ) %]<span>The database returned an error while deleting [% image_ids | html %]. </span>
[% ELSE %]<span>The database returned an error while attempting a delete operation. </span>[% END %][% INCLUDE asksysadmin %]
[% ELSIF ( error == 201 ) %]
[%IF ( element_id ) %]<span>An unsupported operation was attempted on [% card_element | html %] [% element_id | html %]. </span>
[% ELSE %]<span>An unsupported operation was attempted. </span>[% END %][% INCLUDE asksysadmin %]
[% ELSIF ( error == 202 ) %]
<span>An error has occurred. </span>[% INCLUDE asksysadmin %]
[% ELSIF ( error == 203 ) %]
<span>A non-existent or invalid library code was supplied. Please verify that you have a library set. </span><a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
[% ELSIF ( error == 301 ) %]
<span>An error has occurred while attempting to upload the image file. </span>[% INCLUDE asksysadmin %]
[% ELSIF ( error == 302 ) %]
<span>Image exceeds 2MB. Please resize and import again. </span>
[% ELSIF ( error == 303 ) %]
<span>The database image quota currently only allows a maximum of [% image_limit | html %] images to be stored at any one time. Please delete one or more images to free up quota space. </span>
[% ELSIF ( error == 304 ) %]
<span>An image with the name '[% IMAGE_NAME | html %]' already exists.</span>
[% ELSIF ( error == 401 ) %]
<span>An error has occurred and no items have been added to batch [% batch_id | html %]. </span>[% INCLUDE asksysadmin %]
[% ELSIF ( error == 402 ) %]
<span>No items added because the library is not set. Please set your library before adding items to a batch. </span><a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
[% ELSIF ( error == 403 ) %]
<span>An error has occurred and the item(s) was not removed from batch [% batch_id | html %]. </span>[% INCLUDE asksysadmin %]
[% ELSIF ( error == 404 ) %]
<span>An error has occurred and batch [% batch_id | html %] was not deleted. </span>[% INCLUDE asksysadmin %]
[% ELSIF ( error == 405 ) %]
<span>An error has occurred and batch [% batch_id | html %] was not fully de-duplicated. </span>
[% END %]
</p>
</div>
[% END %]