@extends('layouts/default', [ 'helpText' => trans('admin/custom_fields/general.about_fieldsets_text'), 'helpPosition' => 'right', ]) {{-- Page title --}} @section('title') {{ trans('admin/custom_fields/general.custom_fields') }} @parent @stop @section('content') @section('header_right') {{ trans('general.back') }} @stop {{-- Page content --}} @section('content') @if ($field->id)
{{ method_field('PUT') }} @else @endif @csrf
{!! $errors->first('name', '') !!}
{!! Form::customfield_elements('element', old('element', $field->element), 'field_element select2 form-control') !!} {!! $errors->first('element', '') !!}
@php $field_format = ''; if (stripos($field->format, 'regex') === 0){ $field_format = 'CUSTOM REGEX'; } @endphp
{{ Form::select("format",Helper::predefined_formats(), ($field_format == '') ? $field->format : $field_format, array('class'=>'format select2 form-control', 'aria-label'=>'format', 'style' => 'width:100%;')) }} {!! $errors->first('format', '') !!}

{{ trans('admin/custom_fields/general.help_text_description') }}

{!! $errors->first('help_text', '') !!}
@if (($field->id) && ($field->field_encrypted=='1'))
{{ trans('general.notification_warning') }}: {{ trans('admin/custom_fields/general.encrypted_options') }}
@endif @if (!$field->id)
@endif
@if ((!$field->id) || ($field->field_encrypted=='0'))
@endif
@if ($fieldsets->count() > 0)

{{ trans('admin/custom_fields/general.fieldsets') }}

{!! $errors->first('associate_fieldsets', '') !!} @foreach ($fieldsets as $fieldset) @php $array_fieldname = 'associate_fieldsets.'.$fieldset->id; // Consider the form data first if (old($array_fieldname) == $fieldset->id) { $checked = 'checked'; // Otherwise check DB } elseif (isset($field->fieldset) && ($field->fieldset->contains($fieldset->id))) { $checked = 'checked'; } else { $checked = ''; } @endphp @endforeach
@endif
@stop @section('moar_scripts') @stop