added sanity check for IE hold placer since disabled is not supported
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Jun 2006 21:53:52 +0000 (21:53 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Jun 2006 21:53:52 +0000 (21:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4770 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/holds.js
Open-ILS/web/opac/skin/default/xml/common/holds.xml

index 682314a..604635f 100644 (file)
@@ -532,7 +532,10 @@ function holdsBuildOrgSelector(node) {
        var type = findOrgType(node.ou_type());
        var indent = type.depth() - 1;
        var opt = setSelectorVal( selector, index, node.name(), node.id(), null, indent );
-       if(!type.can_have_vols()) opt.disabled = true;
+       if(!type.can_have_users()) {
+               opt.disabled = true;
+               addCSSClass(opt, 'disabled_option');
+       }
        
        if( node.id() == holdArgs.recipient.home_ou() ) {
                selector.selectedIndex = index;
@@ -547,8 +550,13 @@ function holdsBuildOrgSelector(node) {
 
 function holdsBuildHoldFromWindow() {
 
-       var org = $('holds_org_selector').options[
-               $('holds_org_selector').selectedIndex].value;
+       var org = getSelectorVal($('holds_org_selector'));
+       var node = findOrgUnit(org);
+       var ntype = findOrgType(node.ou_type());
+       if(!ntype.can_have_users()) {
+               alertId('holds_pick_good_org');
+               return;
+       }
 
        var hold = new ahr();
        if(holdArgs.editHold) {
index 69419ce..f196025 100644 (file)
 
        <span class='hide_me' id='holds_explain_adv'>&holds.advanced_options;</span>
 
+       <span class='hide_me' id='holds_pick_good_org'>
+               Please select a physical location where your hold can be delivered.
+       </span>
+
 </div>