mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-05 02:06:52 +00:00
Only administrators can update the calendar
This commit is contained in:
parent
072ba3b2a3
commit
9571cfc19d
@ -18,16 +18,16 @@
|
||||
{% include "base_modal.html" with modal_id="updatePhase" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrajavascript %}
|
||||
{% if user.registration.is_admin %}
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$("tr").click(function () {
|
||||
let modalBody = $("#updatePhaseModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:calendar" %}" + $(this).data("id") + "/ #form-content");
|
||||
$("#updatePhase-form").attr("action", "{% url "participation:calendar" %}" + $(this).data("id") + "/")
|
||||
$("#updatePhaseModal").modal();
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
<script>
|
||||
$("tr").click(function () {
|
||||
let modalBody = $("#updatePhaseModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:calendar" %}" + $(this).data("id") + "/ #form-content");
|
||||
$("#updatePhase-form").attr("action", "{% url "participation:calendar" %}" + $(this).data("id") + "/")
|
||||
$("#updatePhaseModal").modal();
|
||||
})
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user