| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- @extends('layout.app')
- @section('title', 'Редактирование заявки #' . $submission->id)
- @section('content')
- <div style="margin-bottom: 20px;">
- <a href="{{ route('submissions.show', $submission->id) }}" style="color: #3490dc; text-decoration: none;">← Назад к заявке</a>
- </div>
- <h1>Редактирование заявки #{{ $submission->id }}</h1>
- @if ($errors->any())
- <div class="error-list">
- <strong>Обнаружены ошибки:</strong>
- <ul>
- @foreach ($errors->all() as $error)
- <li>{{ $error }}</li>
- @endforeach
- </ul>
- </div>
- @endif
- <form method="POST" action="{{ route('submissions.update', $submission->id) }}">
- @csrf
- @method('PUT')
- <div style="margin-bottom: 15px;">
- <label for="name" style="display: block; margin-bottom: 5px;">Имя:</label>
- <input type="text" id="name" name="name" value="{{ old('name', $submission->name) }}" required
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid {{ $errors->has('name') ? 'red' : '#ccc' }};">
- @error('name')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <div style="margin-bottom: 15px;">
- <label for="email" style="display: block; margin-bottom: 5px;">Email:</label>
- <input type="email" id="email" name="email" value="{{ old('email', $submission->email) }}" required
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid {{ $errors->has('email') ? 'red' : '#ccc' }};">
- @error('email')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <div style="margin-bottom: 15px;">
- <label for="message" style="display: block; margin-bottom: 5px;">Сообщение:</label>
- <textarea id="message" name="message" rows="5"
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid {{ $errors->has('message') ? 'red' : '#ccc' }};">{{ old('message', $submission->message) }}</textarea>
- @error('message')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <div style="margin-bottom: 15px;">
- <label for="status" style="display: block; margin-bottom: 5px;">Статус:</label>
- <select id="status" name="status" required
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ccc;">
- <option value="active" {{ old('status', $submission->status) === 'active' ? 'selected' : '' }}>Активно</option>
- <option value="archived" {{ old('status', $submission->status) === 'archived' ? 'selected' : '' }}>Архивировано</option>
- <option value="pending" {{ old('status', $submission->status) === 'pending' ? 'selected' : '' }}>В ожидании</option>
- </select>
- @error('status')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <button type="submit" style="padding: 10px 15px; background-color: #3490dc; color: white; border: none; border-radius: 4px; cursor: pointer;">
- Сохранить изменения
- </button>
- <a href="{{ route('submissions.show', $submission->id) }}" style="padding: 10px 15px; background-color: #6c757d; color: white; text-decoration: none; border-radius: 4px; margin-left: 10px; display: inline-block;">
- Отмена
- </a>
- </form>
- @endsection
|