2024-02-12 15:02:31 +03:00
|
|
|
@extends('layouts.admin_layout')
|
2024-02-08 15:59:44 +03:00
|
|
|
@section('content')
|
|
|
|
@auth()
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<h1 class=""> Создать кафедру</h1>
|
|
|
|
{{ Form::open(['url' => route('departments.update', $department), 'method' => 'PATCH', 'class' => '']) }}
|
|
|
|
<div class="col">
|
|
|
|
<div class="mt-3">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position')]) }}
|
|
|
|
<span class="text-danger">*</span>
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
|
|
|
<div class="mt-1">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::number('position', $department->position, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.position'), 'required']) }}
|
|
|
|
<div class="invalid-feedback">
|
|
|
|
Поле "Позиция" обязательно!
|
|
|
|
</div>
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
2024-03-13 10:56:14 +03:00
|
|
|
<div class="text-danger">
|
2024-02-08 15:59:44 +03:00
|
|
|
@if ($errors->any())
|
|
|
|
{{ $errors->first('position') }}
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-3">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name')]) }}
|
|
|
|
<span class="text-danger">*</span>
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
|
|
|
<div class="mt-1">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::text('name', $department->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.name'), 'required']) }}
|
|
|
|
<div class="invalid-feedback">
|
|
|
|
Поле "Название" обязательно!
|
|
|
|
</div>
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
2024-03-13 10:56:14 +03:00
|
|
|
<div class="text-danger">
|
2024-02-08 15:59:44 +03:00
|
|
|
@if ($errors->any())
|
|
|
|
{{ $errors->first('name') }}
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-3">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
|
|
|
<div class="mt-1">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::text('description', $department->description, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.description')]) }}
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
2024-03-13 10:56:14 +03:00
|
|
|
<div class="text-danger">
|
2024-02-08 15:59:44 +03:00
|
|
|
@if ($errors->any())
|
|
|
|
{{ $errors->first('description') }}
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
<div class="mt-3">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::label('faculty_id', 'Факультет', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
|
|
|
<span class="text-danger">*</span>
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
|
|
|
<div class="mt-1">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::select('faculty_id', $faculties, $department->faculty->id, ['class' => 'form-select', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.faculty_id')]) }}
|
2024-02-08 15:59:44 +03:00
|
|
|
</div>
|
2024-03-13 10:56:14 +03:00
|
|
|
<div class="text-danger">
|
2024-02-08 15:59:44 +03:00
|
|
|
@if ($errors->any())
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ $errors->first('faculty_id') }}
|
2024-02-08 15:59:44 +03:00
|
|
|
@endif
|
|
|
|
</div>
|
2024-02-12 10:39:46 +03:00
|
|
|
|
|
|
|
<div class="mt-3">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
2024-02-12 10:39:46 +03:00
|
|
|
</div>
|
|
|
|
<div class="mt-1">
|
2024-03-13 10:56:14 +03:00
|
|
|
{{ Form::text('slug', $department->slug, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.departments.slug')]) }}
|
2024-02-12 10:39:46 +03:00
|
|
|
</div>
|
2024-03-13 10:56:14 +03:00
|
|
|
<div class="text-danger">
|
2024-02-12 10:39:46 +03:00
|
|
|
@if ($errors->any())
|
|
|
|
{{ $errors->first('slug') }}
|
|
|
|
@endif
|
|
|
|
</div>
|
2024-02-08 15:59:44 +03:00
|
|
|
<div class="mt-3">
|
|
|
|
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ Form::close() }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endauth
|
|
|
|
@endsection
|