sertificate_edit.blade.php 1.86 KB
@extends('workers.cabinet_layout', ['title' => 'Редактирование стандартного документа - РекаМоре'])

@section('cabinet_content')
<h3 class="cabinet__h4 font30">Сертификат / документ</h3>
<form id="submit_form" name="submit_form" action="{{ route('worker.update_serificate', ['doc' => $doc->id]) }}" class="cabinet__inputs" method="GET">
    @csrf
    <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}">

    <div class="cabinet__body-item width100">
        <div class="cabinet__inputs">
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Название сертификата:</label>
                <div class="form-group__item">
                    @error('name')
                    <div class="error red">{{ $message }}</div>
                    @enderror
                    <input type="text" name="name" id="name" class="input" value="{{ old('name') ?? $doc->name }}" required>
                </div>
            </div>
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">Действия сертификата до:</label>
                <div class="form-group__item">
                    @error('end_begin')
                    <div class="error red">{{ $message }}</div>
                    @enderror
                    <input type="text" name="end_begin" id="end_begin" class="input" value="{{ old('end_begin') ?? date('d.m.Y', strtotime($doc->end_begin)) }}" required>
                </div>
            </div>
        </div>
    </div>

    <div class="flex">
        <button type="submit" class="button mr-10">Сохранить</button>
        <a href="{{ route('worker.cabinet') }}" class="button button_light">Отменить</a>
    </div>
</form>
@endsection