@@ -17,12 +17,13 @@
|
||||
</p>
|
||||
</div>
|
||||
{% endmacro post_card %}
|
||||
{% macro input(name, label, errors, form, type="text", props="", optional=false, default='') %}
|
||||
{% macro input(name, label, errors, form, type="text", props="", optional=false, default='', details='') %}
|
||||
<label for="{{ name }}">
|
||||
{{ label | _ }}
|
||||
{% if optional %}
|
||||
<small>{{ "Optional" | _ }}</small>
|
||||
{% endif %}
|
||||
<small>{{ details }}</small>
|
||||
</label>
|
||||
{% if errors is defined and errors[name] %}
|
||||
{% for err in errors[name] %}
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
<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) }}
|
||||
{% 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) }}
|
||||
|
||||
<input type="submit" value="{{ "Publish" | _ }}" />
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user