From c440fe7ed62eb2bc3f195106ab70f0400ec2c824 Mon Sep 17 00:00:00 2001 From: Nicolas Dietrich Date: Tue, 4 Mar 2014 23:23:52 +0100 Subject: [PATCH] Hide attention getter when already dealing with validation --- src/adhocracy/controllers/user.py | 2 ++ src/adhocracy/templates/components.html | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/adhocracy/controllers/user.py b/src/adhocracy/controllers/user.py index 972ea3b1e..50b5c066f 100644 --- a/src/adhocracy/controllers/user.py +++ b/src/adhocracy/controllers/user.py @@ -770,11 +770,13 @@ def activate(self, id): def ask_activate(self, id): c.page_user = get_entity_or_abort(model.User, id, instance_filter=False) + c.hide_activate_attention_getter = True return render('/user/ask_activate.html') def pending_activate(self, id): c.page_user = get_entity_or_abort(model.User, id, instance_filter=False) + c.hide_activate_attention_getter = True return render('/user/pending_activate.html') @RequireInternalRequest() diff --git a/src/adhocracy/templates/components.html b/src/adhocracy/templates/components.html index ab898d19f..cb65a348d 100644 --- a/src/adhocracy/templates/components.html +++ b/src/adhocracy/templates/components.html @@ -411,7 +411,8 @@ or can.instance.join(c.instance) or (c.instance.requires_valid_email() and c.user - and not c.user.is_email_activated()) + and not c.user.is_email_activated() + and not c.hide_activate_attention_getter) or (h.config.get('adhocracy.propose_optional_attributes') and c.user.optional_attributes is None))) %>