Skip to content

Commit 5505de1

Browse files
stephanielearytmccanna
authored andcommitted
LP2089178 Restore OPAC Shelving Location filter
The #adv_copy_location_selector_new div was accidentally removed during the accordion and fieldset refactoring done in bug 2048682. This patch ensures that a fieldset with the required ID exists so that it can be filled in by the render_adv_copy_locations_new() function in copyloc.js, and adds a comment to alert future developers of the relationship. Signed-off-by: Stephanie Leary <[email protected]> Signed-off-by: Terran McCanna <[email protected]>
1 parent b5b2c6e commit 5505de1

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Open-ILS/src/templates-bootstrap/opac/parts/advanced/search.tt2

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
<summary class="card-header" id="[% adv_chunk.id %]_card">
5454
<h4>[% adv_chunk.adv_label %]</h4>
5555
</summary>
56-
57-
[% IF adv_chunk.id != 'adv_copy_location_selector';%]
58-
<fieldset class="card-body" aria-labelledby="[% adv_chunk.id %]_card">
59-
[% END %]
56+
57+
[% # Note: #adv_copy_location_selector_new is required by web/js/ui/default/opac/copyloc.js %]
58+
<fieldset class="card-body" aria-labelledby="[% adv_chunk.id %]_card"
59+
id="[% IF adv_chunk.id == 'adv_copy_location_selector'; 'adv_copy_location_selector_new'; ELSE; adv_chunk.id; END; %]">
6060
[% IF adv_chunk.adv_attr;
6161
INCLUDE "opac/parts/check_value_selector.tt2"
6262
id=adv_chunk.id
@@ -68,9 +68,7 @@
6868
filter_group=adv_chunk.adv_filter multiple="multiple"
6969
size=adv_chunk.adv_size || search.default_adv_select_height || "4";
7070
END; %]
71-
7271
</fieldset>
73-
7472
</details>
7573

7674
</div>

Open-ILS/web/js/ui/default/opac/copyloc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function render_adv_copy_locations_new(locations) {
9696

9797
ulist.appendChild(dojo.create('li')).appendChild(dojo.create('div', {class: "form-check"})).appendChild(dojo.create('label', {innerHTML : loc.name, class: "form-check-label"})).prepend(dojo.create('input', attrs));
9898
});
99-
sel.appendChild(dojo.create("div", {class: "card-body"})).appendChild(ulist);}
99+
sel.appendChild(ulist);}
100100
}
101101

102102

0 commit comments

Comments
 (0)