Template
Clients can run in-house retail without Shopify while keeping the same Docker/Django/Postgres stack and data-ownership promise. Closes #5.
18 lines
1.4 KiB
HTML
18 lines
1.4 KiB
HTML
{% extends "portal_base.html" %}
|
|
{% block title %}{% if event %}Edit{% else %}New{% endif %} event · Portal{% endblock %}
|
|
{% block topbar_title %}{% if event %}Edit event{% else %}New event{% endif %}{% endblock %}
|
|
{% block portal_content %}
|
|
<form method="post" class="form-grid">
|
|
{% csrf_token %}
|
|
<div class="field"><label>Title</label><input name="title" required value="{{ event.title|default:'' }}"></div>
|
|
<div class="field"><label>Slug</label><input name="slug" value="{{ event.slug|default:'' }}" placeholder="auto from title"></div>
|
|
<div class="field"><label>Starts</label><input name="starts_at" type="datetime-local" required value="{% if event %}{{ event.starts_at|date:'Y-m-d\\TH:i' }}{% endif %}"></div>
|
|
<div class="field"><label>Venue</label><input name="venue" value="{{ event.venue|default:'' }}"></div>
|
|
<div class="field"><label>Capacity</label><input name="capacity" type="number" min="0" value="{{ event.capacity|default:0 }}"></div>
|
|
<div class="field"><label>Price</label><input name="price" type="number" step="0.01" min="0" required value="{{ event.price|default:'0' }}"></div>
|
|
<div class="field"><label>Description</label><textarea name="description" style="min-height:120px">{{ event.description|default:'' }}</textarea></div>
|
|
<label><input type="checkbox" name="is_published" {% if event.is_published %}checked{% endif %}> Published</label>
|
|
<button class="btn btn-primary" type="submit">Save</button>
|
|
</form>
|
|
{% endblock %}
|