@inject('formService', 'App\Services\FormService') {{ csrf_field() }}

{{ trans('crud.panels.general_information') }}

{!! Form::text('name', $formService->prefill('name', $source), ['placeholder' => trans('locations.placeholders.name'), 'class' => 'form-control', 'maxlength' => 191]) !!}
@include('cruds.fields.type', ['base' => \App\Models\Location::class, 'trans' => 'locations'])
{!! Form::select2( 'parent_location_id', (isset($model) && $model->parentLocation ? $model->parentLocation : $formService->prefillSelect('parentLocation', $source)), App\Models\Location::class, true, 'crud.fields.location', 'locations.find', 'locations.placeholders.location' ) !!}
@include('cruds.fields.tags') @include('cruds.fields.attribute_template') @if (Auth::user()->isAdmin())
@include('cruds.fields.private') @endif

{{ trans('crud.panels.appearance') }}

@include('cruds.fields.image')
@include('cruds.fields.entry') @if (!isset($model) || auth()->user()->can('map', $model))

{{ trans('locations.panels.map') }}

{{ __('locations.helpers.map') }}

{!! Form::hidden('remove-map') !!}
{!! Form::file('map', array('class' => 'image form-control')) !!}
{!! Form::text('map_url', null, ['placeholder' => trans('crud.placeholders.image_url'), 'class' => 'form-control']) !!}

{{ trans('crud.hints.map_limitations', ['size' => auth()->user()->maxUploadSize(true, 'map')]) }} @if (!auth()->user()->hasRole('patreon')) {{ __('crud.hints.image_patreon') }} @endif

@if (!empty($model->map)) @endif
@if (Auth::user()->isAdmin())
{!! Form::hidden('is_map_private', 0) !!}

{{ trans('locations.hints.is_map_private') }}

@endif
@endif @include('cruds.fields.copy')
@include('cruds.fields.save')