applicant-site/resources/views/admin/catalog/direction/create.blade.php

310 lines
17 KiB
PHP
Raw Permalink Normal View History

2024-03-06 17:11:35 +03:00
@php use App\Helpers\PositionHelper; @endphp
2024-02-12 15:02:31 +03:00
@extends('layouts.admin_layout')
2024-02-10 11:23:38 +03:00
@section('content')
@auth()
<h1 class=""> Создать Направление</h1>
2024-03-06 17:11:35 +03:00
{{ Form::open(['url' => route('directions.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
2024-02-29 18:00:50 +03:00
<div class="row">
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('department_id', 'Кафедра', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.department_id')]) }}
<span class="text-danger">*</span>
2024-02-29 18:00:50 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::select('department_id', $departments, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.department_id'), 'required']) }}
<div class="invalid-feedback">
Поле "Кафедра" обязательно!
</div>
2024-02-29 18:00:50 +03:00
</div>
<div class="text-danger">
2024-02-29 18:00:50 +03:00
@if ($errors->any())
{{ $errors->first('department_id') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('education_level_id', 'Уровень образования', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_level_id')]) }}
<span class="text-danger">*</span>
2024-02-29 18:00:50 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::select('education_level_id', $levels, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_level_id'), 'required']) }}
2024-02-29 18:00:50 +03:00
</div>
<div class="text-danger">
2024-02-29 18:00:50 +03:00
@if ($errors->any())
{{ $errors->first('education_level_id') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('education_form_id', 'Форма образования', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_form_id')]) }}
<span class="text-danger">*</span>
2024-02-29 18:00:50 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::select('education_form_id', $forms, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.education_form_id'), 'required']) }}
2024-02-29 18:00:50 +03:00
</div>
<div class="text-danger">
2024-02-29 18:00:50 +03:00
@if ($errors->any())
{{ $errors->first('education_form_id') }}
@endif
</div>
</div>
</div>
2024-02-10 11:23:38 +03:00
<div class="row">
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::number('position', PositionHelper::direction(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.position'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('code', 'Код', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.code')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::text('code', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.code'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('code') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.slug')]) }}
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.slug')]) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('slug') }}
@endif
</div>
</div>
2024-02-10 11:23:38 +03:00
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
2024-02-10 11:23:38 +03:00
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.description')]) }}
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.name')]) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('description') }}
@endif
</div>
2024-02-29 18:00:50 +03:00
<div class="row">
<div class="col">
2024-02-10 11:23:38 +03:00
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('budget_places', 'Кол-во бюджетных мест', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.budget_places')]) }}
<span class="text-danger">*</span>
2024-02-10 11:23:38 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::number('budget_places', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.budget_places'), 'required']) }}
2024-02-10 11:23:38 +03:00
</div>
<div class="text-danger">
2024-02-10 11:23:38 +03:00
@if ($errors->any())
2024-02-29 18:00:50 +03:00
{{ $errors->first('budget_places') }}
2024-02-10 11:23:38 +03:00
@endif
</div>
</div>
<div class="col">
2024-02-14 16:16:44 +03:00
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('quota', 'Квота', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.quota')]) }}
<span class="text-danger">*</span>
2024-02-14 16:16:44 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::number('quota', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.quota'), 'required']) }}
2024-02-14 16:16:44 +03:00
</div>
<div class="text-danger">
2024-02-14 16:16:44 +03:00
@if ($errors->any())
2024-02-29 18:00:50 +03:00
{{ $errors->first('quota') }}
2024-02-14 16:16:44 +03:00
@endif
</div>
</div>
<div class="col">
2024-02-15 09:58:01 +03:00
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('paid_places', 'Кол-во мест по договорам', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.paid_places')]) }}
<span class="text-danger">*</span>
2024-02-15 09:58:01 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::number('paid_places', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.paid_places'), 'required']) }}
2024-02-15 09:58:01 +03:00
</div>
<div class="text-danger">
2024-02-15 09:58:01 +03:00
@if ($errors->any())
2024-02-29 18:00:50 +03:00
{{ $errors->first('paid_places') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('cost_paid_place', 'Стоимость обучения', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.cost_paid_place')]) }}
<span class="text-danger">*</span>
2024-02-29 18:00:50 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::number('cost_paid_place', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.cost_paid_place'), 'required']) }}
2024-02-29 18:00:50 +03:00
</div>
<div class="text-danger">
2024-02-29 18:00:50 +03:00
@if ($errors->any())
{{ $errors->first('cost_paid_place') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('period', 'Период обучения', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.period')]) }}
<span class="text-danger">*</span>
2024-02-29 18:00:50 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::text('period', null, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.period'), 'required']) }}
2024-02-29 18:00:50 +03:00
</div>
<div class="text-danger">
2024-02-29 18:00:50 +03:00
@if ($errors->any())
{{ $errors->first('period') }}
2024-02-15 09:58:01 +03:00
@endif
</div>
</div>
</div>
2024-02-15 09:58:01 +03:00
2024-02-29 18:00:50 +03:00
<div class="row">
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('direction_profile', 'Профиль подготовки', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.direction_profile')]) }}
<span class="text-danger">*</span>
2024-02-29 18:00:50 +03:00
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::select('direction_profiles[]', $directionProfiles, null, ['class' => 'form-control rounded border-gray-300 w-1/3 h-32', 'multiple' => 'multiple', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction.direction_profile'), 'required']) }}
2024-02-29 18:00:50 +03:00
</div>
<div class="text-danger">
2024-02-29 18:00:50 +03:00
@if ($errors->any())
{{ $errors->first('direction_profile') }}
@endif
</div>
</div>
</div>
<h4 class="mt-3">Добавить вступительные испытания</h4>
<div class="text-center align-items-center entrance-examination" id="entrance-examination"
name="entrance-examination">
<div class="row">
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('entrance-examination[0][examination_type_id]', 'Тип экзамена', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
2024-03-06 17:11:35 +03:00
{{ Form::select('entrance-examination[0][examination_type_id]', $examination_types, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.examination_type_id'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('entrance-examination[0][examination_type_id]') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('entrance-examination[0][subject_id]', 'Предмет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1 col">
2024-03-06 17:11:35 +03:00
{{ Form::select('entrance-examination[0][subject_id]', $subjects, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_id'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('entrance-examination[0][subject_id]') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('entrance-examination[0][subject_type_id]', 'Тип предмета', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1 col">
2024-03-06 17:11:35 +03:00
{{ Form::select('entrance-examination[0][subject_type_id]', $subjectTypes, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.subject_type_id'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('entrance-examination[0][subject_type_id]') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('entrance-examination[0][scores]', 'Кол-во баллов', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1 col">
2024-03-06 17:11:35 +03:00
{{ Form::number('entrance-examination[0][scores]', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.scores'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('entrance-examination[0][scores]') }}
@endif
</div>
</div>
<div class="col">
<div class="mt-3">
2024-03-06 17:11:35 +03:00
{{ Form::label('entrance-examination[0][position]', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1 col">
2024-03-06 17:11:35 +03:00
{{ Form::number('entrance-examination[0][position]', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.entrance-examination.position'), 'required']) }}
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('entrance-examination[0][position]') }}
@endif
</div>
</div>
<div class="col align-items-end">
<div class="mt-3">
{{ Form::label('btn', 'Действия') }}
</div>
<button type="button" class="btn btn-success col" name="add" id="add">Добавить</button>
2024-02-10 11:23:38 +03:00
</div>
</div>
</div>
2024-02-29 18:00:50 +03:00
<div class="mt-3 mb-3">
{{ Form::submit('Создать Направление', ['class' => 'btn btn-primary']) }}
</div>
{{ Form::close() }}
2024-02-10 11:23:38 +03:00
</div>
@include('admin.catalog.direction.script')
2024-03-06 17:11:35 +03:00
@include('layouts.bootstrap_validation')
2024-02-10 11:23:38 +03:00
@endauth
@endsection