prev_company_form.blade.php 4.44 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">
                        @include('messages_error')

                        <h4 class="cabinet__h4">Добавление контакта предыдущей компании</h4>
                        <form id="submit_form" name="submit_form" action="{{ route('worker.add_prev_company') }}" 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_company" id="name_company" class="input" value="{{ old('name_company') ?? '' }}">
                                </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="direct" id="direct" class="input" value="{{ old('direct') ?? '' }}">
                                </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="telephone" id="telephone" class="input" value="{{ old('telephone') ?? '' }}">
                                </div>
                            </div>
                            <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
                                <label class="form-group__label">Телефон 2</label>
                                <div class="form-group__item">
                                    <input type="text" name="telephone2" id="telephone2" class="input" value="{{ old('telephone2') ?? '' }}">
                                </div>
                            </div>
                            <button type="submit" class="button">Сохранить</button>
                            <a href="{{ route('worker.cabinet') }}" class="button">Назад</a>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>

@endsection