form_additional_documents.blade.php 2.08 KB
@extends('workers.cabinet_layout', ['title' => 'Дополнительные документы - РекаМоре'])

@section('cabinet_content')
        <form action="{{ route('worker.edit_diploms', ['worker' => $worker->id]) }}" class="cabinet__inputs" method="POST">
    @csrf
    @method('PUT')

<div class="mb-40" name="ajax_dop_diplomi" id="ajax_dop_diplomi">
    <div class="cabinet__body-item">
        <div class="cabinet__anketa">
            <h2 class="title cabinet__title">Дополнительные документы</h2>
        </div>
    </div>

    <div class="cabinet__body-item">
        <div class="cabinet__inputs">
            @if ($info_blocks->count())
            @foreach ($info_blocks as $info_block)
            <div class="cabinet__inputs-item form-group">
                <label class="form-group__label">{{ $info_block->name }}:</label>

                <div class="form-group__item">
                    @php $status = 0; @endphp
                    @if (!empty($worker->dop_info[$info_block->id]) && $worker->dop_info[$info_block->id]['status'])
                        @php $status = $worker->dop_info[$info_block->id]['status']; @endphp
                    @endif

                    <select name="diploms[{{ $info_block->id }}]" data-info="{{ $info_block->id }}" class="js-select2 sertificates_js">
                    @foreach($additional_document_statuses as $key => $value)
                        <option value="{{ $key }}" @if ($status == $key) selected @endif>{{ $value }}</option>
                    @endforeach
                    </select>
                </div>
            </div>
            @endforeach
            @endif

            <div class="cabinet__body-item cabinet__inputs-item-full-row">
                <div class="cabinet__buttons_flex">
                    <button type="submit" class="button mr-10">Сохранить</button>
                    <a href="{{ route('worker.cabinet') }}" class="button button_light active">Вернуться к моей анкете</a>
                </div>
            </div>
        </div>
    </div>
</div>
</form>
@endsection