edit.blade.php 4.18 KB
@extends('layout.admin', ['title' => 'Редактирование компании'])

@section('content')
    <div class="profile-block-wrapper">
        <div class="profile-block">
            <h2 class="modal-auth__title_">
                Редактирование компании
            </h2>
            <form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.company.update', ['company' => $company->id]) }}">
                @csrf

                @isset($company)
                    @method('PUT')
                @endisset

                <label class="form__label" for="title">Заголовок
                    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
                </label><br>
                @error('title')
                <div class="alert alert-danger">{{ $message }}</div>
                @enderror
                <input class="form-input " type="text" id="title" name="title" placeholder="Введите заголовок" required value="{{ old('title') ?? $company->title ?? '' }}"><br><br>

                <label class="form__label" for="text">Текст
                    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
                </label><br>
                @error('text')
                <div class="alert alert-danger">{{ $message }}</div>
                @enderror
                <textarea class="form-input " id="text" name="text" placeholder="Введите текст"
                          required>{{ old('text') ?? $company->text ?? '' }}</textarea><br><br>

                <label class="form__label" for="area_demo">Площадь демонстрационного зала
                    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
                </label><br>
                @error('area_demo')
                <div class="alert alert-danger">{{ $message }}</div>
                @enderror
                <input class="form-input " type="text" id="area_demo" name="area_demo" placeholder="Введите площадь" required value="{{ old('area_demo') ?? $company->area_demo ?? '' }}"><br><br>

                <label class="form__label" for="workers">Число сотрудников
                    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
                </label><br>
                @error('workers')
                <div class="alert alert-danger">{{ $message }}</div>
                @enderror
                <input class="form-input " type="text" id="workers" name="workers" placeholder="Введите число сотрудников" required value="{{ old('workers') ?? $company->workers ?? '' }}"><br><br>

                <label class="form__label" for="stock_area">Площадь складских помещений
                    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
                </label><br>
                @error('stock_area')
                <div class="alert alert-danger">{{ $message }}</div>
                @enderror
                <input class="form-input " type="text" id="stock_area" name="stock_area" placeholder="Введите площадь" required value="{{ old('stock_area') ?? $company->stock_area ?? '' }}"><br><br>

                <label class="form__label" for="name_equipment">Количество наименований оборудования
                    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
                </label><br>
                @error('name_equipment')
                <div class="alert alert-danger">{{ $message }}</div>
                @enderror
                <input class="form-input " type="text" id="name_equipment" name="name_equipment" placeholder="Введите количество наименований" required value="{{ old('name_equipment') ?? $company->name_equipment ?? '' }}"><br><br>

                <<div class="parts-content-form-bottom modal-auth-bottom">
                    <button class="parts-content-form-bottom__button" type="submit">Сохранить</button>
                </div>
            </form>
        </div>
    </div>
@endsection