FossilRepo

fossilrepo / templates / pages / page_form.html
1
{% extends "base.html" %}
2
{% block title %}{{ title }} — Fossilrepo{% endblock %}
3
4
{% block content %}
5
<div class="mb-6">
6
<a href="{% url 'pages:list' %}" class="text-sm text-brand-light hover:text-brand">&larr; Back to FossilRepo Docs</a>
7
</div>
8
9
<div class="mx-auto max-w-4xl">
10
<h1 class="text-2xl font-bold text-gray-100 mb-6">{{ title }}</h1>
11
12
<form method="post" class="space-y-6 rounded-lg bg-gray-800 p-6 shadow border border-gray-700">
13
{% csrf_token %}
14
15
{% for field in form %}
16
<div>
17
<label for="{{ field.id_for_label }}" class="block text-sm font-medium text-gray-300">
18
{{ field.label }}{% if field.field.required %} <span class="text-red-400">*</span>{% endif %}
19
</label>
20
<div class="mt-1">{{ field }}</div>
21
{% if field.errors %}
22
<p class="mt-1 text-sm text-red-400">{{ field.errors.0 }}</p>
23
{% endif %}
24
{% if field.help_text %}
25
<p class="mt-1 text-sm text-gray-400">{{ field.help_text }}</p>
26
{% endif %}
27
</div>
28
{% endfor %}
29
30
<div class="flex justify-end gap-3 pt-4">
31
<a href="{% url 'pages:list' %}"
32
class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600">
33
Cancel
34
</a>
35
<button type="submit"
36
class="rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover">
37
{% if page %}Update{% else %}Create{% endif %}
38
</button>
39
</div>
40
</form>
41
</div>
42
{% endblock %}
43

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button