def user_profile_mobile_number(): form = ChangeMobileNumberForm(mobile_number=current_user.mobile_number) if form.validate_on_submit(): session[NEW_MOBILE] = form.mobile_number.data return redirect(url_for('.user_profile_mobile_number_authenticate')) return render_template('views/user-profile/change.html', thing='mobile number', form_field=form.mobile_number)
def user_profile_mobile_number(): form = ChangeMobileNumberForm(mobile_number=current_user.mobile_number) if form.validate_on_submit(): session[NEW_MOBILE] = form.mobile_number.data return redirect(url_for('.user_profile_mobile_number_authenticate')) return render_template( 'views/user-profile/change.html', thing='mobile number', form_field=form.mobile_number )
def edit_user_mobile_number(service_id, user_id): user = current_service.get_team_member(user_id) user_mobile_number = redact_mobile_number(user.mobile_number) form = ChangeMobileNumberForm(mobile_number=user_mobile_number) if form.mobile_number.data == user_mobile_number and request.method == 'POST': return redirect(url_for('.manage_users', service_id=service_id)) if form.validate_on_submit(): session['team_member_mobile_change'] = form.mobile_number.data return redirect( url_for('.confirm_edit_user_mobile_number', user_id=user.id, service_id=service_id)) return render_template('views/manage-users/edit-user-mobile.html', user=user, form=form, service_id=service_id)