mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 05:42:23 +00:00
The user detail page is on a separate page since custom JS can't be loaded
This commit is contained in:
parent
6898e9413a
commit
8212568fee
@ -150,7 +150,7 @@
|
||||
</div>
|
||||
{% if user.pk == user_object.pk or user.registration.is_admin %}
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#updateUserModal">{% trans "Update" %}</button>
|
||||
<a class="btn btn-primary" href="{% url "registration:update_user" pk=user_object.pk %}">{% trans "Update" %}</a>
|
||||
{% if user.registration.is_admin %}
|
||||
<a class="btn btn-info" href="{% url "registration:user_impersonate" pk=user_object.pk %}">{% trans "Impersonate" %}</a>
|
||||
{% endif %}
|
||||
@ -158,11 +158,6 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% trans "Update user" as modal_title %}
|
||||
{% trans "Update" as modal_button %}
|
||||
{% url "registration:update_user" pk=user_object.pk as modal_action %}
|
||||
{% include "base_modal.html" with modal_id="updateUser" %}
|
||||
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
{% trans "Upload photo authorization" as modal_title %}
|
||||
{% trans "Upload" as modal_button %}
|
||||
@ -196,11 +191,6 @@
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('button[data-target="#updateUserModal"]').click(function() {
|
||||
let modalBody = $("#updateUserModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "registration:update_user" pk=user_object.pk %} #form-content");
|
||||
});
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
$('button[data-target="#uploadPhotoAuthorizationModal"]').click(function() {
|
||||
let modalBody = $("#uploadPhotoAuthorizationModal div.modal-body");
|
||||
|
Loading…
Reference in New Issue
Block a user