sertificate_add.blade.php 4.34 KB
@extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре'])

@section('scripts')
    <script>
        console.log('Test system');
        $(document).on('submit', '#submit_form', function() {
            var this_ = $(this);
            var new_diplom = $('#name');
            var new_diplom_val = new_diplom.val();
            var new_data_begin = $('#new_data_begin');
            var new_data_begin_val = new_data_begin.val();
            var new_data_end = $('#new_data_end');
            var new_data_end_val = new_data_end.val();
            var education = $('#education');
            var education_val = education.val();
            var worker_id = $('#new_id');
            var worker_val = worker_id.val();

            console.log('Валидация формы.');

            if (new_diplom_val == '') {
                new_diplom.addClass('err_red');
                console.log('Border Up');
                return false;
            } else {
                return true;
            }
        });
    </script>
@endsection

@section('content')
    <section class="cabinet">
        <div class="container">
            <ul class="breadcrumbs cabinet__breadcrumbs">
                <li><a href="{{ route('index') }}">Главная</a></li>
                <li><b>Личный кабинет</b></li>
            </ul>
            <div class="cabinet__wrapper">
                <div class="cabinet__side">
                    <div class="cabinet__side-toper">
                        @include('workers.emblema')

                    </div>

                    @include('workers.menu', ['item' => 1])
                </div>

                <div class="cabinet__body">
                    <div class="cabinet__body-item">
                    <h4 class="cabinet__h4">Добавить сертификат</h4>
                    <form id="submit_form" name="submit_form" action="{{ route('worker.add_serificate') }}" class="cabinet__inputs" method="GET">
                        @csrf
                        <input type="hidden" name="worker_id" id="worker_id" class="input" value="{{ $worker->id }}">
                        <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
                            <label class="form-group__label">Название сертификата</label>
                            <div class="form-group__item">
                                <input type="text" name="name" id="name" class="input" value="Диплом о дополнительном образовании">
                            </div>
                        </div>
                        <div style="display:none" class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
                            <label class="form-group__label">Дата поступления</label>
                            <div class="form-group__item">
                                <input type="text" name="date_begin" id="date_begin" class="input" value="Дата начала">
                            </div>
                        </div>
                        <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
                            <label class="form-group__label">Действия сертификата до</label>
                            <div class="form-group__item">
                                <input type="text" name="end_begin" id="end_begin" class="input" value="04.11.26">
                            </div>
                        </div>
                        <div style="display:none" class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
                            <label class="form-group__label">Название учебного заведения</label>
                            <div class="form-group__item">
                                <input type="text" name="education" id="education" class="input" value="Учебное заведение">
                            </div>
                        </div>
                        <button type="submit" class="button">Сохранить</button>
                        <a href="{{ route('worker.cabinet') }}" class="button">Назад</a>
                    </form>
                </div>
                </div>
            </div>
        </div>
    </section>

@endsection