2020-07-08 14:36:13 +02:00
|
|
|
<form action="{{ url_for('update_blog_post', uuid=instance.id) }}" method="post">
|
|
|
|
<input type="hidden" name="_next" value="{{ _next or request.args.get('_next') or url_for('get_blog_post', uuid=instance.id) }}"/>
|
|
|
|
<table>
|
2021-02-25 11:44:30 +01:00
|
|
|
{% if "filename" not in disabled_columns %}
|
|
|
|
<tr {% if "filename" in hidden_columns %}style="display: none;"{% endif %}><td>
|
2020-07-08 14:36:13 +02:00
|
|
|
<label for="input-blog_post-filename">{{ _("filename") }}</label>:
|
|
|
|
</td><td>
|
|
|
|
<input id="input-blog_post-filename"
|
|
|
|
value="{{ instance.filename }}"
|
|
|
|
type="text" name="filename" autocomplete="off"
|
|
|
|
/>
|
|
|
|
</td></tr>
|
2021-02-25 11:44:30 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if "title" not in disabled_columns %}
|
|
|
|
<tr {% if "title" in hidden_columns %}style="display: none;"{% endif %}><td>
|
2020-07-13 11:54:16 +02:00
|
|
|
<label for="input-blog_post-title">{{ _("title") }}</label>:
|
|
|
|
</td><td>
|
|
|
|
<input id="input-blog_post-title"
|
|
|
|
value="{{ instance.title }}"
|
|
|
|
type="text" name="title" autocomplete="off"
|
|
|
|
/>
|
|
|
|
</td></tr>
|
2021-02-25 11:44:30 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if "body" not in disabled_columns %}
|
|
|
|
<tr {% if "body" in hidden_columns %}style="display: none;"{% endif %}><td>
|
2020-07-08 14:36:13 +02:00
|
|
|
<label for="input-blog_post-body">{{ _("body") }}</label>:
|
|
|
|
</td><td>
|
|
|
|
<textarea id="input-blog_post-body"
|
|
|
|
name="body">{{ instance.body }}</textarea>
|
2021-05-01 16:19:02 +02:00
|
|
|
</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>
|
|
|
|
<input type="hidden" name="_m_n_tags" value="" />
|
|
|
|
<select id="input-blog_post-tag" name="_m_n_tags" multiple>
|
|
|
|
{%- for sub_instance in model_views.tag.model.query.all() %}
|
|
|
|
<option value="{{ sub_instance.id }}"
|
|
|
|
{% if sub_instance in instance.tags %}selected="selected"{% endif %}>{{ sub_instance }}</option>
|
|
|
|
{%- endfor %}
|
|
|
|
</select>
|
2020-07-08 14:36:13 +02:00
|
|
|
</td></tr>
|
2021-02-25 11:44:30 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if "created_dt" not in disabled_columns %}
|
|
|
|
<tr {% if "created_dt" in hidden_columns %}style="display: none;"{% endif %}><td>
|
2020-08-11 13:17:53 +02:00
|
|
|
<label for="input-blog_post-created_dt">{{ _("created_dt") }}</label>:
|
|
|
|
</td><td>
|
|
|
|
<input id="input-blog_post-created_dt"
|
|
|
|
value="{{ instance.created_dt }}"
|
|
|
|
type="text" name="created_dt" autocomplete="off"
|
|
|
|
/>
|
|
|
|
</td></tr>
|
2021-02-25 11:44:30 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if "updated_dt" not in disabled_columns %}
|
|
|
|
<tr {% if "updated_dt" in hidden_columns %}style="display: none;"{% endif %}><td>
|
2020-08-11 13:17:53 +02:00
|
|
|
<label for="input-blog_post-updated_dt">{{ _("updated_dt") }}</label>:
|
|
|
|
</td><td>
|
|
|
|
<input id="input-blog_post-updated_dt"
|
|
|
|
value="{{ instance.updated_dt }}"
|
|
|
|
type="text" name="updated_dt" autocomplete="off"
|
|
|
|
/>
|
|
|
|
</td></tr>
|
2021-02-25 11:44:30 +01:00
|
|
|
{% endif %}
|
2020-07-08 14:36:13 +02:00
|
|
|
</table>
|
|
|
|
<input type="submit">
|
|
|
|
</form>
|