cmc-sales/app/webroot/js/shipment_add.js
2013-03-23 16:25:52 +11:00

43 lines
536 B
JavaScript
Executable file

$(function() {
$('#date_arrived_display').datepicker({
showButtonPanel: true,
dateFormat: 'd M yy',
altFormat: 'yy-mm-dd',
altField: '#date_arrived'
});
$("#importFields").hide();
$("#shipmentType").change(function() {
var shipmentTypeID = getShipmentTypeID();
if(shipmentTypeID == 1) {
$("#importFields").show();
}
});
function getShipmentTypeID() {
var id;
$("#shipmentType :selected").each(function(i, selected) {
id = this.value;
});
return id;
}
});