Sunil Mohan Adapa c45bdf56dd
ui: js: Load all JS files in deferred mode to speed up page load
- This improves page rendering time. If JS files are not loaded in deferred or
async mode, they will halt the page rendering until JS files are loaded from
network.

- 'defer' mode guarantees that the load order is same as the order in which JS
files appeared in the HTML page.

Tests:

- Run at least one function of each affected JS file and ensure that is works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 12:08:51 +02:00

75 lines
2.2 KiB
HTML

{% extends "base.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% block page_js %}
<script type="text/javascript" src="{% static 'users/users.js' %}"
defer></script>
{% endblock %}
{% block content %}
<h3>
{% blocktrans trimmed with username=object.username %}
Edit User <em>{{ username }}</em>
{% endblocktrans %}
</h3>
<p>
{% url 'users:change_password' object.username as change_password_url %}
{% blocktrans trimmed %}
Use the <a href='{{ change_password_url }}'>change password form
</a> to change the password.
{% endblocktrans %}
</p>
<form class="form form-update" method="post">
{% csrf_token %}
{{ form|bootstrap }}
<input type="submit" class="btn btn-primary"
value="{% trans "Save Changes" %}"/>
</form>
<div id="user-delete-confirm-dialog" class="modal" tabindex="-1"
role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{% blocktrans trimmed with username=object.username %}
Delete user <em>{{ username }}</em> and all the user's files?
{% endblocktrans %}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="{% trans 'Close' %}">
</button>
</div>
<div class="modal-body">
<p>
{% blocktrans trimmed %}
Deleting a user account also removes all the files user's home
directory. If you wish to keep these files, disable the user
account instead.
{% endblocktrans %}
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger confirm">
{% trans "Delete user and files" %}
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
{% trans "Cancel" %}
</button>
</div>
</div>
</div>
</div>
{% endblock %}