234 lines
12 KiB
PHP
234 lines
12 KiB
PHP
@extends('themes.default1.client.layout.client')
|
|
|
|
@section('title')
|
|
{!! Lang::get('lang.submit_a_ticket') !!} -
|
|
@stop
|
|
|
|
@section('submit')
|
|
class = "nav-item active"
|
|
@stop
|
|
|
|
@section('breadcrumb')
|
|
<ol class="breadcrumb float-sm-right">
|
|
<style>
|
|
.words {
|
|
margin-right: 10px;
|
|
}
|
|
</style>
|
|
<li class="breadcrumb-item"><i class="fas fa-home"></i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
|
<li><a class="words" href="{{ url('/') }}">{!! Lang::get('lang.home') !!}</a></li>
|
|
<li class="words">></li>
|
|
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
|
|
</ol>
|
|
@stop
|
|
|
|
@section('check')
|
|
<div id="sidebar" class="site-sidebar col-md-3">
|
|
<div id="form-border" class="comment-respond form-border" style="background:#fff">
|
|
<section id="section-categories" class="section">
|
|
<h2 class="section-title h4 clearfix">
|
|
<i class="line"></i>{!! Lang::get('lang.have_a_ticket') !!}?
|
|
</h2>
|
|
|
|
@if (Session::has('check'))
|
|
@if (count($errors) > 0)
|
|
<div class="alert alert-danger alert-dismissable">
|
|
<i class="fa fa-ban"></i>
|
|
<b>{!! Lang::get('lang.alert') !!} !</b>
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
@endif
|
|
|
|
<div>
|
|
{!! Form::open(['url' => 'checkmyticket', 'method' => 'POST']) !!}
|
|
{!! Form::label('email', Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
|
{!! Form::text('email_address', null, ['class' => 'form-control form-group']) !!}
|
|
|
|
{!! Form::label('ticket_number', Lang::get('lang.ticket_number')) !!}<span class="text-red"> *</span>
|
|
{!! Form::text('ticket_number', null, ['class' => 'form-control form-group']) !!}
|
|
|
|
<button type="submit" class="btn btn-info"
|
|
style="border-color: rgb(0,192,239); background-color: rgb(0,154,186)!important; color:white">
|
|
<i class="fas fa-save"></i> {!! Lang::get('lang.check_ticket_status') !!}
|
|
</button>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
@stop
|
|
|
|
@section('content')
|
|
<div id="content" class="site-content col-md-9">
|
|
|
|
@if (Session::has('message'))
|
|
<div class="alert alert-success alert-dismissable">
|
|
<i class="fas fa-check-circle"></i>
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
{!! Session::get('message') !!}
|
|
</div>
|
|
@endif
|
|
|
|
@if (count($errors) > 0)
|
|
@if (Session::has('check'))
|
|
<?php goto a; ?>
|
|
@endif
|
|
@if (!Session::has('error'))
|
|
<div class="alert alert-danger alert-dismissable">
|
|
<i class="fas fa-ban"></i>
|
|
<b>{!! Lang::get('lang.alert') !!} !</b>
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
<?php a: ?>
|
|
@endif
|
|
|
|
<?php
|
|
$encrypter = app('Illuminate\Encryption\Encrypter');
|
|
$encrypted_token = $encrypter->encrypt(csrf_token());
|
|
?>
|
|
<input id="token" type="hidden" value="{{ $encrypted_token }}">
|
|
|
|
{!! Form::open(['route' => 'client.form.post', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!}
|
|
|
|
<article class="hentry">
|
|
<div id="form-border" class="comment-respond form-border" style="background:#fff">
|
|
<section id="section-categories">
|
|
<h2 class="section-title h4 clearfix mb-0">
|
|
<i class="line" style="border-color: rgb(0,154,186);"></i>{!! Lang::get('lang.submit_a_ticket') !!}
|
|
</h2>
|
|
|
|
<div class="row mt-4">
|
|
@if (Auth::user())
|
|
{!! Form::hidden('Name', Auth::user()->user_name) !!}
|
|
{!! Form::hidden('Email', Auth::user()->email) !!}
|
|
{!! Form::hidden('mobile', Auth::user()->mobile) !!}
|
|
{!! Form::hidden('Code', Auth::user()->country_code) !!}
|
|
{!! Form::hidden('Phone', Auth::user()->phone_number) !!}
|
|
@else
|
|
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
|
{!! Form::label('Name', Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
|
{!! Form::text('Name', null, ['class' => 'form-control']) !!}
|
|
</div>
|
|
|
|
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
|
{!! Form::label('Email', Lang::get('lang.email')) !!}
|
|
@if ($email_mandatory->status == 1)
|
|
<span class="text-red"> *</span>
|
|
@endif
|
|
{!! Form::email('Email', null, ['class' => 'form-control']) !!}
|
|
</div>
|
|
|
|
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
|
{!! Form::label('Code', Lang::get('lang.country-code')) !!}
|
|
{!! Form::text('Code', null, [
|
|
'class' => 'form-control',
|
|
'placeholder' => $phonecode,
|
|
'title' => Lang::get('lang.enter-country-phone-code'),
|
|
]) !!}
|
|
</div>
|
|
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
|
{!! Form::label('mobile', Lang::get('lang.mobile_number')) !!}
|
|
{!! Form::text('mobile', null, ['class' => 'form-control']) !!}
|
|
</div>
|
|
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
|
{!! Form::label('Phone', Lang::get('lang.phone')) !!}
|
|
{!! Form::text('Phone', null, ['class' => 'form-control']) !!}
|
|
</div>
|
|
@endif
|
|
|
|
<!-- Help Topic + Priority cùng row -->
|
|
<div class="col-md-12 form-group row">
|
|
<label class="col-md-2 col-form-label">{{ Lang::get('lang.choose_a_help_topic') }}</label>
|
|
<div class="col-md-4">
|
|
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', 1)->get(); ?>
|
|
<select name="helptopic" class="form-control">
|
|
@foreach ($helptopic as $topic)
|
|
<option value="{{ $topic->id }}">{{ $topic->topic }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<label class="col-md-2 col-form-label">{{ Lang::get('lang.priority') }}</label>
|
|
<div class="col-md-4">
|
|
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', 1)->get(); ?>
|
|
{!! Form::select('priority', $Priority->pluck('priority_desc', 'priority_id')->toArray(), null, [
|
|
'class' => 'form-control',
|
|
]) !!}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Location + Department -->
|
|
<div class="col-md-12 form-group row">
|
|
<label for="location" class="col-md-2 col-form-label">Location</label>
|
|
<div class="col-md-4">
|
|
<select name="location" class="form-control">
|
|
<option value="">-- Chọn vị trí --</option>
|
|
@foreach ($locations as $loc)
|
|
<option value="{{ $loc->id }}"
|
|
{{ old('location') == $loc->id ? 'selected' : '' }}>
|
|
{{ $loc->locationname }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<label for="submitdept_id" class="col-md-2 col-form-label">Department</label>
|
|
<div class="col-md-4">
|
|
<select name="submitdept_id" class="form-control" id="submitdept_id">
|
|
@foreach ($departments as $dept)
|
|
<option value="{{ $dept->id }}"
|
|
{{ Auth::user()->dept_id == $dept->id ? 'selected' : '' }}>
|
|
{{ $dept->name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Subject -->
|
|
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
|
|
{!! Form::label('Subject', Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
|
|
{!! Form::text('Subject', null, ['class' => 'form-control']) !!}
|
|
</div>
|
|
|
|
<!-- Message -->
|
|
<div class="col-md-12 form-group {{ $errors->has('Details') ? 'has-error' : '' }}">
|
|
{!! Form::label('Details', Lang::get('lang.message')) !!}<span class="text-red"> *</span>
|
|
{!! Form::textarea('Details', null, ['class' => 'form-control']) !!}
|
|
</div>
|
|
|
|
<!-- Attachment -->
|
|
<div class="col-md-12 form-group">
|
|
<input type="file" name="attachment[]" multiple /><br />
|
|
{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
|
|
</div>
|
|
|
|
{{-- Event fire --}}
|
|
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\ClientTicketForm()); ?>
|
|
|
|
<!-- Submit Button -->
|
|
<div class="col-md-12 form-group">
|
|
{!! Form::button('<i class="fas fa-save"></i> ' . Lang::get('lang.submit'), [
|
|
'type' => 'submit',
|
|
'class' => 'btn btn-primary',
|
|
]) !!}
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
@stop
|