123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- @extends('layouts.main')
- @section('content')
- <!-- CONTENT HEADER -->
- <section class="content-header">
- <div class="container-fluid">
- <div class="row mb-2">
- <div class="col-sm-6">
- <h1>{{ __('Ticket') }}</h1>
- </div>
- <div class="col-sm-6">
- <ol class="breadcrumb float-sm-right">
- <li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
- <li class="breadcrumb-item"><a class="text-muted"
- href="{{ route('ticket.index') }}">{{ __('Ticket') }}</a>
- </li>
- </ol>
- </div>
- </div>
- </div>
- </section>
- <!-- END CONTENT HEADER -->
- <!-- MAIN CONTENT -->
- <section class="content">
- <div class="container-fluid">
- <form action="{{route('ticket.new.store')}}" method="POST" class="ticket-form">
- @csrf
- <div class="row">
- <div class="col-lg-6">
- <div class="card">
- <div class="card-header">
- <h5 class="card-title">
- <i class="fas fa-money-check-alt mr-2"></i>{{__('Open a new ticket')}}
- </h5>
- </div>
- <div class="card-body">
- <div class="form-group col-sm-12 {{ $errors->has('title') ? ' has-error' : '' }}">
- <label for="title" class="control-label">Title</label>
- <input id="title" type="text" class="form-control" name="title" value="{{ old('title') }}">
- @if ($errors->has('title'))
- <span class="help-block">
- <strong>{{ $errors->first('title') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
- <label for="server" class="control-label">{{__("Server")}}</label>
- <select id="server" type="server" class="form-control" name="server">
- <option value="">{{ __("No Server") }}</option>
- @if ($servers->count() >= 1)
- @foreach ($servers as $server)
- <option value="{{ $server->id }}">{{ $server->name }}</option>
- @endforeach
- @endif
- </select>
- @if ($errors->has('category'))
- <span class="help-block">
- <strong>{{ $errors->first('ticketcategory') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
- <label for="ticketcategory" class="control-label">{{__("Category")}}</label>
- <select id="ticketcategory" type="ticketcategory" class="form-control" required name="ticketcategory">
- <option value="" disabled selected>{{__("Select Category")}}</option>
- @foreach ($ticketcategories as $ticketcategory)
- <option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
- @endforeach
- </select>
- @if ($errors->has('category'))
- <span class="help-block">
- <strong>{{ $errors->first('ticketcategory') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
- <label for="priority" class="control-label">Priority</label>
- <select id="priority" type="" class="form-control" name="priority">
- <option value="" disabled selected>{{__("Select Priority")}}</option>
- <option value="Low">{{__("Low")}}</option>
- <option value="Medium">{{__("Medium")}}</option>
- <option value="High">{{__("High")}}</option>
- </select>
- @if ($errors->has('priority'))
- <span class="help-block">
- <strong>{{ $errors->first('priority') }}</strong>
- </span>
- @endif
- </div>
- @if (app(App\Settings\GeneralSettings::class)->recaptcha_enabled)
- <div class="input-group mb-3">
- {!! htmlScriptTagJsApi() !!}
- {!! htmlFormSnippet() !!}
- @error('g-recaptcha-response')
- <span class="text-danger" role="alert">
- <small><strong>{{ $message }}</strong></small>
- </span>
- @enderror
- </div>
- @endif
- </div>
- <div class="card-footer">
- <button type="submit" class="btn btn-primary ticket-once">
- {{__('Open Ticket')}}
- </button>
- </div>
- </div>
- </div>
- <div class="col-lg-6">
- <div class="card">
- <div class="card-header">
- <h5 class="card-title">
- <i class="fas fa-money-check-alt mr-2"></i>{{__('Ticket details')}}
- </h5>
- </div>
- <div class="card-body">
- <div class="form-group col-sm-12 {{ $errors->has('message') ? ' has-error' : '' }}">
- <label for="message" class="control-label">Message</label>
- <textarea rows="8" id="message" class="form-control" name="message">{{old("message")}}</textarea>
- @if ($errors->has('message'))
- <span class="help-block">
- <strong>{{ $errors->first('message') }}</strong>
- </span>
- @endif
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- </section>
- <!-- END CONTENT -->
- <script type="text/javascript">
- $(".ticket-form").submit(function (e) {
- $(".ticket-once").attr("disabled", true);
- return true;
- })
- </script>
- @endsection
|