53 lines
2.8 KiB
PHP
53 lines
2.8 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('page_title', 'Edit Photo Slider')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="mb-0 fw-bold text-dark">Edit Photo Slider</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (session('error'))
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
{{ session('error') }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
@endif
|
|
<form action="{{ route('photo-slider.update', $slider['photo_slider_uuid']) }}" method="POST" enctype="multipart/form-data">
|
|
@method('PUT')
|
|
@csrf
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">Title</label>
|
|
<input type="text" class="form-control" id="title" name="title" value="{{ $slider['title'] }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="description" class="form-label">Description</label>
|
|
<textarea class="form-control" id="description" name="description" rows="3">{{ $slider['description'] }}</textarea>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="type" class="form-label">Type</label>
|
|
<input type="text" class="form-control" id="type" name="type" value="{{ $slider['type'] }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="image" class="form-label">Image (optional - upload new to replace)</label>
|
|
<input type="file" class="form-control" id="image" name="image">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="startDate" class="form-label">Start Date</label>
|
|
<input type="datetime-local" class="form-control" id="startDate" name="startDate" value="{{ $slider['startDate'] }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="endDate" class="form-label">End Date</label>
|
|
<input type="datetime-local" class="form-control" id="endDate" name="endDate" value="{{ $slider['endDate'] }}" required>
|
|
</div>
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" class="form-check-input" id="isActive" name="isActive" {{ $slider['isActive'] ? 'checked' : '' }}>
|
|
<label class="form-check-label" for="isActive">Active</label>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
<a href="{{ route('photo-slider') }}" class="btn btn-secondary">Cancel</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection |