mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-19 01:01:19 +00:00
Compare commits
No commits in common. "95fec7c0dafecb8d020f2c09eac3b2c8b25fac43" and "b6c2a43a1b7b998493d3e4afa51f51ace2d41a3c" have entirely different histories.
95fec7c0da
...
b6c2a43a1b
14
apps/participation/templates/participation/phase_form.html
Normal file
14
apps/participation/templates/participation/phase_form.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load crispy_forms_filters i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post" action="{% url "participation:update_phase" pk=object.pk %}">
|
||||||
|
<div id="form-content">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|crispy }}
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary" type="submit">{% trans "Update" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
||||||
|
|
35
apps/participation/templates/participation/phase_list.html
Normal file
35
apps/participation/templates/participation/phase_list.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load django_tables2 i18n static %}
|
||||||
|
|
||||||
|
{% block extracss %}
|
||||||
|
<link rel="stylesheet" href="{% static "bootstrap_datepicker_plus/css/datepicker-widget.css" %}">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block contenttitle %}
|
||||||
|
<h2>{% trans "Calendar" %}</h2>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div id="form-content">
|
||||||
|
{% render_table table %}
|
||||||
|
|
||||||
|
{% trans "Update phase" as modal_title %}
|
||||||
|
{% trans "Update" as modal_button %}
|
||||||
|
{% include "base_modal.html" with modal_id="updatePhase" %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block extrajavascript %}
|
||||||
|
{% if user.registration.is_admin %}
|
||||||
|
<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 %}
|
@ -0,0 +1,17 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load crispy_forms_filters i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post">
|
||||||
|
<div id="form-content">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{% trans "Are you sure you want to delete this question?" %}
|
||||||
|
</div>
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|crispy }}
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-danger" type="submit">{% trans "Delete" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load crispy_forms_filters i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post">
|
||||||
|
<div id="form-content">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|crispy }}
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary" type="submit">{% trans "Send" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load crispy_forms_filters i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post">
|
||||||
|
<div id="form-content">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|crispy }}
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary" type="submit">{% trans "Update" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load crispy_forms_filters i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post">
|
||||||
|
<div id="form-content">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|crispy }}
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary" type="submit">{% trans "Update" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
||||||
|
|
14
apps/participation/templates/participation/upload_video.html
Normal file
14
apps/participation/templates/participation/upload_video.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load crispy_forms_filters i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post">
|
||||||
|
<div id="form-content">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|crispy }}
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-success" type="submit">{% trans "Upload" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
<div style="position: relative; width: 100%; padding-bottom: 56.25%;">
|
||||||
|
<iframe src="https://www.youtube.com/embed/{{ youtube_code }}"
|
||||||
|
frameborder="0"
|
||||||
|
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
allowfullscreen>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
@ -203,7 +203,7 @@ class UserUpdateView(LoginRequiredMixin, UpdateView):
|
|||||||
context["title"] = _("Update user {user}").format(user=str(self.object.registration))
|
context["title"] = _("Update user {user}").format(user=str(self.object.registration))
|
||||||
context["registration_form"] = user.registration.form_class(data=self.request.POST or None,
|
context["registration_form"] = user.registration.form_class(data=self.request.POST or None,
|
||||||
instance=self.object.registration)
|
instance=self.object.registration)
|
||||||
if not self.request.user.registration.is_admin:
|
if not user.registration.is_admin:
|
||||||
if "team" in context["registration_form"].fields:
|
if "team" in context["registration_form"].fields:
|
||||||
del context["registration_form"].fields["team"]
|
del context["registration_form"].fields["team"]
|
||||||
del context["registration_form"].fields["email_confirmed"]
|
del context["registration_form"].fields["email_confirmed"]
|
||||||
@ -214,7 +214,7 @@ class UserUpdateView(LoginRequiredMixin, UpdateView):
|
|||||||
user = form.instance
|
user = form.instance
|
||||||
registration_form = user.registration.form_class(data=self.request.POST or None,
|
registration_form = user.registration.form_class(data=self.request.POST or None,
|
||||||
instance=self.object.registration)
|
instance=self.object.registration)
|
||||||
if not self.request.user.registration.is_admin:
|
if not user.registration.is_admin:
|
||||||
if "team" in registration_form.fields:
|
if "team" in registration_form.fields:
|
||||||
del registration_form.fields["team"]
|
del registration_form.fields["team"]
|
||||||
del registration_form.fields["email_confirmed"]
|
del registration_form.fields["email_confirmed"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user