| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <!DOCTYPE html>
- <html lang="ru">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Редактирование записи #{{ $submission->id }}</title>
- </head>
- <body>
- <div class="container">
- <h1>Редактирование записи</h1>
- {{-- Блок для вывода ошибок валидации --}}
- @if ($errors->any())
- <div class="alert" style="background: #f8d7da; color: #721c24;">
- <strong>Ошибка!</strong> Проверьте введенные данные.
- <ul>
- @foreach ($errors->all() as $error)
- <li>{{ $error }}</li>
- @endforeach
- </ul>
- </div>
- @endif
- <form action="{{ route('admin.update', $submission) }}" method="POST">
- @csrf
- @method('PUT')
- <div style="margin-bottom: 15px;">
- <label for="name">Имя</label>
- <input type="text" name="name" id="name" value="{{ old('name', $submission->name) }}" required style="width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ccc;">
- </div>
- <div style="margin-bottom: 15px;">
- <label for="email">Email</label>
- <input type="email" name="email" id="email" value="{{ old('email', $submission->email) }}" required style="width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ccc;">
- </div>
- <div style="margin-bottom: 20px;">
- <label for="message">Сообщение</label>
- <textarea name="message" id="message" rows="5" required style="width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ccc;">{{ old('message', $submission->message) }}</textarea>
- </div>
- <div>
- <button type="submit" class="btn">Сохранить изменения</button>
- <a href="{{ route('admin.index') }}" class="btn btn-secondary">Отмена</a>
- </div>
- </form>
- </div>
- </body>
- </html>
|