Commit 6417e7e9 by François C.

Improve auth. errors handling during on members/admin/manage_regular_shifts

parent 523a4803
Pipeline #2482 passed with stage
in 1 minute 24 seconds
......@@ -37,7 +37,12 @@ function remove_from_shift_template() {
display_member_info();
closeModal();
},
error: function() {
error: function(err_data) {
if (err_data.status == 403) {
enqueue_message_for_next_loading("Problème d'autorisation. Merci de vous réidentifier.");
location.reload();
} else {
err = {
msg: "erreur serveur lors de la suppression du membre du créneau",
ctx: 'members.admin.manage_regular_shifts.remove_from_shift_template'
......@@ -50,6 +55,8 @@ function remove_from_shift_template() {
className: "error"
});
}
}
});
}
......@@ -115,6 +122,10 @@ function shift_subscrition(shift_type, shift_template_id = null, shift_template_
true,
false
);
} else if (err_data.status == 403) {
enqueue_message_for_next_loading("Problème d'autorisation. Merci de vous réidentifier.");
location.reload();
} else {
err = {
msg: "erreur serveur lors de l'inscription du membre au créneau",
......
{% extends "base.html" %}
{% load static %}
{% block body_class %}manage_regular_shifts{% endblock %}
{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/datatables/datatables.min.css' %}">
<link rel="stylesheet" href="{% static 'css/admin/manage_regular_shifts.css' %}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment