mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-08 14:14:27 -05:00
Services who are in alpha or building prototypes need a way of sending to any email address or phone number without having to sign the MOU. This commit adds a page where they can whitelist up to 5 email addresses and 5 phone numbers. It uses the ‘list entry’ UI pattern from the Digital Marketplace frontend toolkit [1] [2] [3]. I had to do some modification: - of the Javascript, to make it work with the GOV.UK Module pattern - of the template to make it work with WTForms - of the content security policy, because the list entry pattern uses Hogan[1], which needs to use `eval()` (this should be fine if we’re only allowing it for scripts that we serve) - of our SASS lint config, to allow browser-targeting mixins to come after normal rules (so that they can override them) This commit also adds a new form class to validate and populate the two whitelists. The validation is fairly rudimentary at the moment, and doesn’t highlight which item in the list has the error, but it’s probably good enough. The list can only be updated all-at-once, this is how it’s possible to remove items from the list without having to make multiple `POST` requests. 1.434ad30791/toolkit/templates/forms/list-entry.html2.434ad30791/toolkit/scss/forms/_list-entry.scss3.434ad30791/toolkit/javascripts/list-entry.js4. http://twitter.github.io/hogan.js/
31 lines
488 B
YAML
31 lines
488 B
YAML
options:
|
|
merge-default-rules: true
|
|
|
|
rules:
|
|
extends-before-mixins: 2
|
|
extends-before-declarations: 2
|
|
placeholder-in-extend: 2
|
|
mixins-before-declarations:
|
|
- 2
|
|
-
|
|
exclude:
|
|
- media
|
|
- ie-lte
|
|
no-warn: 1
|
|
no-debug: 1
|
|
no-ids: 1
|
|
no-important: 2
|
|
hex-notation:
|
|
- 2
|
|
-
|
|
style: uppercase
|
|
indentation:
|
|
- 2
|
|
-
|
|
size: 2
|
|
leading-zero: 0
|
|
nesting-depth: 0
|
|
property-sort-order: 0
|
|
shorthand-values: 0
|
|
variable-for-property: 0
|