@extends('header') @section('content') @parent {!! Former::open_for_files() ->addClass('warn-on-exit') ->autocomplete('on') ->rules([]) !!} {{ Former::populate($account_ticket_settings) }} {{ Former::populateField('local_part', $account_ticket_settings->support_email_local_part) }} @include('accounts.nav', ['selected' => ACCOUNT_TICKETS])

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

{!! Former::text('ticket_number_start') ->label(trans('texts.counter')) ->help('ticket_number_start_help') !!}
{!! Former::select('default_priority') ->text(trans('texts.default_priority')) ->options([ TICKET_PRIORITY_LOW => trans('texts.low'), TICKET_PRIORITY_MEDIUM => trans('texts.medium'), TICKET_PRIORITY_HIGH => trans('texts.high'), ]) !!}
{!! Former::select('ticket_master_id') ->label(trans('texts.ticket_master')) ->text(trans('texts.ticket_master')) ->help(trans('texts.ticket_master_help')) ->fromQuery($account->users, 'displayName', 'id') !!}
{!! Former::select('default_agent_id') ->addOption('','0') ->label(trans('texts.default_agent')) ->text(trans('texts.default_agent')) ->help(trans('texts.default_agent_help')) ->fromQuery($account->users, 'displayName', 'id') !!}
{!! Former::checkbox('allow_inbound_email_tickets_external') ->text(trans('texts.enable')) ->help(trans('texts.allow_inbound_email_tickets_external_help')) ->label(trans('texts.allow_inbound_email_tickets_external')) ->value(1) !!}
{!! Former::text('support_email_local_part') ->placeholder('texts.local_part_placeholder') ->label(trans('texts.local_part')) ->append(Button::info(trans('texts.search'))->withAttributes(['onclick' => 'checkSupportEmail()'])) ->help('texts.local_part_help') !!} {!! Former::text('from_name') ->placeholder('texts.from_name_placeholder') ->label(trans('texts.from_name')) ->help('texts.from_name_help')!!}
{!! Former::checkbox('client_upload') ->text(trans('texts.enable')) ->help(trans('texts.enable_client_upload_help')) ->label(trans('texts.client_upload')) ->value(1) !!}
{!! Former::select('max_file_size') ->text(trans('texts.max_file_size')) ->fromQuery($account_ticket_settings->max_file_sizes()) ->help(trans('texts.max_file_size_help')) !!}
{!! Former::text('mime_types') ->placeholder('texts.mime_types_placeholder') ->label(trans('texts.mime_types')) ->help('mime_types_help') !!}
{!! Former::select('new_ticket_template_id') ->text(trans('texts.new_ticket_template_id')) ->addOption('','0') ->fromQuery($templates, "name", "id") ->help(trans('texts.new_ticket_autoresponder_help')) !!}
{!! Former::select('update_ticket_template_id') ->text(trans('texts.update_ticket_template_id')) ->addOption('','0') ->fromQuery($templates, "name", "id") ->help(trans('texts.update_ticket_autoresponder_help')) !!}
{!! Former::select('close_ticket_template_id') ->text(trans('texts.close_ticket_template_id')) ->addOption('','0') ->fromQuery($templates, "name", "id") ->help(trans('texts.close_ticket_autoresponder_help')) !!}
{!! Former::select('alert_new_comment_id') ->text(trans('texts.alert_new_comment_id')) ->addOption('','0') ->fromQuery($templates, "name", "id") ->help(trans('texts.alert_comment_ticket_help')) !!}
{!! Former::text('alert_new_comment_id_email') ->placeholder('texts.comma_separated_values') ->label(trans('texts.update_ticket_notification_list')) ->help('alert_comment_ticket_email_help') !!}
{!! Former::select('alert_ticket_assign_agent_id') ->text(trans('texts.alert_ticket_assign_agent_id')) ->addOption('','0') ->fromQuery($templates, "name", "id") ->help(trans('texts.alert_ticket_assign_agent_id_hel')) !!}
{!! Former::text('alert_ticket_assign_email') ->placeholder('texts.comma_separated_values') ->label(trans('texts.alert_ticket_assign_agent_id_notifications')) ->help('alert_ticket_assign_agent_id_help') !!}
{!! Former::select('alert_ticket_overdue_agent_id') ->text(trans('texts.alert_ticket_overdue_agent_id')) ->addOption('','0') ->fromQuery($templates, "name", "id") ->help(trans('texts.alert_ticket_overdue_agent_id_help')) !!}
{!! Former::text('alert_ticket_overdue_email') ->placeholder('texts.comma_separated_values') ->label(trans('texts.alert_ticket_overdue_email')) ->help('alert_ticket_overdue_email_help') !!}
{!! Former::close() !!}
{!! Button::primary(trans('texts.add_template')) ->asLinkTo(URL::to('/ticket_templates/create')) ->withAttributes(['class' => 'pull-right']) ->appendIcon(Icon::create('plus-sign')) !!} @include('partials.bulk_form', ['entityType' => ENTITY_TICKET_TEMPLATE]) {!! Datatable::table() ->addColumn( trans('texts.name'), trans('texts.description'), trans('texts.action')) ->setUrl(url('api/ticket_templates/')) ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('bAutoWidth', false) ->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[1]]]) ->render('datatable') !!}
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id'=>'saveButton']) !!}
@stop