Documents ready
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
<div class="p-6 bg-white border-b border-gray-200">
|
||||
<div class="w-96 mx-auto">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger text-red-500 p-2">
|
||||
<ul class="list-unstyled alert alert-danger">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="alert alert-danger text-red-500 p-2">
|
||||
<ul class="list-unstyled alert alert-danger">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<form method="POST" action="{{ route('documents.store') }}">
|
||||
@csrf
|
||||
@@ -25,7 +25,8 @@
|
||||
<div>
|
||||
<x-label for="name" :value="__('Title')" />
|
||||
|
||||
<x-input id="name" class="block mt-1 w-full" type="text" name="name" :value="old('name')" required autofocus />
|
||||
<x-input id="name" class="block mt-1 w-full" type="text" name="name"
|
||||
:value="old('name')" required autofocus />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -33,20 +34,28 @@
|
||||
|
||||
<x-select id="parent_id" class="block mt-1 w-full" name="parent_id" required>
|
||||
<option value="0">---</option>
|
||||
@foreach($documents as $document)
|
||||
<option value="{{ $document->id }}">{{ $document->name}}</option>
|
||||
@foreach ($top_documents as $document)
|
||||
<option value="{{ $document->id }}">{{ $document->name }}</option>
|
||||
@if (count($document->childs))
|
||||
@include('documents.optionChild', [
|
||||
'childs' => $document->childs,
|
||||
'level' => 1,
|
||||
])
|
||||
@endif
|
||||
@endforeach
|
||||
</x-select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
|
||||
<button
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
|
||||
<i class="fa fa-add pr-2"></i>{{ __('Create document') }}
|
||||
</button>
|
||||
<div class="pl-2">
|
||||
<a href="{{ route('documents.index') }}" class="btn bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded-full">
|
||||
<i class="fa fa-cancel pr-2"></i>{{__('Cancel')}}
|
||||
<a href="{{ route('documents.index') }}"
|
||||
class="btn bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded-full">
|
||||
<i class="fa fa-cancel pr-2"></i>{{ __('Cancel') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,4 +65,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user