WyR/app/templates/admin/question_form.html

73 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header class="app-header">
<a class="brand" href="{{ url_for('admin.dashboard') }}">admin</a>
<nav class="site-nav">
<a href="{{ url_for('admin.dashboard') }}">Dashboard</a>
<a href="{{ url_for('public.home') }}">Public Site</a>
</nav>
</header>
<main class="page admin-page">
<section class="main-card admin-card">
<p class="eyebrow">Question</p>
<h1>{{ title }}</h1>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<form class="admin-form" method="POST">
<label for="date">Date</label>
<input
id="date"
name="date"
type="date"
value="{{ question.date if question else '' }}"
required
>
<label for="question">Question</label>
<textarea id="question" name="question" rows="4" required>{{ question.question if question else '' }}</textarea>
<label for="option_a">Option A</label>
<input
id="option_a"
name="option_a"
type="text"
value="{{ question.option_a if question else '' }}"
required
>
<label for="option_b">Option B</label>
<input
id="option_b"
name="option_b"
type="text"
value="{{ question.option_b if question else '' }}"
required
>
<div class="form-actions">
<button class="button-compact" type="submit">Save</button>
<a href="{{ url_for('admin.dashboard') }}">Cancel</a>
</div>
</form>
</section>
</main>
<footer class="app-footer">
<span>editor</span>
<span>daily prompt</span>
</footer>
</body>
</html>