54 lines
2 KiB
HTML
54 lines
2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ heading }} · Steady{% endblock %}
|
|
|
|
{% macro field_errors(field) %}
|
|
{% if field.errors %}
|
|
<ul id="{{ field.id }}-errors" class="field__errors">
|
|
{% for error in field.errors %}<li>{{ error }}</li>{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
<section class="panel" aria-labelledby="task-form-heading">
|
|
<p class="eyebrow">Capture first, refine later</p>
|
|
<h1 id="task-form-heading">{{ heading }}</h1>
|
|
<form method="post" novalidate>
|
|
{{ form.hidden_tag() }}
|
|
<div class="field">
|
|
{{ form.title.label }}
|
|
{{ form.title(autofocus=true, aria_describedby="title-errors" if form.title.errors else none) }}
|
|
{{ field_errors(form.title) }}
|
|
</div>
|
|
<div class="field">
|
|
{{ form.description.label }}
|
|
{{ form.description(rows=5, aria_describedby="description-errors" if form.description.errors else none) }}
|
|
{{ field_errors(form.description) }}
|
|
</div>
|
|
<div class="form-grid">
|
|
<div class="field">
|
|
{{ form.status.label }}
|
|
{{ form.status() }}
|
|
{{ field_errors(form.status) }}
|
|
</div>
|
|
<div class="field">
|
|
{{ form.priority.label }}
|
|
{{ form.priority() }}
|
|
{{ field_errors(form.priority) }}
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
{{ form.due_date.label }}
|
|
{{ form.due_date(aria_describedby="due-date-help due_date-errors" if form.due_date.errors else "due-date-help") }}
|
|
<p id="due-date-help" class="field__help">Optional. Leave empty to keep it in your flexible inbox.</p>
|
|
{{ field_errors(form.due_date) }}
|
|
</div>
|
|
<div class="form-actions">
|
|
{{ form.submit(class="button") }}
|
|
<a href="{{ url_for('tasks.index') }}">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
{% endblock %}
|
|
|