Roman_applicant-site/resources/views/admin/news/edit.blade.php

69 lines
3.3 KiB
PHP
Raw Normal View History

2024-03-20 13:09:39 +03:00
@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('news.update', $news), 'method' => 'PATCH', 'files'=>'true', 'class' => 'needs-validation', 'novalidate']) }}
<div class="col">
<div class="mt-3">
{{ Form::label('name', 'Название', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.news.name')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('name', $news->name, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.news.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('text', 'Текст', ['data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.news.text')]) }}
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::textarea('text', $news->text, ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.news.text'), 'required']) }}
<div class="invalid-feedback">
Поле "Текст" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
2024-06-11 10:37:39 +03:00
<div class="mt-2">
{{ Form::label('photo', 'Путь к фото') }}
<span class="text-danger">*</span>
</div>
<div class="mt-2">
{{ Form::file('photo', ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.news.photo'), 'required']) }}
<div class="invalid-feedback">
Поле "Путь к фото" обязательно!
</div>
</div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('photo') }}
@endif
</div>
2024-03-20 13:09:39 +03:00
<div class="mt-3">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>
</div>
{{ Form::close() }}
</div>
</div>
@endauth
@include('layouts.bootstrap_validation')
@endsection