69 lines
3.0 KiB
HTML
69 lines
3.0 KiB
HTML
<form action="{{ url_for('create_blog_post') }}" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<input type="hidden" name="_next" value="{{ _next or request.args.get('_next') or url_for('list_blog_post') }}"/>
|
|
<table>
|
|
{% if "filename" not in disabled_columns %}
|
|
<tr {% if "filename" in hidden_columns %}style="display: none;"{% endif %}><td>
|
|
<label for="input-blog_post-filename">{{ _("filename") }}</label>:
|
|
</td><td>
|
|
<input id="input-blog_post-filename"
|
|
type="text" name="filename" autocomplete="off"
|
|
/>
|
|
</td></tr>
|
|
{% endif %}
|
|
{% if "title" not in disabled_columns %}
|
|
<tr {% if "title" in hidden_columns %}style="display: none;"{% endif %}><td>
|
|
<label for="input-blog_post-title">{{ _("title") }}</label>:
|
|
</td><td>
|
|
<input id="input-blog_post-title"
|
|
type="text" name="title" autocomplete="off"
|
|
/>
|
|
</td></tr>
|
|
{% endif %}
|
|
{% if "body" not in disabled_columns %}
|
|
<tr {% if "body" in hidden_columns %}style="display: none;"{% endif %}><td>
|
|
<label for="input-blog_post-body">{{ _("body") }}</label>:
|
|
</td><td>
|
|
<textarea id="input-blog_post-body"
|
|
name="body"></textarea>
|
|
</td></tr>
|
|
{% endif %}
|
|
{% if "tag" not in disabled_columns %}
|
|
<tr {% if "tag" in hidden_columns %}style="display: none;"{% endif %}><td>
|
|
<label for="input-blog_post-tag">{{ _("tag") }}</label>:
|
|
</td><td>
|
|
|
|
<select id="input-blog_post-tag" name="_m_n_tags" multiple>
|
|
|
|
{% if tags is not defined and instance and instance.tags is defined %}
|
|
{% set tags = instance.tags %}
|
|
{% else %}
|
|
{% set tags = model_views.tag.model.query.all() %}
|
|
{% endif %}
|
|
{%- for sub_instance in tags %}
|
|
<option value="{{ sub_instance.id }}" {% if model_view.model_name == "tag" and instance and instance.id == sub_instance.id %}selected="selected"{% endif %}>{{ sub_instance }}</option>
|
|
{%- endfor %}
|
|
</select>
|
|
</td></tr>
|
|
{% endif %}
|
|
{% if "created_dt" not in disabled_columns %}
|
|
<tr {% if "created_dt" in hidden_columns %}style="display: none;"{% endif %}><td>
|
|
<label for="input-blog_post-created_dt">{{ _("created_dt") }}</label>:
|
|
</td><td>
|
|
<input id="input-blog_post-created_dt"
|
|
type="text" name="created_dt" autocomplete="off"
|
|
/>
|
|
</td></tr>
|
|
{% endif %}
|
|
{% if "updated_dt" not in disabled_columns %}
|
|
<tr {% if "updated_dt" in hidden_columns %}style="display: none;"{% endif %}><td>
|
|
<label for="input-blog_post-updated_dt">{{ _("updated_dt") }}</label>:
|
|
</td><td>
|
|
<input id="input-blog_post-updated_dt"
|
|
type="text" name="updated_dt" autocomplete="off"
|
|
/>
|
|
</td></tr>
|
|
{% endif %}
|
|
</table>
|
|
<input type="submit">
|
|
</form> |