-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HDX-9545 build page C2 - re-enter email address
- Loading branch information
Showing
7 changed files
with
163 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
ckanext-hdx_theme/ckanext/hdx_theme/helpers/ui_constants/onboarding/change_email.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from ckanext.hdx_theme.helpers.ui_constants.onboarding.user_info import CONSTANTS as USER_INFO_CONSTANTS | ||
|
||
CONSTANTS = { | ||
'STEPS_1': USER_INFO_CONSTANTS['STEPS_1'], | ||
'STEPS_2': USER_INFO_CONSTANTS['STEPS_2'], | ||
'STEPS_3': USER_INFO_CONSTANTS['STEPS_3'], | ||
|
||
'PAGE_TITLE': '''Re-enter your email address''', | ||
|
||
'INPUT_EMAIL_LABEL': '''Enter your email address''', | ||
'INPUT_EMAIL_PLACEHOLDER': USER_INFO_CONSTANTS['INPUT_EMAIL_PLACEHOLDER'], | ||
'INPUT_EMAIL_ERROR': USER_INFO_CONSTANTS['INPUT_EMAIL_ERROR'], | ||
'INPUT_EMAIL2_LABEL': USER_INFO_CONSTANTS['INPUT_EMAIL2_LABEL'], | ||
'INPUT_EMAIL2_PLACEHOLDER': USER_INFO_CONSTANTS['INPUT_EMAIL2_PLACEHOLDER'], | ||
'INPUT_EMAIL2_ERROR': USER_INFO_CONSTANTS['INPUT_EMAIL2_ERROR'], | ||
|
||
'BUTTON_SUBMIT': '''Next''', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
ckanext-hdx_theme/ckanext/hdx_theme/templates/onboarding/signup/change-email.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% extends "onboarding/base.html" %} | ||
|
||
{% block scripts %} | ||
{{ super() }} | ||
{% asset 'hdx_theme/hdx-form-validator' %} | ||
{% endblock %} | ||
|
||
{% set CONST = h.HDX_CONST('UI_CONSTANTS')['ONBOARDING']['CHANGE_EMAIL'] %} | ||
|
||
{% block subtitle %}{{ _('Re-enter email address') }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li class="breadcrumb-item active">{{ h.nav_link(_('Sign up'), named_route='hdx_user_onboarding.user-info') }}</li> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
<div class="col-12 col-md-7 mx-auto"> | ||
{{ h.snippet('bem.blocks/stepper.html', steps=[CONST.STEPS_1, CONST.STEPS_2, CONST.STEPS_3], spacing_class="my-5", current_step=2) }} | ||
<div class="text-center"> | ||
{{ h.snippet('bem.blocks/heading.html', title=CONST.PAGE_TITLE, spacing_class="mb-4") }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-12 col-md-6 mx-auto"> | ||
<form method="post" action="{{ h.url_for('hdx_user_onboarding.change_email') }}" novalidate | ||
data-module="hdx-form-validator" class="mb-5"> | ||
{{ h.csrf_input() }} | ||
{{ h.snippet('bem.blocks/input_field.html', type="email", required=True, autocomplete='new-email', label=CONST.INPUT_EMAIL_LABEL, data_attributes={"validation": "email", "validation-error": CONST.INPUT_EMAIL_ERROR}, name="email", errors=errors.get('email'), placeholder=CONST.INPUT_EMAIL_PLACEHOLDER, spacing_class="mb-4") }} | ||
{{ h.snippet('bem.blocks/input_field.html', type="email", required=True, autocomplete='new-email', label=CONST.INPUT_EMAIL2_LABEL, data_attributes={"validation": "email,match", "validation-match": "email", "validation-error": CONST.INPUT_EMAIL2_ERROR}, name="email2", errors=errors.get('email2'), placeholder=CONST.INPUT_EMAIL2_PLACEHOLDER, spacing_class="mb-4") }} | ||
{{ h.snippet('bem.blocks/form_button.html', type="submit", title=CONST.BUTTON_SUBMIT, disabled=True, button_classes=["form-button__btn_font-size_big", "btn-primary", "btn-lg", "d-block", "w-100"]) }} | ||
</form> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters