Viewing file: 1dcf2155b0efa2d1fadc3518ef81da6a.php (10.85 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?>
<?php echo e(trans('customer.became_seller')); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-css'); ?>
<style>
.preview-box {
min-height: 120px;
cursor: pointer;
max-height: 212px;
}
.preview-box-section {
border: 3px dotted red;
height: 100%;
}
.img-fluid{
height: 100% !important;
}
.preview-box-section .btn-upload{
height: 100%;
}
.preview-box{
height: 100%;
}
.reason-section{
background: #d70f0fb5;
padding: 10px 14px;
color: white;
border-radius: 5px;
}
.reason-section strong{
border-bottom: 1px solid #ffffff63;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-10 mx-auto col-sm-10 mt-3">
<div class="card mb-4">
<div class="card-header">
<h2 class="card-title"><?php echo app('translator')->get('customer.became_seller'); ?></h2>
</div>
<div class="card-body">
<?php if(isset($resellerRequest->reason)): ?>
<div class="row ">
<div class="col-md-12 reason-section">
<strong class="d-block">Rejected Reason:</strong>
<h6 class="mt-2"><?php echo e($resellerRequest->reason); ?></h6>
</div>
</div>
<?php endif; ?>
</div>
<!-- /.card-header -->
<form action="<?php echo e(route('customer.became.seller.store')); ?>" id="resellerForm" method="post" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<div class="card-body">
<div class="row mb-3">
<div class="col-md-12">
<div class="form-group">
<label for="">Name</label>
<input type="text" class="form-control" readonly
value="<?php echo e(auth('customer')->user()->fullname); ?>">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="">Email</label>
<input type="text" class="form-control" readonly
value="<?php echo e(auth('customer')->user()->email); ?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">Address <span class="text-danger">*</span></label>
<input type="text" placeholder="Enter Your Address" class="form-control" name="address" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">Country <span class="text-danger">*</span></label>
<input type="text" placeholder="Enter Country Name" class="form-control" name="country" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">City <span class="text-danger">*</span></label>
<input type="text" placeholder="Enter City" class="form-control" name="city" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="">Zip / Postal Code <span class="text-danger">*</span></label>
<input type="text" class="form-control" placeholder="Enter Zip / Postal Code" name="zip_code" required>
</div>
</div>
</div>
<div class="row pt-3">
<div class="col-md-4 col-sm-4 text-center">
<div class="preview-box-section p-2">
<input type="file" name="nid_card" id="input1" class="input-file"
accept="image/*" hidden/>
<label class="btn-upload" for="input1" role="button">
<div id="p-input1" class="preview-box p-4">
<span class="text-danger">
Upload
</span>
</div>
</label>
<div class="upload-direction"><span class="text">NID Card</span></div>
</div>
</div>
<div class="col-md-4 col-sm-4 text-center">
<div class="preview-box-section p-2">
<input type="file" name="td_license" id="input2" class="input-file"
accept="image/*" hidden/>
<label class="btn-upload" for="input2" role="button">
<div id="p-input2" class="preview-box p-4">
<span class="text-danger">
Upload
</span>
</div>
</label>
<div class="upload-direction"><span class="text">Td License</span></div>
</div>
</div>
<div class="col-md-4 col-sm-4 text-center">
<div class="preview-box-section p-2">
<input type="file" id="input3" name="picture" class="input-file"
accept="image/*" hidden/>
<label class="btn-upload" for="input3" role="button">
<div id="p-input3" class="preview-box p-4">
<span class="text-danger">
Upload
</span>
</div>
</label>
<div class="upload-direction"><span class="text">Picture(P.P)</span></div>
</div>
</div>
</div>
<?php if(!isset($resellerRequest) || $resellerRequest->status=='rejected'): ?>
<div class="row mt-4 justify-content-end p-2">
<button class="btn btn-primary" id="submitResellerForm" type="button">Submit
</button>
</div>
<?php endif; ?>
</div>
</form>
</div>
</div>
<!-- /.card -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?>
<script>
$(document).ready(function () {
'use strict';
/*--------------------------------------------
File Input
--------------------------------------------*/
function handleChange(inputId) {
var fileUploader = document.getElementById(inputId);
var getFile = fileUploader.files
var uploadedFile = getFile[getFile.length - 1];
readFile(uploadedFile, inputId);
}
$('.input-file').on('change', function (e) {
handleChange(e.target.id);
})
function readFile(uploadedFile, inputId) {
if (uploadedFile) {
var reader = new FileReader();
reader.onload = () => {
var parent = document.getElementById('p-' + inputId);
parent.innerHTML = `<img class="preview-content img-fluid" src=${reader.result} />`;
};
reader.readAsDataURL(uploadedFile);
}
};
});
$(document).on('click', '#submitResellerForm', function(e){
e.preventDefault();
const nid_card =$('input[name="nid_card"]').val();
const td_license =$('input[name="td_license"]').val();
const picture =$('input[name="picture"]').val();
if(!nid_card || !td_license || !picture) {
$(document).Toasts('create', {
autohide: true,
delay: 3000,
class: 'bg-danger',
title: 'Notification',
body: 'Please provide the document first',
});
return;
}else{
$('#resellerForm').submit();
}
})
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.customer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Pico-SMS-v-2\picosms\resources\views/became_seller/create.blade.php ENDPATH**/ ?>
|