mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-24 19:20:29 +02:00
Delete registrations
This commit is contained in:
@ -111,9 +111,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<a class="nav-link" href="{% url 'treasury:invoice_list' %}"><i class="fa fa-money"></i> {% trans 'Treasury' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'wei:current_wei_detail' %}"><i class="fa fa-bus"></i> {% trans 'WEI' %}</a>
|
||||
</li>
|
||||
{% if "wei.weiclub"|not_empty_model_change_list %}
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'wei:current_wei_detail' %}"><i class="fa fa-bus"></i> {% trans 'WEI' %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="navbar-nav ml-auto">
|
||||
{% if user.is_authenticated %}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Review registration" %}</h4>
|
||||
</div>
|
||||
<div class="card-body" id="profile_infos">
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6">{% trans 'name'|capfirst %}, {% trans 'first name' %}</dt>
|
||||
<dd class="col-xl-6">{{ registration.user.last_name }} {{ registration.user.first_name }}</dd>
|
||||
|
37
templates/wei/weiregistration_confirm_delete.html
Normal file
37
templates/wei/weiregistration_confirm_delete.html
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends "member/noteowner_detail.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block profile_info %}
|
||||
{% include "wei/weiclub_info.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{% trans "Delete registration" %}</h4>
|
||||
</div>
|
||||
{% if object.is_validated %}
|
||||
<div class="card-body">
|
||||
<div class="alert alert-danger">
|
||||
{% blocktrans %}This registration is already validated and can't be deleted.{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card-body">
|
||||
<div class="alert alert-warning">
|
||||
{% with user=object.user wei_name=object.wei.name %}
|
||||
{% blocktrans %}Are you sure you want to delete the registration of {{ user }} for the WEI {{ wei_name }}? This action can't be undoed.{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<a class="btn btn-warning" href="{% url 'wei:wei_update_registration' object.pk %}">{% trans "Update registration" %}</a>
|
||||
<button class="btn btn-danger" type="submit">{% trans "Delete" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
@ -7,10 +7,10 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block profile_content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ membership_form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ membership_form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user