mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 23:38:25 -04:00
Let users switch international letters on and off
We’ve decided that this feature should be self-service, and on by default for all users. Before we can make it on by default we should give users a way to switch it off for themselves. Which is what this PR does.
This commit is contained in:
@@ -665,6 +665,27 @@ def service_set_international_sms(service_id):
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/set-international-letters", methods=['GET', 'POST'])
|
||||
@user_has_permissions('manage_service')
|
||||
def service_set_international_letters(service_id):
|
||||
form = ServiceOnOffSettingForm(
|
||||
'Send letters to international addresses',
|
||||
enabled=current_service.has_permission('international_letters'),
|
||||
)
|
||||
if form.validate_on_submit():
|
||||
current_service.force_permission(
|
||||
'international_letters',
|
||||
on=form.enabled.data,
|
||||
)
|
||||
return redirect(
|
||||
url_for(".service_settings", service_id=service_id)
|
||||
)
|
||||
return render_template(
|
||||
'views/service-settings/set-international-letters.html',
|
||||
form=form,
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/set-inbound-sms", methods=['GET'])
|
||||
@user_has_permissions('manage_service')
|
||||
def service_set_inbound_sms(service_id):
|
||||
|
||||
Reference in New Issue
Block a user