@include('laravel-crm::layouts.partials.nav-settings')

@if($field) {{ ucfirst(trans('laravel-crm::lang.edit_custom_field')) }} @else {{ ucfirst(trans('laravel-crm::lang.create_custom_field')) }} @endif

{{ ucfirst(trans('laravel-crm::lang.back_to_fields')) }}
@include('laravel-crm::partials.form.text',[ 'name' => 'fieldName', 'label' => ucfirst(trans('laravel-crm::lang.name')), 'attributes' => [ 'wire:model' => 'fieldName' ], 'required' => 'true' ]) @include('laravel-crm::partials.form.select',[ 'name' => 'fieldType', 'label' => ucfirst(trans('laravel-crm::lang.type')), 'options' => [ 'text' => 'Single-line text', 'textarea' => 'Multi-line text', 'checkbox' => 'Single checkbox', 'checkbox_multiple' => 'Multiple checkbox', 'select' => 'Dropdown select', 'radio' => 'Radio select', 'date' => 'Date picker', ], 'attributes' => [ 'wire:model' => 'fieldType' ], 'required' => 'true' ]) @switch($fieldType) @case('select') @case('checkbox_multiple') @case('radio')
Options
@foreach($fieldOptions as $key => $option) @endforeach
Label Order
@include('laravel-crm::partials.form.text',[ 'name' => 'options['.$key.'][label]', 'type' => 'text', 'attributes' => [ 'wire:model' => 'fieldOptions.'.$key.'.label', ] ]) @include('laravel-crm::partials.form.text',[ 'name' => 'options['.$key.'][order]', 'type' => 'number', 'attributes' => [ 'wire:model' => 'fieldOptions.'.$key.'.order', ] ])
{{--

Special title treatment

With supporting text below as a natural lead-in to additional content.

Go somewhere--}}
@break @endswitch @include('laravel-crm::partials.form.select',[ 'name' => 'fieldGroup', 'label' => ucfirst(trans('laravel-crm::lang.group')), 'options' => [''=>''] + \VentureDrake\LaravelCrm\Models\FieldGroup::pluck('name','id')->toArray(), 'attributes' => [ 'wire:model' => 'fieldGroup' ], ]) @include('laravel-crm::partials.form.text',[ 'name' => 'fieldDefault', 'label' => ucfirst(trans('laravel-crm::lang.default')), 'attributes' => [ 'wire:model' => 'fieldDefault' ], ])
required == 1) ? 'checked' : null }} data-toggle="toggle" data-size="sm" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="danger">
{{ ucfirst(__('laravel-crm::lang.attach')) }}
@include('laravel-crm::partials.form.multiselect',[ 'name' => 'field_models', 'label' => null, 'options' => \VentureDrake\LaravelCrm\Http\Helpers\SelectOptions\fieldModels(), 'value' => old('field_models', (isset($field)) ? \VentureDrake\LaravelCrm\Models\FieldModel::where('field_id', $field->id)->get()->pluck('model')->toArray() : null), 'attributes' => [ 'wire:model' => 'fieldModels' ], ])
@component('laravel-crm::components.card-footer') {{ ucfirst(trans('laravel-crm::lang.cancel')) }} @endcomponent
@push('livewire-js') @endpush