Subversion Repositories SmartDukaan

Rev

Rev 26831 | Rev 27171 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26831 Rev 26836
Line 121... Line 121...
121
		$('#newaddressModal').modal({show: true});
121
		$('#newaddressModal').modal({show: true});
122
	});
122
	});
123
	
123
	
124
	$('button.mk_add_customer').live('click', function() {
124
	$('button.mk_add_customer').live('click', function() {
125
		customerObj = {}
125
		customerObj = {}
-
 
126
		if($("input.firstName").val().length==0) {
-
 
127
			alert("First Name is required");
-
 
128
			return false;
-
 
129
		}
126
		customerObj['firstName'] = $("input.firstName").val();
130
		customerObj['firstName'] = $("input.firstName").val();
127
		customerObj['lastName'] = $("input.lastName").val();
131
		customerObj['lastName'] = $("input.lastName").val();
128
		customerObj['emailId'] = $("#email").val();
132
		customerObj['emailId'] = $("#email").val();
129
		customerObj['mobileNumber'] = $("input.phone").val();
133
		customerObj['mobileNumber'] = $("input.phone").val();
130
		doPostAjaxRequestWithJsonHandler(`${context}/customer/add`, JSON.stringify(customerObj), function(response){
134
		doPostAjaxRequestWithJsonHandler(`${context}/customer/add`, JSON.stringify(customerObj), function(response){