{% extends "master.html" %}
{% from "_formhelper.html" import render_bootstrap_field %}

{% block title %}Create Group{% endblock %}
{% set tag = "groups" %}


{% block content %}

<div class="container">
  <div class="row">
    <div class="col-md-8 mx-auto">
      <div class="card mt-5">
        <div class="card-header">
          <strong>Create new group</strong>
        </div>
        <div class="card-block m-4">
          <form action="{{ url_for('ui_ns.add_group') }}" method="post">
            {{ render_bootstrap_field(form.group_name, field_description="the name of your group") }}
            {{ render_bootstrap_field(form.display_name, field_description="display name of your group") }}
            {{ render_bootstrap_field(form.description, field_description="short description about the group") }}
            {%- if g.admin %}
            {{ render_bootstrap_field(form.group_type, field_description="mention the type of group") }}
            {%- endif %}
            <p class="buttons indent">
              <input class="submit positive btn btn-primary" type="submit" value="Create" >
              <input type="button" value="Cancel" class="btn btn-default cancel_btn">
              {{ form.csrf_token }}
            </p>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}
