Page and form to persist the inbound api data for a service.
This commit is contained in:
Rebecca Law
2017-06-15 16:20:07 +01:00
parent 12cfd45f60
commit 703b48b157
5 changed files with 84 additions and 1 deletions

View File

@@ -651,6 +651,17 @@ class PlaceholderForm(Form):
pass
class ServiceInboundApiForm(Form):
url = StringField("Inbound sms url",
validators=[DataRequired(message='Cant be empty'),
Regexp(regex="^https.*",
message='Must be a valid https url')]
)
bearer_token = StringField("Bearer token",
validators=[DataRequired(message='Cant be empty'),
Length(min=5, message='Must be at least 10 characters')])
def get_placeholder_form_instance(
placeholder_name,
dict_to_populate_from,