Bug 36825: Hide "Protected" field via BorrowerUnwantedField syspref

Setting field "Protected" as hidden in patron entry/modification
form via BorrowerUnwantedField syspref doesn't work. Form is
missing condition "UNLESS noprotected".

To test:
1. From BorrowerUnwantedField, check field "Protected" as hidden.
2. Either attempt to create a new patron or modify existing one.
=> Note that "Protected" is still displayed in the form.
3. Apply this patch.
4. Navigate back to create/modify patron form.
=> Note that "Protected" is no longer displayed.
5. Uncheck field "Protected" from BorrowerUnwantedField.
=> Field should now be displayed in create/modify form.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Emmi Takkinen 2024-05-10 08:31:42 +03:00 committed by Katrin Fischer
parent 537d5aac5a
commit a0b1ee7df3
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 24 additions and 22 deletions

View File

@ -1080,28 +1080,30 @@ legend.collapsed i.fa.fa-caret-down::before {
</li>
[% END %]
<li class="radio">
<label for="protected">Protected:</label>
[% IF ( patron.protected == 1 ) %]
<label for="yes-protected">
Yes
<input type="radio" id="yes-protected" name="protected" value="1" checked="checked" />
</label>
<label for="no-protected">
No
<input type="radio" id="no-protected" name="protected" value="0" />
</label>
[% ELSE %]
<label for="yes-protected">
Yes
<input type="radio" id="yes-protected" name="protected" value="1" />
</label>
<label for="no-protected">
No
<input type="radio" id="no-protected" name="protected" value="0" checked="checked" />
</label>
[% END %]
</li>
[% UNLESS noprotected %]
<li class="radio">
<label for="protected">Protected:</label>
[% IF ( patron.protected == 1 ) %]
<label for="yes-protected">
Yes
<input type="radio" id="yes-protected" name="protected" value="1" checked="checked" />
</label>
<label for="no-protected">
No
<input type="radio" id="no-protected" name="protected" value="0" />
</label>
[% ELSE %]
<label for="yes-protected">
Yes
<input type="radio" id="yes-protected" name="protected" value="1" />
</label>
<label for="no-protected">
No
<input type="radio" id="no-protected" name="protected" value="0" checked="checked" />
</label>
[% END %]
</li>
[% END %]
[% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
<li>