Plume/templates/posts/new.html.tera

27 lines
863 B
Plaintext
Raw Normal View History

2018-05-09 17:53:12 +00:00
{% extends "base" %}
{% import "macros" as macros %}
2018-04-23 14:25:39 +00:00
2018-05-09 17:53:12 +00:00
{% block title %}
2018-06-17 15:26:15 +00:00
{{ "New post" | _ }}
2018-05-09 17:53:12 +00:00
{% endblock title %}
2018-04-23 14:25:39 +00:00
2018-05-09 17:53:12 +00:00
{% block content %}
2018-06-17 15:26:15 +00:00
<h1>{{ "Create a post" | _ }}</h1>
<form class="new-post" method="post">
2018-07-18 13:34:18 +00:00
{{ macros::input(name="title", label="Title", errors=errors, form=form, props="required") }}
2018-05-09 17:53:12 +00:00
{% if errors is defined and errors.content %}
{% for err in errors.content %}
<p class="error">{{ err.message | default(value="Unknown error") | _ }}</p>
{% endfor %}
{% endif %}
2018-07-18 12:14:57 +00:00
<label for="content">{{ "Content" | _ }}</label>
<textarea id="content" name="content" value="{{ form.content | default(value="") }}"></textarea>
{{ macros::input(name="license", label="License", errors=errors, form=form, optional=true) }}
2018-05-09 17:53:12 +00:00
<input type="submit" value="{{ "Publish" | _ }}" />
2018-05-09 17:53:12 +00:00
</form>
{% endblock content %}