{% extends "panel_base.html" %}

{% block header_title %}{{gettext("New Category")}} | {{get_sitename()}}{% endblock %}
{% block title %}{{gettext("New Category")}}{% endblock %}

{% block content %}
<div class="row">
  <div class="col-lg-7 col-md-9 col-sm-12 col-xs-12">
    <div class="x_panel">
      <div class="x_title">
        <h2>{{gettext("New Category")}}</h2>
        <ul class="nav navbar-left panel_toolbox">
          <li><a class="close-link"><i class="fa fa-close"></i></a>
          </li>
          <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
          </li>            
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="x_content">
        <form method="POST" enctype="multipart/form-data">
          <div class="col-xs-12">
              <div class="form-group col-xs-12">
                  <label for="name">{{gettext("name")}}</label>
                  <input placeholder="{{gettext('name')}}" type="text" id="name" name="name" required="required" class="form-control col-xs-12" {% if category %}value="{{category.name}}"{% endif %}>
              </div><br><br><br>
              <div class="form-group">
                <label for="description">
                  {{gettext("description")}} ({{gettext("optional")}})
                </label>
                <div class="col-xs-12">
                  <textarea id="description" name="description" class="form-control">{% if category %}{{category.description or ""}}{% endif %}</textarea>
                </div>
              </div>
              <div class="divider-dashed"></div>
          </div>
          <div class="col-xs-12">
              <div class="form-group col-xs-12">
                <label for="tags" class="control-label">
                  {{gettext("Search engine title")}} ({{gettext("optional")}})
                </label>
                <input type="text" name="seo-title" class="form-control col-xs-12" {% if category %}value="{{category.seo_title or ""}}"{% endif %}>
              </div>
              <div class="form-group col-xs-12">
                <label for="category" class="control-label">
                  {{gettext("Search engine description")}} ({{gettext("optional")}})
                </label>
                <textarea name="seo-desc" class="form-control">{% if category %}{{category.seo_description or ""}}{% endif %}</textarea>
              </div>
              <div class="form-group">
                <div class="col-lg-12">
                  <button class="btn btn-success" type="submit">{{gettext("Save")}}</button>
                </div>
              </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>  
{% endblock %}