@extends('layouts.app') @section('breadcrumb') @stop @section('content') {!! Html::script('js/tinymce.min.js') !!}

{!! trans('messages.edit').' '. trans('messages.form').' '.trans('messages.template') !!} - {!! App\Company::find($template->tenant_id)->company_name ?? '' !!}

{!! Form::model($template,['method' => 'PATCH','route' => ['form-template.update',$template] ,'class' => 'general-template-form',' name' => 'general-template-form-edit','id' => 'general-template-form-edit','data-form-table' => 'template_table']) !!}
{!! Form::label('name',trans('messages.name'),[])!!} {!! Form::input('text','name',isset($template->name) ? $template->name : '',['required' => 'true','class'=>'form-control','placeholder'=>trans('messages.name')])!!}
{!! Form::label('module',trans('messages.module'),[]) !!} {!! Form::select('module',config('modules'), $template->module,['class'=>'form-control show-tick', 'title'=>trans('messages.module'),'data-actions-box'=>'true']) !!}
{!! Form::label('category',trans('messages.form_category'),[])!!} {!! Form::select('category',App\FormTemplate::$category, $template->category,['class'=>'form-control', 'title'=>trans('messages.category'),'data-actions-box'=>'true']) !!}
@if (Laratrust::isAbleTo('list-client'))
{!! Form::label('clients',trans('messages.client'),[]) !!} {!! Form::select('client_id',$clients,$template->client_id ?: '',['class'=>'form-control show-tick','title'=>trans('messages.select').' '.trans('messages.client'),'data-actions-box'=>'true']) !!}
@endif
{!! Form::label('relationship',trans('messages.relationship').' '.trans('messages.module'),[]) !!} {!! Form::select('relationship', $relationship_list, $template->relationship,['class'=>'form-control show-tick', 'title'=>trans('messages.module'),'data-actions-box'=>'true']) !!}
@if($template->relationship)
{!! Form::label('relationship_id',trans('messages.relationship').' '.trans('messages.item'),[]) !!} {!! Form::select('relationship_id',$relationships, $template->relationship_id,['class'=>'form-control show-tick','title'=>trans('messages.module'),'data-actions-box'=>'true']) !!}
@endif
{!! Form::label('header',trans('messages.header').' '.trans('messages.template'),[]) !!} {!! Form::select('header',$headers,$template->header ?: '',['class'=>'form-control show-tick','title'=>trans('messages.select').' '.trans('messages.header').' '.trans('messages.template'),'data-actions-box'=>'true', 'disabled'=>$template->category != 'body']) !!}
{!! Form::label('footer',trans('messages.footer').' '.trans('messages.template'),[]) !!} {!! Form::select('footer',$footers,$template->footer ?: '',['class'=>'form-control show-tick','title'=>trans('messages.select').' '.trans('messages.footer').' '.trans('messages.template'),'data-actions-box'=>'true', 'disabled'=>$template->category != 'body']) !!}
{!! Form::label('active',trans('messages.active'),[]) !!} {!! Form::select('active',[0 => 'inactive' , 1 => 'active'] ,$template->active,['class'=>'form-control show-tick','title'=>trans('messages.select').' '.trans('messages.active'),'data-actions-box'=>'true']) !!}
{!! Form::label('body',trans('messages.body'),[])!!}
{!! trans('messages.available').' '.trans('messages.field') !!} :
@foreach(explode(',',trim($template->fields)) as $key => $mode) {{$mode}} @endforeach
{{ trans('messages.template_field_instruction') }}
@if(Auth::user()->hasRole('Master'))
{!! Form::label('',trans('messages.field').' ('.trans('messages.hidden').')',[])!!}
@endif {!! Form::close() !!}
@stop