mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Add pages to invite, edit, and delete users
This takes the original prototype version of this page, and, using the same fake data (ie nothing is wired up): - adds an invite users page - adds an edit (and delete) user page Both these pages allow the user to set another user’s permissions. This commit adds images for the ticks and crosses, so we have control over their appearance.
This commit is contained in:
@@ -21,10 +21,10 @@ from app.utils import (
|
||||
)
|
||||
|
||||
|
||||
def email_address():
|
||||
def email_address(label='Email address'):
|
||||
gov_uk_email \
|
||||
= "(^[^@^\\s]+@[^@^\\.^\\s]+(\\.[^@^\\.^\\s]*)*.gov.uk)"
|
||||
return EmailField('Email address', validators=[
|
||||
return EmailField(label, validators=[
|
||||
Length(min=5, max=255),
|
||||
DataRequired(message='Email cannot be empty'),
|
||||
Email(message='Enter a valid email address'),
|
||||
@@ -96,6 +96,10 @@ class RegisterUserForm(Form):
|
||||
password = password()
|
||||
|
||||
|
||||
class InviteUserForm(Form):
|
||||
email_address = email_address('Their email address')
|
||||
|
||||
|
||||
class TwoFactorForm(Form):
|
||||
def __init__(self, validate_code_func, *args, **kwargs):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user