Commit graph

22526 commits

Author SHA1 Message Date
6a0db6c1c4
Bug 35718: Remove ES6 warnings branches.tt
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:23 +01:00
5e3ae14aa0
Bug 35718: Remove ES6 warns from JS system preferences
To test:
1. Add some JS like this to any of the UserJS system preferences:

$(document).ready( function() {
    let something = 1;
    const another_thing = 2;

    let an_arrow_function = (a, b) => a + b;
    console.log( an_arrow_function(something, another_thing) );
});

2. Notice the icons and warnings to the left of the line numbers:

let is available in ES6
const is available in ES6
arrow_function_syntax is available in ES6

3. APPLY PATCH
4. Try steps 1 and 2 again, the warnings should be gone.
5. Check that the JavaScript still works, in my example it should console.log 3.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:22 +01:00
Laura Escamilla
6bf839d892
Bug 36004: Fixed typo in successfully
To test:

1. Turn on the syspref 'OpacCatalogConcerns'

2. Go to view a record in the OPAC and click on "Report a concern" in
   the column located on the right-hand side.

3. Fill out the title on the form and leave everything else the same.
   Click on submit and notice that the message on the screen says "Your
   concern was sucessfully submitted."

4. Apply the patch.

5. Submit a new concern. Notice that the text now has "successfully"
   spelled correctly.

6. Sign off and have a great day! :D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:22 +01:00
Laura Escamilla
0fcf48c55f
Bug 36005: Fixed typo in "Your concern was successfully submitted." text
To test:

1. Turn on the syspref 'CatalogConcerns'

2. Go to view a record in the staff intranet and click on "New catalog concern" which is located in the "+New" dropdown.

3. Fill out the title on the form and leave everything else the same. Click on submit and notice that the message on the screen says "Your concern was sucessfully submitted."

4. Apply the patch.

5. Refresh the page and submit a new concern. Notice that the message now has "successfully" spelled correctly.

6. Sign off and have a wonderful day! :D

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:21 +01:00
0bdd12ea22
Bug 36070: Fix CSS class
1) Enable UseRecalls
2) Checkout an item to a patron:
   Top INTRA search bar: pick 'check out' and paste a patron
   cardnumber:
   23529000035676
   press enter
3) Enter an item barcode:
   39999000003154
   Press checkout
4) As user koha/koha, visit OPAC page for this biblio:
   opac-url/cgi-bin/koha/opac-detail.pl?biblionumber=76
5) Notice all sidebar actions on the right have hover effect except for
   'Place recall'

Apply patch, repeat test plan.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:21 +01:00
Raphael Straub
7c1ce64593
Bug 36032: Use a single angle in the "Next" button
The "Next" pagination button in the OPAC result list has a double angle
whereas the "Previous" button only has a single angle. This patch fixes
that error.

To test:
1) Do a search in the OPAC with more than one page of results.
2) Observe that the "Next" button has a double angle whereas the
   "Previous" button has only a single angle.
3) Apply the patch.
4) Repeat steps 1 and 2.
5) Verify that the "Next" button now has a single angle.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:20 +01:00
0233c1d93f
Bug 35924: (QA follow-up): Comment magic number (patron.privacy < 2)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 17:35:38 +01:00
19f38a286d
Bug 35924: Hide the print checkins button on the checkin screen for patron's who always anonymize
Test Plan:
1) Set a patron's privacy to "Never"
2) Check out a few items to a patron
3) Check in one item
4) Note the "Print checkin slip" diplays
3) Apply this patch
4) Check in an  item
5) Note the option is now missing
6) Set the patron's privacy to "Forever" or "Default"
7) Check in an item
8) Note the print checkins option is back!

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 17:35:37 +01:00
7253c38b8a
Bug 35924: Hide the print checkins button on the patron screens for patron's who always anonymize
If a patron anonymizes their checkins, the checkin slip cannot retrieve any info to print the checkin slip. We should not show the button in this scenario

Test Plan:
1) Set a patron's privacy to "Never"
2) Note the "Print checkin slip" option in the Print button on the
   patrons toolbar displays
3) Apply this patch
4) Reload the page
5) Note the option is now missing
6) Set the patron's privacy to "Forever" or "Default"
7) Reload the page
8) Note the print checkins option is back!

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 17:35:37 +01:00
bcfc786f17
Bug 34234: Respect display_order in additem.tt and detail.tt
1. APPLY PATCH
2. EnableItemGroups
3. Find a record and add some new item groups with display orders that are different from the order in which the groups were added
4. Check the checkbox next to one or more items and click the link to "Add/move to item group"
5. Ensure display order is correct
6. Now add a new item to the record and scroll down to the dropdown underneath "+ Add to item group"
7. Display order should be correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:45 +01:00
Julian Maurice
4515581eff
Bug 36047: Remove jQuery selector from conditional
This prevents the jQuery from breaking if the reason contains an
apostrophe character.

1. Create a suggestion
   1.1. Go to Acquisitions > Suggestions
   1.2. Click New purchase suggestion
   1.3. Enter a title
   1.4. Click Submit your suggestion

2. Update the suggestion to accepted and add a reason with an apostrophe
   2.1. In the suggestions list, check the box next to the suggestion
   2.2. At the bottom of the screen, choose Mark selected as: Accepted
   2.3. In With this reason, choose Others...
   2.4. Enter a reason with an apostrophe (my case was in French :
        Disponible en impression à la demande (POD). S'attendre à un
        long temps d'attente)
   2.5. Click Submit

3. Order the suggestion
   3.1. Go to Acquisitions
   3.2. Search for a vendor
   3.3. Click New > Basket
   3.4. Enter a basket name
        (Optional: for testing I like to change Create items when:
        cataloging the record)
   3.5. Click Save
   3.6. Click Add to basket
   3.7. Click From a suggestion
   3.8. Click Order next to the suggestion
   3.9. Enter order details
   3.10. Click Save
   3.11. Click Close basket
   3.12. Click Yes, close

4. Receive the order
   4.1. Click Receive shipments
   4.2. Enter a Vendor invoice number
   4.3. Click Next
   4.4. Click Receive next to the order
        --> Page stays In processing forever

Apply patch. Repeat. Notice the page now renders correctly.
Extra: Add an entry containg an apostrophe to the SUGGEST authorized
values category and repeat test plan. Confirm everything works as
expected.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:40 +01:00
c39a35ba85
Bug 36249: Fix styling of 'Send email' button
This button was using the old 'btn-default' class instead of the new 'btn-primary' form 22.11 onwards

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:35 +01:00
4214e5415d
Bug 36249: Fix generic_confirm op
Test plan, k-t-d:

1) Install FreeForm, enable ILL module, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) You'll have to switch the FreeForm branch to the one compatible with this work, i.e.:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout b_36243
3) Restart plack:
koha-plack --restart kohadev
4) Start by adding an e-mail address to the patron of category "Inter-library Loan", visit:
<staff_url>/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16
5) Add an e-mail address to "Primary e-mail"
6) Create a new FreeForm request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
7) Set 'type' enter '42' in cardnumber and pick a library. Click 'Create'.
8) Click "Place request with partners"
9) Pick a partner library (will be the same patron from step 4)
10) Click "Send email". Notice the CSRF error.
11) Apply patch and restart plack
koha-plack --restart kohadev
12) Repeat 8-10. Notice error no longer shows.
13) Notice the request's status is now 'Requested from partners'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:35 +01:00
2e633b7f9d
Bug 36243: Update edit_action to cud-edit_action
1) Install FreeForm, enable ILL module, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) You'll have to switch the FreeForm branch to the one compatible with this work, i.e.:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout b_36243
3) Restart plack:
koha-plack --restart kohadev
4) Create a new FreeForm request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set 'type' enter '42' in cardnumber and pick a library. Click 'Create'.
6) Edit that request, click "manage request" or if #1 visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1
7) Click "Edit request". Click "Submit". Notice it errors "No CSRF token passed for POST"
9) Apply patches. Restart plack.
10) Repeat 7)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:34 +01:00
6c1a5b83bb
Bug 36241: Update missing query_type => op in ill-batch.inc
Test plan:
- Add 'FreeForm' backend and enable ILLModule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
- Install a metadata enrichment plugin, e.g.:
https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases
- Add 5 batches, run the following command in kshell:
for x in {1..5}; do echo "INSERT INTO illbatches (name, backend, library_id, status_code, patron_id) VALUES ('$x', 'FreeForm', 'CPL', 'NEW', 52);"; done | koha-mysql kohadev
- Visit ILL batches page:
<INTRA_URL>/cgi-bin/koha/ill/ill-requests.pl?method=batch_list
- Confirm no batches are shown. Apply patch. Repeat.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:33 +01:00
6e56e4a0d1
Bug 36175: Corrections to reduced due for booked items
This patch fixes a mistake in the circulation controller such that the
proper reduceddue date is passed to the template when a checkout would
overlap with a booking.

I also take the oportunity to enhance the functionality to allow
librarians to set their own reduceddue date between now and the hard
reduceddue as required for the existing booking.

Test plan
1) Set an item to 'bookable'
2) Add a booking to that item for user A for a few days time.
3) Attempt to checkout the item to user B and note the warning that
   the item is booked for another user.
4) With the patch applied, a reduced due date of 1 day prior to the
   booking should be defaulted to in the displayed date picker.
5) You should be able to select any date between today and the day
   before the booking starts
6) Confirm you can checkout with the reduceddue date set.
7) Bonus point, confirm the field is required, so if you try to wipe it
   and then checkout, you will be blocked.

Signed-off-by: Kelly <kelly@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:32 +01:00
2f9e8b2b6f
Bug 36234: Fix 'languages' prefs selection
Test plan:
Edit and save several types of sysprefs, reload the page to confirm they
are correctly saved, or check their values in DB

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:31 +01:00
214fc675cf
Bug 36140: Correct label for attribute invoice.tt
To test:
1. Go to /cgi-bin/koha/acqui/invoice.pl?invoiceid=X  where X is the invoice number.
2. Look at the Invoice number with your dev tools, the for attribute is wrong. ( shippingdate )
3. Apply patch and look again, the attribute should correctly be invoicenumber.

Alternatively, just look at the diff of this trivial change. :)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:53 +01:00
52e7c8acf4
Bug 36076: paycollect.tt add permission checks for manual credit and invoice
In members/pay.tt one can see permission checks for manual credit and invoice :
CAN_user_updatecharges_manual_invoice
CAN_user_updatecharges_manual_credit

This is missing from members/paycollect.tt.
HTML is also missing classes manualcredit and manualinvoice.

Test plan :
1) Create a user with permissions to manage accounting
   (remaining_permissions under updatecharges) but without
   manual_invoice and manual_credit
2) Go to a patron account with an invoice
3) Click on "Make a payment", you dont see tabs manual credit/invoice
4) Click on "Pay" in "Actions" column
=> Without patch you see tabs manual credit/invoice
=> With patch you do not see them

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:53 +01:00
Julian Maurice
2753eec1ce
Bug 35963: Fix bundled items table ordering and filtering
Using the many-to-many relationship results in the table alias `me` to
be used for table `item_bundles` instead of the expected table `items`.
This causes ordering and filtering to fail for columns Callnumber and
Barcode.
Using Koha::Items->search does not have this problem.

This patch also disables ordering by status because it does not work
(error message is: "Cannot find Koha::Object class for return_claim'")

Test plan:
1. Create an item bundle
   https://koha-community.org/manual/23.11/en/html/circulation.html#circulating-bundles
2. Add at least 2 items to this bundle
3. Verify that ordering/filtering by callnumber or barcode works
4. Run `prove t/db_dependent/api/v1/items/bundled_items.t`

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:51 +01:00
112a76650c
Bug 35554: Authority search popup width 800px
Authority search popup is only 700 pixels width.
Most popups use 800 pixels, like the z3950 one.

Test plan :
1) Edit a biblio record
2) Click on value builder in a field linked to authority (ie 700)
3) Check popup is 800 pixels wide
4) Same with advanced editor

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:50 +01:00
b7f9a86677
Bug 36150: Update circulation-home.tt layout
Test plan:
Compare both pages:
<staff_url>/cgi-bin/koha/cataloguing/cataloging-home.pl
<staff_url>/cgi-bin/koha/circ/circulation-home.pl

Apply patch
Compare both pages again

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:48 +01:00
dde374e2ad
Bug 35351: Adjust basket details template to avoid showing empty page-section
This patch makes a minor change to the markup of the basket details page
so that we don't display an empty div.page-section when there are no
orders.

Note: This patch includes whitespace changes, so please ignore
whitespace when viewing the diff.

To test, apply the patch and go to Acquisitions.

- Search for a vendor and add a basket if necessary.
- View the details of an empty basket.
- Under the "General information" or "Settings" sections there should be
  no empty white box.
- View the details of a basket which has orders (using the "Add to
  basket" process if necessary).
  - Orders should be displayed correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:45 +01:00
d485ff32b0
Bug 35422: Fix translation of suggestions title tag
This patch corrects a missed instance of a string in the title tag which
should have been wrapped in the translation function [% t() %]

To test, apply the patch and go to Suggestions.

- Click "New purchase suggestion"
- The title of the page should be correct: "Add suggestion"
- Confirm that translation is improved:
  - Update and reinstall active translations (for instance fr-FR):
    perl misc/translator/translate update fr-FR
  - Check the corresponding po file, in this case fr-FR-messages.po
  - There should be an entry for the string "Add suggestion"

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:44 +01:00
58013fd61d
Bug 35397: Fix SIP2AddOpacMessagesToScreenMessage system preference description
The original syspref description contained an extra  '- Use' and reads
weird.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:44 +01:00
f3feebbfe9
Bug 36091: Spelling: Use "card number" instead of cardnumber in text
This patch replaces the term "cardnumber" with "card number" in labels
and text where the patron's library card number is referred to. Where
the database column is referenced "cardnumber" is kept.

A full test plan would be very time-consuming and I think examining the
patch should be verification enough for changes which are limited to
adding a space.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Verified that the patch only changes "visible" text, and not
references to the database column.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:42 +01:00
f94d763b6a
Bug 36099: count and holdcount template vars into JS vars should default to 0 if empty
Visit:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4321
Notice you have 2 console errors:
1) Uncaught SyntaxError: Unexpected token ';'
2) Uncaught ReferenceError: biblionumber is not defined

Apply patch. Repeat. Notice no error shows.
Visit an existing biblionumber. Confirm all is well.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:41 +01:00
e17959b34d
Bug 36157: Remove class from anchor link
Test plan:
- Create a notice with the module of "Reports" -- add something to the "Print" section. Example from bug 34136:
[% FOREACH b IN data %]
<div class="panel panel-default">
  <div class="panel-heading">[% b.surname %], [% b.firstname %]</div>
  <div class="panel-body">Expiration: [% b.dateexpiry %]</div>
  <div class="panel-footer">ID: [% b.borrowernumber %]</div>
</div>
[% END %]

- Create and run a saved report. Example from the other bug:
SELECT * FROM borrowers

- Click on the "Run with template" dropdown and hover the template title.

- Notice it the styling of the hover. Apply patch. Repeat.

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@bsz-bw.de>
2024-03-07 15:02:41 +01:00
ed4fb21e2c
Bug 36158: Update t iterator variable
It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why.

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@bsz-bw.de>
2024-03-07 15:02:40 +01:00
Thibaud Guillot
ed037fb274
Bug 36156: None value selected on clone field/subfield linked to AV
When a field or subfield is linked to a list of authorized values and cloned, the selected value is repeated in the clone. This is linked to the default behavior of Select2Utils, so I've added a precise index (-1) to ensure that no value is selected in the clone.

Test plan:

1) Create a repeatable field and subfield and link a list of authorised values to the subfield.
2) Edit a record, clone the field and see which value is automatically selected in the clone.
3) Apply the patch
4) Repeat step 2

Sponsored by : BibLibre

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:40 +01:00
fa745c3b1d
Bug 35532: Remove shortcut buttons from flatpickr
It doesn't make sense to have the shortcut buttons in the range picker
for bookings. This patch adds the ability to remove them entirely from
display and uses that option in the bookings modal.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:39 +01:00
03b95cc32a
Bug 35532: Update date select field and add hint
This patch updates the 'Period' select from 'Period' to 'Booking dates'
and adds a hint beneath it too.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:39 +01:00
58cdd79357
Bug 35426: Improve layout of bookings modal form
This patch changes the class on the bookings modal form's fieldset in
order to make the form work better in the small space offered by the
modal.

Also changed: The hint for the patron search field has been moved below
the field for consistency.

To test, apply the patch and search for a title in the staff interface.

- View the detail page.
- If you don't see a "Place booking" button in the toolbar,
  click "Items" in the sidebar menu.
  - Locate the "Priority" heading, and change the "Bookable" setting to
    "Yes."
- Click the "PLace booking" button in the toolbar.
  - The bookings modal form should appear, and the form layout should be
    improved.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 15:02:38 +01:00
aa63943c2f
Bug 35329: Fix autocomplete when placing a hold
There was a JS error
Uncaught TypeError: node.autocomplete(...).data(...) is undefined

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-04 14:50:39 +01:00
36c4d315c8
Bug 35329: Fix conflict with 33457
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 16:04:27 +01:00
da5605ca73
Bug 35329: Adjustment for 34478
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:01:25 +01:00
b32b08febb
Bug 35329: (QA follow-up) Fix for bug 35865
This restores the missing hint that's restored by bug 35865 ahead of
this patchset

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:01:24 +01:00
1807573ad1
Bug 35329: Add styling to info and error
There were 2 "class" attribute and the second was ignored.
This could still be improved, but then we should adjust the css from
staff-global, but won't be trivial to test.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:01:24 +01:00
5c1f9b433d
Bug 35329: Fix filter vars scope
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:01:23 +01:00
fc5e0fa8b4
Bug 35329: (follow-up) Label changes for improved accessibility
This patch alters the patron search form so that <label>s wrap the
<input> fields, allowing the label to be clickable without having to
associate it with a unique id. CSS has been modified to accommodate this
change.

The patch also adds missing Bootstrap classes to the "Clear" button, and
swaps out the "hint" class for the "note" class on the permissions
information ("Only staff with superlibrarian or acquisitions
permissions...").

After this patch, form field labels in the patron search modal should be
clickable to give focus to the field (except for Sort 1 and Sort 2 --
label don't work that way with Select2).

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>
2024-03-01 11:01:19 +01:00
afd014710f
Bug 35329: Prevent XSS
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>
2024-03-01 11:01:18 +01:00
fadb37d3e1
Bug 35329: (follow-up) Trigger Select2 upon modal open
If we wait until the modal is visible Select2 can correctly calculate
the width needed for the Sort 1 and Sort 2 dropdowns.

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>
2024-03-01 11:01:18 +01:00
eb0a846329
Bug 35329: Remove fixedHeader
If fixedHeader is set for the result table in the modal, the header will
still appear (quite randomly) on the main view.

To recreate the problem:
Go to /cgi-bin/koha/members/memberentry.pl
Click Add guarantor
Search
Close the modal
Scroll down
=> The header of the table will be displayed randomly at the top of the
page

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>
2024-03-01 11:01:17 +01:00
2880efc517
Bug 35329: Fix neworderempty
Hum I had to put it that way but I cannot remember why. Moving patron_search_js after patron_search_modal fixes the search problem (see comment 12).

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>
2024-03-01 11:01:16 +01:00
a15f32ec9b
Bug 35329: Move patron search to modal - remove members/search.pl
git grep members/search.pl
should not return any results

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>
2024-03-01 11:01:15 +01:00
df85dd3a90
Bug 35329: Move patron search to modal - suggestion
Test plan:
Edit a suggestion
Click "Set patron" to change the suggester
Click "Select manager" to set the manager

On the suggestion list view, you can also select a manager. Make sure
you are testing with different tabs (suggestions with different statuses).

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>
2024-03-01 11:01:14 +01:00
7c5b691808
Bug 35329: Move patron search to modal - erm
Test plan:
Edit an agreement or a license
Add new user and click "Select user" to open the modal
Test with different user for the same agreement/license

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>
2024-03-01 11:01:13 +01:00
e3743529eb
Bug 35329: Move patron search to modal - routing list
The behaviour is a bit different here. Adding a patron from the popup
refreshed the parent page with the newly added patron.

With this patch the refresh of the page will happen when the modal is
closed (if patrons have been added).

Test plan:
Create a subscription, receive one item, create a routing list.
Add users.

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>
2024-03-01 11:01:13 +01:00
7a25557bfe
Bug 35329: Move patron search to modal - edit-batch
Test plan:
Create new patron card batch
Keep the textarea empty and click "Add patron(s)" to open the modal
There is a special feature here, the "checkbox" column is displayed and
you can select several patrons and click "Add selected patrons".

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>
2024-03-01 11:01:12 +01:00
07890e3163
Bug 35329: Move patron search to modal - funds
This is a tricky one.
We can have several modals per page, patron-search.inc needs to be
adjusted to not use ids but classes. Also we need to declare JS
variables with 'var' instead of 'let' (which does not allow redefinition
of the same variable).

Test plan:
Create or modify a fund
"Select owner" and "Add users" to open the modals.

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>
2024-03-01 11:01:11 +01:00