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

77 lines
3.7 KiB
PHP
Raw Permalink Normal View History

@php use App\Helpers\PositionHelper; @endphp
2024-02-16 10:43:55 +03:00
@extends('layouts.admin_layout')
@section('content')
@auth()
<div class="row">
<div class="col">
2024-02-17 11:30:32 +03:00
<h1 class=""> Создать Предмет</h1>
{{ Form::open(['url' => route('subjects.store'), 'method' => 'POST', 'class' => 'needs-validation', 'novalidate']) }}
2024-02-16 10:43:55 +03:00
<div class="col">
2024-02-16 10:43:55 +03:00
<div class="mt-3">
{{ Form::label('position', 'Позиция', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.position')]) }}
<span class="text-danger">*</span>
2024-02-16 10:43:55 +03:00
</div>
<div class="mt-1">
{{ Form::number('position', PositionHelper::subject(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
2024-02-16 10:43:55 +03:00
</div>
<div class="text-danger">
2024-02-16 10:43:55 +03:00
@if ($errors->any())
{{ $errors->first('position') }}
2024-02-16 10:43:55 +03:00
@endif
</div>
2024-02-16 10:43:55 +03:00
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.name')]) }}
<span class="text-danger">*</span>
2024-02-16 10:43:55 +03:00
</div>
<div class="mt-1">
{{ Form::text('name', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.name'), 'required']) }}
<div class="invalid-feedback">
Поле "Название" обязательно!
</div>
2024-02-16 10:43:55 +03:00
</div>
<div class="text-danger">
2024-02-16 10:43:55 +03:00
@if ($errors->any())
{{ $errors->first('name') }}
2024-02-16 10:43:55 +03:00
@endif
</div>
<div class="mt-3">
{{ Form::label('description', 'Описание', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.description')]) }}
2024-02-16 10:43:55 +03:00
</div>
<div class="mt-1">
{{ Form::text('description', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.description')]) }}
2024-02-16 10:43:55 +03:00
</div>
<div class="text-danger">
2024-02-16 10:43:55 +03:00
@if ($errors->any())
{{ $errors->first('description') }}
2024-02-16 10:43:55 +03:00
@endif
</div>
<div class="mt-3">
{{ Form::label('slug', 'URL', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.slug')]) }}
2024-02-16 10:43:55 +03:00
</div>
<div class="mt-1">
{{ Form::text('slug', '', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.subjects.slug')]) }}
2024-02-16 10:43:55 +03:00
</div>
<div class="text-danger">
2024-02-16 10:43:55 +03:00
@if ($errors->any())
{{ $errors->first('slug') }}
2024-02-16 10:43:55 +03:00
@endif
</div>
<div class="mt-3">
2024-02-17 11:30:32 +03:00
{{ Form::submit('Создать', ['class' => 'btn btn-primary']) }}
2024-02-16 10:43:55 +03:00
</div>
</div>
{{ Form::close() }}
</div>
</div>
@endauth
@endsection