{% extends "base.html" %} {% load django_bootstrap5 %} {% load bootstrap_icons %} {% load i18n %} {% block title %}{{ title }}{% endblock %} {% block page_heading %}{{ title }}{% endblock page_heading %} {% block content %} {# what the user may do comes first; who they are and their quota fold away #} {% if edited_user %}
{{ edited_user.username }} {% if edited_user.email %}{{ edited_user.email }}{% endif %}
{% trans "Last login" %} {{ edited_user.last_login|date:"Y-m-d H:i"|default:_("never") }}
{% endif %}
{% csrf_token %} {% bootstrap_form_errors user_form type="non_fields" %}
{% trans "Turn off to block the user while keeping the account." %}

{% if edited_user %}{% blocktrans with name=edited_user.username %}What can {{ name }} do?{% endblocktrans %}{% else %}{% trans "What can the user do?" %}{% endif %}

{% trans "The permissions of the user's groups apply too." %}

{% trans "Groups" %}
{% for box in user_form.groups %} {% empty %} {% trans "There are no groups yet." %} {% endfor %}
{% for error in user_form.groups.errors %}
{{ error }}
{% endfor %}
{% trans "Own permissions" %}

{% trans "Off grants nothing here; it takes away nothing a group grants." %}

{% for box, help in user_form.permission_rows %}
{% endfor %}
{% for error in user_form.user_permissions.errors %}
{{ error }}
{% endfor %}
{% trans "Name and password" %} {% if edited_user %} {{ edited_user.username }}{% if edited_user.email %} · {{ edited_user.email }}{% endif %} · {% if edited_user.has_usable_password %}{% trans "password set" %}{% else %}{% trans "no password" %}{% endif %} {% endif %}
{% bootstrap_field user_form.username %} {% if user_form.password %}{% bootstrap_field user_form.password %}{% endif %}
{% bootstrap_field user_form.first_name %}
{% bootstrap_field user_form.last_name %}
{% bootstrap_field user_form.email %} {% if edited_user %}
{% trans "Password" %}: {% if edited_user.has_usable_password %}{% trans "Set" %}{% else %}{% trans "Not set" %}{% endif %} {% trans "Change password" %}
{% endif %}
{% with quota=attributes_form.instance %}
{% trans "Quota" %} {% if quota.max_instances == -1 %}{% trans "any number of VMs" %}{% else %}{% blocktrans count count=quota.max_instances %}{{ count }} VM{% plural %}{{ count }} VMs{% endblocktrans %}{% endif %} · {% if quota.max_cpus == -1 %}{% trans "any vCPUs" %}{% else %}{% blocktrans count count=quota.max_cpus %}{{ count }} vCPU{% plural %}{{ count }} vCPUs{% endblocktrans %}{% endif %} · {% if quota.max_memory == -1 %}{% trans "any memory" %}{% else %}{{ quota.max_memory }} MiB{% endif %} · {% if quota.max_disk_size == -1 %}{% trans "any disk size" %}{% else %}{{ quota.max_disk_size }} GiB{% endif %}

{% trans "For each limit: -1 means no limit, 0 none allowed." %}

{% bootstrap_field attributes_form.max_instances show_help=False %}
{% bootstrap_field attributes_form.max_cpus show_help=False %}
{% bootstrap_field attributes_form.max_memory show_help=False %}
{% bootstrap_field attributes_form.max_disk_size show_help=False %}
{% endwith %}
{% trans "Cancel" %}
{% endblock content %}