forked from aslan/applicant-site
88 lines
4.5 KiB
PHP
88 lines
4.5 KiB
PHP
@php use App\Helpers\PositionHelper; @endphp
|
|
@extends('layouts.admin_layout')
|
|
@section('content')
|
|
@auth()
|
|
<div class="row">
|
|
<div class="col">
|
|
<h1 class=""> Создать кафедру</h1>
|
|
{{ Form::open(['url' => route('departments.store'), 'method' => 'POST', 'class' => '']) }}
|
|
<div class="col">
|
|
|
|
<div class="mt-3">
|
|
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position')]) }}
|
|
<span class="text-danger">*</span>
|
|
</div>
|
|
<div class="mt-1">
|
|
{{ Form::number('position', PositionHelper::department(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position'), 'required']) }}
|
|
<div class="invalid-feedback">
|
|
Поле "Позиция" обязательно!
|
|
</div>
|
|
</div>
|
|
<div class="text-danger">
|
|
@if ($errors->any())
|
|
{{ $errors->first('position') }}
|
|
@endif
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name')]) }}
|
|
<span class="text-danger">*</span>
|
|
</div>
|
|
<div class="mt-1">
|
|
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name'), 'required']) }}
|
|
<div class="invalid-feedback">
|
|
Поле "Название" обязательно!
|
|
</div>
|
|
</div>
|
|
<div class="text-danger">
|
|
@if ($errors->any())
|
|
{{ $errors->first('name') }}
|
|
@endif
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
|
</div>
|
|
<div class="mt-1">
|
|
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
|
</div>
|
|
<div class="text-danger">
|
|
@if ($errors->any())
|
|
{{ $errors->first('description') }}
|
|
@endif
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
{{ Form::label('faculty_id', 'Факультет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
|
<span class="text-danger">*</span>
|
|
</div>
|
|
<div class="mt-1">
|
|
{{ Form::select('faculty_id', $faculties, null, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
|
</div>
|
|
<div class="text-danger">
|
|
@if ($errors->any())
|
|
{{ $errors->first('faculty_id') }}
|
|
@endif
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
|
</div>
|
|
<div class="mt-1">
|
|
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
|
</div>
|
|
<div class="text-danger">
|
|
@if ($errors->any())
|
|
{{ $errors->first('slug') }}
|
|
@endif
|
|
</div>
|
|
<div class="mt-3">
|
|
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
|
|
</div>
|
|
</div>
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
@endauth
|
|
@endsection
|