{% extends "./template.html" %}
{% block content %}
{% load static %}
    <div class="card mt-4">
        <div class="card-header">
            <h2>New Permission Set</h2>
        </div>
        <div class="card-body">
            {% if save_errors %}
                <div class="alert-danger">{{ save_errors }}</div>
            {% endif %}
            <div class="alert-primary">Please note - duplicated named permission sets will not be created. Instead you will be taken to the permission set.</div>
            <hr>
            <form action="{% url 'new_permission_set' %}" method="POST" class="new_permission_set">
                {% csrf_token %}
                <div class="form-group">
                    <label for="id_permission_set_name">Permission Set Name</label>
                    {{ permission_set_form.permission_set_name }}
                </div>

                <hr>
                <h4>Administration Permissions</h4>
                <div class='form-group'>
                    <label for='id_administration_assign_user_to_group'>Administration Assign User to Group </label>
                    {{ permission_set_form.administration_assign_user_to_group }}
                </div>
                <div class='form-group'>
                    <label for='id_administration_create_group'>Administration Create Group </label>
                    {{ permission_set_form.administration_create_group }}
                </div>
                <div class='form-group'>
                    <label for='id_administration_create_permission_set'>Administration Create Permission Set </label>
                    {{ permission_set_form.administration_create_permission_set }}
                </div>
                <div class='form-group'>
                    <label for='id_administration_create_user'>Administration Create User </label>
                    {{ permission_set_form.administration_create_user }}
                </div>

                <hr>
                <h4>Normal Permissions</h4>
                <div class='form-group'><label for='id_assign_campus_to_customer '>Assign Campus to Customer</label> {{ permission_set_form.assign_campus_to_customer  }}</div>
                <div class='form-group'><label for='id_associate_project_and_task '>Associate Project and Task </label> {{ permission_set_form.associate_project_and_task  }}</div>
                <div class='form-group'><label for='id_bug '>Bug </label> {{ permission_set_form.bug  }}</div>
                <div class='form-group'><label for='id_bug_client '>Bug Client </label> {{ permission_set_form.bug_client  }}</div>
                <div class='form-group'><label for='id_customer '>Customer </label> {{ permission_set_form.customer  }}</div>
                <div class='form-group'><label for='id_email '>Email </label> {{ permission_set_form.email  }}</div>
                <div class='form-group'><label for='id_invoice '>Invoice </label> {{ permission_set_form.invoice  }}</div>
                <div class='form-group'><label for='id_invoice_product '>Invoice Product </label> {{ permission_set_form.invoice_product  }}</div>
                <div class='form-group'><label for='id_kanban '>Kanban </label> {{ permission_set_form.kanban  }}</div>
                <div class='form-group'><label for='id_kanban_card '>Kanban Card </label> {{ permission_set_form.kanban_card  }}</div>
                <div class='form-group'><label for='id_opportunity '>Opportunity </label> {{ permission_set_form.opportunity  }}</div>
                <div class='form-group'><label for='id_organisation '>Organisation </label> {{ permission_set_form.organisation  }}</div>
                <div class='form-group'><label for='id_organisation_campus '>Organisation Campus </label> {{ permission_set_form.organisation_campus  }}</div>
                <div class='form-group'><label for='id_project '>Project </label> {{ permission_set_form.project  }}</div>
                <div class='form-group'><label for='id_quote '>Quote </label> {{ permission_set_form.quote  }}</div>
                <div class='form-group'><label for='id_requirement '>Request for Change </label> {{ permission_set_form.request_for_change  }}</div>
                <div class='form-group'><label for='id_requirement '>Requirement </label> {{ permission_set_form.requirement  }}</div>
                <div class='form-group'><label for='id_requirement_link '>Requirement Link </label> {{ permission_set_form.requirement_link  }}</div>
                <div class='form-group'><label for='id_tag '>Tag </label> {{ permission_set_form.tag  }}</div>
                <div class='form-group'><label for='id_task '>Task </label> {{ permission_set_form.task }}</div>
                <div class='form-group'><label for='id_tax '>Tax </label> {{ permission_set_form.tax }}</div>
                <div class='form-group'><label for='id_template '>Template </label> {{ permission_set_form.template  }}</div>
                <div class='form-group'><label for='id_whiteboard '>Whiteboard </label> {{ permission_set_form.whiteboard  }}</div>

                <hr>
                <h4>Addon Permissions</h4>
                <div class='form-group'><label for='id_contact_history '>Contact History </label> {{ permission_set_form.contact_history  }}</div>
                <div class='form-group'><label for='id_document '>Document </label> {{ permission_set_form.document  }}</div>
                <div class='form-group'><label for='id_kanban_comment '>Kanban Comment </label> {{ permission_set_form.kanban_comment  }}</div>
                <div class='form-group'><label for='id_project_history '>Project History </label> {{ permission_set_form.project_history  }}</div>
                <div class='form-group'><label for='id_task_history '>Task History </label> {{ permission_set_form.task_history  }}</div>

                <div class="form-row">
                    <input type="submit" value="Create New Permission Set" class="btn btn-primary col-md-6">
                    <a href="{% url 'search_permission_set' %}" class="btn btn-warning col-md-6">Cancel</a>
                </div>
            </form>
        </div>
    </div>

{% endblock %}