Skip to content

Commit

Permalink
Updated the not_verified message as suggested by George (closes #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
anandology committed May 4, 2011
1 parent 1d4f683 commit 5c96ef8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
3 changes: 2 additions & 1 deletion openlibrary/plugins/upstream/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def POST_login(self, i):
except ClientException, e:
code = e.get_data().get("code")
if code == "email_not_verified":
return render_template("account/not_verified", username=i.username, password=i.password)
email = get_user_email("/people/" + i.username)
return render_template("account/not_verified", username=i.username, password=i.password, email=email)
else:
return self.error("account_incorrect_password", i)

Expand Down
25 changes: 17 additions & 8 deletions openlibrary/plugins/upstream/templates/account/not_verified.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
$def with (username, password)
$def with (username, password, email)

$var title: $_("Email not verified")
$var title: $_("Oops!")


<style>
div.alert {
background: url("/images/icons/icon_alert-gold.png") no-repeat scroll 15px 50% #FFFDCD !important;
padding: 10px 10px 10px 50px;
}
</style>

<div id="contentHead">
<h1>$_("Email not verified")</h1>
<h1>$_("Oops!")</h1>
</div>

<div id="contentBody">
<p>Your email address has not been verified yet.</p>

<p>You must have received an email with a verification link when your account was created. Please click that verification link to verify your email address.</p>
<div class="alert">The email address you signed up with needs to be verified.</div>

<p>In case you haven't received the verification email, we can resend it.</p>
<p>When you created your account, we sent an email to $email that contained a link for you to verify your email address. We need you to click that link, please.</p>

<p>If you can't find the email, just hit this button to send a fresh one:</p>

<form method="POST" class="olform">
<input type="hidden" name="username" value="$username"/>
Expand All @@ -21,8 +30,8 @@ <h1>$_("Email not verified")</h1>
<div class="formElement bottom">
<br/>
<input value="$_('Resend the verification email')" type="submit" name="" title="$_('Resend the verification email')"/>
&nbsp;
<a href="/account/login" class="attn">$_("Cancel")</a>
</div>
</form>

<p>Thanks!</p>
</div>

0 comments on commit 5c96ef8

Please sign in to comment.