{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}

{% import "macro_functions.phtml" as mf %}

{% set active_menu = 'support' %}

{% block meta_title %}Forum{% endblock %}

{% block content %}
<div class="widget">
    <div class="head">
        <h5>{{ 'Forum details'|trans }}</h5>
    </div>

    <form method="post" action="{{ 'api/admin/forum/update'|link }}" class="mainForm save api-form" data-api-redirect="{{ 'forum'|alink }}">
        <fieldset>
            <div class="rowElem noborder">
                <label>{{ 'Category'|trans }}:</label>
                <div class="formRight moreFields">
                    <ul>
                        <li style="width: 170px"><input type="text" name="category" value="{{forum.category}}" placeholder="" style="width: 150px"/></li>
                        <li class="sep"></li>
                        <li style="width: 250px"><input type="checkbox" name="update_categories" value="1" placeholder="" checked="checked"/><label>Update same title categories</label></li>
                        <li class="sep"></li>
                    </ul>
                </div>
                <div class="fix"></div>
            </div>
            <div class="rowElem">
                <label>{{ 'Title'|trans }}:</label>
                <div class="formRight">
                    <input type="text" name="title" value="{{forum.title}}" required="required" placeholder=""/>
                </div>
                <div class="fix"></div>
            </div>
            <div class="rowElem">
                <label>{{ 'Slug'|trans }}:</label>
                <div class="formRight">
                    <input type="text" name="slug" value="{{forum.slug}}" required="required" placeholder=""/>
                </div>
                <div class="fix"></div>
            </div>
            <div class="rowElem">
                <label>{{ 'Status'|trans }}:</label>
                <div class="formRight">
                    <input type="radio" name="status" value="active"{% if forum.status == 'active' %} checked="checked"{% endif %}/><label>{{ 'Active'|trans }}</label>
                    <input type="radio" name="status" value="locked"{% if forum.status == 'locked' %} checked="checked"{% endif %}/><label>{{ 'Locked'|trans }}</label>
                </div>
                <div class="fix"></div>
            </div>
            <div class="rowElem">
                <label>{{ 'Description'|trans }}</label>
                <div class="formRight">
                    <textarea name="description" cols="5" rows="4">{{ forum.description }}</textarea>
                </div>
                <div class="fix"></div>
            </div>
            <input type="submit" value="{{ 'Update'|trans }}" class="greyishBtn submitForm" />
            <input type="hidden" name="id" value="{{ forum.id }}" />
        </fieldset>
    </form>
</div>
{% endblock %}
