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:
Chris Hill-Scott
2016-02-19 15:02:13 +00:00
parent a86be302ce
commit 17b99c9bf2
23 changed files with 443 additions and 132 deletions

View File

@@ -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):
'''