Commit graph

16780 commits

Author SHA1 Message Date
b5307bb6cb Bug 26534: (QA follow-up) Fix CSS declaration
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
26c717fcd4 Bug 26534: Add Font Awesome icon only for staff patrons
In patron pages it would help to see an icon indicating that this is a staff patron (having permission to access staff interface).
This may avoid wrong patron deletion or permission mistakes.
I propose the shield Font Awesome icon and a grey background

Patch also shows patron name and cardnumber aligned center instead of right.
Patch adds to 'patroninfo' div a class 'staffgrade' or 'normalgrade' to
allow more styling depending on patron beeing staff or not.

Test plan:
Compare display between a patron having staff interface access and one without permissions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
Katrin Fischer
46197752aa Bug 26643: (QA follow-up) Fix typo in message
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
bbd86d7a30 Bug 26643: Notify librarian of completed transfers
It came to light that it's not clear to all users that a checkin results
in the completion of a transfer if one exists for the item being checked
in.  This patch adds such a notification to the error messages loop to
highlight that the item has been recieved from it's sending brnach.

To test
1/ Setup a transfer from branch A to branch B
2/ Check the item in at branch B
3/ Note that a new message appears in the 'Check in message' alert box
saying "Item recieved from branch A"
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
f87f64c41f Bug 26536: WRITEOFF not writeoff
There is inconsistency in variable case between the controller script
and the template. This patch corrects those inconsistencies.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 11:20:40 +02:00
8eb68c082a Bug 26595: Embed the whole smtp_server object
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 15:53:38 +02:00
1a62e3e030 Bug 26595: Add SMTP server column to libraries table
This patch makes the libraries datatable render the assigned SMTP server
on each row. 'Default' will be rendered when the system default is
detected. A link to the SMTP server config will be rendered when a real
SMTP server is assigned.

To test:
1. Apply this patches, reload al the things
2. Visit the libraries table
=> SUCCESS: There's an SMTP server column displaying the right thing
3. Assign an SMTP server to a library
=> SUCCESS: The table displays the server name as a link
=> SUCCESS: The link correctly points to the SMTP server config page
4. Sign off

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 15:53:38 +02:00
Timothy Alexis Vass
096327cfcd Bug 26647: Add translation context to cancel hold button in OPAC
0) Apply the patch and add a hold on an item.
1) Install Swedish language, sv-SE and change interface language to
   Swedish
2) Modify sv-SE-opac-bootstrap.po and add this:
   msgctxt "Cancel hold button"
   msgid "Cancel"
   msgstr "Ta bort"
3) Go to the Holds table at /cgi-bin/koha/opac-user.pl#opac-user-holds
4) Confirm that the button is translated as "Ta bort"
5) Sign off

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>
2020-10-14 14:50:07 +02:00
Joonas Kylmälä
0e1d291b14 Bug 12556: Add new "in processing" state to holds
This adds new syspref, HoldsNeedProcessingSIP, which controls whether
a hold that is related to item will be filled automatically or not. If
the user has enabled the syspref then instead of fulfilling the hold
automatically the hold will go to "in processing" state.

To test:
 1. Checkout a book to patron A
 2. Place a bib level hold to the book for B
 3. Patron A returns the book via SIP, to simulate this use:
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item <ItemBarcode> -m checkin
 4. Notice that no notification is generated for Patron B about hold
    and that the hold status in intranet and opac is "In Processing".
 5. Notice that patron A (or other patrons) cannot checkout a book
    that is in processing, because it is considered to be attached to
    the holdee (similarly to the waiting state):
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --patron <PatronABarcode> --item <ItemBarcode> -m checkout

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
Joonas Kylmälä
9d76149118 Bug 12556: Simplify and correct logic in holds-table.inc template
The states is_waiting and is_found are already implied by
is_at_destination. Also we would never get the 'transfered' html class
since transfer's status is T (this might not have been true in the
past but now is).

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
Joonas Kylmälä
bb3e76f7f9 Bug 12556: Remove unused HTML
Koha::Hold::is_at_destination() already checks for found = 'W' so the ELSE
code path which would print "Item waiting to be pulled from [...]"
never gets executed.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
Katrin Fischer
c760a8d381 Bug 13625: Change messaging preferences descriptions according to RenewalSendNotice
Sending out renewal notices depends on the RenewalSendNotice and the
patron having the checkout notice checked in their messaging
preferences.

To test:
- Apply patch
- Take a look at the messaging preferences table on the following pages:
  - OPAC > patron account > your messaging tab
  - Staff interface > patron account > details tab
  - Staff interface > patron account > edit patron
- Toggle the RenewalSendNotice preferences
  - The label on the last notice should switch between "Item checkout"
    and "Item checkout and renewal" depending on the pref setting

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
899bd08e0c Bug 19382: Add blocking of ability to checkout on circulation.pl
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
7a7a0a2474 Bug 19382: Add ability to block guarantees based on fees owed by guarantor and other guarantees
Some libraries would like to not only block the circulation of a guarantor based on fines owed by guarantees, but would also like to block circulation for all guarantees as well. Basically, if a family as a whole reaches a certain threshold of fines, the entire family will be blocked from checking out items.

Test Plan:
1) Apply this patch
2) Set NoIssuesChargeGuarantorsWithGuarantees to $14
3) Create a family of four ( 2 guarantors, 2 guarantees ) where the parents guarantee both children
4) Give 3 of the 4 a $5 fine
5) None of them should be able to check out items

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
b845c5601a Bug 24899: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the interface or functionality.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
f04d2accf8 Bug 24899: Reindent record matching rules template
This patch reindents the template the record matching rules template.
The only non-whitespace changes where lines were combined or split.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines.

Test that functionality is unaffected: Administration -> Record matching
rules.

Test adding, editing, and deleting record matching rules. Test adding,
editing, and deleting match points and match checks. Confirm that
changes are saved correctly.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
55d7d511b5 Bug 26327: (QA follow-up) Fix colspan in boraccount.tt
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
91ab070e20 Bug 26327: (follow-up) Add transacting library to the transactions tab
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
40cd70c581 Bug 26327: Include transacting library in fines
This patch introduces a new column on the fines table to display the
checkout library when the fine is tied to a checkout.

To test:
1. Have an overdue item that generated a fee
2. Look at the 'Accounting' tab, 'Make a payment'
=> FAIL: There's no information about the library
3. Apply this patch
4. Restart all
5. Reload and repeat 2
=> SUCCESS: There's a column with the library name!
6. Identify the issue_id for the mentioned checkout and:
   $ koha-mysql kohadev
   > UPDATE old_issues SET branchcode='TOM' WHERE issue_id=11;
  (i.e. set the branchcode to an invalid value, to emulate a deleted
   branch).
7. Reload
=> SUCCESS: It doesn't explode, it doesn't display a library name.
8. Sign off :-D

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>
2020-10-14 14:50:06 +02:00
210c62ad8c Bug 26456: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

Also changed: Some form hints have been wrapped in <div class="hint"> to
make it consistent with other pages.

This patch should have no effect on functionality.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:06 +02:00
d09108919f Bug 26456: Reindent MARC subfield structure template
This patch reindents the MARC subfield structure template.
The only non-whitespace changes where lines were combined or split.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines.

Test that functionality is unaffected: Administration -> MARC
bibliographic framework -> MARC structure -> Edit subfields..

Test adding, editing, and deleting subfields. Confirm that changes are
saved correctly.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:06 +02:00
Henry Bolshaw
dab160d599 Bug 26655: Add ARIA Labels to OPAC Lists
This patch adds ARIA labels to opac-shelves.tt
so that checkboxes for list items are meaningful
to users of screenreaders and other assistive
technology.

Test Plan:
1/ Open an OPAC list
2/ Inspect the checkbox for a list item
3/ Confirm the aria-label is missing
4/ Apply the patch
5/ Refresh the Opac list page
6/ Inspect the checkbox for a list item
7/ Note that there is now an aria-label with a
meaningful description
8/Sign off

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>
2020-10-14 11:47:57 +02:00
Katrin Fischer
57182d6a04 Bug 9118: (QA follow-up) Fix spelling on "To Date :"
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 11:47:57 +02:00
Emmi Takkinen
683d6ced64 Bug 9118: Do not show option to create exception on range for unique holiday
When an unique holiday is edited one can choose
option 'Generate exceptions on a range of dates.'
Exceptions are meant to be used with repeating
holidays and it makes no sense to have option to
be able to create one for an unique holiday.

This patch hides exception on range option when
editing an unique holiday. Also fixes a minor
spelling error.

To test:
1. Create unique holiday and edit it.
2. Note that option to create exception on range is shown.
3. Apply patch.
=> Option is now hidden.

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>
2020-10-14 11:47:57 +02:00
ace5b632a6 Bug 26389: Add auto renewal error to opac-user.tt
Test plan:
1 Check out an auto-renewing item to a patron
2 confirm in circ rules that the rule allows at least one renewal
3 log into OPAC, confirm your summary shows item is scheduled for auto-renewal
4 click Renew All
5 Get note "Please note: Your loan renewal failed because of the following reason(s):" with no following reasons
6 Apply patch
7 Repeat 3-5
8 See appropriate error

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 11:47:57 +02:00
Emmi Takkinen
1b40ee8d18 Bug 26429: Show correct expiration date at the request.pl
Bug 25789 changed holds tables expriration input class as "datepickerto".
This results to past expiration date to be displayed as tomorrows date.
Class "futuredate" should have been used instead.

To test:

1. Have waiting hold with expiration date in past (e.g 24.9)
2. Observe that waiting reserves table displays correct expiration date
3. At the request.pl page expiration date is however displayed as 26.9
=> Apply patch
4. Confirm that expiration date at the request.pl is now 24.9

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>
2020-10-14 11:47:57 +02:00
5a66924914 Bug 26538: Display cities list before input text
In patron creation or edition actually the city field is displayed with input text then cities list.
I propose to display cities list first since it is more likely used.

Test plan :
1) Create some cities
2) Open patron creation form
3) Check you see for each city field : cities list, text "or enter", text input
4) Delete all cities
5) Open patron creation form
6) Check you see for each city field : only text input

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>
2020-10-14 11:47:57 +02:00
5545cf2860 Bug 26576: Subfield descriptions on authority detail view are cut off
This patch corrects the authority detail view on the staff interface so
that subfield descriptions are not longer output as truncated strings.

For instance, before this patch the subfield description for 035$a would
be "System control numbe"

After the patch it should be "System control number."

Based on the assumption that the subfield descriptions were truncated at
some point for readability reasons I've also made some style changes
intended to improve the readability of the page.

To test, apply the patch and go to Authorities.

- Search for and view the details for an authority.
- On the authority detail page, confirm that subfield descriptions are
  shown in full.
- Confirm that the style changes look good and make the data more
  readable.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 11:47:57 +02:00
d2c59eda85 Bug 26145: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
Katrin Fischer
26eadaa7de Bug 26145: (QA follow-up) Add missing filters
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
7478b94306 Bug 26145: Correctly preserve itemnumber value
In order to know we are dealing with the cover images of a specific item
we need to pass it though the different forms.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
8cc1f02a94 Bug 26145: Add the "Cover image" column to the table settings
The new column can now be hidden by the table settings

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
176a678fbe Bug 26145: Hide 'Upload image' if no CoverImage pref is set
If LocalCoverImages AND OPACLocalCoverImages are disabled, we should not
let the ability to upload an image for the items.

We should also hide the column "cover image" in the tables

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
a4ca6c1441 Bug 26145: Fix image tag
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
a06223a20d Bug 26145: Allow multi covers per item
In this patch we remove the limitation of 1 cover image per item

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
7bc87ce75e Bug 26145: Refactoring - Move C4::Images to Koha::CoverImages
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
549d033cb1 Bug 26145: Display the cover image at the OPAC
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
c3f2993bdb Bug 26145: Add the ability to upload a cover image per item
This patchset adds the ability to attach cover images at item level.
This commit message will explain the different patches that are
following.

The main idea is to have cover images for a given item. This is useful
for a bibliographic record linked with a subscription. Each item could
have the cover image for the serial numbers.

In this first patch there is a limitation to allow only 1 cover per
item, but a later patch will remove it. That way we will take advantage
of the recent work done to display nicely cover images (bug 25031), and
reuse it in this development (staff interface only).

In order to use a flexible and robust code, the legacy C4 code
(C4::Images) has been moved to Koha::CoverImages. Also the DB table
biblioimages has been renamed cover_images.

Test plan (for the whole patch set):
0. Turn off AllowMultipleCovers
1. Create a new bibliographic record and items
2. Attach a cover image to the bibliographic record
3. In the item list of the bibliographic detail page, you will notice a
new "Upload image" action. Select it
4. Select an image
=> Notice the new column in the item table
5. Upload another image
=> You cannot upload 2 images, you are going to replace the existing one
6. Turn on AllowMultipleCovers
7. Attach another image to the image
=> Notice the 2 images are displayed nicely, with navigation controls
8. Confirm you can view an image if you click on it and you can delete it
9. Test the OPAC view now
=> Cover image for items are displayed in the table, there is no
navigation controls here however.

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
62a569ea73 Bug 26152: Remove the use of jquery.checkboxes plugin from serial collection page
This patch removes the use of the jquery.checkboxes plugin from the
serial collection page and replaces it with custom JS.

To test, apply the patch and go to Serials.

- Locate a subscription which has multiple issues.
- View the details for that subscription.
- In the sidebar menu click the "Serial collection" link.
- On the serial collection page test the "Select all" and "Clear all"
  links at the top of each table of issues. The controls should work
  correctly and only affect the table on  that tab.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
30fcb92d62 Bug 26154: Remove the use of jquery.checkboxes plugin from batch item deletion and modification
This patch removes the use of the jquery.checkboxes plugin from the
batch item modification and batch item deletion pages.

To test, apply the patch and go to Tools -> Batch item
modification.

 - Submit a batch of barcodes.
 - On the results page, test the "Select all" and "Clear all" controls
   at the top of the page. These should work correctly on the checkboxes
   in the table of results.
 - Test that the "Clear on loan" control still works to uncheck
   checkboxes corresponding to items which are checked out.
 - Test the "Show all columns" and "Hide all columns" checkboxes in the
   "Show/hide columns" section. These should work correctly on the
   checkboxes for showing and hiding columns in the table.
 - Go to Tools -> Batch item deletion.
 - Submit a batch of barcodes.
 - Repeat the same testing steps above (except the "Clear on loan"
   step).

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
Katrin Fischer
352e8d2306 Bug 26503: Add limit for standing orders to acq advanced search
This allows to filter on standing orders on the acq advanced search
checkbox. For this purpose a new checkbox is shown behind the order
status search option.

As both not yet ordered and standing orders have the status
'new' or partially received internally, this seems like a good
placement as it will help distinguish these cases clearly.

new + standing order = standing order, but nothing received yet
partially received + standing order = active standing order
all status + standing order = all standing orders

To test:
- Create some baskets with at least one order, some 'standing' and
  others not
- In the top toolbar choose tab Orders search > Advanced search
- Make some searches with and without the new 'Standing order' option
- Verify the right orders are found
- In the search results standing orders will now show with the
  status + (standing order).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
d50332c1e5 Bug 26519: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
7076125083 Bug 26519: Clean up OPAC buttons with incorrect classes
This patch makes some corrections to the OPAC templates to add the
correct classes to a few buttons which were missed during the
Bootstrap 4 upgrade, especially in cases where the buttons only appear
when JavaScript is disabled.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate the bibliographic record for a serial record and view the
  details. The subscription should have patron notification set.
- Under the Subscriptions tab, the "Subscribe to email notifications"
  button should look correct.
- Click to subscribe and confirm that the buttons during and after the
  process look correct.

- Perform a catalog search in the OPAC. On the search results page,
  disable JavaScript. This can be done in the browser's developer tools
  under "Settings."
- At the top of the table of search results there should be a
  correctly-styled "Go" button next to the sorting dropdown menu. It
  should work correctly.

- View the contents of a list with JavaScript disabled.
- The "Resort list" button should be correctly-styled and should work to
  submit the form.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 10:54:21 +02:00
9ddb312749 Bug 23695: (QA follow-up) Revert 'Orginating library' option
At my request, we added an 'Originating library' option to the manual
transfers form.

However, we did not properly pass this through in the controller and I
have since discovered that my request was ill conceived/a
misunderstanding of requirements.

This patch removes the option from the template and drops the references
to it in the controller.

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>
2020-10-09 13:07:01 +02:00
a9f2fc1eb9 Bug 23852: (QA follow-up) Fix remaining call to biblio-default-view
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:07:01 +02:00
12253d5382 Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 12:22:01 +02:00
b7d31ef16d Bug 23420: Add OPACSuggestionUnwantedFields system pref
To test:
-Apply patch
-Check OPACSuggestionUnwantedFields
-Check some fields as unwanted
-Go to the OPAC suggestion page and make sure these correct fields are hidden
-Turn on the system preference AllowPurchaseSuggestionBranchChoice to see the branch choice on the form
-Make sure you can correctly hide this one and still submit the purchase suggestion for without error.
-Go through each option and make sure it hides properly.

Note: You will only see the patron reason field when there are authorised values in the OPAC_SUG category

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 12:22:01 +02:00
Agustin Moyano
e9c799e942 Bug 23376: (follow-up) Fix subscription bug in orderreceive.tt
When order has subscription, general order variable gets replaced by other order variable in FOR loop

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:43:38 +02:00
Katrin Fischer
42761560c4 Bug 15436: (follow-up) Fix separator for a single 440 in staff
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
Katrin Fischer
81f71d45fe Bug 15436: Use semicolon between series name and volume
MARC21 dictates that we should be using a ; before $v in 440, 490,
810, 811 and 830.

This patch also introduces some additional changes to unify formatting
between the various options for cataloguing series:

- The separator between multiple series is switched form ; to the
  now commonly used | with a class for easy change of formatting.
- There was some missing logic that prevented the separator to show
  up correctly between traced and untraced series.
- For some series $v was included in the link for others not. Now
  $v always appears as text and only $a is linked, as this is what
  we actually search for.

To test this:
- You should be cataloguing multiple series in different ways, using
  - deprecated 440 (still present in old data)
  - 490, Ind. 1 = empty or 0 = not traced
  - 490, Ind. 1 = 1 = traced in combination with an 8xx field

Example (you should try a different combination!)
440 _ _ $aFirst series
490 _ _ $aSecond series ;$v1
490 1 _ $aThird series ;$v1 (this won't show, it will use 830 for display)
830 _ _ $aThird series ;$v1

Without patch:
Series: First Series; Second series ; 1Third series: 1

With patch:
Series: First series | Second series ; 1 | Third series ; 1

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
Katrin Fischer
3afd21f71f Bug 5927: (QA follow-up) Move part template below show-series to make both *Utils.xsl match
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
c4e04e2cba Bug 5927: [Alternate] Show series information in staff and opac results pages
This moves the series info to a template in the XSLT utils files and adds a
few variables to make it work right.

To test:
1 - Create a catalog records with:
    440 series fields
    490 traced series fields
    490 untraced series fields
2 - View the details pages for these records and note the display and the links formed
3 - Apply patch
4 - Confirm the details pages look the same
5 - Search on staff and opac to return the records
6 - Confirm the results pages form the same series as on details
7 - Confirm the links work the same

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
Katrin Fischer
fee5886432 Bug 16728: Add MARC21 777 - Issued with entry to staff and OPAC detail pages
This adds the 777 - Issued with entry to the staff and OPAC detail pages.
It's built using the template for 773 with minor adjustments.

To test:
- Apply patch
- Catalog several 777 fields in one or more of your records
  - When using 1st indicator = 1, the note won't display
  - When using 2nd indicator empty, label will be "Issued with:"
  - When using 2nd indicator 8, the label will be drawn from $i if present
  - When $w and UseControlNumber pref is used, the link will be built using $w
  - In all other cases the title form $t will be used for the link
- Verify the display is correct

Examples for 777 can be found in the LOC MARC21 documentation:
http://www.loc.gov/marc/bibliographic/bd777.html

Note: Because the label depends on the 2nd indicator, the label is repeated for every
777 on a record.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
5aab43462a Bug 19616: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
Katrin Fischer
fa2ec4c74c Bug 19616: (follow-up) Breaking items according to punctuation
Previously the code assumed that $t indicates a new line in the
listing. But this is not true. The standard tells us that -- or
.-- will indicate a new item.

"In records formulated according to AACR 2, a space-hyphen-hyphen-space
( -- ) is recorded between each item in the contents note unless a
delimiter/subfield code follows in which case there is no ending space.
In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)."

The previous logic did no longer work with $g added. From the LOC
examples:

This would work:
505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows.
505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49).

This wouldn't:
505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland

With the patches applied, all examples should display nicely now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:03:49 +02:00
Katrin Fischer
8e6b401932 Bug 19616: (follow-up) Reindent XSLT code used for 505 display
Also adds a note at the beginning of the code block.
This causes no functional change, just code clean-up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:03:49 +02:00
Katrin Fischer
acc84d428b Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin
This adds the subfield $g to the display of the 505 field in
staff and OPAC detail pages.

To test:
- Catalog some records using variations of 505
  Examples can be found in the LOC documentation:
  https://www.loc.gov/marc/bibliographic/bd505.html
- Verify that the display in staff and OPAC is still nice
  and now includes $g

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:03:49 +02:00
87a6f5fa9a Bug 23376: Remove unneeded 'count' parameter
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:03:49 +02:00
15e35f77fb Bug 23376: Move AcqCreateItem logic to template
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:03:49 +02:00
5d4740dfb0 Bug 23376: Clean up order receipt page code
This patchset switches from using DB lookups to using an order object for most things on orderreceive.pl

It simplifies the script and makes minimal changes to the template

To test:
1 - Place some orders and receive them
2 - Have orders with or without subscriptions attached
3 - Try with different AcqCreateItems settings
4 - Apply patch
5 - No behaviour should change
6 - Read code to ensure things make sense

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:03:40 +02:00
d7c58c10f1 Bug 23852: (QA follow-up) Correct scope of breadcrumb title style
This patch corrects the scope of the ".title" style intended for titles
displayed in the breadcrumbs bar.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 15:01:29 +02:00
157d329083 Bug 23852: Merge biblio-title.inc and biblio-default-view.inc
This patch moves the functionality contained in biblio-default-view.inc
into biblio-title.inc. biblio-title.inc can now be called with a "link =
1" parameter in order for the title to be displayed as a link which is
controlled by the IntranetBiblioDefaultView preference.

To test, apply the patch and test the affected pages, especially titles
linked to in breadcrumbs menus

Acquisitions:
 - Add to basket -> From existing record -> Search
   - Title in search results

Catalog:
 - Search for a record
   - Add record to cart
     - Open cart
       - Title in brief display
         - Check that link opens the correct page in the main window
   - View bibliographic record
     - ISBD view
     - MARC view
     - Normal view
      - Local cover image detail page
      - Checkout history
      - Request article
     - Item details
     - From the "Edit" menu -> Attach item
     - Stock rotation rota
     - Place hold

Cataloging:
 - Cataloging search -> Search results

Circulation:
 - Article requests
 - Overdues with fines
 - Overdues
 - Holds queue
 - Holds to pull
 - Hold ratios
 - Holds awaiting pickup
 - Transfers to recevie
 - Renew
 - Batch checkout

Lists:
 - View list contents

Patrons:
 - View patron details
   - Holds history
   - Checkout history

Tools:
 - Rotating collections
   - View collection
     - Add item
 - Tags
   - Click term to see titles tagged with that term

 - Batch record deletion
   - Submit batch

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 15:01:29 +02:00
aa329bcc4a Bug 26280: Add unique class for each problem in returns.tt
1. Checkin an item with a bad barcode and see the prolem class also has
   a class called 'ret_badbarcode'
2. Checkin an item that triggers a lotforloan updated via
   UpdateNotForLoanStatusOnCheckin, notice the class 'ret_nflupdate'.
3. You should also see an updated_from and updated_to class. This
   should make it easier to target those for audio alerts
4. Checkin an item that triggers an location update and see the class
   'ret_locationupdate'
5. Checkin an item that is not at its permenat location and you should
   see the class 'ret_ispermenant'.
6. Checkin an item that is not checkout and you should see the class
   'ret_notissued'
7. Checkin lost items with BlockReturnOfLostItems set to 'Dont block'
   and see the class 'ret_checkedin'
8. Checkin lost items with BlockReturnOfLostItems set to 'block' and
   see the class 'ret_blocked'
9. Checkin lost items with a fee on the patron's account for that lost
   item and see the class 'ret_feeremains'
10. Checkin item that is withdrawn and see the class 'ret_withdrawn'

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>
2020-10-08 14:52:20 +02:00
bc61f27b22 Bug 26184: Add div element to 'items available' note in OPAC reserve template
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 11:36:33 +02:00
Andreas Roussos
5f5e6c85d9 Bug 26449: fix web installer typo
The onboarding segment of the web installer contains a small typo
in Step 4: "Importantl:" (should be "Important:").

This patch fixes that.

Test plan: apply the patch and access the web installer, Step 4 of
the onboarding tool should no longer display the typo.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 11:36:32 +02:00
c21de86ab2 Bug 26551: Correct modal markup to prevent long heading from overflowing
This patch modifies the markup of the MARC framework import and export
modals so that CSS intended only for Bootstrap buttons isn't applied to
content in the modal.

The modal dialog markup was nested inside a ".btn-group" <div>, which
carries with it CSS that prevents text wrapping. Moving the modal markup
out of the button group while keeping it inside the <td> corrects the
problem. Lines have only been shifted and reindented.

To test, apply the patch and go to Administration -> MARC bibliographic
framework.

- In the table of frameworks, from the "Actions" menu, test both
  the "Import" and "Export" links. Both should work as expected.
- Confirm that the text of the heading on the "Import" modal wraps
  correctly.
- Test the same operations for a framework other than the default one.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 11:36:32 +02:00
98503334cc Bug 22417: Remove list of pending jobs
This was not accurate as it was only retrieving jobs for batch_biblio_record_modification

We will need to improve that later if needed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:26:36 +02:00
2c6e6b12a5 Bug 22417: Add rabbitmq status indicator on the about page
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:26:36 +02:00
d33f74fa7e Bug 22417: Fix spelling resizeable vs resizable
For the record, codespell does not raise the problem within ktd with
1.17.1 but appears with 1.14

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:08 +02:00
504e0a2e6a Bug 22417: Add missing POD and html filters
Also remove "authnotrequired => 0,"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:08 +02:00
991456b092 Bug 22417: Remove FIXME in the template
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:08 +02:00
7f774d08be Bug 22417: Let owner of a job see the progress
A owner of a job should be able to see the progress of this job.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:08 +02:00
53ba2f3ffb Bug 22417: Add the new permission manage_background_jobs
QA: Please answer the question in admin/background_jobs.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:01 +02:00
c79aee3e7f Bug 22417: Restore the 'add to list' feature
This feature has been added recently by bug 18127.

It highlights the need of a post processing hook.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
42b3529424 Bug 22417: Fix the batch authority tool
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 22417: Add a note about the existence of the DB row

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 22417: (follow-up) Fix the batch authority tool

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
2122fd8ee5 Bug 22417: Try to display pending jobs - only work if worker not started
ie. no subscription yet

This needs to be fixed (if possible), or removed from the patchset

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
735e9016ba Bug 22417: Handle errors
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
9251623b8d Bug 22417: Switch to STOMP
apt install rabbitmq-server
service rabbitmq-server start
rabbitmq-plugins enable rabbitmq_stomp
apt install libnet-stomp-perl
cp debian/scripts/koha-functions.sh /usr/share/koha/bin/koha-functions.sh
cp debian/scripts/koha-worker /usr/bin/
koha-worker --start kohadev
tail -f /var/log/rabbitmq/*

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 22417: Remove useless use statement

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
dc20949f65 Bug 22417: Add the ability to cancel a job
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
63cf7a0307 Bug 22417: Adapt the batch_record_modification tool
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
8c47e0c2a6 Bug 22417: Add GUI to watch the progress of jobs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
b9a63feb73 Bug 22343: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 17:59:37 +02:00
6fbf6f3df9 Bug 22343: Add the 'required' class when needed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 14:15:42 +02:00
3ef67a1119 Bug 22343: Correctly handle password on editing
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 14:15:42 +02:00
8850b7cf68 Bug 22343: Add warning to the about page if KohaAdminEmailAddress is invalid
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 14:15:42 +02:00
f5def63c34 Bug 22343: (follow-up) Add a hint to the debug form option
This patch appends a small note to the debug form field in the edit/add
smtp server form to hint that debug mode results in additional output in
the logs.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 10:54:41 +02:00
b785ae79cc Bug 22343: (follow-up) Highlight debug mode enabled
This patch adds a debug class to a row if debug mode is enabled for the
smtp server and adds css rules to highlight the row by setting the test
to bold, red and italic.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 10:54:41 +02:00
69be1f3848 Bug 22343: Allow choosing an SMTP server in branches.pl
The missing piece on this patchset is choosing the desired SMTP server
for each library. This patch adds the option on editing the library.

The default one is picked for existing libraries, and you can pick the
one you want.

To test:
1. Apply the patchset
2. Run:
   $ updatedatabase
=> SUCCESS: Things go smooth
3. Notice the new permission for managing SMTP servers
4. Notice the entry in the admin page
5. Add/have a few SMTP servers defined.
6. Edit a library
=> SUCCESS: The 'Default' SMTP server is picked
7. Choose any server and save
=> SUCCESS: Saving doesn't explode
8. Edit the server
=> SUCCESS: Your selection is kept (this can also be checked on the DB,
        the library_smtp_server table)
9. Try (7) with many different options
=> SUCCESS: It works
10. Sign off :-D

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>
2020-10-02 10:54:41 +02:00
26cab84bd5 Bug 22343: Prevent passing password to the UI
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>
2020-10-02 10:54:41 +02:00
0de6a7edff Bug 22343: Add CRUD page for SMTP servers
This patch introduces a way to define SMTP servers either globally or
per-library.

To test:
1. Apply this patch
2. Find the SMTP servers entry in the admin page
3. Play with adding/removing SMTP servers
=> SUCCESS: All works as expected
4. Sign off :-D

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>
2020-10-02 10:54:40 +02:00
eafdab5a05 Bug 24155: Fix parameter order to fix search_utf8.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 15:04:59 +02:00
3a47b5812a Bug 25261: (QA follow-up) Make issue and returns messages consistent
This patch makes the confirmation dialogue handing and visuality
consistent between issues and returns.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
8988941dbc Bug 25261: (QA follow-up) Prevent double dialogue
This patch removes the blue information message box if we are using
multi-part confirmations.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Katrin Fischer
e3a4d74b2f Bug 25261: (QA follow-up) Terminology: checkin/checkout
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
d845febfd5 Bug 25261: (QA follow-up) Restore previously returned list
Test plan
0 - Enable ShowAllCheckins
1 - Check in several regular items
2 - Check in an item with parts
3 - Confirm the checkin in
4 - The list of checkins contains all the previous checkins and the
  multi-part checkin too.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
be379b664c Bug 25261: (QA follow-up) Capitalize return of needsconfirm
This patch capitalizes the 'ADDITIONAL_MATERIALS' key in the
needsconfirm hash return value for CanBookBeIssued to restore
consistency with previous code and ensure SIP Checkout works as
expected.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
978daf8412 Bug 25261: (QA follow-up) Add handling to SCI
Test plan
1/ Enable the feature as per previous patches
2/ Attempt to return an item with materials attached via the SCI
3/ Note that the return is blocked with the message '(The item
cannot be returned at a self service terminal, please see library
staff for assistance)'
4/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
334c8e94c1 Bug 25261: (QA follow-up) Add handling to SCO
Test plan
1/ Enable the feature as per previous patches
2/ Attempt to checkout an item with materials attached via the SCO
3/ Note that the checkut is blocked with the message 'Item must be
issued at a circulation desk'
4/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
1e346db48a Bug 25261: (QA follow-up) Add confirmation to issues table
The issues table allows for checkins and was not appropriately
requireing confirmation for the multi-part confirmation added in this
bug.

Test plan
1/ Enable the feature as per previous patches
2/ Checkot an item with attached materials
3/ Navigate to a page that display your users issues table (the checkout
page is a reasonable example)
4/ You should have the option to select items for return in the table
(If not, use the column settings to enable the feature)
5/ Select at least the item with attached materials to return
6/ Upon clicking the return buttton you should find that items without
additional materials are returned as expected, but rows with additional
materials turn yellow and contain a message and additional checkbox for
confirmation in the table.
7/ Ensure the checkbox is selected and click the return button again
8/ This item should have been returned.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
acf11bacfd Bug 25261: (QA follow-up) Non-confirm on return
This patch updates the confirmation from an alert to a dismissable modal
which allows for optionally not checking the item in

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
54454554e9 Bug 25261: (follow-up) Rename CircConfirmParts to CircConfirmItemParts
This clarifies the preference name to make it clear we are talking about
the 'parts' that make up an 'item'. 'Part' is a well known term in
british english libraries and I think perhaps 'Materials' may be
confused with other terms?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
bdfb8a556f Bug 25261: Require confirmation of multiple parts items
Test plan
1/ Catalogue an item to contain multiple parts by populating 'Materials
specified (bound volume or other part)'
2/ Enable the new system preference 'CircConfirmParts'
3/ Attempt to checkout the item created in step 1 to a user and note
that confirmation is now required.
4/ Checkout the item
5/ Attempt to checkin the item you have just checked out and note that
confirmation is required.
6/ Signoff

Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
a6ca5a6e12 Bug 25261: Add system preference
Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
28ecd4cb7e Bug 14648: Take advantage of I18N to deal with plural
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Katrin Fischer
04c499b11d Bug 14648: (QA follow-up) Terminology items-reserves delete-remove
- As we have batch add reserves, we should also have batch remove reserves
- Delete items sounds a bit scary, removed items I think is a little better here

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Katrin Fischer
02f65c8925 Bug 14648: (QA follow-up) Add missing filters
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Joseph Sikowitz
3bf7430d1c Bug 14648: Batch remove reserve items
Adds "Batch remove items" button to course-reserves.tt. Creates batch_rm_items.pl and batch_rm_items.tt. Allows user to enter a list of
barcode numbers so that they will be removed from all course reserves to which they are attached. A dialog box will provide a warning
before the final deletion is made.

This patch also now moves barcodes that are invalid or not attached to a course reserve to the invalid barcodes output. It also provides
a count of the courses that the deleted items were attached to.

Test Plan
1. Log in as a user with permissions to add and delete course reserves
2. Add the same items to multiple course reserves
3. Go to the main course reserves page (i.e. /cgi-bin/koha/course_reserves/course-reserves.pl)
4. Click the "- Batch remove items" button
5. Enter the barcodes that you added to multiple reserves in step 1
6. Click submit
7. Click Ok if you are ready to delete all of these items
8. Check each course reserve that you added the items to in step 1 to make sure the items you entered were deleted but nothing else
9. Repeat 2-5
10. Add an invalid barcode and a valid barcode that is not attached to a course reserve
11. Repeat 6-7
12. You should see that the items attached to course reserves were removed while the invalid and unattached barcodes were rejected
13. Log out
14. Log in as a user without permission to delete course reserves
15. Go to the main course reserves page (i.e. /cgi-bin/koha/course_reserves/course-reserves.pl)
16. You should not longer see the "- Batch remove items" button

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
c72f01d907 Bug 19322: Typo in UNIMARC field 140 plugin
This patch corrects some incorrect information in the UNIMARC plugin for
tag 140. Literature code "li" should be "mystic literature."

To test you do not need a UNIMARC installation. Apply the patch and go
to Administration -> MARC frameworks and Actions -> MARC structure for
one of your frameworks.

- Edit subfields for a tag, e.g. 245. This is only for testing purposes
  so it doesn't have to be any particular tag.
- Change the options for one of the subfields, e.g. $a. Under "Other
  options (choose one), set "Plugin" to "unimarc_field_140.pl"
- Save changes.
- Open a bibliographic record for editing using the framework you
  modified.
- Click the plugin link next to the subfield you modified, e.c. 245$a.
- This should trigger the "UNIMARC field 140 builder" popup window.
- Find "Literature" and select "Mystic literature." Save.
- In the MARC editor, the field you modified should contain the value
  "li" at position 17-18.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
fce5887e16 Bug 19327: Typo in UNIMARC field 128a plugin
This patch corrects some incorrect information in the UNIMARC plugin for
tag 128$a. The value for "partsong" should be "pt#"

To test you do not need a UNIMARC installation. Apply the patch and go
to Administration -> MARC frameworks and Actions -> MARC structure for
one of your frameworks.

- Edit subfields for a tag, e.g. 245. This is only for testing purposes
  so it doesn't have to be any particular tag.
- Change the options for one of the subfields, e.g. $a. Under "Other
  options (choose one), set "Plugin" to "unimarc_field_128a.pl"
- Save changes.
- Open a bibliographic record for editing using the framework you
  modified.
- Click the plugin link next to the subfield you modified, e.c.
  245$a.
- This should trigger the "UNIMARC field 128a builder" popup window.
- Select "partsong" in the dropdown. Save.
- In the MARC editor, the field you modified should contain the
  value "pt#"
- Trigger the popup window again and click "Save" without making
  changes.
- The value in the MARC editor should be the same.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Katrin Fischer
87ca07f423 Bug 23114: (QA follow-up) Slightly rephrase message when both barcode options are used
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Matthias Meusburger
7b5a37fa19 Bug 23114: Inventory: allow to scan barcodes
This patch allows the user to scan barcodes in the inventory tool
(in addition to upload a barcode file, like in other tools)

Test plan:
 1) Apply the patch.
 2) Check that you can still upload a barcode file.
 3) Check that you can scan/enter barcodes in the new textarea.
 4) Check that if you both upload a barcode file and enter barcodes,
    you will be prompted to choose only one method.
 5) Check that you can then proceed to the next step by either resetting the
    upload file input or emptying the textarea.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
6e2aba2c02 Bug 24155: (follow-up) Template fixes and updates
This patch makes a few minor changes to the OPAC and staff interface
templates:

- In both, the "Apply field weights" checkbox will only appear after the
  "More options" button has been clicked. Otherwise a hidden input sets
  the value to 1.
- In both, the checkbox now appears below the search fields.
- Checkboxes are now wrapped in the <label> tag to ensure the label is
  clickable.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
e302abf49d Bug 24155: (follow-up) Add span with id to weighted search option
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
e474df6402 Bug 24155: Make weighting an option on advanced search
Currently we apply weighting to all searches except advanced search. The theory
being that when selecting indexes we don't want to apply weights. When searching
in ES weights are only applied to relevant results so it doesn't matter.

i.e. if weighting author*100 but searching subject, a term matching the subject search in author
is not boosted.

Given this, we should always apply weights, unless the user wishes not to

To test:
1 - Set some weighting
2 - Do some searches
3 - Note your terms and results, try advanced and regular searches specifying indexes or not
4 - Apply patch
5 - Note that opac and staff advanced search have option to apply weights
6 - Compare searches after the patch to see how weighting affects, it should be beneficial or not at all

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
88f34a3554 Bug 24322: Simplify condition to separate elements
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
Olli-Antti Kivilahti
6824b93b02 Bug 24322: National Library of Medicine (NLM) call number to XSLT Detail
This adds MARC21 060 - National Library of Medicine Call Number
https://www.loc.gov/marc/bibliographic/bd060.html

To test:
- Catalog records using the 060, examples can be found in the
  LOC documentation.
- Verify that the field displays on the detail pages in staff
  and OPAC

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
RRescued this patch by redoing the changes. Only change made
was moving the section up before "Other classification".

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
0efa9a917b Bug 25242: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:08 +02:00
6e5142e61b Bug 25242: Improve column wrapping for holdingst
This patch attempts to improve the column wrapping for the holdingst
datatable and sets the tabel to fixed width to prevent overlapping
with other content on high zoom levels/low width screen sizes.

Test plan
1/ Build the OPAC CSS from the updated SCSS
2/ Navigate to an item with holdings visible in the OPAC
3/ 'Play' with various window sizes and zoom levels.
4/ The table should not overlap with right navigation content
5/ Signoff

NOTE: This is an alternative patch to those pushed and reverted that
attempted to provide a global fix to overlap issues. This patch
specifically targets just the holdings table in the opac detail view.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
9aa84cb348 Bug 25771: Allow the user to sort checkouts by the renew column in the OPAC
This patch makes it possible for the logged-in OPAC user to sort their
checkouts by the number of renewals they have remaining on their
checkouts.

To test, apply the patch and log in to the OPAC as a user with multiple
checkouts. To fully test the patch's functionality the user's checkouts
should have a varying number of renewals available.

On the "your summary" page, confirm that the "Renew" column is now
sortable and that it sorts correctly by the number of renewals left on
each checked-out item.

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
4a1c5c1396 Bug 25776: (QA follow-up) Add missing filter
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
2cd12ac4d4 Bug 25776: (follow-up) Fix sorting by change date in notices table
Some markup was missing to sort the date correctly.

To test:
- Verify date sorting in the notices table works as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
50877291b2 Bug 25776: Add a 'last updated' column for notices
This add an 'udated_on' column to the letter table and displays
the information in 'slips and notices'.

To test:
- Apply patch
- Run updatedatabase
  Note: the existing letters will all be set to the
  currnet date).
- Go to Tools > Notices and slips
- Verify there is a new column "Last updated" in the table
  Note: The table will always display the newest change date
  of the different message transport types.
- Edit any notice
- Verify the "Last updated" is shown for any transport type
  with an existing notice definition
- Edit and add a notice
- Verify the dates are correctly stored
- Test the column configuration for the new column works
  correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
80465d502f Bug 26484: Add serials-related reports to serials sidebar menu
This patch adds a section to the serials sidebar menu for showing
serials reports.

To test, apply the patch and go to Serials.

- If you are logged in as a user with permission to access reports you
  should see a new "Reports" heading in the sidebar menu and a link to
  the serials statistics wizard.
- Confirm that the link works correctly.
- Log in as a user without reports permission and confirm that the
  section doesn't appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
bf5b8c2be7 Bug 26089: Add acquisitions-related reports to acquisitions sidebar menu
This patch adds links to two acquisitions-related reports in the sidebar
menu shown on acquisitions pages: Acquisitions statistics wizard and
orders by fund.

To test, apply the patch and go to the Acquisitions page.

- If you are logged in as a user with permission to access reports you
  should see a new "Reports" heading in the sidebar menu and links to
  two reports.
- Confirm that the links work correctly.
- Log in as a user without reports permission and confirm that the
  section doesn't appear.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
d3619c88cd Bug 26207: (follow-up) Hide comparison toolbar if there are no comparisons
This patch adds a check to the JavaScript so that the comparisons
toolbar will be hidden if there are no system preferences in the results
to compare.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
574e2e80eb Bug 26207: (follow-up) Remove whitespace from markup
Markup indentation around log entries in the template cause extra
whitespace in the diff view. Removing the markup whitespace corrects it.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
d3d89e629e Bug 26207: Compare values of system preference log entries
This patch adds the ability to compare the values of system preferences
in the system log. The user can select two entries in the log search
results and view a diff of the two versions.

The feature is designed specifically for CSS and JS preferences like
OpacUserCSS or OpacUserJS where code changes are difficult to track.

To test, apply the patch and go to Tools -> Log viewer. You may need to
add values and make changes to preferences like OpacUserCSS if you don't
already have a history in your logs.

- Perform a search for log entries in the "System prefs" module.
- In the results, each entry for a system preference should have a
  "Compare" checkbox."
- Check one of the checkboxes.
  - The table should now be filtered by the system preference name. This
    facilitates meaningful selections for comparison.
  - You should see a message displayed onscreen, "Showing results
    for...[ preference name]"
  - The "Check none" link in the toolbar above the table should now be
    enabled.
  - If youy click the "Compare selected" link in the toolbar at this
    stage you should get a message, "You must select two entries to
    compare."
  - If you uncheck the checkbox the table should return to an unfiltered
    state.
- Check two checkboxes.
  - The "Compare selected" link in the toolbar should now be enabled.
  - Next to each of the checkboxes you checked should be a "View
    comparison" link.
  - Clicking either of the "View comparison" links or the "Compare
    selected" link should trigger a modal with the diff view of the two
    preferences.
- Try to select a third checkbox. You should get a message, "You can
  select a maximum of two checkboxes." The box should remain unchecked.
- Test that unchecking both checkboxes manually clears the table filter.
- Test that the "Check none" link works to uncheck checked boxes and
  clear the table filter.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Timothy Alexis Vass
33c8969039 Bug 26266: Add jQuery validator to opac-password-recovery.tt
To test:
0) Activate password reset in system preferences.
1) Initiate a password recovery.
2) Try to submit with an invalid password.
3) Confirm that validation occurs.
4) Try to submit with mismatching passwords.
5) Confirm that validation occurs.
6) Sign off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
ff64264092 Bug 26268: Remove final references to paidfor db field
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
5dcca80dc5 Bug 26299: Use same SMS number help text in OPAC as staff interface
The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
ebfbefdeb1 Bug 26338: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:10 +02:00
fb59f3f0f0 Bug 26338: Show tool plugins run in tools home
In tools home there is a link to the table showing tool plugins.
Would be great to be able to run a tool plugin directly from tools home.

Also adds the behavior than if there is no tool plugin, "Tool plugins"
section is not displayed in tools home.
No need of a link that goes to an empty table ;)

Test plan :
1) Enable plugins, dont install any
2) Go to "Tools" module : /cgi-bin/koha/tools/tools-home.pl
3) Check you dont see "Tool plugins"
4) Install a tool plugin like Carrousel https://inlibro.com/instructions-carrousel/
5) Refresh /cgi-bin/koha/tools/tools-home.pl
6) Check you see "Tool plugins" and a link to Carrousel
7) Click on link to Carrousel => You see plugin run
8) Disable Carrousel plugin
9) Refresh /cgi-bin/koha/tools/tools-home.pl
10) Check you dont see "Tool plugins"

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>
2020-09-30 17:30:13 +02:00
Timothy Alexis Vass
debf8f804c Bug 26454: Add system preference to set meta description for the OPAC
Websites should have a meta description tag that shows in search engine results.
The content should also be available to set as a system preference.

To test:
1) Look at opac-main source (in the browser) and see that meta name="description" is missing.
2) Apply patch.
3) Run: perl installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add a description to OpacMetaDescription.
5) Look at opac-main source and confirm that meta name="description" now has content equal to the text set in the OpacMetaDescription system preference.
6) Sign off.

Sponsored by: Lunds University Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Newlines are preserved. Double quote is rendered
as &quot;. Nice enhancement!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-30 16:15:34 +02:00
d6ddf53ab6 Bug 26501: Add datatables to article-requests form
Actually two tables: one for pending and processing.
Variable active_table has been renamed to active_tab.
To prevent a flickering form we hide stuff until ready.

Test plan:
[1] Submit a few article requests.
[2] Verify that Process, Complete and Cancel still work via Actions.
[3] Test again with multiselect and top Actions menu.
[4] Test Search and Sort on the datatable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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>
2020-09-30 16:15:33 +02:00
41f0f22cb2 Bug 26530: Use patron card number as checkbox label during patron merge
This patch makes a minor change the the merge patrons template so that
on the patron selection stage the user can click the card number to
select the radio button.

To test, apply the patch and perform a patron search in the patrons
module.

- In patron search results, select two patrons to merge.
- Click the "Merge selected patrons" button.
- On the page showing the two patrons to merge, click each of the card
  numbers to confirm that it selects the correct radio button.

Signed-off-by: Jennifer <jennifer.marlatt@coronaca.gov>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 15:32:24 +02:00
1ac0850a33 Bug 25320: (follow-up) Remove obsolete include file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
dc393dc6be Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js
This patch eliminates the use of a separate include file containing
translatable strings in favor of embedding translatable strings in the
JavaScript itself.

To test, apply the patch and clear your browser cache if necessary.

 - Perform a catalog search in the staff interface.
 - Select two results to merge. Click Edit -> Merge records.
 - Click "Next" on the "Merging records" page.
 - On the "Source records" page click the second tab where all the
   checkboxes are unchecked.
   - Check the box for a tag which is non-repeatable, e.g. 245.
     - You should see a message, "The field is non-repeatable and
       already exists in the destination record. Therefore, you cannot add it."
   - Check the box for a subfield which is non-repeatable, e.g. 245$a.
     - You should see a message, "The subfield is non-repeatable and
       already exists in the destination record. Therefore, you cannot
       add it."

TESTING TRANSLATABILITY

 - Update a translation, e.g. fr-FR:

   > cd misc/translator
   > perl translate update fr-FR

 - Open the corresponding .po file for JavaScript strings, e.g.
   misc/translator/po/fr-FR-messages-js.po
 - Locate strings pulled from prog/js/merge-record.js for
   translation, e.g.:

   #: koha-tmpl/intranet-tmpl/prog/js/merge-record.js:72
   msgctxt "Bibliographic record"
   msgid ""
   "The field is non-repeatable and already exists in the destination
   record. "
   "Therefore, you cannot add it."
   msgstr ""

 - Edit the "msgstr" string however you want (it's just for testing).
 - Install the updated translation:

   > perl translate install fr-FR

 - Switch to your newly translated language in the staff client and
   repeat the test plan above. The translated string should appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
654eda8edc Bug 26291: (follow-up) Correct stray MSG instances
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
45558c35e3 Bug 26291: Move translatable strings out of z3950_search.inc into z3950_search.js
This patch moves translatable strings out of z3950_search.inc into
z3950_search.js, wrapped in the double-underscore function for
translation.

To test, apply the patch and go to Cataloging.

 - Click "New from Z39.50/SRU"
 - In the search form, uncheck all search targets and submit the form.
   You should get an error: "Please choose at least one external target"
 - Peform a search which will return multiple pages of results.
 - Test  that you can enter a number in the "Go to page" form to
   navigate to a specific page.
 - Enter a non-number in the field and submit. You should get an error,
   "The page entered is not a number."
 - Enter a number in the field which is greater than the number of pages
   of results. Submitting the form should trigger an error, "The page
   should be a number between 1 and 10."

 - Perform the same tests from the other Z39.50 search results
   interfaces:
   - Acquisitions -> Add to basket -> From an external source.
   - Authorities -> New authority -> New from Z39.50/SRU.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/z3950_search.js for translation,
  e.g.:

  msgid "The page entered is not a number."
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
404767da8f Bug 26164: (and bug 26419) Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
0b7bd6ee28 Bug 26562: Removes 'searches' from localStorage on logout
A user recently logged in will inherit the "searches" item stored in localStorage.

To recreate:
Log in with user A, do some searches
Note that the "searches" item is filled in with the search queries
Logout and log in with user B
Note that the "searches" item is still there

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
88c40e5097 Bug 26242: Remove one unused occurrences of MSG_NON_RESERVES_SELECTED
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
99506632a7 Bug 26330: Change encoding of text used as tab triggers in MARC subfield constraints
This patch changes the encoding of the data being used to define
jQueryUI tabs on the MARC subfield constraints page. A jQueryUI bug
prevents non-Latin-1 characters from being used when defining tab
controls. Using Template:Toolkit's "uri" filter converts the data to
usable characters.

To test, apply the patch and go to Administration -> MARC frameworks ->
MARC structure -> tag 952 -> Edit subfields.

- Under the "New" tab, add a subfield code which is outside the basic
  Latin character set, e.g. £, §, æ.
- Save changes.
- Edit any subfield code to load the subfield constraints page again.
- Test that the subfield code tabs work correctly: Clicking each tab
  should load only the corresponding panel.
- Test a variety of tabs including the one you created with the
  non-Latin character.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
Katrin Fischer
05537bcd8e Bug 26431: Update NewsToolEditor system preference description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
7248562956 Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news
This patch modifies the news interface so that the user is offered a
choice of editing news items using the default editor as defined by the
NewsToolEditor system preference or the non-default one.

To test, apply the patch and go to Tools -> News.

- In the list of news items you should see an "Edit" split button in
  each row.
- Clicking the "Edit" part of the button should open the edit view with
  the correct editor as defined by the NewsToolEditor preference.
- Clicking the menu arrow on the button should offer the other editing
  method:
 - If NewsToolEditor is set to "WYSIWYG," the menu should offer "text
   editor."
 - If NewsToolEditor is set to "text editor," the menu should offer
   "WYSIWYG editor."
- Test the button with the NewsToolEditor preference set to both options
  and confirm that the button and menu work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
701fde53ed Bug 26261: Split calendar.inc into include file and JavaScript file
This patch moves most of the JavaScript out of calendar.inc and into a
new file, calendar.js. English strings in calendar.js are now wrapped in
the double-underscore function to allow for translation.

The patch shouldn't affect datepicker functionality in any way.

To test, apply the patch and test the datepicker in various contexts:

- Reports -> Statistics wizards -> Patrons
- Date of birth "from" and "to" should be linked so that the former
  must come before the latter.
- Patrons -> Add or edit patron
- The date of birth field datepicker shouldn't allow you to pick a
  future year from the dropdown.
- Tools -> Calendar.
- Test that the calendar tool works correctly.
- Test with various settings of the dateformat system preference.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/en/js/calendar.js for translation,
  e.g.:

  msgid "August"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and test the datepicker again. Translated strings like days of
  the week and months should be correct.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
171e7bfc51 Bug 26164: Replace OPAC table sort icons with SVG
This patch modifies the OAPC CSS to convert table sorting icons from PNG
to SVG. These icons are added via background-image data-urls, so only
the SCSS file is modified.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface).

- Clear your browser cache if necessary
- View any DataTable in the OPAC, for instance the table of
  checkouts under the logged-in user's "your summary" tab.
- Confirm that the sorting icons in the table headers look
  correct in each state: Sorted ascending, sorted descending, and
  unsorted.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
8722bce904 Bug 26419: Replace OPAC Koha logo with SVG
This patch replaces the OPAC Koha logo PNG file with an SVG version.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Clear your browser cache if necessary.
 - View any page in the OPAC. The Koha logo in the upper-left corner of
   the screen should look good.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:19 +02:00
558e64eec0 Bug 26245: Remove unused functions from members.js
This patch removes some code from members.js which was unused.

To test, apply the patch and test that the process of adding or editing
a patron is unaffected. Check the Koha codebase for references to these
functions in JavaScript:

CheckDate
unique (note: Not the jQuery function)
check_manip_date
check_password

There should be none.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
99befa42c8 Bug 26120: Remove the use of jquery.checkboxes plugin from tags review template
This patch removes the use of the jquery.checkboxes plugin and improves
the handling of tag status markup so that the "Select all pending"
selection link works correctly.

To test, apply the patch and go to Tools -> Tags. To test properly you
should have multiple tags awaiting moderation.

 - The initial view of tags moderation shows only tags awaiting
    moderation. Test that the "select all," "clear all," and "Select all
    pending" links work correctly.
 - Click the "Approve" button for a tag, and the "Reject" button for
   another tag.
 - Test the "Select all pending" link again. Only the tags awaiting
   moderation should be selected.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
f0275e6677 Bug 26151: Remove the use of jquery.checkboxes plugin from suggestions management page
This patch removes the use of the jquery.checkboxes plugin from the
suggestions management page and replaces it with custom JS.

To test, apply the patch and go to Acquisitions -> Suggestions

Under each tab ("Accepted," "Pending," etc.), test that the "Check all"
and "Uncheck all" controls work correctly and only affect the table on
that tab.

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
8620d1ec4b Bug 26504: Remove the use of jquery.checkboxes plugin from checkout notes page
This patch removes the inclusion of the jquery.checkboxes plugin from
the checkout notes page. It is unused.

To test, apply the patch and confirm that the AllowCheckoutNotes system
preference is enabled.

- Go to Circulation -> Checkout notes.
- Confirm that the "Select all" and "Clear all" links work correctly.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
7fb705696f Bug 24958: Remember last selected tab in SQL reports
This patch modifies the saved reports page so that it remembers, for the
duration of the browser session, the last active tab.

To test you should have multiple reports in multiple report groups.
Apply the patch and go to Reports -> Saved reports.

- Select a tab to filter the table of saved reports to a particular
  report group.
- Navigate away from the page
- Return to the save reports page. The tab you previously selected
  should be selected again.
- Restart your browser and return to the saved reports page. The tab
  should no longer be preselected.

Update: The tabs filtering JavaScript has been moved to a separate
function so that the function can be triggered by both the "create"
event (when the tabs are initialized) and the "activate" event (when a
tab is selected).

Update II: Persistence is now enable through localStorage instead of
Cookies. The localStorage item is now cleared during the logOut
function.

Update III: The logOut() function in staff-global.js is now called by
auth.tt to ensure that tabs are not remembered across sessions.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
912d911db2 Bug 26217: Move translatable strings out of templates into acq.js
This patch removes the definition of translatable strings out of
templates and into the JavaScript file, using the new JS i81n function.

To test:

- Apply the patch, go to acquisitions, and view a vendor.
- Click "Uncertain prices" in the sidebar menu.
- In the table of orders, enter something in the "price" form field
  which isn't a valid price. You should get an error message.

- Test the validation of fund amounts: Go to Administration -> Budgets
  and create an active budget if necessary.
- Add a fund to that budget. Try to save the fund with a fund amount
  which exceed the amount in the budget.
- You should get an error message: "Fund amount exceeds period
  allocation"
- Add a fund with valid data and then go to Administration -> Funds and
  locate the fun you just created.
- Use the "Actions" menu to add a sub fund to that fund.
- Try to save this new fund with an amount which exceeds the amount in
  the parent fund.
- You should get an error message, "Fund amount exceeds parent
  allocation."

Note: I was unable to properly test the error message "New budget-parent
is beneath budget." I couldn't figure out how to trigger it.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/acq.js for translation, e.g.:

  msgid "Fund amount exceeds period allocation"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
ea72b15480 Bug 26256: Move translatable strings out of templates and into serials-toolbar.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch and go to Serials and search for a subscription.
- Open the detail page for an open subscription.
- Click the "Close" button. You should get a confirmation, "Are you
  sure you want to close this subscription?"
- Confirm that you want to close it.
- When the page reloads, click the "Reopen" button. You should get a
  confirmation, "Are you sure you want to reopen this subscription?"
- Cancel.
- Choose Edit -> Delete subscription. You should get a confirmation,
  "Are you sure you want to delete this subscription?"
- Perform the same tests from the "Serial collection" page.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js for translation,
  e.g.:

  msgid "Are you sure you want to delete this subscription?"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
Katrin Fischer
124560556e Bug 26243: (QA follow-up) Switch quotes to avoid translation issues
The QA script warned about text in single quotes which can be
a problem for languages like French that need to be able to use
these quotes in their translations.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
111b14dc96 Bug 26243: Move translatable strings out of templates and into circulation.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch and check out to a patron.
- If there are none on the account, add a new message using the "Add a
  new message" link.
- Click "Delete" for that message.
- You should get a confirmation message, "Are you sure you want to
  delete this message? This cannot be undone."
- If necessary, enable the ExportCircHistory system preference.
- Check out to a patron who has one or more items checked out.
- Wihtout checking any checkboxes, click the "Export" button at the
  bottom of the page.
- You should get an error message, "You must select checkout(s) to
  export."
- Add a restriction the patron's account.
- Delete the restriction. You should get a confirmation message, "Remove
  restriction?"
- Perform the same tests from the patron detail page.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js for translation,
  e.g.:

  msgid "You must select checkout(s) to export"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
b1a3aeb062 Bug 26118: Move translatable strings out of tags/review.tt and into tags-review.js
This patch removes the section of the tags review template which defined
strings for translation. They can now be embedded in the JavaScript
file, wrapped in the __() function.

To test, apply the patch and clear your browser cache if necessary.

- Go to Tools -> Tags and perform some actions which will trigger the
  use of translated strings in the interface. For instance:
  - Approving and rejecting tags
  - Testing tags which are approved, rejected, or unclassified.
    - Status messages for these operations should work correctly.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js for
  translation, e.g.:

  msgid "Both subfield values should be filled or empty."
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

> perl translate install fr-FR

- Switch to your newly translated language in the staff client and
  repeat the test plan above. The translated strings should appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
d2afd19bc3 Bug 25321: Remove 2 remaining occurrences of strings.inc
They were used for browser.js

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
ee5914b9b9 Bug 25321: Remove PLACE_HOLD from results.js
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
5fa99d7d59 Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript
This patch moves string definitions out of strings.inc and into the
corresponding JavaScript files.

To test, apply the patch and test various pages in the staff interface:

A few suggestions:

- Perform a catalog search and view the detail page for a bibliographic record.
  - Confirm that the search results browser in the left-hand sidebar
    work correctly and that the title attributes of the controls are
    correct.
- Locate a patron with multiple checkouts. View the checkout page and
  test the various controls in the table of checkouts: Renew, check in,
  return claims, etc.
- View the list of holds on a patron's account. Test suspending and
  resuming holds.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/checkouts.js for
  translation, e.g.:

  msgid "Checked in"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for
  testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
9e06e62a7f Bug 26240: Move translatable strings out of sms_providers.tt and into sms_providers.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test you must have the SMSSendDriver preference populated ("Email" is
fine).

- Apply the patch and go to Administration -> SMS cellular providers.
- Click "New SMS provider."
- The legend on the form's fieldset should read "Add an SMS cellular
  provider."
- Add an SMS provider.
- Edit an SMS provider.
- The legend on the form's fieldset should read "Edit provider <provider
  name>"
- If necessary, edit a patron's SMS settings to use one of your existing
  SMS providers.
- From the list of SMS providers, click to delete the provider which is
  in use.
- The error message should read "Are you sure you want to delete
  <provider name>? <number> patron(s) are using it!"
- Click to delete a provider which isn't in use. The error message
  should read "Are you sure you want to delete <provider>?"

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/sms_providers.js for translation,
  e.g.:

  msgid "Add an SMS cellular provider"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
c2b14f6a1e Bug 26242: Move translatable strings out of results.tt and into results.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch and perform a catalog search which will return
  multiple results.
- Without checking any checkboxes, click the "Add to Cart" button. You
  should see a message, "No item was selected."
- The same should happen if you select an item from the "Add to list"
  menu or click the "Place hold" button.
- Click the "Select all" link to check all checkboxes.
- Click the "Place hold" button.
- You will inevitably get a "One or more selected items cannot be placed
  on hold." message. If you were to want to complete this process you
  would have to painstakingly sift through each search result to find
  which item couldn't be placed on hold so that you could uncheck the
  corresponding checkbox. Luckily this test plan doesn't require you to
  do that.
- If you don't get an error message you're living in a catalog utopia
  unlike any I have ever seen.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/pages/results.js for translation,
  e.g.:

  msgid "Nothing is selected"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
22ff2118a7 Bug 26237: Move translatable strings out of preferences.tt and into JavaScript files
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test (a non-comprehensive list):

- Apply the patch, go to Administration -> System preference
- Modify any system preference. "modified" should appear next to the
  preference name.
- Click the "Save" button. You should get a message, "Saved preference
  <pref name>"
- Hover your mouse over a section heading (e.g. "Features" under
  Accounting). You should see a tooltip, "Click to collapse this
  section."
- Click to collapse the section. The tooltip should change to "Click to
  expand the section."
- Open a new tab for the staff interface and log out.
- In the original tab, modify and try to save a system preference. You
  should get a message, "Error; your data might not have been saved."

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js for
  translation, e.g.:

  msgid "Saved preference %s"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for
  testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff
  client and repeat the test plan above. The translated strings
  should appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
f04ea65fa3 Bug 26334: Move translatable strings out of members-menu.inc into members-menu.js
This patch moves translatable strings out of members-menu.inc into
members-menu.js where they can be translated using the double-underscore
i18n function.

To test, apply the patch and go to Patrons.

- Expand the search options in the search header by clicking the [+]
  link.
- Select "Date of birth" from the "Search fields" dropdown.
  - A tooltip should appear above the search form, "Dates of birth
    should be entered in the format..." with your current date format.
- Remove all "Adult" type patron categories but one.
  - Check out to a child patron.
  - From the "More" menu choose "Update child to adult patron."
  - You should see a confirmation.
- From the checkout screen, from the "More" menu, choose "Renew patron"
  - You should get a confirmation.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/members-menu.js for translation,
  e.g.:

  msgid "Are you sure you want to renew this patron's registration?"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
8bf7c342bf Bug 26395: Move translatable strings out of letter.tt into letter.js
This patch moves strings defined for translation in letter.tt
into letter.js for translation using the new double-underscore
i81n function.

Note, the "MSG_NO_NOTICE_FOUND" usage has been removed because it didn't
work.

To test, apply the patch and go to Tools -> Notices & Slips.

- Use the "Copy" dropdown to copy an existing notice to a specific
  library.
- Save the copied notice.
- Return to the "All libraries" view on the Notices & Slips page.
- Repeat the same process above: Copy the same notice to the same
  library.
- When you click save on the "Add notice" page you should get an error
  message, "A letter with the code 'ACCTDETAILS' already exists for
  <library>"

- From the "All libraries" view on the Notices & Slips page, copy the
  text in the "Code" column of an existing notice.
- Click "New notice" and choose the module of the notice you copied
  from.
- On the "Add notice" page, paste the code into the "Code" field and
  enter a name in the "Name" field.
- Click "Save" without making any other changes. You should get an error
  message, "Please fill at least one template."
- Enter some data into one of the message body fields but not message
  subject, and click "Save" again.
- You should get an error, "Please specify title and content for
  <notice>"
- Enter data in the message subject field and click "Save" again.
- You should get an error, "A default letter with the code <CODE>
  already exists."

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/letter.js for translation,
  e.g.:

  msgid "Please fill at least one template."
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

> perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
2c98f4849d Bug 26230: Move translatable strings out of item_search_fields.tt and into item_search_fields.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch, go to Administration -> Item search fields.
- If necessary, add a new search field.
- From the table of search fields, click the "Delete" button for one of
  the fields.
- You should get a confirmation: "Are you sure you want to delete this
  field?"

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate the string pulled from
  koha-tmpl/intranet-tmpl/prog/js/item_search_fields.js for translation:

  #: koha-tmpl/intranet-tmpl/prog/js/item_search_fields.js:18
  msgid "Are you sure you want to delete this field?"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
38566a861a Bug 26229: Move translatable strings out of categories.tt and into categories.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch, go to Administration -> Patron categories
- Click "New category"
- Enter some special characters in the "Category code" field, e.g.
  "%^&*"
- Try to submit the form without filling in any other details.
- The category code field should have a validation message, "Category
  code can only contain the following characters: letters, numbers, -
  and _."
- The enrollment period fields should have a validation message, "Please
  choose an enrollment period in months OR by date."
- Enter valid data and confirm that the form can be submitted.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/categories.js for translation, e.g.:

  msgid "Please choose an enrollment period in months OR by date."
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
94f7ad3e60 Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js
This patch moves translatable strings out of catalog-strings.inc into
catalog.js, wrapped in the double-underscore function for
translation.

To test that each affected string correctly appears in the interface:

- View the details for a bibliographic record which has items attached.
- From the Edit menu, choose "Delete record." You should get an alert,
  "X item(s) are attached to this record. You must delete all items
   before deleting this record."
- From the Edit menu, choose "Delete all items." You should get an
  alert, "Are you sure you want to delete the X attached items?"

- When logged in as a user with acquisitions and cataloging privileges,
  view the details for a bibliographic record which is used in an order
  in Acquisitions. Delete any items attached.
- Choose "Delete record" from the Edit menu. You should get an alert,
  "Warning: This record is used in X order(s). Deleting it could cause
  serious issues on acquisition module. Are you sure you want to delete
  this record?"
- In Acquisitions, view a basket containing orders. Cancel the
  order for a title in the basket. Open the detail page for the title in
  the cancelled order. Try to delete it. You should get an confirmation,
  "X deleted order(s) are using this record. Are you sure you want to
  delete this record?"
  - Perform the same test as a user with cataloging but not acquisitions
    privileges. The alert should say "X deleted order(s) are using this
    record. You need order managing permissions to delete this record."

- When logged in as a user with cataloging but not acquisitions
  privileges, view the details for a bibliographic record which is used
  in an order in Acquisitions. Delete any items attached.
- Choose "Delete record" from the Edit menu. You should get an alert, "X
  order(s) are using this record. You need order managing permissions to
  delete this record."

- View the details for a bibliographic record which has a hold.
- Choose "Delete all items" from the Edit menu. You should get an alert,
  "X hold(s) on this record. You must delete all holds before deleting
  all items."
- View the details for a bibliographic record which has no items.
- Choose "Delete record" from the Edit menu. You should get an alert,
  "Are you sure you want to delete this record?"
- Choose "Edit items in a batch" from the Edit menu. You should get an
  alert, "This record has no items."

I could not find any instance of the PopupZ3950Confirmed function in
catalog.js being triggered so I don't think the associated string can be
tested.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/catalog.js for
  translation, e.g.:

  msgid "This record has no items."
  msgstr ""

- Edit the "msgstr" string however you want (it's just for
  testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
1eb0fe4e5e Bug 26225: Move translatable strings out of biblio_framework.tt and into biblio_framework.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch, go to Administration -> MARC bibliographic framework.
- Click Actions -> Export and save the file.
- Click Actions -> Import.
- Select a file which isn't CSV or ODS. You should get an error message,
  "Please select a CSV (.csv) or ODS (.ods) spreadsheet file."
- Select the file you exported previously and click "Import." You should
  see an error message, "Are you sure you want to replace the fields and
  subfields for the default framework structure? ..."
- Click "OK." You should see a message in the modal window, "Importing
  to framework:..."
- Edit your exported framework file in such a way that it isn't a valid
  framework export.
- Repeat the process of importing the file. You should get an error
  message, "Error importing the framework..."

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js for translation,
  e.g.:

  msgid "Please select a CSV (.csv) or ODS (.ods) spreadsheet file"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

https://bugs.koha-community.org/show_bug.cgi?id=26226

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
ac12b9c648 Bug 26225: Move translatable strings out of audio_alerts.tt and into audio_alerts.js
This patch removes the definition of translatable strings out of
templates and into the corresponding JavaScript file, using the new JS
i81n function.

To test:

- Apply the patch, go to Administration -> Audio alerts.
- Click the "Delete selected alerts" button without checking any
  checkboxes. You should see an error: "Check the box next to the alert
  you want to delete."
- Check the checkbox for an existing sound and click "Delete selected
  alerts." You should get a confirmation message, "Are you sure you want
  to delete the selected audio alerts?"
- Click "New alert."
- Without filling any details, click the "Play sound" button. You should
  see an error message, "Please select or enter a sound."

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js for translation, e.g.:

  msgid "Are you sure you want to delete the selected audio alerts?"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
2ac76aee66 Bug 26339: Move translatable strings out of addorderiso2709.tt into addorderiso2709.js
This patch moves strings defined for translation in addorderiso2709.tt
into addorderiso2709.js for translation using the new double-underscore
i81n function.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket ->
Add orders from MARC file.

 - Click "Add orders" next to a staged file.
 - Without making any selections, click "Save." You should get an error,
   "There is no record selected."
 - Select a record and click "Save." You should get an error, "Some
   budgets are not defined in item records."
 - Enter a non-numeric value in the "Quantity" field and click "Save."
   You should get an error, "1 quantity values are not filled in or are
    not numbers."

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js for translation,
  e.g.:

  msgid "Some budgets are not defined in item records"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
9d056d0364 Bug 25317: Move translatable strings out of additem.js.inc
This patch moves the definition of translatable strings out of
additem.js.inc and into additem.js using the new JS i81n function.
additem.js.inc is removed, being obsolete.

To test:

When creating an order:

- Go to Administration -> System preferences and set "AcqCreateItem" to
  "when placing an order."
- Apply the patch and go to Acquisitions -> Vendor -> Add to basket ->
  From a new (empty) record.
- In the "Item" section, confirm that the buttons at the bottom of the
  form are correct: "Add item," "Clear," and "Add multiple items."
- Click "Add multiple items." The placeholder in the revealed form field
  should read "Number of items to add." The corresponding button should
  be labeled "Add."
- You should see a note, "NOTE: Fields listed in the 'UniqueItemsFields'
  system preference will not be copied."
- Fill out the item entry form and add a number to the "multiple items"
  field. Click "Add."
- A table of items should be displayed with "Edit" and "Delete" buttons
  for each new item.
- Click one of the "Edit" buttons. The item form should be populated
  with the item's data, with an "Update item" button at the bottom.

When receiving an order:

- Go to Administration -> System preferences and set "AcqCreateItem" to
  "when receiving an order."
- Go to Acquisitions -> Vendor -> Receive shipments.
- Select or create an invoice.
- Click "Receive" on an order which has a quantity greater than 1.
- Add two items, duplicating in each at least one value which is marked
  as unique by the "UniqueItemFields" system preference (e.g. fill in
  the same barcode number for each item).
- Click "Save." You should get an alert about duplicated values, and
  there should be an alert message on the page, "barcode 'XXX' is
  duplicated."
- Edit one of the two items and change the barcode to one which already
  exists in your database.
- Click "Save." An alert message should be shown on the page, "barcode
  'XXX' already exists in the database."
- Note: I was unable to find out how to trigger this error, "You can't
  receive any more items." It may be obsolete.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/additem.js for translation,
  e.g.:

  msgid "Add multiple items"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client
  and repeat the test plan above. The translated strings should
  appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-29 14:28:18 +02:00
a0e4e3b5f8 Bug 26556: (bug 25070 follow-up) Fix typo data_addressfield in address includes
Selecting "main address" city or "alternate address" city does not trigger the automatic population of values to the city, state, and zip fields anymore.
It woks for "alternate contact".

Test plan :
1) Create some cities with all datas : city, state, zip code and country
2) Open patron creation form
3) On "main address", select a city in combobox
4) Check city, state, zip code and country are filled
5) Same with "alternate address"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
8dca36661d Bug 11176: Add active switch on budgets select in suggestions
When creating a new purchase suggestion, all funds display and are available for selection.
The behaviour of this drop-down menu should mirror that of those drop-down menus elsewhere in acquisitions,
where only funds that are linked to active budgets display to the user.

This patch add the active switch based on what exists in acqui/invoice.tt and acqui/invoice.pl.

Looks like actually in suggestion.pl budgets list was fetches with GetBudgets().
But this is for the filter in 'Acquisition information'.
Budgets selection on suggestion creation/edition must use GetBudgetHierarchy(), like in acqui/invoice.pl,
in order to have the actif status.

Test plan :
1) Create a budget periods active B1 with a fund F1
2) Create a budget periods inactive B2 with a fund F2
3) Go to suggestions module
4) Create a new suggestion
5) Check you see only active fund F1
6) Click on 'Show inactive'
7) Check you see also 'F2 (inactive)'
8) Choose fund F1 and save
9) Select the suggestion and edit
10) Check fund F1 is selected
11) Come back to suggestion table
12) Check filter 'Book fund' under 'Acquisition information' contains all funds

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
Katrin Fischer
80993795dd Bug 11223: Fix the ind1 semantics for 785 in the staff interface
For 780 and 785 the field should not display when the first indicator
is 1. After checking the code, I found that 785 in staff was missing.
This patches fixes that one.

To test:
- Catalog a record with 785 and 780 fields with one 1st indicator set to
  0 and another to 1.
- Verify in staff and OPAC detail pages that only the fields with 0 display.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
Katrin Fischer
ed6d0d42a7 Bug 15437: (follow-up) Move $i subfield display to the beginning and add OPAC
This patch builds on Caitlin's to finish the work but keeping as
much from her code as possible.

- Finishes reindenting started in first patch
- Readds a space after the label
- Moves $i to the beginning of the field as suggested by MARC21
  documentation:
  http://www.loc.gov/marc/bibliographic/bd76x78x.html
  The data in subfield $i can be displayed preceding the other
  data contained in the field.
- Adds a span with a class around the $i so people can control
  the formatting

To test:
  - Catalog a record with 780/785 with and without $i.
  - Verify that they display nicely in staff and OPAC, $i should show.
    Also $a and $t will show (unchanged by this patch)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
Caitlin Goodger
a03e4f485a Bug 15437: MARC21: Show $i for 780/785
Test Plan
1: Inside Administration go to MARC bibliographic framework and on the
default framework under Actions click on MARC structure
2: Search for 780 under search tag and under actions click subfields
3: Find i and click on edit.
4: Under Advanced Constraints select editor and save the changes.
5: Repeat for 785.
6: Find a Bibliograpical record and under Edit select edit record.
7: Under the 7 put values into 780 and 785. For this to work it is
dependant on the patch 17929 so that you can type into the indicators
8: When you save the changes you won't be able to see 780 or 785 on the
Bibliographical details
8: Apply the patch
9: Refresh and 780 and 785 should be there at the bottom under the
content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
81b14467af Bug 26249: Set keep_text class correctly in cat-search.inc
This patch sets the keep_text class correctly in cat-search.inc
for the "Search the catalog" tab

To test:
1) Apply the patch
2) Go to /cgi-bin/koha/catalogue/search.pl
3) Type "A" into the search box for "Search the catalog"
4) Click on the "Check out" tab
5) Note that "A" appears in search box
6) Change "A" to "B" in search box
7) Click on the "Search the catalog" box
8) Note that "B" appears in the search box
9) Note no Javascript errors in the console

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:11 +02:00
e8522d8231 Bug 26478: Display issue with buttons on the self checkout screens
This patch adds missing Bootstrap classes to a few buttons on the self
checkout page. Without the classes the buttons are not styled correctly.

To test, apply the patch and open the self checkout page for a patron
with multiple checkouts, some renewable and some non-renewable.

In the table of the user's checkouts the "Renew item" button should be
styled as a green button. The "Check in item" button should be styled as
a blue button.

Try to check out an item which cannot be circulated. On the page warning
you "Item cannot be checked out," the "Return to account summary" button
should be styled as a blue button.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
5baffbee31 Bug 26512: Display issue with buttons for OPAC checkout note
This patch adds the correct Bootstrap 4 class to the buttons for
submitting checkout notes in the OPAC.

The markup has been updated to use <button> instead of <a> because of a
style conflict with jQueryUI's CSS.

To test, apply the patch and enable the AllowCheckoutNotes system
preference.

- Log in to the OPAC as a patron with checkouts.
- On the "Your summary" page, enter some text into a field in the
  "Notes" column of the checkouts table.
- Upon typing in the field a button should appear, "Submit note."
- The button should be styled as a green button.
- Submit the note.
- Make a change to the text in the field. A button should appear,
  "Submit changes." It should also be styled correctly.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
Katrin Fischer
d924e892a8 Bug 17458: Remove use of datereceived from order receive page
Before this patch the order receive page (parcel.pl) would show
... Received by: <current user> On: <current date>

This is not really helpful. Whenever you viewed an invoice, it
would tell you it was _you_ who received that _today_.

As we don't store a creator of an invoice and the order lines
in an invoice could have been received by different people (which
we also don't know about), the "Received by" is removed by this patch.

Instead of today's date, we can show the shipment date entered for
the invoice. Again: different order lines could have been received
on different dates for this shipment. So only the shipment date makes
sense as it's on invoice level.

This also makes changes to the page title, breadcrumby and page heading:
When the invoice is closed, they will read:
  Receipt summary for [vendor] ...
When the invoice is not closed, they wil read:
  Receive orders from [vendor] ...

To test:
- Create a basket with some orders in acq
- Close the basket
- Receive shipment and create an invoice
  - Make sure shipment date is not set to today
- Verify the information shown on top of parcel.pl is you and today
- Change staff users
- Go to your invoice, it's now this user and today
- Apply patch
- Received by: should be gone and the On: replaced by Shipment date:
  with the date you selected
- Check the page title, breadcrumbs and headings read all the same 'Receive orders...'
- Finish receiving and close the invoice
- "Go to receipt page"
- Verify they now read "Receipt summary.."

If you have older invoices in your system, it would work
even better with these as you'd see that always today's date
is displaying without the patch.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
fe84c3acba Bug 23485: Show barcode in holds to pull
Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold.
Also incorporating feedback to simplify the TT logic and remove list formatting.

To test:
1 - Place an item level hold on a bib with several items with the same callnumber
2 - View the holds to pull report
3 - Try to guess which one on the shelf is right?
4 - Apply patch
5 - See the barcode in holds to pull report
6 - You can now grab the correct item (but don't yet)
7 - Place a next available hold on the same title
8 - See the report now shows one possible valid barcode with the text "or any available."
9 - Check in a different item that fills the next available hold
10 - Now the report shows the single item for the borrower

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
5d5a49a7ef Bug 26224: Prevent double submit of header check in form
To test:
 1 - Browse to Home
 1 - In the header bar select the 'Check in' tab
 2 - Type a barcode into the box
 3 - Hit Enter as many as times as you can
 4 - Check the statistics table:
    SELECT * FROM statistics WHERE itemnumber={itemnumber} AND DATE(datetime)=CURDATE();
 5 - Note you have multiple lines for the same item at the same time
 6 - Apply patch
 7 - Reload the page
 8 - Type the barcode
 9 - Press Enter even more fast and more furiously
10 - Check the statistics table
11 - Only one entry, huzzah!

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>
2020-09-28 16:09:10 +02:00
Katrin Fischer
bd6598d018 Bug 26323: (QA follow-up) Fix syntax errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
9bbf909693 Bug 26323: (follow-up) Add new cases introduced
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
1e502efa0a Bug 26323: Retrieve the correct values for LOST, DAMAGED, LOC and CCODE
Same as previously

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
5da1e809b7 Bug 26323: Retrieve the correct NOT_LOAN value
From the template we are assuming that items.notforloan is mapped with
the NOT_LOAN authorised value category, but that is not necessarily the
case.

We must retrieve the correct AV category

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 16:09:10 +02:00
34b9c061f3 Bug 26418: Fix translatability of REFUND credit type
The description of REFUND type accountline credits introduced with the "issue refund" feature is not translatable.

To test:
- Make sure a language with a complete translation is installed
- Switch to the language
- Go to any user account
- Add a manual invoice
- Pay it off fully or partially
- Click on "issue refund"
- Confirm the refund
- Check the description of the line in the patron account is not translated.

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>
2020-09-28 15:07:27 +02:00
be7c705d3b Bug 26497: "Hide all columns" throws Javascript error on aqplan.pl
This patch updates the JavaScript for checking and unchecking checkboxes
on the Acquisitions planning page so that it doesn't require the
checkboxes plugin.

To test, apply the patch and go to Administration -> Budgets -> Budget
details -> Planning.

On the planning page, test the "Show all columns" and "Hide all columns"
checkboxes. They should work correctly to show and hide the correct
columns.

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 15:06:49 +02:00
f8d9a7a427 Bug 26541: Remove percent sign from discount button
Realized I'd left a stray tag, fixed.

To test:
1 - go to borrower account, apply manual fee
2 - go to Transactions tab and see that fee has "% Apply discount" button
3 - apply patch, restart, reload page
4 - button just says "Apply discount"

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 15:06:46 +02:00
d9815855bd Bug 16314: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 11:09:30 +02:00
ae21c3adb1 Bug 26505: Suspend hold modal broken in the OPAC
This patch makes corrections to the markup for the suspend hold modal in
the OPAC. It hadn't been updated during the upgrade to Bootstrap 4.

The JavaScript controlling the "suspend until" datepicker has been
modified because the datepicker pop-up was not positioned correctly in
this new version.

Unrelated: The markup for confirmation modals has been updated to
replace Bootstrap 3's "btn-default" with Bootstrap 4's "btn-secondary."

To test, apply the patch and make sure the SuspendHoldsOpac and
AutoResumeSuspendedHolds system preferences are enabled.

- Log in to the OPAC as a user who has holds.
- On the "Your summary" page open the "Holds" tab.
- In the list of holds, click the "Suspend" button.
- The modal should appear and look correct.
- Test the "Suspend until" field: Clicking in the form field should
  trigger the datepicker. It should be positioned correctly under the
  form field.
- Confirm that the datepicker populates the field.
- Submit the suspension and confirm that the hold is suspended.
- Click the "Cancel" button for a hold. Confirm that the confirmation
  dialog appears correctly.

Edit: Updated class of hidden submit button. Test the page with JS
disabled to test that the "Suspend until" form works correctly.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-28 11:08:03 +02:00
Katrin Fischer
4f3cb59a97 Bug 26283: Add dateexpiry and dateenrolled to new borrower fields modal
While these may not make sense for all patron field preferences, I think
it's better to have them in general than to have them missing.

To test:
- Check the modal for BorrowerMandatoryField system preference
- Verify dateenrolled and dateexpiry fields are missing
- Apply patch
- Verify the dates are listed now
- Set both to mandatory
- Verify that they are indeed mandatory when adding a new patron now

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:49:29 +02:00
5ece5d7c7f Bug 26421: Use Bootstrap screen reader text class for shelf browser messages
This patch udpates the markup added by Bug 26039, replacing the "hidden"
class, which is no longer functional with Bootstrap 4, with "sr-only," a
class designed specifically for screen reader text.

The patch also corrects a typo, "shelfbrowers" -> "shelf browser"

To test, apply the patch and make sure the OPACShelfBrowser system
preference is enabled.

View the detail page for a bibliographic record with items. In the
holdings table, you should see links labeled "Browse shelf."

When you open the shelf browser there should be a link at the top that
reads "Close shelf browser."

If you have access to a screen reader, test that the hidden text is
announced by the reader. "Browse shelf (Opens below)" and "Close shelf
browser (Hides shelf browser)."

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:49:29 +02:00
0310e973a4 Bug 10921: Prevent an order from a closed basket to be edited
We don't allow editing of orders that are part of a closed basket, but
we don't enforce the rule in the controller file.

This patch use output_and_exit to stop the script and display an error
to the end user.

Test plan:
Create a basket, add an order
On the basket view you see the "Modify" link, open it in a separate tab
=> You can edit the basket
Keep this tab open, get back to the other one and close the basket
Reload the tab with the order edition form
=> You cannot longer edit the basket

QA: Do we need a check in addorder.pl as well?

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:49:29 +02:00
f90afe5c22 Bug 15933: Add cataloguing plugin to search for existing publishers in other records
This patch adds a new cataloging plugin for MARC21 installations,
marc21_field-260b.pl. When enabled it provides autocomplete for
publisher name, pulling existing data from biblioitems.publishercode.

To test, apply the patch and enable the plugin:

- Go to Administration -> MARC bibliographic framework -> MARC structure
  -> 260 -> Edit subfields -> Subfield b -> Other options.
- Set "Plugin" to marc21_field_260b.pl.
- Go to Cataloging and edit or create a record.
- Under tab 2 click the field for 260$b. Start typing a publisher name.
  A dropdown should appear with matching publishers.
- Selecting one of the results should populate the form field with that
  information.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also works with 264$b.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:49:29 +02:00
David Gustafsson
d1c8d7ecce Bug 24807: Add "year" type to improve sorting behaviour
Add a "year" search field type. Fields with this type will only
retain values that looks like years, so invalid values such as
whitespace or word characters will not be indexed.
This for instance improves the behaviour when sorting by
"date-of-publication". If all values are indexed, records with
junk data instead of valid years will appear first among the search
results, drowning out more relevant hits. If assigning this field
the "year" type these records will instead always appear last,
regarless of sort order.

To test:

1) Have at least two biblios, one with a valid year in 008 (pos 7-10)
and another with an invalid one ("uuuu" for example)
2) Perform a wildcard search (*) and sort results by publication date.
3) The record with invalid year of pulication in 008 should appear first
4) Apply patch and run database updates
5) Reindex ElasticSearch
6) Perform the same search as in 2)
7) The record with the invalid year should now appear last

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:21:31 +02:00
3b273de577 Bug 25744: replace <b> with <strong> in the staff interface
This patch set attempts to replace all the <i> tags with <em> and all
the <b> tags with <strong> in the staff interface.
I attempted to get all the templates, includes, and xslt files.

To test:

1. Review the changes as best as possible, looking for mistakes.
2. grep for <i> and <b> in the modules, includes, and xslt folders. You should get nothing/
3. If you grep '<\/i>' you should only see instances of Font Awesome.
4. If you grep '<\/b>' you should only see instances where caret is used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:08:35 +02:00
a02bd4f71c Bug 25744: Replace <i> with <em> in staff interface
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:08:35 +02:00