phpBMS

Changeset 768 for trunk

Show
Ignore:
Timestamp:
01/20/10 12:18:21 (2 years ago)
Author:
brieb
Message:
  • Fixed add new button not functioning when no client has been looked up
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/bms/javascript/quickview.js

    r703 r768  
    6666 
    6767        case "client": 
     68            if(clientrealid) 
    6869            theid = clientrealid.value; 
    6970            break; 
     
    7172    }//endswitch 
    7273 
    73     theURL += "?backurl=" + encodeURIComponent(currentURL + "?cid=" + clientid.value) 
     74    if(clientid) 
     75        theURL += "?backurl=" + encodeURIComponent(currentURL + "?cid=" + clientid.value); 
     76    else 
     77        theURL += "?backurl=" + encodeURIComponent(currentURL); 
    7478 
    7579    if(newedit == "edit"){ 
     
    8084            theURL += "&id="  + encodeURIComponent(theid); 
    8185 
    82     } else 
    83         theURL += "&cid=" + encodeURIComponent(clientid.value); 
     86    } else { 
     87 
     88        if(clientid) 
     89            theURL += "&cid=" + encodeURIComponent(clientid.value); 
     90             
     91    }//endif 
    8492 
    8593    document.location = theURL; 
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.