Current File : /home/tradevaly/new.tradevaly.com.bd/resources/views/user/pages/ticket/create.blade.php |
@extends('user.ayaan.master')
@push('style')
<link href="{{ asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-12 mb-4">
<div class="card bg__white">
<div class="card-header bg-transparent">
<h4 class="bg-transparent">Generate Ticket
</h4>
<p>Thank you for your interest in tradevaly.com.bd Our team of customer services specialists will be more than happy to help you.</p>
</div>
<div class="card-body">
<form action="{{url('user/offer/add')}}" method="POST" enctype="multipart/form-data">
@csrf
<div class="row">
<div class="col-md-12 mb-2">
<div class="form-group">
<label class="bmd-label-floating">Subject </label>
<input type="text" name="title" class="form-control" required>
</div>
</div>
<div class="col-md-12 mb-2">
<div class="form-group">
<label class="bmd-label-floating mt-3">Message </label>
<textarea rows='10' name="des" aria-hidden="true" class="form-control" ></textarea>
</div>
</div>
</div>
<div class="col-md-12 mb-2">
<div class="form-group">
<label class="bmd-label-floating">Attachment </label>
<input type="file" name="file" class="form-control" required>
</div>
</div>
<br/>
<button type="submit" class="btn btn-info pull-right gradient__bg">Upload</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
</div>
@stop
@section('script')
<script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
<!-- dropzone plugin -->
<script src="{{ asset('/assets/libs/dropzone/dropzone.min.js') }}"></script>
<script src="{{ asset('assets/libs/tinymce/tinymce.min.js') }}"></script>
<!-- init js -->
<script src="{{ asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>
<script src="{{ asset('assets/js/pages/form-editor.init.js') }}"></script>
<script>
$(function() {
$('#example').select2({
multiple: true,
maximumSelectionSize: 1
});
});
</script>
<script>
$(document).ready(function() {
$(".btn-success").click(function(){
var lsthmtl = $(".clone").html();
$(".increment").after(lsthmtl);
});
$("body").on("click",".btn-danger",function(){
$(this).parents("#cloning").remove();
});
});
$(document).on('change', '[name=category_id]', function() {
var child_id = $(this).val();
get_cat(child_id);
});
function get_cat(child_id) {
$('[name="sub_id"]').html("");
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url: "{{ route('ajax.cat')}}",
type: 'POST',
data: {
sub_id : child_id
},
success: function (response) {
$(".select2").select2();
var obj = JSON.parse(response);
if(obj != '') {
$('[name="sub_id"]').html(obj);
}
}
});
}
$(document).on('change', '[name=sub_id]', function() {
var child_id = $(this).val();
get_child(child_id);
});
function get_child(child_id) {
$('[name="child_id"]').html("");
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url: "{{ route('ajax.subcat')}}",
type: 'POST',
data: {
sub_id : child_id
},
success: function (response) {
$(".select2").select2();
var obj = JSON.parse(response);
if(obj != '') {
$('[name="child_id"]').html(obj);
}
}
});
}
</script>
@endsection