@extends('header') @section('head') @parent @stop @section('content') {!! Former::open($url) ->addClass('col-lg-10 col-lg-offset-1 warn-on-exit main-form') ->autocomplete('off') ->method($method) ->rules([ 'name' => 'required', ]) !!} @if ($ticket) {!! Former::populate($ticket) !!} @endif
{!! Former::text('data')->data_bind('value: ko.mapping.toJSON(model)') !!} {!! Former::hidden('category_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') !!} {!! Former::hidden('contact_key')->value($ticket->contact_key)->id('contact_key') !!} {!! Former::hidden('is_internal')->value($ticket->is_internal) !!} @else {!! Former::hidden('status_id')->value(1) !!} @endif
@if($isAdminUser) @include('tickets.partials.ticket_meta_data_admin') @else @include('tickets.partials.ticket_meta_data_agent') @endif
@if($ticket && $ticket->is_internal == true)

{!! trans('texts.internal_ticket') !!}

@endif @if($ticket)
{!! Button::info(trans('texts.show_hide_all'))->large()->withAttributes(['onclick' => 'toggleAllComments()']) !!}
@endif
@foreach($ticket->comments as $comment)

{!! $comment->description !!}

@endforeach
@if(!$ticket->merged_parent_ticket_id)

@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
@can('edit', $ticket)
@if(!$ticket->is_internal && $ticket->client) {!! DropdownButton::normal(trans('texts.more_actions')) ->withContents([ ['label'=>trans('texts.ticket_merge'),'url'=>'/tickets/merge/'. $ticket->public_id ], ['label'=>trans('texts.new_internal_ticket'), 'url'=>'/tickets/create/'.$ticket->public_id], ]) ->large() ->dropup() !!} @endif @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
@endcan
@endif
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 0) }} {{ Former::setOption('TwitterBootstrap3.labelWidths.small', 0) }}
{!! Former::textarea('private_notes') ->data_bind("value: private_notes, valueUpdate: 'afterkeydown'") ->label(null)->style('width: 100%')->rows(4) !!}
@if ($ticket->documents()) @foreach($ticket->documents() as $document)
{{$document->name}}
@endforeach @endif
{!! Former::select('linked_object') ->style('width:170px;padding:10px;') ->label('') ->text(trans('texts.type')) ->addOption('', '') ->fromQuery(\App\Models\Ticket::relationEntities()) ->data_bind("event: {change: onEntityChange }") !!}
{!! Former::select('linked_item') ->style('width:170px;padding:10px;') ->label('') ->text(trans('texts.type')) ->addOption('', '') ->data_bind("options: entityItems") !!}
{!! Button::normal(trans('texts.link')) ->small() ->withAttributes(['onclick' => 'addRelation()', 'data-bind' => 'enable: checkObjectAndItemExist']) !!}
@if(!$ticket->merged_parent_ticket_id && Auth::user()->can('edit', $ticket))
{!! Button::primary(trans('texts.save'))->large()->withAttributes(['onclick' => 'saveAction()']) !!}
@endif {{ Former::setOption('TwitterBootstrap3.labelWidths.large', 4) }} {{ Former::setOption('TwitterBootstrap3.labelWidths.small', 4) }}
{!! Former::close() !!} @stop