mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-30 00:31:09 +02:00
Use Bootstrap 5 instead of Bootstrap 4
This commit is contained in:
@ -5,15 +5,13 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{% trans "Error" %}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% trans "This task failed successfully." %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Close" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,6 @@ class TeamTable(tables.Table):
|
||||
}
|
||||
model = Team
|
||||
fields = ('name', 'trigram',)
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
||||
|
||||
# noinspection PyTypeChecker
|
||||
@ -55,7 +54,6 @@ class ParticipationTable(tables.Table):
|
||||
}
|
||||
model = Team
|
||||
fields = ('name', 'trigram', 'valid',)
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
||||
|
||||
class TournamentTable(tables.Table):
|
||||
@ -75,7 +73,6 @@ class TournamentTable(tables.Table):
|
||||
model = Tournament
|
||||
fields = ('name', 'date',)
|
||||
order_by = ('name', )
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
||||
|
||||
class PoolTable(tables.Table):
|
||||
@ -96,7 +93,6 @@ class PoolTable(tables.Table):
|
||||
}
|
||||
model = Pool
|
||||
fields = ('teams', 'round', 'tournament',)
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
||||
|
||||
class PassageTable(tables.Table):
|
||||
@ -121,7 +117,6 @@ class PassageTable(tables.Table):
|
||||
}
|
||||
model = Passage
|
||||
fields = ('defender', 'opponent', 'reporter', 'solution_number', )
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
||||
|
||||
class NoteTable(tables.Table):
|
||||
@ -140,4 +135,3 @@ class NoteTable(tables.Table):
|
||||
model = Note
|
||||
fields = ('jury', 'defender_writing', 'defender_oral', 'opponent_writing', 'opponent_oral',
|
||||
'reporter_writing', 'reporter_oral',)
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
@ -51,7 +51,7 @@
|
||||
{% trans "If you upload a solution, this will replace the version for the final tournament." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadSolutionModal">{% trans "Upload solution" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadSolutionModal">{% trans "Upload solution" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('button[data-target="#uploadSolutionModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadSolutionModal"]').click(function() {
|
||||
let modalBody = $("#uploadSolutionModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:upload_solution" pk=participation.pk %} #form-content")
|
||||
|
@ -41,13 +41,13 @@
|
||||
{% if notes is not None %}
|
||||
<div class="card-footer text-center">
|
||||
{% if my_note is not None %}
|
||||
<button class="btn btn-info" data-toggle="modal" data-target="#updateNotesModal">{% trans "Update notes" %}</button>
|
||||
<button class="btn btn-info" data-bs-toggle="modal" data-bs-target="#updateNotesModal">{% trans "Update notes" %}</button>
|
||||
{% endif %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#updatePassageModal">{% trans "Update" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updatePassageModal">{% trans "Update" %}</button>
|
||||
</div>
|
||||
{% elif user.registration.participates %}
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadSynthesisModal">{% trans "Upload synthesis" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadSynthesisModal">{% trans "Upload synthesis" %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -121,21 +121,21 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
{% if notes is not None %}
|
||||
$('button[data-target="#updatePassageModal"]').click(function() {
|
||||
$('button[data-bs-target="#updatePassageModal"]').click(function() {
|
||||
let modalBody = $("#updatePassageModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:passage_update" pk=passage.pk %} #form-content")
|
||||
});
|
||||
|
||||
{% if my_note is not None %}
|
||||
$('button[data-target="#updateNotesModal"]').click(function() {
|
||||
$('button[data-bs-target="#updateNotesModal"]').click(function() {
|
||||
let modalBody = $("#updateNotesModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:update_notes" pk=my_note.pk %} #form-content")
|
||||
});
|
||||
{% endif %}
|
||||
{% elif user.registration.participates %}
|
||||
$('button[data-target="#uploadSynthesisModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadSynthesisModal"]').click(function() {
|
||||
let modalBody = $("#uploadSynthesisModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:upload_synthesis" pk=passage.pk %} #form-content")
|
||||
|
@ -51,10 +51,10 @@
|
||||
</div>
|
||||
{% if user.registration.is_volunteer %}
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-success" data-toggle="modal" data-target="#addPassageModal">{% trans "Add passage" %}</button>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#updatePoolModal">{% trans "Update" %}</button>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#updateTeamsModal">{% trans "Update teams" %}</button>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadNotesModal">{% trans "Upload notes from a CSV file" %}</button>
|
||||
<button class="btn btn-success" data-bs-toggle="modal" data-bs-target="#addPassageModal">{% trans "Add passage" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updatePoolModal">{% trans "Update" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamsModal">{% trans "Update teams" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadNotesModal">{% trans "Upload notes from a CSV file" %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -89,25 +89,25 @@
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('button[data-target="#updatePoolModal"]').click(function() {
|
||||
$('button[data-bs-target="#updatePoolModal"]').click(function() {
|
||||
let modalBody = $("#updatePoolModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_update" pk=pool.pk %} #form-content")
|
||||
});
|
||||
|
||||
$('button[data-target="#updateTeamsModal"]').click(function() {
|
||||
$('button[data-bs-target="#updateTeamsModal"]').click(function() {
|
||||
let modalBody = $("#updateTeamsModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_update_teams" pk=pool.pk %} #form-content")
|
||||
});
|
||||
|
||||
$('button[data-target="#addPassageModal"]').click(function() {
|
||||
$('button[data-bs-target="#addPassageModal"]').click(function() {
|
||||
let modalBody = $("#addPassageModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:passage_create" pk=pool.pk %} #form-content")
|
||||
});
|
||||
|
||||
$('button[data-target="#uploadNotesModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadNotesModal"]').click(function() {
|
||||
let modalBody = $("#uploadNotesModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_upload_notes" pk=pool.pk %} #form-content")
|
||||
|
@ -10,19 +10,19 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6 text-right">{% trans "Name:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Name:" %}</dt>
|
||||
<dd class="col-sm-6">{{ team.name }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Trigram:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Trigram:" %}</dt>
|
||||
<dd class="col-sm-6">{{ team.trigram }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Email:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Email:" %}</dt>
|
||||
<dd class="col-sm-6"><a href="mailto:{{ team.email }}">{{ team.email }}</a></dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Access code:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Access code:" %}</dt>
|
||||
<dd class="col-sm-6">{{ team.access_code }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Coaches:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Coaches:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for coach in team.coaches.all %}
|
||||
<a href="{% url "registration:user_detail" pk=coach.user.pk %}">{{ coach }}</a>{% if not forloop.last %},{% endif %}
|
||||
@ -31,7 +31,7 @@
|
||||
{% endfor %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Participants:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Participants:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for student in team.students.all %}
|
||||
<a href="{% url "registration:user_detail" pk=student.user.pk %}">{{ student }}</a>{% if not forloop.last %},{% endif %}
|
||||
@ -40,7 +40,7 @@
|
||||
{% endfor %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Tournament:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Tournament:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if team.participation.tournament %}
|
||||
<a href="{% url "participation:tournament_detail" pk=team.participation.tournament.pk %}">{{ team.participation.tournament }}</a>
|
||||
@ -49,7 +49,7 @@
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Photo authorizations:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Photo authorizations:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for participant in team.participants.all %}
|
||||
{% if participant.photo_authorization %}
|
||||
@ -61,7 +61,7 @@
|
||||
</dd>
|
||||
|
||||
{% if not team.participation.tournament.remote %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Health sheets:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Health sheets:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for student in team.students.all %}
|
||||
{% if student.under_18 %}
|
||||
@ -74,7 +74,7 @@
|
||||
{% endfor %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Vaccine sheets:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Vaccine sheets:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for student in team.students.all %}
|
||||
{% if student.under_18 %}
|
||||
@ -87,7 +87,7 @@
|
||||
{% endfor %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Parental authorizations:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Parental authorizations:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% for student in team.students.all %}
|
||||
{% if student.under_18 %}
|
||||
@ -101,7 +101,7 @@
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Motivation letter:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Motivation letter:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if team.motivation_letter %}
|
||||
<a href="{{ team.motivation_letter.url }}">{% trans "Download" %}</a>
|
||||
@ -109,7 +109,7 @@
|
||||
<em>{% trans "Not uploaded yet" %}</em>
|
||||
{% endif %}
|
||||
{% if user.registration.team == team and not user.registration.team.participation.valid or user.registration.is_admin %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadMotivationLetterModal">{% trans "Replace" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadMotivationLetterModal">{% trans "Replace" %}</button>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
@ -123,9 +123,9 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#updateTeamModal">{% trans "Update" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamModal">{% trans "Update" %}</button>
|
||||
{% if not team.participation.valid %}
|
||||
<button class="btn btn-danger" data-toggle="modal" data-target="#leaveTeamModal">{% trans "Leave" %}</button>
|
||||
<button class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#leaveTeamModal">{% trans "Leave" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -200,17 +200,17 @@
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('button[data-target="#uploadMotivationLetterModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadMotivationLetterModal"]').click(function() {
|
||||
let modalBody = $("#uploadMotivationLetterModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:upload_team_motivation_letter" pk=team.pk %} #form-content");
|
||||
});
|
||||
$('button[data-target="#updateTeamModal"]').click(function() {
|
||||
$('button[data-bs-target="#updateTeamModal"]').click(function() {
|
||||
let modalBody = $("#updateTeamModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:update_team" pk=team.pk %} #form-content");
|
||||
});
|
||||
$('button[data-target="#leaveTeamModal"]').click(function() {
|
||||
$('button[data-bs-target="#leaveTeamModal"]').click(function() {
|
||||
let modalBody = $("#leaveTeamModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:team_leave" %} #form-content");
|
||||
|
@ -9,52 +9,52 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6 text-right">{% trans 'organizers'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'organizers'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.organizers.all|join:", " }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'size'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'size'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.max_teams }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'place'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'place'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.place }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'price'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'price'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{% if tournament.price %}{{ tournament.price }} €{% else %}{% trans "Free" %}{% endif %}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'remote'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'remote'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.remote|yesno }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'dates'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'dates'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{% trans "From" %} {{ tournament.date_start }} {% trans "to" %} {{ tournament.date_end }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'date of registration closing'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'date of registration closing'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.inscription_limit }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'date of maximal solution submission'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'date of maximal solution submission'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.solution_limit }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'date of the random draw'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'date of the random draw'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.solutions_draw }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'date of maximal syntheses submission for the first round'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'date of maximal syntheses submission for the first round'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.syntheses_first_phase_limit }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'date when solutions of round 2 are available'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'date when solutions of round 2 are available'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.solutions_available_second_phase }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'date of maximal syntheses submission for the second round'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'date of maximal syntheses submission for the second round'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.syntheses_second_phase_limit }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'description'|capfirst %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'description'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ tournament.description }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'To contact organizers' %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'To contact organizers' %}</dt>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ tournament.organizers_email }}">{{ tournament.organizers_email }}</a></dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'To contact juries' %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'To contact juries' %}</dt>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ tournament.jurys_email }}">{{ tournament.jurys_email }}</a></dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'To contact valid teams' %}</dt>
|
||||
<dt class="col-xl-6 text-end">{% trans 'To contact valid teams' %}</dt>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ tournament.teams_email }}">{{ tournament.teams_email }}</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
@ -84,7 +84,9 @@
|
||||
{% endif %}
|
||||
|
||||
{% if user.registration.is_admin %}
|
||||
<button class="btn btn-block btn-success" data-toggle="modal" data-target="#addPoolModal">{% trans "Add new pool" %}</button>
|
||||
<div class="d-grid">
|
||||
<button class="btn gap-0 btn-success" data-bs-toggle="modal" data-bs-target="#addPoolModal">{% trans "Add new pool" %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if notes %}
|
||||
@ -116,7 +118,7 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
{% if user.registration.is_admin %}
|
||||
$('button[data-target="#addPoolModal"]').click(function() {
|
||||
$('button[data-bs-target="#addPoolModal"]').click(function() {
|
||||
let modalBody = $("#addPoolModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_create" %} #form-content")
|
||||
|
@ -10,7 +10,9 @@
|
||||
<div id="form-content">
|
||||
{% render_table table %}
|
||||
{% if user.registration.is_admin %}
|
||||
<a class="btn btn-block btn-success" href="{% url "participation:tournament_create" %}">{% trans "Add tournament" %}</a>
|
||||
<div class="d-grid">
|
||||
<a class="btn gap-0 btn-success" href="{% url "participation:tournament_create" %}">{% trans "Add tournament" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -29,4 +29,3 @@ class RegistrationTable(tables.Table):
|
||||
model = Registration
|
||||
fields = ('last_name', 'user__first_name', 'user__email', 'type',)
|
||||
order_by = ('type', 'last_name', 'first_name',)
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
@ -11,18 +11,18 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6 text-right">{% trans "Last name:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Last name:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.last_name }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "First name:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "First name:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.first_name }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Email:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Email:" %}</dt>
|
||||
<dd class="col-sm-6"><a href="mailto:{{ user_object.email }}">{{ user_object.email }}</a>
|
||||
{% if not user_object.registration.email_confirmed %} (<em>{% trans "Not confirmed" %}, <a href="{% url "registration:email_validation_resend" pk=user_object.pk %}">{% trans "resend the validation link" %}</a></em>){% endif %}</dd>
|
||||
|
||||
{% if user_object == user %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Password:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Password:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
<a href="{% url 'password_change' %}" class="btn-sm btn-secondary">
|
||||
<i class="fas fa-edit"></i> {% trans "Change password" %}
|
||||
@ -31,7 +31,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if user_object.registration.participates %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Team:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Team:" %}</dt>
|
||||
{% trans "any" as any %}
|
||||
<dd class="col-sm-6">
|
||||
<a href="{% if user_object.registration.team %}{% url "participation:team_detail" pk=user_object.registration.team.pk %}{% else %}#{% endif %}">
|
||||
@ -40,93 +40,93 @@
|
||||
</dd>
|
||||
|
||||
{% if user_object.registration.studentregistration %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Birth date:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Birth date:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.birth_date }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Gender:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Gender:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.get_gender_display }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Address:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Address:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.address }}, {{ user_object.registration.zip_code|stringformat:'05d' }} {{ user_object.registration.city }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Phone number:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Phone number:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.phone_number }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Health issues:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Health issues:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.health_issues|default:any }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Photo authorization:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Photo authorization:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if user_object.registration.photo_authorization %}
|
||||
<a href="{{ user_object.registration.photo_authorization.url }}">{% trans "Download" %}</a>
|
||||
{% endif %}
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadPhotoAuthorizationModal">{% trans "Replace" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadPhotoAuthorizationModal">{% trans "Replace" %}</button>
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if user_object.registration.studentregistration %}
|
||||
{% if user_object.registration.under_18 and user_object.registration.team.participation.tournament and not user_object.registration.team.participation.tournament.remote %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Health sheet:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Health sheet:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if user_object.registration.health_sheet %}
|
||||
<a href="{{ user_object.registration.health_sheet.url }}">{% trans "Download" %}</a>
|
||||
{% endif %}
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadHealthSheetModal">{% trans "Replace" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadHealthSheetModal">{% trans "Replace" %}</button>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Vaccine sheet:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Vaccine sheet:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if user_object.registration.vaccine_sheet %}
|
||||
<a href="{{ user_object.registration.vaccine_sheet.url }}">{% trans "Download" %}</a>
|
||||
{% endif %}
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadVaccineSheetModal">{% trans "Replace" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadVaccineSheetModal">{% trans "Replace" %}</button>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Parental authorization:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Parental authorization:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if user_object.registration.parental_authorization %}
|
||||
<a href="{{ user_object.registration.parental_authorization.url }}">{% trans "Download" %}</a>
|
||||
{% endif %}
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#uploadParentalAuthorizationModal">{% trans "Replace" %}</button>
|
||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadParentalAuthorizationModal">{% trans "Replace" %}</button>
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Student class:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Student class:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.get_student_class_display }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "School:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "School:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.school }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Responsible name:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Responsible name:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.responsible_name }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Responsible phone number:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Responsible phone number:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.responsible_phone }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Responsible email address:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Responsible email address:" %}</dt>
|
||||
{% with user_object.registration.responsible_email as email %}
|
||||
<dd class="col-sm-6"><a href="mailto:{{ email }}">{{ email }}</a></dd>
|
||||
{% endwith %}
|
||||
{% elif user_object.registration.coachregistration or user_object.registration.is_volunteer %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Profesional activity:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Profesional activity:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.professional_activity }}</dd>
|
||||
|
||||
{% if user_object.registration.is_volunteer %}
|
||||
<dt class="col-sm-6 text-right">{% trans "Admin:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Admin:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.is_admin|yesno }}</dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Grant Animath to contact me in the future about other actions:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Grant Animath to contact me in the future about other actions:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.give_contact_to_animath|yesno }}</dd>
|
||||
</dl>
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
<hr>
|
||||
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6 text-right">{% trans "Payment information:" %}</dt>
|
||||
<dt class="col-sm-6 text-end">{% trans "Payment information:" %}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% trans "yes,no,pending" as yesnodefault %}
|
||||
{% with info=user_object.registration.payment.additional_information %}
|
||||
@ -146,7 +146,7 @@
|
||||
{{ user_object.registration.payment.get_type_display }}, {% trans "valid:" %} {{ user_object.registration.payment.valid|yesno:yesnodefault }}
|
||||
{% endif %}
|
||||
{% if user.registration.is_admin or user_object.registration.payment.valid is False %}
|
||||
<button class="btn-sm btn-secondary" data-toggle="modal" data-target="#updatePaymentModal">
|
||||
<button class="btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#updatePaymentModal">
|
||||
<i class="fas fa-money-bill-wave"></i> {% trans "Update payment" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
@ -211,29 +211,29 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
{% if user_object.registration.team and not user_object.registration.team.participation.valid %}
|
||||
$('button[data-target="#uploadPhotoAuthorizationModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadPhotoAuthorizationModal"]').click(function() {
|
||||
let modalBody = $("#uploadPhotoAuthorizationModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "registration:upload_user_photo_authorization" pk=user_object.registration.pk %} #form-content");
|
||||
});
|
||||
$('button[data-target="#uploadHealthSheetModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadHealthSheetModal"]').click(function() {
|
||||
let modalBody = $("#uploadHealthSheetModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "registration:upload_user_health_sheet" pk=user_object.registration.pk %} #form-content");
|
||||
});
|
||||
$('button[data-target="#uploadVaccineSheetModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadVaccineSheetModal"]').click(function() {
|
||||
let modalBody = $("#uploadVaccineSheetModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "registration:upload_user_vaccine_sheet" pk=user_object.registration.pk %} #form-content");
|
||||
});
|
||||
$('button[data-target="#uploadParentalAuthorizationModal"]').click(function() {
|
||||
$('button[data-bs-target="#uploadParentalAuthorizationModal"]').click(function() {
|
||||
let modalBody = $("#uploadParentalAuthorizationModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "registration:upload_user_parental_authorization" pk=user_object.registration.pk %} #form-content");
|
||||
});
|
||||
{% endif %}
|
||||
{% if user_object.registration.team.participation.valid %}
|
||||
$('button[data-target="#updatePaymentModal"]').click(function() {
|
||||
$('button[data-bs-target="#updatePaymentModal"]').click(function() {
|
||||
let modalBody = $("#updatePaymentModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "registration:update_payment" pk=user_object.registration.payment.pk %} #form-content");
|
||||
|
@ -4,9 +4,11 @@
|
||||
|
||||
{% block content %}
|
||||
{% if user.registration.is_volunteer %}
|
||||
<a href="{% url "registration:add_organizer" %}" class="btn btn-block btn-secondary">
|
||||
<i class="fas fa-user-plus"></i> {% trans "Add organizer" %}
|
||||
</a>
|
||||
<div class="d-grid">
|
||||
<a href="{% url "registration:add_organizer" %}" class="btn gap-0 btn-secondary">
|
||||
<i class="fas fa-user-plus"></i> {% trans "Add organizer" %}
|
||||
</a>
|
||||
</div>
|
||||
<hr>
|
||||
{% endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user