Bug 40114: Can't select new library when editing a desk
This patch fixes selection of a library when editing a desk in Administration. The form should provide all libraries as options, not just the currently selected one. To test, apply the patch and go to Administration -> Desks. - If necessary, create a new desk. - Edit the desk. The form should load with the correct library prefilled in the <select>, but should offer all libraries as a choices. Sponsored-by: Athens County Public Libraries Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit20085be7fb) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> (cherry picked from commitf94664313d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
f65ff6a385
commit
ac122de235
|
|
@ -117,17 +117,10 @@
|
|||
<label for="branchcode" class="required">Library: </label>
|
||||
<select id="branchcode" name="branchcode" required="required">
|
||||
<option value=""></option>
|
||||
[% FOREACH branch IN branches %]
|
||||
[% IF desk %]
|
||||
[% IF (desk.branchcode == branch.branchcode) %]
|
||||
<option value="[% branch.branchcode|html %]" selected="selected">[% branch.branchname|html %]</option>
|
||||
[% END%]
|
||||
[% PROCESS options_for_libraries libraries => Branches.all( selected => desk.branchcode ) %]
|
||||
[% ELSE %]
|
||||
[% IF (Branches.GetLoggedInBranchcode == branch.branchcode) %]
|
||||
<option value="[% branch.branchcode|html %]" selected="selected">[% branch.branchname|html %]</option>
|
||||
[% END%]
|
||||
<option value="[% branch.branchcode|html %]">[% branch.branchname|html %]</option>
|
||||
[% END %]
|
||||
[% PROCESS options_for_libraries libraries => Branches.all() %]
|
||||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue