Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item...
authorOwen Leonard <oleonard@myacpl.org>
Thu, 12 May 2022 16:25:05 +0000 (16:25 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 23 Aug 2022 19:53:33 +0000 (19:53 +0000)
commit5db848f2ce875a171ee3b9e46f1e2ce576ea7633
treed73b00d2a2f972bd40b18d7b89e67d496c398719
parentf70fd04521e560f55a45742e1c3ba388a34e6d98
Bug 26377: Clearly label parts of subscription-add.pl that relate to optional item records

This patch modifies the form for adding a new subscription so that the
collection and item type fields are shown only when the subscription is
configured to create an item when receiving.

To test, apply the patch and go to Serials -> New subscription.

- When the page first loads, the "Do not create an item record when
  receiving this serial" radio button should be selected.
- Under the "Location" field there should be no item type or collection
  field.
- Select the "Create an item when receiving this serial" radio button.
- The item type and collection fields should appear.
- Test that the values are correctly saved when you add or edit a
  subscription.
- If you edit a subscription which had item type and collection defined,
  and you switch to "Do not create an item..." the record should save with
  empty values for those fields.
- Confirm that existing subscriptions open with the correct settings
  applied: Only records with "Create an item..." checked should open
  with the item type and collection fields displayed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 13525cff5ce866b060fcc899aa696646db351c3a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/js/subscription-add.js