Bug 18980: Add js to dynamically show/hide the Anyone remark
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 21 Jun 2017 14:24:57 +0000 (16:24 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 16:20:31 +0000 (13:20 -0300)
commit93366e10fbe2b018caa9d6b388b74cc3ef302a86
tree0a514c4bb5ae5b4d8c3242bd5494d7b9ff7b595f
parent3e5cad0f03d5d90eff2d6cedfb4ff6014c0610c0
Bug 18980: Add js to dynamically show/hide the Anyone remark

If we we move from Private to Public or vice versa, this should reflect
on the Anyone remark from the first patch.
If we go back to a private list without shares, we should show it.

Handled in a js sub AdjustRemark, triggered by onchange of the category
combo or the permission combo.

Test plan:
[1] Edit a private list without shares in OPAC. Toggle category and/or
    permissions. Is the remark shown or hidden accordingly?
    Note: Include a test with OpacAllowPublicListCreation enabled.
[2] Edit a shared list or public list in staff. Toggle category/permissions.
    You should never see the remark.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt