Mapped template actions to the api and mocked tests.

This commit is contained in:
Nicholas Staples
2016-01-19 15:54:12 +00:00
parent e2f5d64695
commit cfb3f96b01
13 changed files with 321 additions and 88 deletions

View File

@@ -6,7 +6,8 @@ from wtforms import (
PasswordField,
ValidationError,
TextAreaField,
FileField
FileField,
SelectField
)
from wtforms.validators import DataRequired, Email, Length, Regexp
@@ -187,8 +188,13 @@ class ConfirmPasswordForm(Form):
class TemplateForm(Form):
template_name = StringField(u'Template name')
template_body = TextAreaField(u'Message')
name = StringField(
u'Template name',
validators=[DataRequired(message="Template name cannot be empty")])
template_type = SelectField(u'Template type', choices=[('sms', 'SMS')])
content = TextAreaField(
u'Message',
validators=[DataRequired(message="Template content cannot be empty")])
class ForgotPasswordForm(Form):