From 4f8fd4fe80cfbf5125e971435a530e3c2a9e3b1d Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 28 Mar 2011 09:50:33 -0400 Subject: [PATCH] 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 --- Open-ILS/web/opac/skin/default/js/holds.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 ) { -- 2.11.0