Roman_applicant-site/resources/views/admin/documents/create.blade.php

80 lines
3.3 KiB
PHP

@extends('layouts.admin-layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class="">Прикрепить файл</h1>
{{ Form::open(['url' => route('documents.store'), '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('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('idReceptionScreen', 'Пункт экрана приема') }}
</div>
<div class="mt-2">
{{ Form::select('idReceptionScreen', $receptionScreens, null, ['class' => 'form-select']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('idReceptionScreen') }}
@endif
</div>
<div class="mt-4">
{{ Form::submit('Загрузить файл', ['class' => 'btn btn-primary'])}}
</div>
{{Form::close()}}
</div>
{{-- @if($idReceptionScreen !== null)--}}
{{-- <div class="col">--}}
{{-- <h2>Файлы пункта Экрана Приема: {{ $receptionScreens[$idReceptionScreen] }}</h2>--}}
{{-- <table class="table">--}}
{{-- <thead class="border-b-2 border-solid border-black text-left" style="text-align: left">--}}
{{-- <tr>--}}
{{-- <th scope="col">Позиция</th>--}}
{{-- <th scope="col">Название</th>--}}
{{-- </tr>--}}
{{-- </thead>--}}
{{-- <tbody>--}}
{{-- @foreach($files as $file)--}}
{{-- <tr>--}}
{{-- <th scope="row">{{ $file->position }}</th>--}}
{{-- <th scope="row">{{ $file->name }}</th>--}}
{{-- @endforeach--}}
{{-- </tbody>--}}
{{-- </table>--}}
{{-- </div>--}}
{{-- @endif--}}
</div>
@endauth
@endsection