This patch changes the colour of the navigation
links on the OPAC (Cart, Lists etc.) to improve
the contrast ration and make them easier to read.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to check the contrast
ratio on the OPAC
2. Confirm that the navigation links have
insufficient contrast
3. Apply the patch and rebuild the OPAC css:
yarn build --view opac
4. Use the accessibility tool to confirm
the contrast ratio meets the minimum
accessibility requirements
5. Check that the OPAC looks ok after the
changes
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Remove forgotten code of the old legacy demo functionality that was
removed from elsewhere except systempreferences, this code not only
serves no purpose but also is causing some troubles for our customers.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
While moving the dropdown to a block, I noticed the page size was very large when there are many holds
This patch chomps a large amoutn of whitespace, from the block and elsewhere and drecreased the paeg from about 400k lines to 25k lines for a record with ~200 holds
To test:
1 - Apply previous patch
2 - Load holds tab for a biblio
3 - Save the page as html from your browser, note the size of the file
4 - Apply patch this
5 - Reload and repeat
6 - Note the size is much smaller
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes a few changes:
1 - If we are not splitting the queue ( HoldsSplitQueue == 'nothing' ) then
there are no changes for 'virtual' vs 'actual' numbering
2 - If we are splitting the queue you cannot use the dropdown, so we do not need to process the options
3 - If the hold is 'found' we do not need to process the options
4 - We can simply use the 'last priority' to build the options, we do not need to process in the script
5 - We can use a block to build the options
6 - Remove a stray holds.index
To test:
1 - Place 5 holds on a bib
2 - 'Find' two of the holds i.e. check them in to set status to 'transit' or 'waiting'
3 - View the holds page for the biblio
4 - Inspect the priorty dropdown for the found holds, note they have options for 1-5 but are disabled
5 - Note the dropdowns for other holds have options 1-5
6 - Note options 4&5 in the dropdowns have no effect
7 - Apply patch
8 - Inspect the priority dopdowns on the found holds
9 - Note they only show their found status
10 - Note the other dropdowns only show options 1-3
11 - Test with other HoldsSplitQueue options and HoldsSplitQueueNumbering
12 - When holds queue is split, no dropdowns should be active and should show only their current priority
13 - When HoldsSplitQueueNumbering is 'virtual' the dropdown should be disabled and correctly count the number of unfound holds in the list
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
JK: Fixed grammar in commit title
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
JD: Remove trailing 'i'
Bug 29049: (QA follow-up) Remove excessive whitespace
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note that we treat the elements 18-34 as one block of elements,
since its subdivision may vary.
E.g. if you pass 24 characters to the form, it will use the first
18 chars (until the last complete element) and pad with default
elements from position 18-39.
Test plan:
[1] Go to addbiblio. Make sure that 008 is connected to the plugin.
[2] Backspace field 008 a bit, click on the plugin button.
[3] Verify that the last elements come from the default.
[4] Repeat for a few different lengths.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Run t/db_dependent/FrameworkPlugin.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Caused by
commit 61a39b0dd5
Bug 23916: (QA follow-up) Adapt all the things to the new column and accessor names
- [% INCLUDE 'patron-title.inc' patron=checkout.issued_by %]
+ [% INCLUDE 'patron-title.inc' patron=checkout.issuer_id %]
It must have been patron=checkout.issuer as patron-title.inc is
expecting a Koha::Patron object, not a borrowernumber.
Test plan:
Turn RecordStaffUserOnCheckout on
Check an item out then in
Go to the biblio checkout history and confirm that the "Checked out by"
column contains the logged in librarian's name.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
When preference CircAutoPrintQuickSlip is 'clear the screen', when an empty barcode field is submitted in circulation :
Before Bug 17845, behavior was to display empty circulation page (no patron selected).
Now behavior is displaying the circulation page of current patron.
I think previous behavior was used when scanner is used to clear form and wait for another patron card to be scanned.
Test plan :
1) Set system preference CircAutoPrintQuickSlip to 'clear the screen'
2) Go to a patron circulation page
3) Post form without a barcode
=> Check you go to circulation page with no patron selected
4) Set system preference CircAutoPrintQuickSlip to 'open a print quick slip window'
5) Go to a patron circulation page
6) Post form without a barcode
=> Check you go to print quick slip window with correct datas
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Actually this rule does nothing, it defines same background color as "body" : #fcf9fc
Test plan :
1) Without patch look at OPAC header
2) With patch OPAC header should have same background color
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Since preference OpacMainUserBlock is now an HTML customization,
there is actually an HTML tags with id="opacmainuserblock" and one with id="OpacMainUserBlock".
Same for OPACNavRight in opac-registration-confirmation.tt
This patch removed id from page to keep the one comming from HTML customization include.
Test plan :
1) Create an HTML customization for OpacMainUserBlock with some text
2) Go to OPAC main page
3) Check HTML code of the page
4) Check you see id="OpacMainUserBlock" once and not id="opacmainuserblock"
5) Same for id="opacnavright" in opac-registration-confirmation.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Recent Firefox versions try to prefill userid and password with
logged in user credentials.
To test
1 - Log in staff as user foo password bar
2 - Save user and password in Firefox
3 - Log out
4 - Log in again, log in pop-up must be pre-filled
5 - Open Create a new patron form
6 - At least password field is pre-filled with logged in user's credentials
7 - Apply patch
8 - Redo 4 and 5
9 - Userid and password fields aren't prefilled
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes some corrections to additional contents to allow
content to be deleted. The wrong parameter was being passed to the
script. The script was also not handling multiple deletions correctly.
The patch also adds a "category" parameter to the delete operation so
that the page is redirected correctly.
The patch also changes some strings which referred to "news"
referencing operations which might be performed on news or on HTML
customizations, e.g.:
"Are you sure you want to delete the selected content?" instead of "Are
you sure you want to delete the selected news?"
To test, apply the patch and go to Tools -> News.
- Create multiple news items if necessary.
- Test the "Delete" button corresponding to a single news item:
- Clicking the button should ask you to confirm.
- Check that the wording of the message is correct.
- After confirming the news item should be deleted.
- Ideally, test on news items which are on the second page of the
DataTable of news items.
- Test the process of deleting multiple news items at once:
- Check the checkbox next to multiple items.
- Click the "Delete selected" button at the bottom of the page.
- Check that the wording of the confirmation message is correct.
- After you confirm, the items should be deleted.
- Repeat these tests under Tools -> HTML customizations to confirm that
redirects work correctly. After deleting an HTML customization you
should be redirected back to the list of HTML customizations.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch remove a check for confirm when fetching the entries
for possible deletion from the zebraqueue
Without this we die when we try to access the entries for counting
To test:
1 - perl misc/cronjobs/cleanup_database.pl --sessions --zebraqueue 10 --list-invites --z3950 --logs 180 --mail 375 -v
2 - Dies
3 - Apply patch
4 - Repeat 1
5 - Success!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
DefaultHldexpirationDate is set in the pref screen to 'yes/no'
The code checks if the preference is 'true', 'no' is true
We should instead use 1/0
To test:
0 - Have a fresh devbox
1 - With syspref disabled, place a hold
2 - Note no expiration date set
3 - Enable the preference
4 - Place a hold and note the expiration date is set, good
5 - Disable the pref
6 - Place a hold and note the expiration date is set, bad
7 - Apply patch
8 - Update database
9 - Repeat 1-8, date not set when pref disabled
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 28534: (follow-up) Don't adjust original DB update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I can't see how this will ever get thrown, but as it's there we should
have the template handling included.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch updates the exceptions thrown by Koha::Email to include the
parameter that failed email validation and then updates the failure code
to include this parameter and finally display this field in the template.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a try/catch block around the call to Koha::Email->create
to catch and handle invalid emails being passed in the parameters.
The message is marked as 'failed' with an error_code of 'INVALID_EMAIL'.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch updates Letters.t to confirm that invalid email addresses in
the message_queue should not throw an exception when sending mail but
instead set the status to failed and pass error details to the end user.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To ease testing and future changes if needed.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a new dependency, Email::Address. It is used in
Koha::Email to replace the current use of Email::Valid, which proved to
be problematic when it comes to UTF-8 characters.
Email::Address provides suitable regexes that -when used- keep our
tests passing, but also deal better with UTF-8 data.
To test:
1. Apply the regression tests patch
2. Notice the only change is that it tweaks a couple addresses so they
contain umlauts and also have the "Description <address>" format that
is used when sending carts.
3. Run:
$ kshell
k$ prove t/Koha/Email.t
=> FAIL: Tests fail! Things die because Email::Valid doesn't like the
from we passed.
4. Run:
$ sudo apt install libemail-address-perl
5. Apply this patch
6. Repeat 3
=> SUCCESS: Tests pass!
7. Try what is described in comment 1
=> SUCCESS: Things are back to normal
8. Sign off :-D
9. Send cookies
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds an initial text explaining the valid authentication
mechanisms Koha has for the API.
My first approach included information about the controlling sysprefs,
but I decided to remove it, as it is not usual for API consumers to be
presented such detailed internal information which is probably
confusing. We could add a link to the manual, but that's not the point I
think.
I've added an entry about error messages and how we thougth about them.
It is copied from Docker Engine's API docs.
This is my 2 cents.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch takes strings defined as variables in opac-bottom.inc for use
in overdrive.js and moves them to overdrive.js, wrapped in the
double-underscore translation function.
To test you must have valid credentials entered in system preferences
for the OverDrive API. Ideally you should test using a patron who has
holds and current checkouts in OverDrive.
Apply the patch and log in to the OPAC.
- On the "Your summary" page, open the "OverDrive Account" tab.
- Log in to your OverDrive account.
- The contents of the tab should display correctly, with correct
labels for controls like "Log out of your OverDrive account", "Check
in", "On hold", etc.
- Perform a catalog search which will return results also found in your
OverDrive collection.
- Open the OverDrive results page.
- The page should display correctly, with correct labels on controls
like "Check out" and "Place hold."
To test that the correct strings are translatable. In this example I'm
testing fr-FR:
- Update a translation:
> gulp po:update
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from
JavaScript e.g. misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from bootstrap/js/overdrive.js for
translation, e.g.:
koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js:124
msgid "OverDrive account page"
msgstr ""
- Edit the "msgstr" string however you want (it's just for testing)
- Install the updated translation:
> perl translate install fr-FR
In the OPAC, switch to the language you're testing. Confirm that your
translated strings appear. In the above example, the string should
appear at the top of the "Overdrive Account" tab.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amend the workaround (from but 2206) to only show subfield "9" in editor if
subfield "a" has the editor-visibility bit set.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch add context to the term Term in the context of course reserves.
To test:
0- Apply patch
Set up course reserves
1- Enable UseCourseReserves
2- Create at least one authorized value for DEPARTMENT
3- Create at least one authorized value for TERM
4- Create a course
5- Add at least one item to the course
Check the terms:
6- Go to the OPAC
7- Go to Course reserves
** 8- In the list of courses, check the Term column heading
9- Go to the staff interface
10- Go to Course reserves
** 11- In the list of courses, check the Term column heading
12- Click on the course name
** 13- Check the Term line in the course description
Add a new language (fr-CA in the example, change for whatever language code you want)
14- In a terminal, run
gulp po:create --lang fr-CA
15- Then, run
gulp po:update --lang fr-CA
16- In system preferences, enable the new language in language and OpacLanguages
17- Switch the language in staff interface and OPAC
Change the translations
18- In your favourite text editor, open fr-CA-messages.po
19- Find the string 'msgctxt Semester'
20- Enter a word in msgstr
21- Save the file
22- In a terminal, go to misc/translator
23- Run
./translate install fr-CA
Check the translations
24- Redo the steps to check the terms (6-16) and make sure the terms in steps 8, 11, and 13 are changed for the word you put in step 20.
25- Optionally, check the following pages to make sure the terms are not the word you put in step 20 (these pages shouldn't have been changed)
- opac-tags (your account > your tags)
- opac-authorities (search for an authority in Authority search)
- review (tags in staff interface)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit sorts metadata by key prior to preparing a notice with it
Test plan:
- Do not apply patch
- Create a report with the following SQL:
SELECT * FROM message_queue;
- Create an ILL request with plenty of metadata
- Go to "Manage request"
- Send a notice to a patron
- Run the report created earlier
=> TEST:
- Observe that the metadata is in random order
- Apply the patch
- Create an ILL request with plenty of metadata
- Go to "Manage request"
- Send a notice to a patron
- Run the report created earlier
=> TEST:
- Observe that the metadata is now sorted alphabetically by key
Signed-off-by: Jill Tivey <Jill.Tivey@sasa.gov.scot>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: remove commented line
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
<sigh> This commit fixes the incorrect bug fix from the previous commit
Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If a row object doesn't have a 'links' property, calling 'length' on it
will fail. This commit fixes this.
Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit adds support for the new 'links' property that will allow an
availability plugin to return an array of links for a result. These
links are parsed and appended to the title field of a results record.
Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
As requested in comment #49, renamed uses of AcqLog to AcquisitionLog
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
JD amended patch: replace one missing occurrence in Budgets.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Basket creation involves two steps in Koha, creating the basket then
modifying its header. We were logging these two steps in the wrong
order. This commit fixes that.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In response to Jonathan's request for tests, I have now added additional
tests for the methods in C4/Budgets.pm that do logging
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit makes changes in response to Jonathan's feedback in comment
- Moved from using zero padded strings to store log data to a JSON
object
- Stopped storing formatted dates in logged data
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>