Subversion Repositories SmartDukaan

Rev

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

Rev 29214 Rev 29215
Line 335... Line 335...
335
		}
335
		}
336
	});
336
	});
337
 
337
 
338
 
338
 
339
 
339
 
340
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
-
 
341
		if (confirm('Confirm upload ?')) {
-
 
342
			var fileSelector = $(this)[0];
-
 
343
			if (fileSelector != undefined
-
 
344
				&& fileSelector.files[0] != undefined) {
-
 
345
				var url = `${context}/document-upload`;
-
 
346
				console.log(url);
-
 
347
				var file = this.files[0];
-
 
348
				console.log("file" + file);
-
 
349
				let fileInput = $(this);
-
 
350
				console.log("fileInput" + file);
-
 
351
				doAjaxUploadRequestHandler(
-
 
352
					url,
-
 
353
					'POST',
-
 
354
					file,
-
 
355
					function(response) {
-
 
356
						console.log(response);
-
 
357
						var documentId = response.response.document_id;
-
 
358
						console.log("documentId : " + documentId);
-
 
359
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
-
 
360
					});
-
 
361
				// alert("Retailer Shop Document
-
 
362
				// is required");
-
 
363
			}
-
 
364
		} else {
-
 
365
			// Do nothing!
-
 
366
		}
-
 
367
	});
-
 
368
 
-
 
369
 
-
 
370
 
-
 
371
	$(document).on('input', 'table#onboardingLegal input[type=file]', function() {
-
 
372
		if (confirm('Confirm upload ?')) {
-
 
373
			var fileSelector = $(this)[0];
-
 
374
			if (fileSelector != undefined
-
 
375
				&& fileSelector.files[0] != undefined) {
-
 
376
				var url = `${context}/document-upload`;
-
 
377
				console.log(url);
-
 
378
				var file = this.files[0];
-
 
379
				console.log("file" + file);
-
 
380
				let fileInput = $(this);
-
 
381
				console.log("fileInput" + file);
-
 
382
				doAjaxUploadRequestHandler(
-
 
383
					url,
-
 
384
					'POST',
-
 
385
					file,
-
 
386
					function(response) {
-
 
387
						console.log(response);
-
 
388
						var documentId = response.response.document_id;
-
 
389
						console.log("documentId : " + documentId);
-
 
390
						fileInput.closest('td').find("input[type=hidden]").val(documentId);
-
 
391
					});
-
 
392
				// alert("Retailer Shop Document
-
 
393
				// is required");
-
 
394
			}
-
 
395
		} else {
-
 
396
			// Do nothing!
-
 
397
		}
-
 
398
	});
-
 
399
 
340
 
400
 
341
 
401
 
342
 
402
	$(document)
343
	$(document)
403
		.on(
344
		.on(