Commit graph

47677 commits

Author SHA1 Message Date
Katrin Fischer
da01f3941c
Bug 31414: (QA follow-up) Re-add required class
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:56:01 -03:00
Isobel Graham
d2a72dfea4
Bug 31414: Set focus to name in additional fields.
Focus is set to name on additional fields on
administation add fields.

Test plan
1. Go to administation and manange additional
fields.
2. If you then add field the focus should
automatically go to the field name.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:55:56 -03:00
55bc39cb3e
Bug 32088: Consistent classes for primary buttons: Patron card creator
This patch makes changes the button markup in patron card creator
templates so that all submit buttons and any buttons that should should
be styled as primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view patron card creator pages to confirm
that everything looks correct. In most cases there are no visible
changes.

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>
2022-11-09 13:55:00 -03:00
89dcd61cad
Bug 32087: Consistent classes for primary buttons: Course reserves
This patch makes changes the button markup in course reserves templates
so that all submit buttons and any buttons that should should be styled
as primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view course reserves pages to confirm
that everything looks correct. In most cases there are no visible
changes.

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>
2022-11-09 13:54:07 -03:00
a24f890403
Bug 32138: Fix OIDC default mapping
This patch fixes the OIDC default mapping to have the Koha fields on
the left (ie key) and the OIDC standard claim fields on the right (ie value).

1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/identity_providers.pl?op=add_form
3. Choose "OIDC" for "Protocol"
4. Click "Add default OIDC mapping"
5. Note the following is displayed:
{
  "email": "email",
  "firstname": "given_name",
  "surname": "family_name"
}

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:40:28 -03:00
c53a114857
Bug 32141: Add missing fieldset legends and titlecase "matchpoint"
This patch adds missing fieldset legends and titlecases "matchpoint",
so that the "Edit" UI is consistent with the "New" UI for adding
and modifying Identity Providers.

Test plan:
1) Apply patches
2) Go to http://localhost:8081/cgi-bin/koha/admin/identity_providers.pl?op=add_form
3) Fill out the fields to add an identity provider
4) Click "Edit" next to the Identity Provider in the list
5) In a new tab, go to
http://localhost:8081/cgi-bin/koha/admin/identity_providers.pl?op=add_form
6) Compare the two screens and note that all the labels, inputs, and help text
are the same on both screens.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:35:21 -03:00
98d5e21ad0
Bug 32141: Fix textbox formatting on edit IdP screen
This patch makes the textbox have the same number of rows and columns
on the "Edit" page as it does on the "New" page for Identity Providers.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:35:16 -03:00
9d3a54f6f6
Bug 32139: Set "update on login" correctly when creating new IdP
This patches allows "Update on Login" to be set to "Yes" when
creating a domain as part of a new Identity Provider.

Test plan:
1) Apply patch
2) koha-plack --reload kohadev
3) Go to http://localhost:8081/cgi-bin/koha/admin/identity_providers.pl
4) Click "New identity provider"
5) Fill in "Code" and "Description" with "test"
6) Click "Add default OAuth configuration"
7) Click "Add default OAUth mapping"
8) Fill in "Domain" with "*"
9) Change "Allow OPAC", "Allow staff", "Auto register", and "Update on login"
to "Yes"
10) Click "Submit"
11) Click "Manage Domains" for your new Identity Provider
12) Note that "Allow opac", "Allow staff", "Auto register", and "Update on login"
are all set to "Yes"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:32:46 -03:00
2c24682fa0
Bug 32028: (follow-up) Fix headings levels
This patch corrects the headings levels on cash_registers,
patron-attr-types and restrictions admin pages.

We also move the h2 headings inside the page-section div as appropriate.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 13:07:17 -03:00
6edcd586df
Bug 32030: Add missing sponsors
Sponsored-by: ByWater Solutions
Sponsored-by: BibLibre
Sponsored-by: PTFS-Europe

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 12:25:44 -03:00
4bdba2bdb6
Bug 31894: (QA follow-up) Move rollbacks to the end
Obvious fix. This test removed my method records.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 10:05:37 -03:00
Stefan Berndtsson
116d17d701
Bug 31894: Extend after_hold_action hook
Hook actions added:
after_hold_action adds new actions transfer, waiting and processing

How to test:
Run tests in t/db_dependent/Koha/Plugins/Holds_hooks.t

Sponsored by: Gothenburg University Library

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 10:05:32 -03:00
0106f3957d
Bug 31271: Preselect previous search index
This patch passes the constructed value of the preselect to search_indexes.inc

To test:
1 - Perform an advanced search, making sure to select different indexes
2 - Click 'Edit search' on results page
3 - Confirm index selections are preselected
4 - Enable  IntranetCatalogSearchPulldown
5 - Do a search form the top bar using an index
6 - Confirm 'Edit search' correctly popluates the chosen index

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>
2022-11-09 10:04:48 -03:00
2621f28376
Bug 32114: Add missing html_helpers.inc
This patch makes a minor modification to the OPAC
search results RSS template so that an error isn't
triggered. The html_helpers include was missing.

To test, apply the patch and perform a catalog
search in the OPAC which will return results.

At the end of the "Your search results" heading
you should see an orange RSS icon. Clicking on it
should take you to an RSS feed instead of an
error page.

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>
2022-11-09 10:03:34 -03:00
e4079d17f3
Bug 31818: Enable table elements in keyboard shortcuts popover
This patch updates the whitelist for the popover to ensrue our shortcuts table displays

To test:
1 - Open the advanced cataloging editor
2 - Click 'Keyboard shortcuts'
3 - Is empty, be sad
4 - Apply patch
5 - Reload
6 - Click it again
7 - Shortcuts!

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>
2022-11-09 10:03:04 -03:00
74bef99916
Bug 32111: Remove disabled from date input for curbside pickup
The date input is always disabled and it's not possible to select or enter a date.

git bisect blames "Bug 30718: Apply flatpickr changes to OPAC" and "altInput: true"

I don't really know what's happening here, but it's impossible to
interact with the date widget if the input is disabled when it's
initialized.

The solution I have here is to play with hide/show instead of disabled.

Other suggestions welcome.

Test plan:
Schedule a curbside pickup from the OPAC and confirm that the date input
is working as expected.

Signed-off-by: David Nind <david@davidnind.com>
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>
2022-11-09 10:02:22 -03:00
6fcd9ec2c3
Bug 32028: (follow-up) Improve smart rules formatting
I correct the indenting here, so remember to diff ignoring whitespace ;)

I remove some of the page-section divs introduced by the previous patch
and instead replace the 'container' classes with the new 'page-section
class on existing divs.

This brings the page-sections more in line with elsewhere in the
codebase.

I also update the 'h3' headings to 'h2' as we were somehow skipping that
heading level page wide and update the final 'h4' heading to 'h2' to
match the other section headings appropriately.

Finally, I break up the top section more, using bg-info for the top
block of instructions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 10:01:10 -03:00
517726d69a
Bug 32028: Add page-section to smart-rules.tt and fix markup errors
To test:
1. Apply patch
2. Go to Adminstration > Circulation and fine rules
3. Look at the page-section added and make sure each looks good.
4. Use an HTML validator to check and make sure the HTML looks good.

Note: There are indentation changes and some fixes to bad markup ( stray tags, etc ).

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

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

https://bugs.koha-community.org/show_bug.cgi?id=32082
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 10:01:07 -03:00
fb6f107b39
Bug 32028: Add page-section to various admin pages
This patch adds the page section to div to the following administration pages:

admin/cash_registers.tt
admin/cities.tt
admin/credit_types.tt
admin/debit_types.tt
admin/patron-attr-types.tt
admin/restrictions.tt
plugins/plugins-home.tt

To test go the following pages and make sure everything looks good:

Administration > Cash registers. You must enable the sys pref 'UseCashRegisters'
Administration > Cities and towns.
Administration > Credit types
Administration > Debit types
Administration > Patron restrictions
Adminstration > Patron attribute types
Administration > Manage plugins

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

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

https://bugs.koha-community.org/show_bug.cgi?id=32082
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 10:01:02 -03:00
c01977158c
Bug 12758: (QA follow-up) Enhance POD
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:58:56 -03:00
9ec1fb4fd9
Bug 12758: Add new module call in Koha::XSLT::Base
Reviving a report back from 2014. The workaround is now moved to a
separate helper module from another patch.

Test plan:
Test OPACXSLTDetailsDisplay with an https reference.
You may try:
https://library.rijksmuseum.nl/opac-tmpl/bootstrap/en/xslt/zztest.xsl

If you flush and restart, the opac detail pages will contain the
text 'This is my MARC record.'.

NOTE: If you point to an xslt file over https that contains includes or
imports, you will still get the error: Failed to load external entity.
To address that, we need to extend the _resolve_includes sub.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:52:25 -03:00
2d2e93e66e
Bug 12758: Introduce Koha::XSLT::HTTPS
This module now fetches a https stylesheet and returns it as a
string to Base. (As a workaround waiting for a real solution
in the underlying libraries.)

The module can be extended to resolve includes but this requires
parsing the xslt code.

Test plan:
[1] Run t/Koha_XSLT_HTTPS.t

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:52:17 -03:00
1ea56fb092
Bug 12758: Make LWP::Protocol::https required module
Moving from recommends to required in cpanfile.

Reference info: Debian package liblwp-protocol-https-perl is
available for Buster (6.07-2) and Bullseye (6.10-1).

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:52:13 -03:00
18319c1654
Bug 32030: Add missing additionalProperties to /erm/eholdings/local/titles/import
This fixes xt/api.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:48:34 -03:00
263acd5dac
Bug 32030: Fix Makefile.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:48:30 -03:00
b26427ef12
Bug 32030: Fix perlcritic errors
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:48:26 -03:00
0232ee9cc4
Bug 32030: Remove maintenance file
This script is actually not used.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-09 09:48:21 -03:00
17096d4e00
Bug 31378: (follow-up) Fix t/Koha/Auth/Permissions.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 23:40:30 -03:00
ce1ed7e02f
Bug 32030: Add erm/ dir to Makefile.PL
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 21:18:21 -03:00
862de51915
Bug 32030: Wrong permissions on maintenance script
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 21:04:10 -03:00
9a9b374f6a
Bug 31378: (follow-up) Wrong permissions on controller script file
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 21:02:18 -03:00
6732b52e79
Bug 31378: (follow-up) MySQL 8 doens't allow default for longtext
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 19:28:03 -03:00
509d11b66e
Bug 31378: DBRev 22.06.00.081
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:46:17 -03:00
a2f0d33107
Bug 31378: DBIC schema
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:41:43 -03:00
f57fb6df4f
Bug 31378: Add domain settings to IdP add page
This patch introduces a small form for an initial domain configuration
to the 'New identity provider' page, to avoid confusion on testers about
required settings for things to work.

To test:
1. Apply this patch
2. Verify you are now offered a configuration section for domain
   settings. Fields like 'Default category' and 'Default library' are
   mandatory.
3. Choosing some values makes them get stored on 'Submit'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:40:24 -03:00
2dd0cec2e0
Bug 31378: (QA follow-up) Tidy tests
This patch perltidys the tests added lately. It also removes some
commented debugging lines.

Note: There's an attempt to write tests on the full auth workflow that
is commented out but left there on purpose for now.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:40:17 -03:00
2cf2fba315
Bug 31378: (follow-up) catch startup error when missing Oauth provider table
In theory, this shouldn't come up with a package install, but
it could happen with other installations, so best to let it get to
the web installer.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:40:10 -03:00
9e2cf4d358
Bug 31378: Use base URLs for redirect uri
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:40:04 -03:00
Agustin Moyano
9c5f6e8c17
Bug 31378: (follow-up) Fix QA concerns
Several FIXME comments added on the report addressed here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:39:57 -03:00
Agustin Moyano
016105cf8c
Bug 31378: Rename Auth Provider to Identity Provider and add Client.t tests
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:39:51 -03:00
Agustin Moyano
c98d2f3009
Bug 31378: Add an administration interface for authentication sources
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:39:40 -03:00
f97ba16e44
Bug 31378: Add authentication provider endpoints
This patch adds routes for handling authentication providers to the REST
API.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_providers.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:31:20 -03:00
58d66c35df
Bug 31378: Add 'parameter' parameter to Koha::Exceptions::MissingParameter
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:31:15 -03:00
f3a4e312e2
Bug 31378: Add manage_authentication_providers permission
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:31:10 -03:00
8434183d40
Bug 31378: Add accessor methods for JSON attributes
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:31:06 -03:00
Agustin Moyano
66fdd41bdb
Bug 31378: Add STAFF support for authentication providers
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:31:00 -03:00
Agustin Moyano
1e12281ace
Bug 31378: Add OPAC support for authentication providers
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:30:56 -03:00
Agustin Moyano
208b9b5ba7
Bug 31378: Add the API-based auth mechanism to C4::Auth::check_api_auth
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:30:46 -03:00
Agustin Moyano
e466ffdec1
Bug 31378: Add auth providers template plugin
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:30:42 -03:00
Agustin Moyano
5c8ab4f590
Bug 31378: Add API routes
Signed-off-by: Lukasz Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-08 14:30:37 -03:00