39 lines
1.9 KiB
HTML
39 lines
1.9 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
<div class="container mt-4">
|
|
<div class="row">
|
|
<div class="col-md-8 offset-md-2">
|
|
<div class="card">
|
|
<div class="card-header bg-primary text-white">
|
|
<h3 class="mb-0">Edit Product</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="POST" action="{{ url_for('admin.edit_product', product_id=product.id) }}">
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">Product Title</label>
|
|
<input type="text" class="form-control" id="title" name="title" value="{{ product.title }}" required>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="thumbnail" class="form-label">Thumbnail URL</label>
|
|
<input type="url" class="form-control" id="thumbnail" name="thumbnail" value="{{ product.thumbnail }}">
|
|
<div class="form-text">Enter a URL for the product image.</div>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="description" class="form-label">Description</label>
|
|
<textarea class="form-control" id="description" name="description" rows="3">{{ product.description }}</textarea>
|
|
</div>
|
|
|
|
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
|
<a href="{{ url_for('admin.admin_dashboard') }}" class="btn btn-outline-secondary me-md-2">Cancel</a>
|
|
<button type="submit" class="btn btn-primary">Save Changes</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |