mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-23 09:29:14 -04:00
Added Multiple SMS sender functionality
This commit is contained in:
@@ -505,6 +505,7 @@ class ServiceSmsSender(Form):
|
||||
Length(max=11, message="Enter 11 characters or fewer")
|
||||
]
|
||||
)
|
||||
is_default = BooleanField("Make this text message sender the default")
|
||||
|
||||
def validate_sms_sender(self, field):
|
||||
if field.data and not re.match(r'^[a-zA-Z0-9\s]+$', field.data):
|
||||
@@ -674,6 +675,19 @@ class PasswordFieldShowHasContent(StringField):
|
||||
widget = widgets.PasswordInput(hide_value=False)
|
||||
|
||||
|
||||
class ServiceInboundNumberForm(Form):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.inbound_number.choices = kwargs['inbound_number_choices']
|
||||
|
||||
inbound_number = RadioField(
|
||||
"Select your inbound number",
|
||||
validators=[
|
||||
DataRequired("Option must be selected")
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class ServiceInboundApiForm(Form):
|
||||
url = StringField("Inbound sms url",
|
||||
validators=[DataRequired(message='Can’t be empty'),
|
||||
|
||||
Reference in New Issue
Block a user