mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
change timezone to hidden field with default for now
This commit is contained in:
@@ -610,6 +610,8 @@ class SetupUserProfileForm(StripWhitespaceForm):
|
|||||||
"Full name", validators=[DataRequired(message="Cannot be empty")]
|
"Full name", validators=[DataRequired(message="Cannot be empty")]
|
||||||
)
|
)
|
||||||
mobile_number = international_phone_number()
|
mobile_number = international_phone_number()
|
||||||
|
# TODO This should be replaced with a select widget when one is available.
|
||||||
|
preferred_timezone = HiddenField("preferred_timezone", default="US/Eastern")
|
||||||
|
|
||||||
|
|
||||||
class RegisterUserFromInviteForm(RegisterUserForm):
|
class RegisterUserFromInviteForm(RegisterUserForm):
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ def registration_continue():
|
|||||||
def set_up_your_profile():
|
def set_up_your_profile():
|
||||||
|
|
||||||
form = SetupUserProfileForm()
|
form = SetupUserProfileForm()
|
||||||
if form.validate_on_submit():
|
|
||||||
|
|
||||||
|
if form.validate_on_submit():
|
||||||
# start login.gov
|
# start login.gov
|
||||||
code = request.args.get("code")
|
code = request.args.get("code")
|
||||||
state = request.args.get("state")
|
state = request.args.get("state")
|
||||||
@@ -157,13 +157,7 @@ def set_up_your_profile():
|
|||||||
raise Exception(f"Could not login with login.gov {login_gov_error}")
|
raise Exception(f"Could not login with login.gov {login_gov_error}")
|
||||||
# end login.gov
|
# end login.gov
|
||||||
|
|
||||||
user = User.register(
|
|
||||||
name=form.name.data,
|
|
||||||
email_address=user_email,
|
|
||||||
mobile_number=form.mobile_number.data,
|
|
||||||
password=str(uuid.uuid4()),
|
|
||||||
auth_type="sms_auth",
|
|
||||||
)
|
|
||||||
# activate the user
|
# activate the user
|
||||||
user = user_api_client.get_user_by_uuid_or_email(user_uuid, user_email)
|
user = user_api_client.get_user_by_uuid_or_email(user_uuid, user_email)
|
||||||
activate_user(user["id"])
|
activate_user(user["id"])
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Set up your profile
|
|||||||
"hint": {"text": "We'll send you a security code by text message"},
|
"hint": {"text": "We'll send you a security code by text message"},
|
||||||
}) }}
|
}) }}
|
||||||
</div>
|
</div>
|
||||||
{{ usaSelect({
|
<!--{{ usaSelect({
|
||||||
"id": "time-zone",
|
"id": "time-zone",
|
||||||
"name": "time-zone",
|
"name": "time-zone",
|
||||||
"label": "Time zone",
|
"label": "Time zone",
|
||||||
@@ -67,7 +67,7 @@ Set up your profile
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}}
|
}}-->
|
||||||
{{form.auth_type}}
|
{{form.auth_type}}
|
||||||
{{ page_footer("Save") }}
|
{{ page_footer("Save") }}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|||||||
Reference in New Issue
Block a user