mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Let users choose when to end a broadcast
Different emergencies will need broadcasts to last for a variable amount of time. We give users some control over this by letting them stop a broadcast early. But we should also let them set a maximum broadcast time, for: - when the duration of the danger is known - when the broadcast has been live long enough to alert everyone who needs to know about it This code re-uses the pattern for scheduling jobs, which has some constraints that are probably OK for now: - end time is limited to an hour - longest duration is 3 whole days (eg if you start broadcasting Friday you have the choice of Saturday, Sunday and all of Monday, up to midnight)
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
{% macro radio_select(
|
||||
field,
|
||||
hint=None,
|
||||
wrapping_class='form-group'
|
||||
wrapping_class='form-group',
|
||||
show_now_as_default=True
|
||||
) %}
|
||||
<div class="{{ wrapping_class }} {% if field.errors %} form-group-error{% endif %}">
|
||||
<fieldset>
|
||||
@@ -35,7 +36,7 @@
|
||||
</span>
|
||||
{% endif %}
|
||||
</legend>
|
||||
<div class="radio-select" data-module="radio-select" data-categories="{{ field.categories|join(',') }}">
|
||||
<div class="radio-select" data-module="radio-select" data-categories="{{ field.categories|join(',') }}" data-show-now-as-default="{{ show_now_as_default }}">
|
||||
<div class="radio-select-column">
|
||||
{% for option in field %}
|
||||
<div class="multiple-choice">
|
||||
|
||||
Reference in New Issue
Block a user