@extends('twill::layouts.main') @section('appTypeClass', 'body--form') @push('extra_css') @if(app()->isProduction()) @endif @unless(config('twill.dev_mode', false)) @endunless @endpush @push('extra_js_head') @if(app()->isProduction()) @endif @endpush @php $editor = $editor ?? false; $translate = $translate ?? false; $translateTitle = $translateTitle ?? $translate ?? false; $titleFormKey = $titleFormKey ?? 'title'; $customForm = $customForm ?? false; $controlLanguagesPublication = $controlLanguagesPublication ?? true; $disableContentFieldset = $disableContentFieldset ?? false; $editModalTitle = ($createWithoutModal ?? false) ? twillTrans('twill::lang.modal.create.title') : null; @endphp @section('content')
@unless($disableContentFieldset) @yield('contentFields') @endunless @yield('fieldsets')

{!! twillTrans('twill::lang.form.dialogs.delete.confirmation') !!}

@stop @section('initialStore') window['{{ config('twill.js_namespace') }}'].STORE.form = { baseUrl: '{{ $baseUrl ?? '' }}', saveUrl: '{{ $saveUrl }}', previewUrl: '{{ $previewUrl ?? '' }}', restoreUrl: '{{ $restoreUrl ?? '' }}', availableBlocks: {}, blocks: {}, blockPreviewUrl: '{{ $blockPreviewUrl ?? '' }}', availableRepeaters: {!! $availableRepeaters ?? '{}' !!}, repeaters: {!! json_encode(($form_fields['repeaters'] ?? []) + ($form_fields['blocksRepeaters'] ?? [])) !!}, fields: [], editor: {{ $editor ? 'true' : 'false' }}, isCustom: {{ $customForm ? 'true' : 'false' }}, reloadOnSuccess: {{ ($reloadOnSuccess ?? false) ? 'true' : 'false' }}, editorNames: [] } window['{{ config('twill.js_namespace') }}'].STORE.publication = { withPublicationToggle: {{ json_encode(($publish ?? true) && isset($item) && $item->isFillable('published')) }}, published: {{ isset($item) && $item->published ? 'true' : 'false' }}, createWithoutModal: {{ isset($createWithoutModal) && $createWithoutModal ? 'true' : 'false' }}, withPublicationTimeframe: {{ json_encode(($schedule ?? true) && isset($item) && $item->isFillable('publish_start_date')) }}, publishedLabel: '{{ $customPublishedLabel ?? twillTrans('twill::lang.main.published') }}', expiredLabel: '{{twillTrans('twill::lang.publisher.expired')}}', scheduledLabel: '{{twillTrans('twill::lang.publisher.scheduled')}}', draftLabel: '{{ $customDraftLabel ?? twillTrans('twill::lang.main.draft') }}', submitDisableMessage: '{{ $submitDisableMessage ?? '' }}', startDate: '{{ $item->publish_start_date ?? '' }}', endDate: '{{ $item->publish_end_date ?? '' }}', visibility: '{{ isset($item) && $item->isFillable('public') ? ($item->public ? 'public' : 'private') : false }}', reviewProcess: {!! isset($reviewProcess) ? json_encode($reviewProcess) : '[]' !!}, submitOptions: @if(isset($item) && $item->cmsRestoring) { draft: [ { name: 'restore', text: '{{ twillTrans('twill::lang.publisher.restore-draft') }}' }, { name: 'restore-close', text: '{{ twillTrans('twill::lang.publisher.restore-draft-close') }}' }, { name: 'restore-new', text: '{{ twillTrans('twill::lang.publisher.restore-draft-new') }}' }, { name: 'cancel', text: '{{ twillTrans('twill::lang.publisher.cancel') }}' } ], live: [ { name: 'restore', text: '{{ twillTrans('twill::lang.publisher.restore-live') }}' }, { name: 'restore-close', text: '{{ twillTrans('twill::lang.publisher.restore-live-close') }}' }, { name: 'restore-new', text: '{{ twillTrans('twill::lang.publisher.restore-live-new') }}' }, { name: 'cancel', text: '{{ twillTrans('twill::lang.publisher.cancel') }}' } ], update: [ { name: 'restore', text: '{{ twillTrans('twill::lang.publisher.restore-live') }}' }, { name: 'restore-close', text: '{{ twillTrans('twill::lang.publisher.restore-live-close') }}' }, { name: 'restore-new', text: '{{ twillTrans('twill::lang.publisher.restore-live-new') }}' }, { name: 'cancel', text: '{{ twillTrans('twill::lang.publisher.cancel') }}' } ] } @else null @endif } window['{{ config('twill.js_namespace') }}'].STORE.revisions = {!! json_encode($revisions ?? []) !!} window['{{ config('twill.js_namespace') }}'].STORE.parentId = {{ $item->parent_id ?? 0 }} window['{{ config('twill.js_namespace') }}'].STORE.parents = {!! json_encode($parents ?? []) !!} window['{{ config('twill.js_namespace') }}'].STORE.medias.crops = {!! json_encode(($item->mediasParams ?? []) + config('twill.block_editor.crops') + (config('twill.settings.crops') ?? [])) !!} window['{{ config('twill.js_namespace') }}'].STORE.medias.selected = {} window['{{ config('twill.js_namespace') }}'].STORE.browser = {} window['{{ config('twill.js_namespace') }}'].STORE.browser.selected = {} window['{{ config('twill.js_namespace') }}'].APIKEYS = { 'googleMapApi': '{{ config('twill.google_maps_api_key') }}' } @stop @prepend('extra_js') @includeWhen(config('twill.block_editor.inline_blocks_templates', true), 'twill::partials.form.utils._blocks_templates') @endprepend