@extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ __('labels.white_labels') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => isset($whiteLabel) && isset($readonly) && $readonly ? __('labels.view_white_labels') : (isset($whiteLabel) ? __('labels.edit_white_labels') : __('labels.create_new_white_labels')), 'actionButton' => [ 'url' => route('white-labels.index', ['type' => 'latest']), 'text' => __('labels.back_to_white_labels'), ], ]) @include('components.common.flush-message') @include('components.common.validation-errors')
@csrf @if(isset($whiteLabel)) @method('PUT') @endif
@error('title')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
@include('components.form.author-name', [ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'authorName' => old('author_name', isset($whiteLabel->author_name) && $whiteLabel->author_name ? $whiteLabel->author_name : auth()->user()->name), ])
@error('type')
{{ $message }}
@enderror
@include('components.form.published-inputs', [ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'published_at' => old('published_at', $whiteLabel->published_at ?? ''), 'is_published' => old('is_published', $whiteLabel->is_published ?? ''), ])
@include('components.form.url-links-manage', [ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'urlList' => old('urls', isset($selectedUrls) && count($selectedUrls) ? $selectedUrls : null), ]) @if(isset($whiteLabel->assets) && count($whiteLabel->assets)) @include('components.form.file-manager.existing-files',[ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'assets' => $whiteLabel->assets ]) @endif {{-- Include upload files section --}} @if(!isset($readonly) || (isset($readonly) && !$readonly)) @include('components.form.file-manager.upload-files') @endif @include('components.form.select-group',[ 'readonly' => isset($readonly) && $readonly ? 1 : 0, 'groups' => $groups ?? [], 'selectedGroups' => old('groups', isset($selectedGroups) && count($selectedGroups) ? $selectedGroups : null), 'canCreate' => auth()->user()->can('create',\App\Models\WhiteLabel::class), 'canUpdate' => isset($whiteLabel) && auth()->user()->can('update',$whiteLabel), ])
@if(!isset($readonly) || (isset($readonly) && !$readonly))
{{ __('labels.cancel') }}
@endif
@endsection