Roman_applicant-site/resources/views/admin/documents/create_from_admission.blade...

80 lines
3.1 KiB
PHP
Raw Normal View History

@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class="">Прикрепить файл</h1>
{{ Form::open(['url' => route('document_store_from_admission'), 'method' => 'POST', 'files'=>'true']) }}
<div class="mt-2">
{{ Form::label('document', 'Путь к документу') }}
</div>
<div class="mt-2">
{{ Form::file('document', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('document') }}
@endif
</div>
<div class="mt-2">
{{ Form::label('name', 'Имя файла') }}
</div>
<div class="mt-2">
{{ Form::text('name', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-2">
{{ Form::label('description', 'Описание') }}
</div>
<div class="mt-2">
{{ Form::text('description', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
<div class="mt-2">
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-2">
{{ Form::text('position', 0, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-2">
{{ Form::label('admission_id', 'Пункт экрана приема') }}
</div>
<div class="mt-2">
{{ Form::select('admission_id', $admissions, $admission->id, ['class' => 'form-select']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('admission_id') }}
@endif
</div>
<div class="mt-4">
{{ Form::submit('Загрузить файл', ['class' => 'btn btn-primary'])}}
</div>
{{Form::close()}}
</div>
<div class="col-4">
<h3>Документы пункта {{ $admission->name }}</h3>
<ul class="list-group">
@foreach($documents as $document)
<li class="list-group-item">{{ $document->name }}</li>
@endforeach
</ul>
</div>
</div>
@endauth
@endsection