Add claim call to action on unclaimed accounts

This commit is contained in:
rubenwardy 2018-05-29 18:16:05 +01:00
parent 6353ac29e9
commit 63a3b5e872
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
6 changed files with 16 additions and 5 deletions

View File

@ -243,13 +243,16 @@ select:not([multiple]) {
.alert .alert_right, .alert > form {
display: inline-block;
margin: 0;
padding: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
}
.alert .alert_right:not(.button) {
padding: 0;
}
.alert .alert_right form {
height: 100%;
}

View File

@ -71,7 +71,7 @@ Sign in
<h2>New here?</h2>
<div class="box-body">
<p>Create an account using your forum account.</p>
<p>Create an account using your forum account or email.</p>
<a href="{{ url_for('user_claim_page') }}" class="button">{%trans%}Claim your account{%endtrans%}</a>
</div>

View File

@ -11,8 +11,7 @@ Creating an Account
<div class="box-body">
<p>
If you have a forum account, you'll need to prove that you own it
to get an account on ContentDB. You don't need a forum account to sign
up however.
to get an account on ContentDB.
</p>
{% if current_user.is_authenticated %}

View File

@ -6,6 +6,14 @@
{% block content %}
{% if not current_user.is_authenticated and user.rank == user.rank.NOT_JOINED and user.forums_username %}
<div class="box box_grey alert alert-info">
Is this you? Claim your account now!
<a class="alert_right button" href="{{ url_for('user_claim_page', username=user.forums_username) }}">Claim</a>
</div>
{% endif %}
<div class="box box_grey">
<h2>{{ user.display_name }}</h2>

View File

@ -194,7 +194,7 @@ def user_claim_page():
user = User.query.filter_by(forums_username=username).first()
if user is not None and user.rank.atLeast(UserRank.NEW_MEMBER):
flash("That user has already been claimed!", "error")
return redirect(url_for("user_claim_page", username=username))
return redirect(url_for("user_claim_page"))
# Get signature
sig = None

View File

@ -36,6 +36,7 @@ def defineDummyData(licenses, tags, ruben):
jeija = User("Jeija")
jeija.github_username = "Jeija"
jeija.forums_username = "Jeija"
db.session.add(jeija)