2018-10-11 21:43:52 +00:00
|
|
|
{% extends 'manage/news/master.twig' %}
|
2018-10-22 19:53:21 +00:00
|
|
|
{% from 'macros.twig' import container_title %}
|
2018-10-27 14:29:13 +00:00
|
|
|
{% from '_layout/input.twig' import input_hidden, input_csrf, input_text, input_checkbox %}
|
2018-10-11 21:43:52 +00:00
|
|
|
|
|
|
|
{% set is_new = category|length < 1 %}
|
|
|
|
|
|
|
|
{% block manage_content %}
|
2019-06-09 22:10:59 +00:00
|
|
|
<form method="post" action="{{ url('manage-news-category', {'category': category.category_id|default(0)}) }}" class="container">
|
2018-10-22 19:53:21 +00:00
|
|
|
{{ container_title(is_new ? 'New Category' : 'Editing ' ~ category.category_name) }}
|
2018-10-11 21:43:52 +00:00
|
|
|
|
2018-10-25 01:35:53 +00:00
|
|
|
{{ input_csrf('news_category') }}
|
|
|
|
{{ input_hidden('category[id]', category.category_id|default(0)) }}
|
2018-10-11 21:43:52 +00:00
|
|
|
|
|
|
|
<table style="color:inherit">
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
2018-10-25 01:35:53 +00:00
|
|
|
<td>{{ input_text('category[name]', '', category.category_name|default(), 'text', '', true) }}</td>
|
2018-10-11 21:43:52 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
2018-10-22 17:26:59 +00:00
|
|
|
<td><textarea name="category[description]" required class="input__textarea">{{ category.category_description|default() }}</textarea></td>
|
2018-10-11 21:43:52 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Is Hidden</td>
|
2018-10-27 14:29:13 +00:00
|
|
|
<td>{{ input_checkbox('category[hidden]', '', category.category_is_hidden|default(false)) }}</td>
|
2018-10-11 21:43:52 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2018-10-22 17:26:59 +00:00
|
|
|
<button class="input__button">Save</button>
|
2018-10-11 21:43:52 +00:00
|
|
|
</form>
|
|
|
|
{% endblock %}
|