mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-23 02:38:21 +02:00
Update calendar
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
{% load crispy_forms_filters i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
<form method="post" action="{% url "participation:update_phase" pk=object.pk %}">
|
||||
<div id="form-content">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
@ -8,4 +8,22 @@
|
||||
|
||||
{% block content %}
|
||||
{% render_table table %}
|
||||
|
||||
{% trans "Update phase" as modal_title %}
|
||||
{% trans "Update" as modal_button %}
|
||||
{% include "base_modal.html" with modal_id="updatePhase" %}
|
||||
{% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user