2018-05-09 19:53:12 +02:00
|
|
|
{% extends "base" %}
|
2018-07-07 22:51:48 +02:00
|
|
|
{% import "macros" as macros %}
|
2018-04-23 16:25:39 +02:00
|
|
|
|
2018-05-09 19:53:12 +02:00
|
|
|
{% block title %}
|
2018-06-17 17:26:15 +02:00
|
|
|
{{ "New post" | _ }}
|
2018-05-09 19:53:12 +02:00
|
|
|
{% endblock title %}
|
2018-04-23 16:25:39 +02:00
|
|
|
|
2018-05-09 19:53:12 +02:00
|
|
|
{% block content %}
|
2018-06-17 17:26:15 +02:00
|
|
|
<h1>{{ "Create a post" | _ }}</h1>
|
2018-05-19 16:26:56 +02:00
|
|
|
<form class="new-post" method="post">
|
2018-07-18 15:34:18 +02:00
|
|
|
{{ macros::input(name="title", label="Title", errors=errors, form=form, props="required") }}
|
2018-09-04 13:26:13 +02:00
|
|
|
{{ macros::input(name="subtitle", label="Subtitle", errors=errors, form=form, optional=true) }}
|
2018-05-09 19:53:12 +02:00
|
|
|
|
2018-07-06 19:29:36 +02:00
|
|
|
{% if errors is defined and errors.content %}
|
|
|
|
{% for err in errors.content %}
|
2018-07-07 22:51:48 +02:00
|
|
|
<p class="error">{{ err.message | default(value="Unknown error") | _ }}</p>
|
2018-07-06 19:29:36 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
2018-07-27 20:54:34 +02:00
|
|
|
<label for="content">{{ "Content" | _ }}<small>{{ "Markdown is supported" | _ }}</small></label>
|
2018-08-30 22:47:25 +02:00
|
|
|
<textarea id="content" name="content" value="{{ form.content | default(value="") }}" rows="20"></textarea>
|
2018-07-06 19:29:36 +02:00
|
|
|
|
2018-09-05 22:18:27 +02:00
|
|
|
{{ macros::input(name="tags", label="Tags, separated by commas", errors=errors, form=form, optional=true) }}
|
|
|
|
|
2018-07-27 20:31:47 +02:00
|
|
|
{% set license_infos = "Default license will be {{ instance.default_license }}" | _(instance=instance) %}
|
|
|
|
{{ macros::input(name="license", label="License", errors=errors, form=form, optional=true, details=license_infos) }}
|
2018-05-09 19:53:12 +02:00
|
|
|
|
2018-06-17 20:14:58 +02:00
|
|
|
<input type="submit" value="{{ "Publish" | _ }}" />
|
2018-05-09 19:53:12 +02:00
|
|
|
</form>
|
2018-08-30 22:47:25 +02:00
|
|
|
<script src="/static/js/autoExpand.js"></script>
|
2018-05-09 19:53:12 +02:00
|
|
|
{% endblock content %}
|