@extends('layouts.master')

@section('content')

<section class="content">
	<div class="row">
		<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
			<section class="panel tasks-widget">
				<header class="panel-heading" style="height:40px;">
				    <div class="pull-left">
				        {{$title}}
				    </div>
				    <div>
				    </div>
				</header>
				<div class="panel-body">
					@include('layouts.message')
					<form action="{{ url('ticket/save') }}" method="POST" class="form-horizontal" enctype="multipart/form-data">
					{{ csrf_field() }}
						@if(\Auth::user()->utype!=3)
						<div class="form-group">
							<label for="client" class="col-sm-2">Client</label>
							<div class="col-sm-6">
								<select name="client" id="client" class='form-control'>
									<option value="">Select Client</option>
									@if($clients)
									@foreach($clients as $client)
									<option value="{{ $client->id }}">{{ $client->name}}</option>
									@endforeach
									@endif
								</select>
							</div>
						</div>
						@endif

						<div class="form-group">
							<label for="service" class="col-sm-2">Service</label>
							<div class="col-sm-6">
								<select name="service" id="service" class='form-control' required>
									<option value="">Select Service</option>
									@if($services)
									@foreach($services as $row)
									<option value="{{ $row->id }}">{{ $row->name }}</option>
									@endforeach
									@endif
								</select>
							</div>
						</div>

						<div class="form-group">
							<label for="title" class="col-sm-2">Title</label>
							<div class="col-sm-6">
								<input type="text" name="title" id="title" class="form-control" placeholder="Title" required>
							</div>
						</div>
						<div class="form-group">
							<label for="details" class="col-sm-2">Description</label>
							<div class="col-sm-6">
								<textarea name="details" id="details" class="form-control" placeholder="Description" required></textarea>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2">Priority</label>
							<div class="col-sm-6">
								<label class="radio-inline">
									<input type="radio" name="prority" value="4"> Urgent
								</label>
								<label class="radio-inline">
									<input type="radio" name="prority" value="3"> High
								</label>
								<label class="radio-inline">
									<input type="radio" name="prority" value="2"> Medium
								</label>
								<label class="radio-inline">
									<input type="radio" name="prority	" value="1"> Low
								</label>
							</div>
						</div>

						<div class="form-group">
							<label for="title" class="col-sm-2">Upload your document</label>
							<div class="col-sm-6">
								<input type="file" name="ticket_document" id="">
							</div>
						</div>


						<div class="form-group">
							<div class="col-sm-6 col-sm-offset-2">
								<button class="btn btn-primary"><i class="fa fa-save"></i> Create</button>
								<button class="btn btn-default"><i class="fa fa-times"></i> Cancel</button>
							</div>
						</div>
					</form>
				</div>
			</section>
		</div>
	</div>
</section>

@stop