Commit graph

50023 commits

Author SHA1 Message Date
e4f9a2adae Bug 35174: Add a warning to the about page
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2023-11-22 09:37:14 +01:00
72580bd09f Bug 35174: Do not explode if po dir does not exist
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2023-11-22 09:36:47 +01:00
Koha translators
8901b3dd7b Bug 35174: Remove .po files from Koha 2023-11-22 09:36:09 +01:00
75b85ddb29 Bug 35012: Apply change to all events
We should not just look at Click.

Test plan:
[1] Apply the example patch for a Blur action in barcode.pl.
[2] Check that barcode.pl is active in your framework and that
    autoBarcode is not disabled.
[3] Open the browser dev console.
[4] Tab a few times through barcode in the neworderempty form of
    Acquisition. If you leave the field, the Blur event fires.
    => Without this patch you will see two console lines (FF may
    show a little '2' icon at the right side) added. With this
    patch just one.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9326f0e86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c8685d088a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-16 09:37:12 +00:00
Jan Kissig
ca7f2208ce Bug 35012: Prevent Click handler firing twice
test plan:
a) build a new basket + order line using "item create on placing an order"
b) in the item creation dialog (neworderempty.pl) please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking
c) notice the Clicktag_952_subfield_d_* event gets fired twice.
d) apply patch and reload page
e) there should be only 1 click handler left (besides the jquery one), which points to the Clicktag_952_subfield_* function

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
See also bug 35298. You may have seen that the Focus event of dateaccessioned
did not fire. But that is related to use of Flatpickr in this plugin.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec3fe5d41e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f846ee85ec)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-16 09:37:11 +00:00
0f9fcfcaab Bug 35276: Remove authentication params from suggestion hash
These would be forwarded to Koha::Objects->as_list and crash on
unknown column.

Test plan:
Logout from staff.
Enter URL /suggestion/suggestion.pl
Without this patch, it crashes. Now it does not.

Note: The crash may show auth_forwarded_hash but I also saw
koha_login_context passing by. Same issue.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2821c7962)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 898e0d7979)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-16 09:37:10 +00:00
a0458e0300 Bug 35298: Remove focus handler from dateaccessioned plugin.
Test plan:
Verify that setting focus to date acquired field in items editor
fills date of today when field is empty but does not replace existing
date.

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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0583deac95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5ca56bf8b3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-16 09:37:10 +00:00
f86419cea7 Bug 35343: Add record accessor method to Koha::Authority
Code lifted from bug 31794 to fix already backported bug 26611.

Unit tests included.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40115a2c8cba3e081ffd0710899ef4556a3bbb54)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-16 09:09:25 +00:00
2e99040bfe Rmaint fix: Revert bug 35148 as it needs 31453 not in 22.11.x 2023-11-15 12:41:10 -01:00
733c617b4f Rmaint fix: Same as 7e9866a
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-15 08:31:41 -01:00
19f35a08db Bug 35284: Fix tests
This fix patrons_search.t but other selenium tests certainly need
adjustements

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 17:26:50 +00:00
11fbc3e5c8 Rmaint fix: Remove Koha::Tickets import from 35019 rebase 2023-11-14 16:11:36 +00:00
9e93b94a72 Bug 35284: Add throttling to column filters
Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2023-11-14 15:54:03 +00:00
a52508d266 Bug 35284: Fix Vue tables
Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2023-11-14 15:54:03 +00:00
adc064546d Bug 35284: Add DT delay to kohaTable
To test:
* When a specific initComplete exists (general patron search)
* When no specific initComplete exists (cities)

=> KO
* ERM tables display twice the "show X entries" dropdown list
* Column filters are not affected

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2023-11-14 15:54:03 +00:00
f7c1947f49 Bug 35187: [23.05] (follow-up) Fix missing line breaks in WELCOME notice
yaml was broken because of extra space

(cherry picked from commit e867c7207b)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 14:02:06 -01:00
2256e2017f Bug 35144: Update style of 'Required' label for OPAC patron attributes
This patch makes some changes to style and markup of the part of the
OPAC patron entry form which displays patron attribute entry fields.

To test, apply the patch and rebuild the OPAC CSS.

- Create at least two patron attributes which have both "Display in
  OPAC" and "Editable in OPAC" checked: One which is linked to an
  authorized value, one which isn't. At least one attribute should be
  mandatory. At least one attribute should be repeatable.
- Test the form using either patron self-registration or by logging in
  to the OPAC and clicking the "Personal details" link in the sidebar.
- Check the appearance of required fields in the form, including the
  mandatory patron attributes.
- Confirm that the "Clear" and "New" controls look good and work
  correctly, including fields cloned with the "New" button.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dd70e43b66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e1dc14bb68)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 14:00:15 -01:00
Katrin Fischer
d608562697 Bug 35283: Add missing subfield h to action note 583 in OPAC detail page
$x is nonpublic note, so it makes sense to only display it in staff, but
$h is Jurisdiction and we should show it in OPAC and staff alike.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 653dc1b221)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 916f7d9127)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:58:32 -01:00
ca6970ab18 Bug 35283: Add missing subfields h and x to field 583 for staff XSLT
This change adds the missing subfields h and x to field 583 for
the detail XSLT in the staff interface.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
2. Click on tab "5"
3. Scroll down to 583 and click on "ACTION NOTE" to expand subfields
4. Fill in using the following example:
   583	0#$adowngraded$c19910110$hJoe Smith$otitle$xfrom secret FRD to confidential NSI
5. Click "Save"
6. Note that the "Action note" now shows "Joe Smith" and "from secret
   FRD to confidentail NSI"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d74a89e2da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ba9a113410)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:58:26 -01:00
Aleisha Amohia
8febe5ed4e Bug 33164: Do not prevent processing of all error messages
This follow-up patch removes the use of $exit_required_p completely. The sysprefs BlockReturnOfLostItems and BlockReturnOfWithdrawnItems are handled in other scripts, and should not prevent the processing of all returns error messages when enabled.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64460e4f4e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 53370581fd)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:58:11 -01:00
Aleisha Amohia
f9ba89ade4 Bug 33164: Ensure return claim message shows if lost item return blocked
This fix ensures that a return claim confirmation always shows, even if
the return of lost items has been blocked by BlockReturnOfLostItems
being enabled.

To test:

1. Set BlockReturnOfLostItems system preference to Block
2. Check out an item to a patron
3. Go to the patrons page and claim a return on the item
4. Check in the item and keep checking in the item. Notice the message
"Item is lost, cannot be checked in." shows every time, but the return
claim message only shows sometimes.

5. Apply the patch and restart services

6. Check in the item and keep checking in the item. Confirm both the
lost message shows and the return claim message shows every time.
7. Confirm the return of the item is still blocked.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f56880812)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 93276f59f1)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:58:03 -01:00
8500168c89 Bug 35278: Fix warn from column_settings.pl
We need to add scalar to the calls. These parameters are not meant
to be used as multi_param.

Test plan:
Try With and without this patch on staff:

Try: /cgi-bin/koha/admin/columns_settings.pl
=> WITHOUT: No warnings
=> WITH: Same. No change.
Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&page=basket
=> WITHOUT: Opens module, scrolls down. CGI::param called in list context in logfile
=> WITH: Opens module, scrolls down.
Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&page=basket&table=orders
=> WITHOUT: Opens module, scrolls down. CGI::param called in list context in logfile
=> WITH: Opens module, scrolls down.

Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&module=admin
* Hash like: panel => acqui, admin => page, undef  => table, undef => modules, $modules (SHIFTED)
=> WITHOUT: Acqui expanded showing: There is no page using the table configuration in this module.
=> CGI::param warning in log.
=> And: Problem = a value of table has been passed to param without key
=> And: Problem = a value of modules has been passed to param without key
=> WITH: Only the first module (Acqui) should be expanded.

Try: /cgi-bin/koha/admin/columns_settings.pl?module=acqui&module=admin&page=basket&table=orders
* Hash like: panel => acqui, admin => page, basket => table, orders => modules, $modules hash (SHIFTED)
=> WITHOUT: Acqui expanded showing: There is no page using the table configuration in this module.
=> And: CGI param log warning.
=> WITH:: Opens Acqui. Second module ignored. Scrolling.

Try: /cgi-bin/koha/admin/columns_settings.pl?module=admin&module=acqui&page=basket&table=orders
* Hash like: panel => admin, acqui=> page, basket => table, orders => modules, $modules hash (SHIFTED)
=> WITHOUT: Admin expanded showing: There is no page using the table configuration in this module.
=> And: CGI param log warning.
=> WITH: Admin should be expanded (page and table ignored, not in Admin). No scroll.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1b11de87b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dbc24ece69)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:57:42 -01:00
9c93df0b07 Bug 34413: Fix style of Flatpickr in iOS mobile view
This patch updates Flatpickr CSS in the OPAC and staff interface so that
date fields are displayed correctly in iOS mobile views.

To test, apply the patch and rebuild the OPAC and staff interface CSS.

- In the OPAC, click "Create new account"
- In the account entry form, confirm that the date of birth field looks
  correct and that the date-picker works as it should.
- In the staff client, go to Patrons -> New patron.
- Check the date of birth field in this form too.

This patch has been tested in the Xcode iOS device simulator with iOS
17. While I wasn't able to reproduce the problem in Firefox, I was able
to use the developer tools' responsive design mode to trigger the mobile
view and thus be able to see the styles which are being applied:

- In the OPAC, on the "Create new account" screen, open the Web
  Developer Tools panel (Tools -> Browser tools -> Web Developer Tools).
- Click the "Responsive Design Mode" button in the upper-right corner of
  the developer tools panel (it looks like a phone and tablet together).
- The main browser window will now how some settings at the top.
- In the first dropdown, choose an iPhone model.
- The date of birth field should now be styled differently because of
  the addition of a "flatpickr-mobile" style.
- Right-click the field and choose "Inspect." In the developer console
  you can see the styles which are being applied to the field. One of
  those should be ".flatpickr-input.flatpickr-mobile"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e9fa64d5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0b468bd413)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:57:10 -01:00
1892c62edd Bug 35295: Move JS asset in returns.tt
To Test:
1. Place a hold
2. Check-in an item of the held record
3. No hold modal 😱
4. APPLY PATCH
5. Hold modal!!!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 771334218a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6abfcbecd8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:56:48 -01:00
971bcfd9b5 Bug 35262: Improve OPAC self registration confirmation page
This patch corrects logic in the OPAC self registration confirmation
template so that the right column markup is shown when various
combinations of OpacNav, OpacNavBottom, and OpacNavRight are displayed.

To test, apply the patch and enable the PatronSelfRegistration system
preference, and deactivate the PatronSelfRegistrationVerifyByEmail
preference.

- Go to the OPAC and start the process of registering online.
- Fill in the form and submit it.
- On the registration confirmation page, check that the layout looks
  correct.
- Test with the presence of various combinations of OpacNav,
  OpacNavBottom, and OpacNavRight HTML customizations.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64edb69245)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4e34b92112)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:54:05 -01:00
9d64b04146 Bug 35206: Adjust style of add button on curbside pickups administration
This patch adds Bootstrap classes to the "Add" button on the curbside
administration page, in the "Curbside pickup hours" section. This makes
it consistent with the markup of similar buttons in the interface and
makes it slightly smaller so that it fits better in the form.

To test, apply the patch and make sure the "CurbsidePickup" preference
is enabled.

- Go to Administration -> Curbside pickups.
- Fill out the form, including the "New slot" fields in the "Curbside
  pickup hours" section.
  - Confirm that the corresponding "Add" button looks correct, and that
    it works to add your new slot.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc70e17f5d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b7cb356363)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:53:41 -01:00
5dc358fb23 Bug 35198: Sort database column names alphabetically on automatic item modification page
This patch modifies the automatic item modification by age page so that
the rule entry form sorts <select>s alphabetically, making it easier to
find the entry you need.

The [% FOR field IN... %] directives now include the "sort" method, e.g.

    [% FOR field IN agefields.sort %]

To test, apply the patch and go to Cataloging -> Item modifications by
age

- Click the "Add rules" button, then the "Add rule" button.
- Check the "Age field," "Conditions," and "Substitutions" dropdowns to
  confirm that the choices are listed alphabetically.
- Fill in the form and save the rule.
- Go back and edit the rule you created. Check that the dropdowns are
  still correct.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd25828048)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2872ebe3d4)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:49:58 -01:00
Katrin Fischer
1a04d21a71 Bug 34704: Remove regex for adding additional line breaks to print templates
This makes sure that we don't change the line breaking for either
HTML nor plain text print notices.
For plain text, the <pre> is used to keep the line breaks as defined
in the notices template.
For HTML we require on the line breaks added by block elements in the
HTML notice, not adding any additional ones like before.
This gives the full control of the formatting to the notice editor.

To test:
* Make sure your patron doesn't have an email address
* Make sure to check the hold filled notice in messaging preferences
* Place a old on any item
* Checkin the item
* Confirm hold
* Verify notices tab shows the Hold (print) notice
* ./misc/cronjobs/gather_print_notices.pl ./ --html
* Verify the generated file has the HTML output wrapped in pre.
* Reformat the HOLD print notice to be HTML by setting the checkbox.
  Mmake sure to add some empty lines for (they should not print later)
  and some <br>, <p>, <div>  - They should be reflected in the notice later.
* Repeat test.
* All should be well :)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4c15ad658d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e0eb511d59)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:49:43 -01:00
Katrin Fischer
50e8b27996 Bug 35187: Fix missing line breaks in WELCOME notice
When a notices is marked as HTML, we need to use block elements
(p, div, li, etc.) or explicit line breaks.
This adds the line breaks where required.

To test:

WELCOME
* Without patch
* Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress)
* Make sure your patron has an email set
* In patron account, use "More > Welcome email"
* Verify all text is on one line
* Apply patch
* reset_all to install new sample notice templates
* Repeat test, verify welcome notice is now nice

(cherry picked from commit d60fe27ea4)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:49:26 -01:00
94ce705a7f Bug 35280: Fix patron attributes "clear" link in OPAC patron entry form
This patch makes a minor correction to the JavaScript controlling the
behavior of the "clear" link which appears on the patron entry form next
to patron attribute <select>s or <textarea>s which are editable in the
OPAC.

To test, apply the patch and create patron attributes
which have both "Display in OPAC" and "Editable in OPAC" checked.

- Create one which is tied to an authorized value, and one which isn't.
- Log in to the OPAC and click the "Personal details" tab.
- In the entry form, find the patron attribute fields under the
  Additional information" heading..
- Select a value in the dropdown, and enter text in the textarea.
- Confirm that clicking the corresponding "Clear" link for each works as
  expected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a027a0da9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f49e438ed9)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:49:15 -01:00
Andreas Jonsson
2b60e926bc Bug 34857: Do not enable hidden select element (regression from bug 33233).
Test plan:

Using Chrome as web browser:

* Go to opac advanced search
* Press "more options"
* Search for two keywords using "and" operator (on ktd search for idea AND behind, which matches 1 result)
* Search for two keywords using "or" operator (on ktd search for idea OR behind, which matches 4 results)
* Search for two keywords using "not" operator (on ktd search for idea NOT behind, which matches 2 results)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5d174c7d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit edbe64ef5e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:48:50 -01:00
6f798ff886 Bug 31041: (follow-up) Clean up and generalise
This patch cleans out the print media css rules that were originally
added for modalprinting.  The window.open method is simpler to maintain
and will more reliably print modal content as expected.

We factor out the printer code into it's own JS asset that we can apply
to other printable modals and then use it in the two existing places
where such modals have been defined already (cashup summary and bundle
confirmation).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ef880e349f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 39a8ff6bb5)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:48:12 -01:00
1feb977d43 Bug 31041: Prevent duplicate display of cashup summary when printing
To test:
1. Have POS on.
2. Have some registers and items for sale. Make some sales to 'Cashup'.
3. If you have enough enough lines in the table so that 'register.pl' would print on 2 or more pages, the summary will be duplicated that same number of time.

If you are lazy like me and don't want to make that many transaction you can also add some content to the page like this:

for (let i = 0; i < 100; i++) {
  $('#register').append('<h1>TEST</h1>');
}

4. APPLY PATCH, clear browser cahche
5. Try printing again, you should only get one cashup summary when printing.

Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85fb62f3d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d74cec9612)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:48:05 -01:00
5e559c58a3 Bug 31041: add modal_printer.js asset to registers.tt
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fcd97d8741)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fc11755571)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:47:59 -01:00
6018adbc65 Bug 34931: Remove fieldset/legend in favor of div/h3
1. Create some PA_CLASS authorized values.
2. Create some custom patron attributes and add them to the newly created PA_CLASS's.
3.  Set CollapseFieldsPatronAddForm to collapse 'Additional attributes and identifiers'.
4. Go to a new or existing patron record.
5. At the top of the page click the checkbox for "Show collapsed fields:".
6. Scroll down to that section and notice the PA_CLASS <legend> element is shown but not the individual patron attributes within that PA_CLASS.
7. Apply patch
8. Try again, the Additional attributes and identifiers fieldset should display properly.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1944c66fc0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2d96b55f32)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:47:43 -01:00
bc6462b9a7 Bug 34375: Fix the option to provide no fund in budget dropdown
Currently it is not possible to use the No fund option as the dropwdown will default to the first budget in the list. This patch re-adds this option so that the defaulting behaviour is fixed

Test plan:
1) Go to a vendor record in Acquisitions and then Receive Shipment
2) Enter an invoice number
3) Leave the Shipping cost empty and Shipping Fund as 'No fund'
4) Receive some orders or go straight to Finish receiving
5) Notice the Shipping fund has defaulted to the first fund in the alphabetical list of funds.  It is not possible to select 'No fund' and the selected fund is recorded in shipmentcost_budgetid incorrectly.
6) Apply patch
7) Repeat steps 1-5 and this time the No fund option should be used correctly

Signed-off-by: Georgia Newman <g.newman@arts.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7e0390dab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 534cee26ba)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:47:28 -01:00
9de53eb9af Bug 35245: Set default width for select2 in authorities
Test plan:
1) Edit a authority Marc framework, e.g. 'CHRON_TERM', visit:
   /cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=CHRON_TERM
2) Pick any field to turn into a AV field, e.g. 371, and edit its subfields:
   /cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=371&authtypecode=CHRON_TERM
3) Pick a subfield e.g. 'd' and click edit, visit:
   /cgi-bin/koha/admin/auth_subfields_structure.pl?op=add_form&tagfield=371&tagsubfield=d&authtypecode=CHRON_TERM#subdfield
4) Pick a Authorized value list e.g. DEPARTMENT, click Submit
5) Create a new authority of the same type 'CHRON_TERM', visit:
   /cgi-bin/koha/authorities/authorities.pl?authtypecode=CHRON_TERM
6) Click on Tab '3' and click on field 371 ADDRESS to expand it
7) Notice field 'd' select2 width is very narrow
8) Apply patch. Repeat. Notice its not narrow anymore

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f918c3ff80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c577710c40)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:47:10 -01:00
Katrin Fischer
156ab3c738 Bug 34993: (QA follow-up) Perltidy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 24e1ee2118)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b193a8097)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:46:49 -01:00
Emily Lamancusa
20c77759cf Bug 34993: Pass context parameters to generate_subfield_form
Pass necessary parameters from the UI to ensure that the basic
MARC editor can correctly identify when a framework is changed,
a bib is being duplicated, or a bib is being imported with Z39.50 -
for purposes of filling in default values according to the settings
of ApplyFrameworkDefaults.

To test:
1. Set the system preference ApplyFrameworkDefaults - Select All
2. Create or edit a MARC bibliographic framework with a default value in
   one of the fields (such as 500$a)
3. Go to the Cataloguing module and create a new record using the
   framework from step 2
   --> Confirm that the default value is filled in
4. Search for an existing bib record
5. Click Edit > Edit record to open the basic editor
6. If the field from step 2 already has data, clear it
7. Switch the framework to the framework from step 2
   --> Confirm that the default value is filled in
8. Clear the field again, and save the edit
9. Click Edit > Edit as new (duplicate)
   --> Confirm that the default value is filled in
10. Go to the cataloguing module and do a Z39.50 search
11. Find a record that does not have a value for the subfield from step 2
12. Import the record using the framework from step 2
    --> Confirm that the default value is filled in

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c94114790)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e72ac1bacc)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:46:42 -01:00
cb65b5516f Bug 35212: Correct mismatched label on identity provider entry form
This patch corrects the identity provider form so that the label for the
"Allow staff" field has the correct "for" attribute. Currently it is a
duplicate of the one for the "Allow OPAC" field.

To test, apply the patch and go to Administration -> Identity providers.

- Click "New identity provider"
- Near the bottom of the form, look for the "Allow staff" field.
- Clicking the "Allow staff" label should activate the corresponding
  dropdown.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 15f0dc2c2a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ddc3c4172a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:44:26 -01:00
c17fc9e6b5 Bug 17798: (follow-up) Adjust color of fieldset nested in .dialog.alert
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aaa0bd2391)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d15d94279)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:42:29 -01:00
159b745710 Bug 17798: Add fieldset for 'Yes, check out (Y)'
With the increased text, the buttons don't arrange neatly. Adding a
fieldset around the options for 'Yes' mitigates this somewhat - it
could do with a bit more styling, however, it also fixes bug 23953

To test:
Confirm the 'Yes' options are more clear that they only affect the yes
button
Confirm the other buttons arrange nicely

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d291a6f1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ac35d4f15)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:42:21 -01:00
cae75b64dd Bug 17798: Confirm hold when printing slip from another patron's account
This patch adds a few pieces of information to the print slip button
and makes the code confirm the hold

As we are printing before the confirm, we also add the ability to pass
in the itemnumber to 'ReserveSlip'

This is slightly hacky, however, I don't see another way to allow
printing without an additional page reload.

To test:
 1 - Place a title level hold for patron A, for delivery to library B
 2 - Attempt to checkout an item from the record above to Patron B from
     library A
 3 - You receive an alert about the hold
 4 - Click "Don't check out, confirm hold, and print slip"
 5 - Confirm the slip looks correct and has item info
 6 - Confirm that item is in transit to fill hold
 7 - Revert transit status
 8 - Attempt to checkout the item to Patron B from Library B
 9 - Click "Don't check out, confirm hold, and print slip"
10 - Confirm slip is correct
11 - Confirm item is marked waiting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ec73d80e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 96442d7ac7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:42:15 -01:00
04feadb6bf Bug 32379: Add check on existing item
Simplest fix; bail out with output_error.

Test plan:
Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999
Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist.
You should get the 404 screen now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0677a53e14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7890c068fa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:41:58 -01:00
5027f0c8c1 Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink
This patch makes the trivial change of making the linker script rely on
LinkerRelink instead of CatalogModuleRelink, which is confusing and
incorrect (according to both sysprefs descriptions).

To test:
1. Verify that relinking is now tied to the right syspref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4310e13a64)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 234e00b1d6)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:41:06 -01:00
c13b03031e Bug 35242: Force memcache restart after koha upgrade
to test..

1/ install koha-common
    $ sudo apt install koha-common

2/ start memcached, check PID
    $ sudo service memcached start
    $ sudo systemctl status  memcached | grep PID
        Main PID: 52851 (memcached)

3/ build and install new koha-common package (will trigger a restart)
    $ sudo apt install ./koha-common-git+deadbeef.deb

5/ check that memcache is started, and has new PID (52900)
    $ sudo systemctl status  memcached | grep PID
        Main PID: 52900 (memcached)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1fa096e7a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 557425afd9)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:40:55 -01:00
40bab28b99 Bug 35073: perltidy subscription-batchedit.pl
git show -w <this_patch_hash>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ffb5022591)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3621e32bd1)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:40:44 -01:00
77495e2778 Bug 35073: Default to existing value if there is one
For values that dont exist in the batch edit submission, i.e. UI says 'No change', we default to existing value if there is one.

Test plan:
Preparation - Additional fields:
1) Add a new 'additional field', visit:
/cgi-bin/koha/admin/additional-fields.pl
2) Click 'subscription' and '+ New field'. Enter a 'name' and hit 'save'.

Serials:
1) Add a new serial, visit:
/cgi-bin/koha/serials/subscription-add.pl
2) Put a biblionumber in the 'record' field, i.e. '112'. Press 'next' and click 'ok' on the alert box
3) Fill all the required fields and click 'test prediction'
4) Input something in the additional field created previously.
5) Click 'save subscription'. Notice the additional field is as expected.
6) Repeat steps 1-5 to create a second serial.

Batch edit:
1) Visit serials and hit the 'Search' button:
/cgi-bin/koha/serials/serials-home.pl
2) Click the 2 checkboxes for the 2 serials we created previously and click the new link that pops up 'edit selected serials'.
3) Click 'Save' without changing anything.
4) Go back to either of the serials, notice the value for the additional field is unchanged. Visit:
/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7294908de3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bcb2adb604)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:40:37 -01:00
889761675c Bug 35073: Rename additional_fields to available_additional_fields
'additional_fields' is ambiguous and in other places we name this available_additional_fields instead. Do the same here.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 05d131febf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a5fa92d2c0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:40:31 -01:00
Katrin Fischer
f2a09677a5 Bug 35185: Remove is_html flag from sample notices that are plain text
Some notices had the is_html flag for new installations, but actually
didn't include any HTML formatting. These should be plain text
to have the line breaks behave as expected.

This updates:
* 2FA_OTP_TOKEN
* OPAC_REG_VERIFY

We cannot do a database update here, as libraries will
have changed and updated these. So this is only for new
installations.

To test:
* Apply patch
* reset_all (create a new sample database)
* Verify that the HTML checkbox is not set for these notices
* Verify they appear as plain text notices, not including HTML tags

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c6284eed81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3cacb76e8e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:39:17 -01:00