Commit graph

1081 commits

Author SHA1 Message Date
dc55479043
Bug 33237: Add display of which language default language is expected
This patch adds the display of 'Default language' to the 'Default'
language in the notices editor tool.

This is so that librarians know which language they are expected to be
writing the notice in so we can remain consistent in both template and
include language used.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-30 14:32:14 +02:00
Aleisha Amohia
225a6747f0
Bug 33478: Consider TranslateNotices when saving notice styles
This patch ensures saving styles per notice still works as expected when the TranslateNotices system preference is enabled.

To test, enable the TranslateNotices system preference and attempt to save different CSS for each installed language for one notice. Confirm the correct CSS is saved for the correct language.

Confirm the CSS selector helpers are inserted into the textarea as expected.

Confirm the 'Apply format settings to all notices for this language' setting works, as in CSS is saved for all relevant language notices.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 20:15:47 +02:00
Aleisha Amohia
e441aba315
Bug 33478: Save notice format settings
Save format settings for an individual notice, or for all notices
This patch implements a single style field for a slip to allow for advanced CSS customisation of printed notices. There are links to insert selectors as helpers. Styles can be applied for an individual notice, or all notices.

To test:

1. Apply the patches, install database updates, update schema if needed, and restart services
2. Go to Tools -> Notices and slips
3. Edit any notice
4. Go to the Format tab
5. Confirm there is a textarea for CSS, and links to insert helpful selectors for IDs like #receipt and #slip
6. Add some CSS and confirm it saves.
7. Test that 'apply these settings to all notices' option works. Test the confirmation box appears when this is checked.
8. Add a new notice and confirm CSS settings save successfully
9. The subsequent patches have specific testing plans for each printable notice. For each, confirm that SlipCSS stylesheet changes are applied first. Specific notice styles should be applied last.
10. Test with a non-HTML notice as well, such as RECALL_REQUESTER_DET. Plain (non_HTML) notices have always come with <pre> tags around them so the text is formatted slightly differently but any CSS from SlipCSS or the notice Format should still hold.

Sponsored-by: Colorado Library Consortium
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 20:15:40 +02:00
Laura Escamilla
86e6f8451f
Bug 36443: Add a fax field / column to the batch patron modification tool
To test:
1. Create or modify an existing patron account so that they have a
   value in their fax number field.
2. Go to Tools > Batch patron modification
    1. Add the patron card number, or borrower number into the
       modification tool and click on continue. There is no option for
       modifying fax numbers, nor are fax numbers visible in the
       modification table.
3. Apply the patch and restart_all
4. Repeat step 2
    1. A column for ‘Fax’ is now visible after ‘Other phone’
    2. Test the ‘Fax’ field by clearing out the field with the checkbox.
       ‘Checking the box right next to the label will disable the entry
       and delete the values of that field on all selected patrons.’
    3. Test the ‘Fax’ field by updating the value with a new number
5. Sign off and have a wonderful day :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 18:06:07 +02:00
0e7d2c3db4
Bug 36652: Pass copy_form template variable
To test:

1. Go to Tools > Notices and slips
2. Pick any notice and try to copy it to another library using the 'Copy notice' column.
3. You are redirected to a blank screen and if you go back to the Notices and slips page the notice has not been copied.
4. APPLY PATCH
5. Try steps 1 - 3 again, but this time you should be correctly directed.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 08:52:52 +02:00
8c7ce470c1
Bug 36634: Replace cud-show with show in tools/automatic_item_modification_by_age.pl
It's never used in the template anyway but for consistency it would be better to use "show" (it's not CUD)

No change expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-19 18:06:38 +02:00
98a500d120
Bug 27893: Optionally skip biblio with open orders in batch delete
If the user unchecks the skip checkbox (on by default), we must
make sure that order cancellation is done in background job.

Test plan:
Pick two biblios. One has linked open orders, the other not.
Go to batch delete records. Select 'Enter list of numbers'.
Enter both biblio numbers and check that only one is used on the
follow-up form.
Run the deletion without the skip open orders and verify
that linked order line is cancelled.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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-04-19 18:06:32 +02:00
b89d744e86
Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date'
Test Plan:
1) Test importing a patron with the "from the current membership expiry date" option,
   note it does not work
2) Apply this patch
3) Restart all the things!
4) Re-test, note the expiration was renewed from the patron's current
   expiration date!

Signed-off-by: David Nind <david@davidnind.com>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-12 14:02:41 +02:00
a36e8900d7
Bug 36326: Fix batch item mod/del access from biblio detail page
Allow both $op eq "show" and "cud-show".
We need to keep the POST when we upload a file, but we can simply allow
GET with "show".

Test plan:
Go to the biblio detail page, select an item and test both tools via the links
"Delete selected items" and "Modify selected items"

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-22 12:26:36 +01:00
b1fc965878
Bug 36305: (QA follow-up) Enforce op values in script
Replacing a FIXME by TODO along the way.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:55 +01:00
06c09e15fd
Bug 35782: Replace TT plugin's method Biblio::HoldsCount
We can use biblio.holds.count instead.

The main idea here is to make sure we are passing a Koha::Biblio object
as 'biblio' to all the templates including biblio-view-menu.inc

Test plan:
1. Go to the biblio detail view, click on the different entries in the menu
on the left. Confirm that the "Holds" tab always has the correct number
of Holds display in the parenthesis.

2. Run a search and confirm that the number of holds are still displayed
for each result.

QA:
git grep biblio-view-menu.inc
notice the tt list, open the corresponding perl controllers and confirm
that 'biblio' is passed and that it is a Koha::Biblio object.
The only missing place I found was in viewlog.
Note that we are not removing the TT method yet, we are marking it as
deprecated and also display a warning during the update DB process in
case one of the notice templates is using it.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:39 +01:00
65c0c01161
Bug 36193: cud- treatment for tools/stockrotation.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-12 17:47:33 +01:00
32b1d59568
Bug 34478: Correct op name in CSV profile deletion confirmation step
The 'delete_confirm' op leads to a confirmation page, so it's GET.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:07 +01:00
5b8cfd5f30
Bug 34478: Correct op name in notice deletion confirmation step
The 'delete_confirm' op leads to a confirmation page, so it's GET.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:06 +01:00
4e5944f7f9
Bug 34478: Fixes for MARC modification template management
This patch converts several delete links to POSTed forms and corrects
the op variable names in the script. The patch also simplifies the
deletion click handlers.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:05 +01:00
7798f0346c
Bug 34478: SQUASH Follow-up to previous batch operations patches
- Get the CSRF token from the pop-up instead of from the parent window,
  since that seems to work
- Remove some click handlers which were made obsolete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:05 +01:00
31ed10b82d
Bug 34478: SQUASH further changes to batch biblio operations
This patch makes a number of changes to finish incomplete work in
668cd06e1960a3878ec1c976ce7f2e1f93688468

Initial submissions to batch biblio operations have to accommodate
POSTed file data, so this patch makes changes to instances where we were
submitting biblionumbers in a URL.

We could also choose to make a change in tools/batch_delete_records.pl
and tools/batch_record_modification.pl to handle different "list"
operations differently based on the method of submission. This patch
presents only the client-side option.

The cart presented a unique problem in that it requires that data be
passed from the pop-up window to the parent window, something which
can't as easily be done with a form as with a URL. The workaround I came
up with is to dynamically generate the form in the parent page and
trigger the submission from there.

Also changed:

- More updated CSS to handle buttons inside dropdowns inside toolbars.
- Correct op names for the "list" operation in batch modify and delete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:03 +01:00
688759b0d5
Bug 34478: (follow-up) upload-cover-image.pl: Remove bitwise-and from condition
Add one character and we should be fine :)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:56 +01:00
9736227d68
Bug 34478: Manual fix - tools/batchMod-del
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:55 +01:00
0f182f84b0
Bug 34478: Correct check of list op in batch record modification
The "list" step (previewing records to be modified) is a post operation
so the op must be cud-list.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:49 +01:00
21fa3f64c3
Bug 34478: Fix link to batch patron mod from reports
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:04 +01:00
cf445df109
Bug 34478: Move to get for modborrowers
Bug 34478: [TO SQUASH] tools/modborrowers

We actually want to POST here to not reach the limit of a GET request.
It also fixes the following warning in the console:
  Form contains enctype=multipart/form-data, but does not contain method=post.  Submitting normally with method=GET and no enctype instead.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:04 +01:00
b8814ff696
Bug 34478: Manual - Replace link with submit button - circu-menu
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:00 +01:00
a7525cf6b7
Bug 34478: Changes for tools/cleanborrowers
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:47 +01:00
d0b2a3f362
Bug 34478: (QA follow-up) Rename change to delete
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:42 +01:00
e2691e0870
Bug 34478: Changes for tools/upload
Required some more changes for mode to op, and delete form.
Most forms did not need a POST.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:42 +01:00
bc2bb89930
Bug 34478: (follow-up) Remove check_csrf from pl files
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:41 +01:00
17ec52961c
Bug 34478: Changes for tools/stage-marc-import
First form is ajax upload, no post needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:40 +01:00
e50445fef2
Bug 34478: Changes for tools/import_borrowers
Removed a csrf check in script itself.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:39 +01:00
aa7a8569a4
Bug 34478: Changes for tools/viewlog (no POST, just viewing)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:38 +01:00
4f63ac9dff
Bug 34478: Changes for tools/upload-images
First upload form does not submit (ajax processing).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:37 +01:00
03941cc684
Bug 34478: Changes for tools/scheduler
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:37 +01:00
6a366faf3f
Bug 34478: Changes for tools/holidays
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:36 +01:00
fb004545c7
Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:32 +01:00
7f25a1a131
Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email
Wrong replace of 'email' in a lot of places.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:14 +01:00
e513541238
Bug 34478: Manual fix - problem_reports
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:59 +01:00
1ea77fbd19
Bug 34478: Manual fix - batchMod
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:12 +01:00
18e808240f
Bug 34478: op =~ ^cud- in pl/pm
This is the result of
  bash op_must_start_with_cud-perl.sh

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:11 +01:00
7e7159bf58
Bug 34478: Remove generate_csrf from pl
We do not longer need to generate_csrf from pl files

TODO - members/boraccount.tt and sco/sco-main.tt needs to be adjusted

Bug 34478: [TO SQUASH] Remove generate_csrf from pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:55:56 +01:00
074684eaf4
Bug 35817: Fix hint on patron's category when batch update patron
When a patron's attribute is limited to a given patron's category, the
batch patron modification tool will display a hint "This attribute will
be only applied to the patron's category %s". But this is followed by
the description of the patron's attribute, not the patron's category.

Test plan:
Create a patron's attribute "Color of hair" and select a patron
category (Patron).
Batch edit batch and select "Color of hair"
A hint will be display.
=> Without this patch the hint is "This attribute will be only applied
   to the patron's category Color of hair"
=> With this patch it will be corrected to "This attribute will be only
   applied to the patron's category Patron"

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-26 15:13:58 +01:00
4e480d48f6
Bug 32029: Automatic item modifications by age add biblio table
In automatic item modifications by age missing,
conditions can be on columns of tables items or biblioitems.
Table biblio is missing.

Test plan :
1) Create an automatic item modifications by age with a condition on a column of biblio table
2) Create a record and item matching the rule
3) Run misc/cronjobs/automatic_item_modification_by_age.pl -c -v
=> Check only matching items are impacted

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>

Bug 32029: (follow-up) unit test

Signed-off-by: matthias le gac <matthias.le-gac@inlibro.com>

Bug 32029: (follow-up) tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-26 15:13:50 +01:00
80b2970b74
Bug 34913: Adjust "Manage staged MARC records"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-26 15:13:43 +01:00
5ae5e4367b
Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory
This patch does three things:
1 - Removes a specific query for withdrawn status of each item scanned - we can use the withdrawn field
2 - Removes a specific query for checkouts on each item scanned - we can use the onloan field
    a - additionally we don't need to fetch the checkout as we check it in to the homebranch,
    this is likely incorrect - we should use the current branch, but I preserve behavior for now
3 - Fetches the items ahead of time and builds a hash based on barcode, reduces DB lookups, may raise memory usage

To test:
1 - Checkout some items
2 - Withdraw some items
3 - Generate a lsit of barcodes including some checked out items and some withdrawn items
4 - Enter that list of barcodes into inventory tool
5 - Note your results
6 - Apply patch
7 - Issue the items again
8 - Repeat inventory
9 - Confirm results are the same as before patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-16 12:06:11 +01:00
Aleisha Amohia
b30898c8bf
Bug 35291: (QA follow-up) Tidying script for QA test tools
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-24 16:43:25 -03:00
bae5256216
Bug 35291: Validate filepaths in linking files
Validate that the files in linking files are contained within the ZIP.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-24 16:43:24 -03:00
4b019fcbb0
Bug 35291: Don't allow symlinks for link files in cover image ZIP
There's no reason to allow symlinks for link files in cover image
ZIP files. Preventing their use prevents someone from uploading
a symlink pointing to an existing file on the Koha server.

Test plan:
0. Apply patch and restart/reload Koha
1. Create a PNG cover image
2. Create a datalink.txt file that contains something like the
following:
29,Untitled.PNG
3. Turn on "LocalCoverImages" system preference
4. Upload via http://localhost:8081/cgi-bin/koha/tools/upload-cover-image.pl
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Note the cover image has been uploaded

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-24 16:43:23 -03:00
6023acd648
Bug 35291: Prevent leaks from FS
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-24 16:43:23 -03:00
c53e6e977f
Bug 32986: (follow-up) Tidy conditional in letter.pl
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:59:34 -03:00
Katrin Fischer
6322e08a02
Bug 32986: (QA follow-up) Fix QA script complaints: tabs and TT filters
* Perltidied the section with tabs in printslip.pl
* Fixed indentation and tabs in letter.tt
* Added missing TT filters to members-toolbar.inc

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:59:33 -03:00
c3b40a5499
Bug 32986: Add patron_slip module to letters and allow printing on members account
This patch adds a new module to letters 'patron_slip' / Patrons toolbar
(slip)

This also combines some of the slip printing JS to make things more
direct

To test:
1 - Apply patch
2 - restart_all
3 - yarn build
4 - Confirm you can print slip, summary, quickslip, and checkin slip
  when viewing a patron's account
5 - Enable  DisplayClearScreenButton syspref, and test that it works
  with both values
6 - Go to Tools->Notices and slips
7 - Define a new notice in the 'Patron toolbar (slip)' module
8 - Enter content like below in the 'Print' transport:
Patron has [% borrower.holds.count %] holds

List of holds:
[% FOREACH hold IN borrower.holds %]
===============================
    Reserve id: [% hold.reserve_id %]
    Title [% hold.biblio.title %]
[% END %]
9 - Go to patron scree
10 - Note new option under 'Print'
11 - Print the new slip and confirm it works (try with and without
  placing holds for patron

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-08 17:59:33 -03:00