$def with (form) $# :param openlibrary.plugins.upstream.forms.RegisterForm form: $var title: $_("Sign Up to Open Library")

$_("Sign Up")

$if not ctx.user: $:render_template("account/ia_thirdparty_logins")
$_('OR')

$_("Complete the form below to create a new Internet Archive account.") $_("Each field is required")

$def field(input, suffix=''): $# :param openlibrary.utils.form.Input input: $# :param str suffix: HTML to put at bottom of input
$if input.help: $input.help
$:input.render() $input.note $:suffix
$if ctx.user: $def user_link(): $ctx.user.displayname

$:_("You are already logged into Open Library as %(user)s.", user=str(user_link()))

$:_('If you\'d like to create a new, different Open Library account, you\'ll need to log out and start the signup process afresh.')

$else:
$if form.note:
$form.note
$def screenname_url(): $_('Your URL'): https://openlibrary.org/people/$(form.username.value or _('screenname')) $:field(form.email) $:field(form.username, suffix=str(screenname_url())) $:field(form.password) $:field(form.password2)

$if form.has_recaptcha:
$_("If you have security settings or privacy blockers installed, please disable them to see the reCAPTCHA.")
$if form['recaptcha'].error: $_('Incorrect. Please try again.')
$:_("By signing up, you agree to the Internet Archive's Terms of Service.")

$_("Cancel")