From: Bill Erickson Date: Mon, 28 Mar 2011 13:50:33 +0000 (-0400) Subject: when alternate formats are selected, thereby promoting a T hold to an M hold, reset... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4f8fd4fe80cfbf5125e971435a530e3c2a9e3b1d;p=evergreen%2Fequinox.git when alternate formats are selected, thereby promoting a T hold to an M hold, reset/disable the parts selector, since P/M holds are not an option --- diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js index 153a8d52bf..73514c1243 100644 --- a/Open-ILS/web/opac/skin/default/js/holds.js +++ b/Open-ILS/web/opac/skin/default/js/holds.js @@ -697,6 +697,20 @@ function holdsSetFormatSelector() { if(type=='M') opt.selected=true; unHideMe(opt); } + + // If the user selects a format, P-type holds are no longer an option + // disable and reset the P-type form control + selector.onchange = function() { + var partsSel = $('holds_parts_selector'); + for(var i = 0; i < selector.options.length; i++) { + if(selector.options[i].selected) { + partsSel.selectedIndex = 0; // none selected + partsSel.disabled = true; + return; + } + } + partsSel.disabled = false; + } } function findFormatSelectorOptByParts( sel, val ) {