Subversion Repositories SmartDukaan

Rev

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

Rev 29104 Rev 29134
Line 306... Line 306...
306
						}
306
						}
307
 
307
 
308
					});
308
					});
309
	
309
	
310
	
310
	
-
 
311
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
-
 
312
		if (confirm('Confirm upload ?')) {
-
 
313
			var fileSelector = $(this)[0];
-
 
314
			if (fileSelector != undefined
-
 
315
				&& fileSelector.files[0] != undefined) {
-
 
316
				var url = `${context}/document-upload`;
-
 
317
				console.log(url);
-
 
318
				var file = this.files[0];
-
 
319
				console.log("file" + file);
-
 
320
				let fileInput = $(this);
-
 
321
				console.log("fileInput" + file);
-
 
322
				doAjaxUploadRequestHandler(
-
 
323
					url,
-
 
324
					'POST',
-
 
325
					file,
-
 
326
					function(response) {
-
 
327
						console.log(response);
-
 
328
						var documentId = response.response.document_id;
-
 
329
						console.log("documentId : " + documentId);
-
 
330
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
-
 
331
					});
-
 
332
				// alert("Retailer Shop Document
-
 
333
				// is required");
-
 
334
			}
-
 
335
		} else {
-
 
336
			// Do nothing!
-
 
337
		}
-
 
338
	});
-
 
339
 
-
 
340
	
-
 
341
	
311
	$(document)
342
	$(document)
312
	.on(
343
	.on(
313
			'click',
344
			'click',
314
			".submit-legal",
345
			".submit-legal",
315
			function() {
346
			function() {