@extends('public.header') @section('content') @parent {!! Former::open($url) ->addClass('col-lg-10 col-lg-offset-1 warn-on-exit main-form') ->autocomplete('off') ->method($method) ->rules([ 'name' => 'required', 'client_id' => 'required', 'subject' => 'required', ]) !!} @if ($ticket) {!! Former::populate($ticket) !!} @endif
{!! Former::text('data')->data_bind('value: ko.mapping.toJSON(model)') !!} {!! Former::hidden('account_id')->value($account->id) !!} {!! Former::hidden('category_id')->value(1) !!} {!! Former::hidden('status_id')->value(1) !!} @if($ticket) {!! Former::hidden('public_id')->value($ticket->public_id) !!} {!! Former::hidden('status_id')->value($ticket->status_id)->id('status_id') !!} {!! Former::hidden('closed')->value($ticket->closed)->id('closed') !!} {!! Former::hidden('reopened')->value($ticket->reopened)->id('reopened') !!} {!! Former::hidden('subject')->value($ticket->subject)->id('subject') !!} @endif
@if($ticket)
{!! trans('texts.ticket_number')!!}{!! $ticket->ticket_number !!}
{!! trans('texts.category') !!}:{!! $ticket->category->name !!}
{!! trans('texts.subject')!!}:{!! substr($ticket->subject, 0, 30) !!}
{!! trans('texts.assigned_to') !!}:{!! $ticket->agentName() !!}
{!! trans('texts.created_at') !!}:{!! \App\Libraries\Utils::fromSqlDateTime($ticket->created_at) !!}
{!! trans('texts.last_updated') !!}:{!! \App\Libraries\Utils::fromSqlDateTime($ticket->updated_at) !!}
{!! trans('texts.status') !!}:{{ $ticket->getStatusName() }}
{!! trans('texts.priority') !!}:{{ $ticket->getPriorityName() }}
@endif @if($ticket)
{!! Button::info(trans('texts.show_hide_all'))->large()->withAttributes(['onclick' => 'toggleAllComments()']) !!}
@foreach($ticket->comments as $comment)

{!! $comment->description !!}

@endforeach
@endif

@if($ticket) {!! trans('texts.reply') !!} @else {!! trans('texts.new_ticket') !!} @endif

@if(!$ticket) {{trans('texts.subject')}} {!! Former::small_text('subject') ->label('') ->id('subject') ->style('width:100%;') !!} {{ trans('texts.description') }} @endif {!! Former::textarea('description')->label(trans('texts.description'))->style('display:none')->raw() !!}
@include('partials/quill_toolbar', ['name' => 'description'])
@if($ticket && $ticket->status_id == 3) {!! Button::warning(trans('texts.ticket_reopen'))->large()->withAttributes(['onclick' => 'reopenAction()']) !!} @elseif(!$ticket) {!! Button::primary(trans('texts.ticket_open'))->large()->withAttributes(['onclick' => 'submitAction()']) !!} @else {!! Button::danger(trans('texts.ticket_close'))->large()->withAttributes(['onclick' => 'closeAction()']) !!} {!! Button::primary(trans('texts.ticket_update'))->large()->withAttributes(['onclick' => 'submitAction()']) !!} @endif
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 0) }} {{ Former::setOption('TwitterBootstrap3.labelWidths.small', 0) }}
@if ($ticket && $ticket->documents()) @foreach($ticket->documents() as $document)
{{$document->name}}
@endforeach @endif
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 4) }} {{ Former::setOption('TwitterBootstrap3.labelWidths.small', 4) }}
{!! Former::close() !!} @stop