Revert the disabled email field on the register-invited-user page, the email address is not being submitted on the form when registering

This commit is contained in:
Rebecca Law
2016-03-08 16:29:05 +00:00
parent d3825b253a
commit 4678a12d33
3 changed files with 4 additions and 4 deletions

View File

@@ -104,7 +104,7 @@ class RegisterUserFromInviteForm(Form):
mobile_number = mobile_number() mobile_number = mobile_number()
password = password() password = password()
service = HiddenField('service') service = HiddenField('service')
email_address = email_address() email_address = HiddenField('email_address')
class InviteUserForm(Form): class InviteUserForm(Form):

View File

@@ -12,12 +12,12 @@ Create an account GOV.UK Notify
<div class="column-two-thirds"> <div class="column-two-thirds">
<h1 class="heading-large">Create an account</h1> <h1 class="heading-large">Create an account</h1>
<form method="post" autocomplete="nope"> <form method="post" autocomplete="nope">
{{ textbox(form.email_address, width='3-4', disabled=True ) }}
{{ textbox(form.name, width='3-4') }} {{ textbox(form.name, width='3-4') }}
{{ textbox(form.mobile_number, width='3-4') }} {{ textbox(form.mobile_number, width='3-4') }}
{{ textbox(form.password, hint="Your password must have at least 10 characters", width='3-4') }} {{ textbox(form.password, hint="Your password must have at least 10 characters", width='3-4') }}
{{ page_footer("Continue") }} {{ page_footer("Continue") }}
{{form.service}} {{form.service}}
{{form.email_address}}
</form> </form>
</div> </div>
</div> </div>

View File

@@ -101,13 +101,13 @@ def test_new_user_accept_invite_calls_api_and_views_registration_page(app_,
assert page.h1.string.strip() == 'Create an account' assert page.h1.string.strip() == 'Create an account'
form = page.find('form') form = page.find('form')
email = form.find('input', id='email_address')
name = form.find('input', id='name') name = form.find('input', id='name')
password = form.find('input', id='password') password = form.find('input', id='password')
service = form.find('input', type='hidden', id='service') service = form.find('input', type='hidden', id='service')
email = form.find('input', type='hidden', id='email_address')
assert email assert email
assert email.attrs['disabled'] assert email.attrs['value'] == 'invited_user@test.gov.uk'
assert name assert name
assert password assert password
assert service assert service