applicant-site/resources/views/admin/documents/edit.blade.php

60 lines
2.4 KiB
PHP

@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class="">Изменить документ</h1>
{{ Form::open(['url' => route('documents.update', $document), 'method' => 'PATCH', 'files'=>'true']) }}
<div class="mt-2">
{{ Form::label('name', 'Имя документа') }}
</div>
<div class="mt-2">
{{ Form::text('name', $document->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', $document->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', $document->position, ['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, $document->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>
@endauth
@endsection