mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-03 11:08:46 +01:00 
			
		
		
		
	Display edit password button
This commit is contained in:
		@@ -20,7 +20,7 @@ class RegistrationTable(tables.Table):
 | 
			
		||||
 | 
			
		||||
    def order_type(self, queryset, desc):
 | 
			
		||||
        types = ["volunteerregistration__adminregistration", "volunteerregistration", "participantregistration"]
 | 
			
		||||
        return queryset.order_by(*(("" if desc else "-") + t for t in types)), True
 | 
			
		||||
        return queryset.order_by(*(("-" if desc else "") + t for t in types)), True
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        attrs = {
 | 
			
		||||
@@ -28,5 +28,5 @@ class RegistrationTable(tables.Table):
 | 
			
		||||
        }
 | 
			
		||||
        model = Registration
 | 
			
		||||
        fields = ('last_name', 'user__first_name', 'user__email', 'type',)
 | 
			
		||||
        order_by = ('volunteerregistration__adminregistration', 'volunteerregistration', 'last_name', 'first_name',)
 | 
			
		||||
        order_by = ('type', 'last_name', 'first_name',)
 | 
			
		||||
        template_name = 'django_tables2/bootstrap4.html'
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,15 @@
 | 
			
		||||
            <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>
 | 
			
		||||
                <dd class="col-sm-6">
 | 
			
		||||
                    <a href="{% url 'password_change' %}" class="btn-sm btn-secondary" data-turbolinks="false">
 | 
			
		||||
                        <i class="fas fa-edit"></i> {% trans "Change password" %}
 | 
			
		||||
                    </a>
 | 
			
		||||
                </dd>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
 | 
			
		||||
            {% if user_object.registration.participates %}
 | 
			
		||||
                <dt class="col-sm-6 text-right">{% trans "Team:" %}</dt>
 | 
			
		||||
                {% trans "any" as any %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user