Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23026 ashik.ali 1
$().ready(function() {
2
	$("form#update-retailer-details-form input").each(function(){
3
		$(this).attr('autocomplete', 'off');
4
	});
5
});
6
$().ready(function() {
7
        $('#update-retailer-details-form').validate({
8
			submitHandler: function (form, event) {
9
				event.preventDefault();
10
				if(validateRetailerDetails()){
11
					alert("Please fix errors");
12
					return false;
13
				}
14
				var json = retailerDetailsJson();
15
				console.log("retailerJson = " + json);
16
				if(confirm("Are you sure you want to update Retailer Details!") == true){
23032 ashik.ali 17
					var response = doPutAjaxRequestWithJson("retailerDetails",json);
18
					$('#retailer-details-container').html(response);
23026 ashik.ali 19
		             return false; // required to block normal submit since you used ajax
20
				}
21
	       }
22
	});
23
 
24
});