Stop letting people enter empty SMS senders

This shouldn’t be deployed until we’ve migrated the database to default
to GOVUK.
This commit is contained in:
Chris Hill-Scott
2017-05-19 17:12:44 +01:00
parent eb7b8631b6
commit ab150d876d
4 changed files with 30 additions and 11 deletions

View File

@@ -492,6 +492,7 @@ class ServiceSmsSender(Form):
sms_sender = StringField(
'Text message sender',
validators=[
DataRequired(message="Cant be empty"),
Length(max=11, message="Enter 11 characters or fewer")
]
)

View File

@@ -13,17 +13,9 @@
This appears instead of a phone number when a user receives a
text message from your service.
<p>
If you leave this blank:
If you set this to GOVUK each message will begin with
{{ current_service.name }}:.
</p>
<ul class="list list-bullet">
<li>
your messages will be sent from 40604 (a shortcode thats
reserved for government use)
</li>
<li>
each message will begin with {{ current_service.name }}:
</li>
</ul>
<form method="post">
{{ textbox(
form.sms_sender,