{% extends 'accounts/base.html' %} {% load static %} {% block title %} {% if form.instance.pk %} Edit {{ form.instance.get_full_name|default:form.instance.email }} {% else %} Create New User {% endif %} - Ad-tlas {% endblock %} {% block breadcrumb_items %} {% if form.instance.pk %} {% else %} {% endif %} {% endblock %} {% block page_title %} {% if form.instance.pk %} Edit User {% else %} Create New User {% endif %} {% endblock %} {% block page_actions %}
Back to List {% if form.instance.pk %} View Details {% endif %}
{% endblock %} {% block content %}
{% csrf_token %}
Basic Information
{% if form.avatar %}
{% if form.instance.avatar %} Current Avatar {% else %}
{% endif %}
{{ form.avatar }} {% if form.avatar.help_text %}
{{ form.avatar.help_text }}
{% endif %} {% if form.avatar.errors %}
{% for error in form.avatar.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %}
{{ form.email }}
{% if form.email.help_text %}
{{ form.email.help_text }}
{% endif %} {% if form.email.errors %}
{% for error in form.email.errors %} {{ error }} {% endfor %}
{% endif %}
{% if form.username %}
{{ form.username }}
{% if form.username.help_text %}
{{ form.username.help_text }}
{% endif %} {% if form.username.errors %}
{% for error in form.username.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %}
{{ form.first_name }}
{% if form.first_name.help_text %}
{{ form.first_name.help_text }}
{% endif %} {% if form.first_name.errors %}
{% for error in form.first_name.errors %} {{ error }} {% endfor %}
{% endif %}
{{ form.last_name }}
{% if form.last_name.help_text %}
{{ form.last_name.help_text }}
{% endif %} {% if form.last_name.errors %}
{% for error in form.last_name.errors %} {{ error }} {% endfor %}
{% endif %}
{% if form.password1 or form.password2 %}
{% if form.instance.pk %} Change Password {% else %} Set Password {% endif %}
{% if form.instance.pk %}
Leave password fields empty to keep the current password.
{% endif %}
{% if form.password1 %}
{{ form.password1 }}
{% if form.password1.help_text %}
{{ form.password1.help_text }}
{% endif %} {% if form.password1.errors %}
{% for error in form.password1.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %} {% if form.password2 %}
{{ form.password2 }}
{% if form.password2.help_text %}
{{ form.password2.help_text }}
{% endif %} {% if form.password2.errors %}
{% for error in form.password2.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %}
{% endif %}
Contact Information
{% if form.phone %}
{{ form.phone }}
{% if form.phone.help_text %}
{{ form.phone.help_text }}
{% endif %} {% if form.phone.errors %}
{% for error in form.phone.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %} {% if form.website %}
{{ form.website }}
{% if form.website.help_text %}
{{ form.website.help_text }}
{% endif %} {% if form.website.errors %}
{% for error in form.website.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %} {% if form.address %}
{{ form.address }}
{% if form.address.help_text %}
{{ form.address.help_text }}
{% endif %} {% if form.address.errors %}
{% for error in form.address.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %} {% if form.bio %}
{{ form.bio }} {% if form.bio.help_text %}
{{ form.bio.help_text }}
{% endif %} {% if form.bio.errors %}
{% for error in form.bio.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %}
{% if user.is_staff %}
Permissions & Status
Account Status
{% if form.is_active %}
{{ form.is_active }} {% if form.is_active.help_text %}
{{ form.is_active.help_text }}
{% endif %} {% if form.is_active.errors %}
{% for error in form.is_active.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %} {% if form.is_staff %}
{{ form.is_staff }} {% if form.is_staff.help_text %}
{{ form.is_staff.help_text }}
{% endif %} {% if form.is_staff.errors %}
{% for error in form.is_staff.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %} {% if form.is_superuser and user.is_superuser %}
{{ form.is_superuser }} {% if form.is_superuser.help_text %}
{{ form.is_superuser.help_text }}
{% endif %} {% if form.is_superuser.errors %}
{% for error in form.is_superuser.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %}
{% if form.groups %}
Groups
{{ form.groups }} {% if form.groups.help_text %}
{{ form.groups.help_text }}
{% endif %} {% if form.groups.errors %}
{% for error in form.groups.errors %} {{ error }} {% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% if form.instance.pk %} {% else %} {% endif %}
{% endblock %} {% block extra_css %} {% endblock %} {% block extra_js %} {% endblock %}