From: Josh Stompro Date: Mon, 24 Jul 2017 18:51:55 +0000 (-0500) Subject: LP#1706148 - Hide "Hold is behind Circ Desk" checkbox in XUL patron registration. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=97dda314bee85b2d5cac153fd11523473c0f5115;p=Evergreen.git LP#1706148 - Hide "Hold is behind Circ Desk" checkbox in XUL patron registration. When the library setting for "Behind Desk Pickup Supported" is not enabled then the checkbox for "Hold is behind Circ Desk" should be hidden. Test Plan - before fix: 1. Check to make sure that the "Behind Desk Pickup Supported" library setting is unset or false. 2. Open the patron registration screen in the XUL staff client and see that the user settings checkbox for "Hold is behind Circ Desk" exists. After Fix Applied: 1. Check to make sure that the "Behind Desk Pickup Supported" library setting is unset or false. 2. Open the patron registration screen in the XUL staff client and see that the user settings checkbox for "Hold is behind Circ Desk" no longer is shown. 3. Change the library setting in question to True. 4. Reload/reopen the patron registration screen and see that the checkbox now is visible. Signed-off-by: Josh Stompro Signed-off-by: Dan Pearl Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index 865866731b..0e9ae91a54 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -974,6 +974,13 @@ function uEditDrawSettingRow(tbody, dividerRow, template, stype) { tb.attr('value', userSettings[stype.name()]); dojo.connect(tb, 'onChange', function(newVal) { userSettingsToUpdate[stype.name()] = newVal; }); break; + case 'circ.holds_behind_desk': + // Skip when hold is behind circ desk is not enabled + if(!orgSettings['circ.holds.behind_desk_pickup_supported']) return; + var cb = new dijit.form.CheckBox({scrollOnFocus:false}, getByName(row, 'widget')); + cb.attr('value', userSettings[stype.name()]); + dojo.connect(cb, 'onChange', function(newVal) { userSettingsToUpdate[stype.name()] = newVal; }); + break; default: var cb = new dijit.form.CheckBox({scrollOnFocus:false}, getByName(row, 'widget')); cb.attr('value', userSettings[stype.name()]);