{% extends "shatailadmin/base.html" %} {% load shatailimages_tags %} {% load i18n %} {% block titletag %}{% trans "Editing" %} {{ user.get_username }}{% endblock %} {% block content %} {% trans "Editing" as editing_str %} {% include "shatailadmin/shared/header.html"
with title=editing_str subtitle=user.get_username merged=1 icon="user" %}

<div class="w-tabs" data-tabs data-tabs-animate>
    <div class="w-tabs__wrapper">
        <div role="tablist" class="w-tabs__list nice-padding">
            {% trans "Account" as account_text %} {% include 'shatailadmin/shared/tabs/tab_nav_link.html' with tab_id='account' title=account_text %} {% trans "Roles" as roles_text %} {% include 'shatailadmin/shared/tabs/tab_nav_link.html' with tab_id='roles' title=roles_text
            %}
        </div>
    </div>

    <form action="{% url 'shatailusers_users:edit' user.pk %}" method="POST" novalidate{% if form.is_multipart %} enctype="multipart/form-data" {% endif %}>
        <div class="tab-content nice-padding">
            {% csrf_token %}

            <section id="tab-account" class="w-tabs__panel" role="tabpanel" hidden aria-labelledby="tab-label-account">
                <ul class="fields">
                    {% block fields %} {% if form.separate_username_field %} {% include "shatailadmin/shared/field_as_li.html" with field=form.username_field %} {% endif %} {% include "shatailadmin/shared/field_as_li.html" with field=form.email %} {% include "shatailadmin/shared/field_as_li.html"
                    with field=form.first_name %} {% include "shatailadmin/shared/field_as_li.html" with field=form.last_name %} {% block extra_fields %}{% endblock extra_fields %} {% if form.password1 %} {% include "shatailadmin/shared/field_as_li.html"
                    with field=form.password1 %} {% endif %} {% if form.password2 %} {% include "shatailadmin/shared/field_as_li.html" with field=form.password2 %} {% endif %} {% if form.is_active %} {% include "shatailadmin/shared/field_as_li.html" with
                    field=form.is_active %} {% endif %} {% endblock fields %}
                    <li>
                        <input type="submit" value="{% trans 'Save' %}" class="button" /> {% if can_delete %}
                        <a href="{% url 'shatailusers_users:delete' user.pk %}" class="button button-secondary no">{% trans "Delete user" %}</a> {% endif %}
                    </li>
                </ul>
            </section>
            <section id="tab-roles" class="w-tabs__panel" role="tabpanel" hidden aria-labelledby="tab-label-roles">
                <ul class="fields">
                    {% if form.is_superuser %} {% include "shatailadmin/shared/field_as_li.html" with field=form.is_superuser %} {% endif %} {% include "shatailadmin/shared/field_as_li.html" with field=form.groups %}
                    <li>
                        <input type="submit" value="{% trans 'Save' %}" class="button" /> {% if can_delete %}
                        <a href="{% url 'shatailusers_users:delete' user.pk %}" class="button button-secondary no">{% trans "Delete user" %}</a> {% endif %}
                    </li>
                </ul>
            </section>
        </div>
    </form>
</div>
{% endblock %} {% block extra_css %} {{ block.super }} {% include "shatailadmin/pages/_editor_css.html" %} {{ form.media.css }} {% endblock %} {% block extra_js %} {{ block.super }} {% include "shatailadmin/pages/_editor_js.html" %} {{ form.media.js }}
{% endblock %}