moviewyrm/bookwyrm/templates/settings/announcements/announcement_form.html

81 lines
2.5 KiB
HTML
Raw Normal View History

2021-05-19 21:55:01 +00:00
{% extends 'components/inline_form.html' %}
{% load i18n %}
{% block header %}
{% if announcement %}
{% trans "Edit Announcement" %}
{% else %}
2021-05-19 21:55:01 +00:00
{% trans "Create Announcement" %}
{% endif %}
2021-05-19 21:55:01 +00:00
{% endblock %}
{% block form %}
2021-05-20 15:56:17 +00:00
{% csrf_token %}
<input type="hidden" name="user" value="{{ request.user.id }}">
<p>
2021-11-29 22:28:51 +00:00
<label class="label" for="id_preview">
{% trans "Preview:" %}
</label>
2021-05-20 15:56:17 +00:00
{{ form.preview }}
2021-11-29 22:28:51 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.preview.errors id="desc_preview" %}
2021-05-20 15:56:17 +00:00
</p>
<p>
2021-11-29 22:28:51 +00:00
<label class="label" for="id_content">
{% trans "Content:" %}
</label>
2021-05-20 15:56:17 +00:00
{{ form.content }}
2021-11-29 22:28:51 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.content.errors id="desc_content" %}
2021-05-20 15:56:17 +00:00
</p>
<p>
2021-11-29 22:28:51 +00:00
<label class="label" for="id_event_date">
{% trans "Event date:" %}
</label>
<input type="date" name="event_date" value="{{ form.event_date.value|date:'Y-m-d' }}" class="input" id="id_event_date">
2021-11-29 22:28:51 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.event_date.errors id="desc_event_date" %}
2021-05-20 15:56:17 +00:00
</p>
<hr aria-hidden="true">
<div class="columns">
<div class="column">
<p>
2021-11-29 22:28:51 +00:00
<label class="label" for="id_start_date">
{% trans "Start date:" %}
</label>
<input type="date" name="start_date" class="input" value="{{ form.start_date.value|date:'Y-m-d' }}" id="id_start_date">
2021-11-29 22:28:51 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.start_date.errors id="desc_start_date" %}
2021-05-20 15:56:17 +00:00
</p>
2021-05-19 21:55:01 +00:00
</div>
2021-05-20 15:56:17 +00:00
<div class="column">
<p>
2021-11-29 22:28:51 +00:00
<label class="label" for="id_end_date">
{% trans "End date:" %}
</label>
<input type="date" name="end_date" class="input" id="id_end_date" value="{{ form.end_date.value|date:'Y-m-d' }}">
2021-11-29 22:28:51 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.end_date.errors id="desc_end_date" %}
2021-05-20 15:56:17 +00:00
</p>
</div>
<div class="column is-narrow">
<p>
2021-11-29 22:28:51 +00:00
<label class="label" for="id_active">
{% trans "Active:" %}
</label>
2021-05-20 15:56:17 +00:00
{{ form.active }}
2021-11-29 22:28:51 +00:00
{% include 'snippets/form_errors.html' with errors_list=form.active.errors id="desc_active" %}
2021-05-20 15:56:17 +00:00
</p>
</div>
</div>
2021-05-19 21:55:01 +00:00
2021-05-20 15:56:17 +00:00
<div class="field has-addons">
<div class="control">
2021-11-29 22:28:51 +00:00
<button type="submit" class="button is-primary">
{% trans "Save" %}
</button>
2021-05-19 21:55:01 +00:00
</div>
2021-05-20 15:56:17 +00:00
</div>
2021-05-19 21:55:01 +00:00
{% endblock %}