mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
Allow excluding services from live services count
Adds a front end for: https://github.com/alphagov/notifications-api/pull/2417 > Sometimes we have to make a few services for what really is one > service, for example GOV.UK Pay and GOV.UK Pay Direct Debit. We also > have our own test services which aren’t included in the count of live > services. We currently count these as one service by not including > them in the beta partners spreadsheet.
This commit is contained in:
@@ -933,9 +933,13 @@ class OnOffField(RadioField):
|
||||
|
||||
class ServiceOnOffSettingForm(StripWhitespaceForm):
|
||||
|
||||
def __init__(self, name, *args, **kwargs):
|
||||
def __init__(self, name, *args, truthy='On', falsey='Off', **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.enabled.label.text = name
|
||||
self.enabled.choices = [
|
||||
(True, truthy),
|
||||
(False, falsey),
|
||||
]
|
||||
|
||||
enabled = OnOffField('Choices')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user