Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1479,20 +1479,6 @@ msgstr ""
msgid "Public and cannot be changed later."
msgstr ""

#: openlibrary/plugins/upstream/forms.py
msgid ""
"I want to receive news, announcements, and resources from the <a "
"href=\"https://archive.org/\">Internet Archive</a>, the non-profit that "
"runs Open Library."
msgstr ""

#: openlibrary/plugins/upstream/forms.py
msgid ""
"I want to apply* for <a href=\"https://help.archive.org/help/program-"
"overview/\" target=\"_blank\">special print disability access</a> through"
" a qualifying program."
msgstr ""

#: openlibrary/plugins/upstream/forms.py
msgid "Invalid password"
msgstr ""
Expand Down Expand Up @@ -2507,6 +2493,20 @@ msgstr ""
msgid "screenname"
msgstr ""

#: account/create.html
msgid ""
"I want to receive news, announcements, and resources from the <a "
"href=\"https://archive.org/\">Internet Archive</a>, the non-profit that "
"runs Open Library."
msgstr ""

#: account/create.html
msgid ""
"I want to apply* for <a href=\"https://help.archive.org/help/program-"
"overview/\" target=\"_blank\">special print disability access</a> through"
" a qualifying program."
msgstr ""

#: account/create.html
msgid "Select qualifying program"
msgstr ""
Expand Down
16 changes: 0 additions & 16 deletions openlibrary/plugins/upstream/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from openlibrary.accounts import InternetArchiveAccount
from openlibrary.i18n import lgettext as _
from openlibrary.utils.form import (
Checkbox,
Email,
Form,
Hidden,
Expand Down Expand Up @@ -112,21 +111,6 @@ class RegisterForm(Form):
maxlength="20",
required="true",
),
Checkbox(
'ia_newsletter',
description=_(
'I want to receive news, announcements, and resources from the '
'<a href="https://archive.org/">Internet Archive</a>, the non-profit '
'that runs Open Library.'
),
),
Checkbox(
"pd_request",
description=_(
'I want to apply* for <a href="https://help.archive.org/help/program-overview/" target="_blank">'
'special print disability access</a> through a qualifying program.'
),
),
)

def __init__(self):
Expand Down
6 changes: 4 additions & 2 deletions openlibrary/templates/account/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ <h1 class="ol-signup-hero__title">$_("Sign Up")</h1>
$:field(form.password)

<div class="ol-signup-form__checkbox">
$:form.ia_newsletter.render() <label for="ia_newsletter">$:form.ia_newsletter.description</label>
<input type="checkbox" id="ia_newsletter" name="ia_newsletter"/>
<label for="ia_newsletter">$:_('I want to receive news, announcements, and resources from the <a href="https://archive.org/">Internet Archive</a>, the non-profit that runs Open Library.')</label>
</div>
<div id="rpd-checkbox" class="ol-signup-form__checkbox">
$:form.pd_request.render() <label for="pd_request">$:form.pd_request.description</label>
<input type="checkbox" id="pd_request" name="pd_request"/>
<label for="pd_request">$:_('I want to apply* for <a href="https://help.archive.org/help/program-overview/" target="_blank">special print disability access</a> through a qualifying program.')</label>
</div>
<div id="pda-selector" class="ol-signup-form__select hidden">
<div class="ol-signup-form__error" id="pd_programMessage"></div>
Expand Down
17 changes: 0 additions & 17 deletions openlibrary/utils/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,6 @@ def get_type(self):
return "email"


class Checkbox(Input):
"""Checkbox input."""

@property
def checked(self):
return self.value is not None

def get_type(self):
return "checkbox"

def render(self):
if self.value is not None:
self.attrs['checked'] = ''

return Input.render(self)


class Hidden(Input):
"""Hidden input."""

Expand Down
Loading