diff --git a/WebContent/html/webpages/shoppingCart.jsp b/WebContent/html/webpages/shoppingCart.jsp index 17c99fd..50ad0f9 100644 --- a/WebContent/html/webpages/shoppingCart.jsp +++ b/WebContent/html/webpages/shoppingCart.jsp @@ -90,7 +90,7 @@ if(c.getName().equals("ssoNum")) sso = Integer.parseInt(c.getValue());
- +
@@ -392,17 +392,25 @@ function forceUpdateLocationMetadata() { for (var i = locations.length - 1; i >= 0; i--) { if(locations[i].id==selectedLocID) selectedLocation=locations[i]; } - if(selectedLocID!=-1) //-1 is the 'new location' option + if(selectedLocID!=0) //0 is the 'new location' option { + document.orderForm.locname.value = selectedLocation.name; document.orderForm.address.value = selectedLocation.address; document.orderForm.city.value = selectedLocation.town; document.orderForm.state.value = selectedLocation.state; document.orderForm.zip.value = selectedLocation.zip; + // if we're force updating metadata, it means we don't want the name to be editable + document.orderForm.locname.readOnly=true; } + else document.orderForm.locname.readOnly=false; //Should be editable with new location though + + } function forceDropdownCustomLocation() { - $("#dropdown option[value='0']").attr("selected",true); + document.orderForm.location_dropdown.selectedIndex=0; + document.orderForm.locname.value=""; + document.orderForm.locname.readOnly=false; //let user edit name since they're making new location } function getLocations() {