Skip to content

Commit

Permalink
Updating the account creation to mirror archive.org
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles authored and root committed Aug 4, 2017
1 parent 084970f commit 72b5f1a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 34 deletions.
15 changes: 7 additions & 8 deletions openlibrary/plugins/upstream/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@ def valid(self, value):

class RegisterForm(Form):
INPUTS = [
Textbox("displayname", description=_("Your Full Name")),
Textbox('email', description=_('Your Email Address'),
Textbox('email', description=_('Your email address'),
klass='required',
validators=[vemail, email_not_already_used, email_not_disposable, email_domain_not_blocked]),
Textbox('email2', description=_('Confirm Your Email Address'),
klass='required',
validators=[EqualToValidator('email', _('Your emails do not match. Please try again.'))]),
Textbox('username', description=_('Choose a Username'),
Textbox('username', description=_('Choose a screen name'),
klass='required',
help=_("Only letters and numbers, please, and at least 3 characters."),
validators=[vlogin, username_validator]),
Password('password', description=_('Choose a Password'),
Password('password', description=_('Choose a password'),
klass='required',
validators=[vpass]),
Textbox('password2', description=_('Confirm password'),
klass='required',
validators=[vpass])
validators=[vpass, EqualToValidator('password', _("Passwords didn't match."))]),
]
def __init__(self):
Form.__init__(self, *self.INPUTS)
Expand Down
39 changes: 15 additions & 24 deletions openlibrary/templates/account/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<div id="contentHead">
<h1>$_("Sign Up")</h1>
$if not ctx.user:
<p class="instruct">$_("Complete the form below to create your new Internet Archive account.")
<span class="attn remind">$_("Each field is required, and you'll need to verify your email address.")</span></p>
<p class="instruct">$_("Complete the form below to create a new Internet Archive account.")
<span class="attn remind">$_("Each field is required")</span></p>
</div>

<div id="contentBody">
Expand All @@ -28,30 +28,31 @@ <h1>$_("Sign Up")</h1>
<form id="signup" class="olform create validate" name="signup" method="post" action="">
$if form.note:
<div class="note">$form.note</div>

<div class="formElement">
<div class="label">
<label for="displayname">$_("Your Full Name")</label>
<span class="smaller lighter">$_("This is how your additions and edits will be credited on the site.")</span>
<label for="emailAddr">$("Your email address")</label>
<span class="smaller lighter"></span>
</div>
<div class="input">
<input type="text" class="required" name="displayname" id="displayname" value="$form.displayname.value"/>
<span class="invalid clearfix" htmlfor="username">$form.displayname.note</span>
<input type="text" class="required email" name="email" id="emailAddr" value="$form.email.value"/>
<span class="invalid clearfix" htmlfor="email">$form.email.note</span>
</div>
</div>
<div class="formElement">
<div class="label">
<label for="username">$_("Choose a Username")</label>
<label for="username">$_("Choose a screen name")</label>
<span class="smaller lighter">$_("Letters and numbers only please, and at least 3 characters.")</span>
</div>
<div class="input">
<input type="text" class="required" name="username" id="username" value="$form.username.value" autocapitalize="off"/>
<span class="invalid clearfix" htmlfor="username">$form.username.note</span>
<div class="sansserif smaller lighter">Your URL: https://openlibrary.org/people/<span id="userUrl">username</span></div>
<div class="sansserif smaller lighter">Your URL: https://openlibrary.org/people/<span id="userUrl">screenname</span></div>
</div>
</div>
<div class="formElement">
<div class="label">
<label for="password">$("Choose a Password")</label>
<label for="password">$("Choose a password")</label>
<span class="smaller lighter"></span></div>
<div class="input">
<input value="" type="password" class="required" name="password" id="password"/>
Expand All @@ -60,24 +61,14 @@ <h1>$_("Sign Up")</h1>
</div>
<div class="formElement">
<div class="label">
<label for="emailAddr">$("Your Email Address")</label>
<span class="smaller lighter"></span>
</div>
<div class="input">
<input type="text" class="required email" name="email" id="emailAddr" value="$form.email.value"/>
<span class="invalid clearfix" htmlfor="email">$form.email.note</span>
</div>
</div>
<div class="formElement">
<div class="label">
<label for="emailAddr2">$("Confirm Your Email Address")</label>
<span class="smaller lighter"></span>
</div>
<label for="password">$("Confirm password")</label>
<span class="smaller lighter"></span></div>
<div class="input">
<input type="text" class="required email" name="email2" id="emailAddr2" value="$form.email2.value"/>
<span class="invalid clearfix" htmlfor="email2">$form.email2.note</span>
<input value="" type="password" class="required" name="password2" id="password2"/>
<span class="invalid clearfix" htmlfor="password2">$form.password2.note</span>
</div>
</div>

$if form.has_recaptcha:
<div class="formElement">
<div class="label">$_("Please type in the text or number(s) below.")<br/><span class="smaller lighter">$_("If you have security settings or privacy blockers installed, please disable them to see the reCAPTCHA.")</span></div>
Expand Down
9 changes: 8 additions & 1 deletion openlibrary/templates/account/verify.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@ <h1>$_("Hi, %(user)s!", user=username)</h1>
</div>

<div id="contentBody">
<p>We've sent an email to $(email)s. You'll need to read that and click on the verification link to finish creating your Internet Archive account. Afterword, <a href="/account/login">login</a> to Open Library.</p>
<p>
We’ve sent an email to $(email) containing a link to verify your account. Click/tap on the link to finish creating your Internet Archive account.
</p>

<p>
Then, come back to Open Library and find some great books!
</p>

</div>
2 changes: 1 addition & 1 deletion openlibrary/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1>$_("Log In")</h1>
<div class="label">
<label for="username">$_("Email")</label>
<span class="smaller lighter"></span>
&mdash; <a class="forgot-email" href="/account/email/forgot">Forgot your email?</a>
&mdash; <a class="forgot-email" href="/account/email/forgot">Forgot your Internet Archive email?</a>
</div>

<div class="input">
Expand Down

0 comments on commit 72b5f1a

Please sign in to comment.