misuzu/templates/manage/news/category.twig

33 lines
1.2 KiB
Twig
Raw Normal View History

{% extends 'manage/news/master.twig' %}
2018-10-22 19:53:21 +00:00
{% from 'macros.twig' import container_title %}
{% set is_new = category|length < 1 %}
{% block manage_content %}
<form method="post" action="" class="container">
2018-10-22 19:53:21 +00:00
{{ container_title(is_new ? 'New Category' : 'Editing ' ~ category.category_name) }}
{{ 'news_category'|csrf|raw }}
<input type="hidden" name="category[id]" value="{{ category.category_id|default(0) }}">
<table style="color:inherit">
<tr>
<td>Name</td>
<td><input type="text" required name="category[name]" class="input__text" value="{{ category.category_name|default() }}"></td>
</tr>
<tr>
<td>Description</td>
<td><textarea name="category[description]" required class="input__textarea">{{ category.category_description|default() }}</textarea></td>
</tr>
<tr>
<td>Is Hidden</td>
<td><input type="checkbox" name="category[hidden]" {% if category.category_is_hidden|default(false) %}checked{% endif %}></td>
</tr>
</table>
<button class="input__button">Save</button>
</form>
{% endblock %}