mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Allow platform admins to change daily message limit
One less thing we have to go into the database to do, and remember to manually clear the cache for after.
This commit is contained in:
@@ -36,6 +36,7 @@ from app.main.forms import (
|
||||
EstimateUsageForm,
|
||||
FreeSMSAllowance,
|
||||
LinkOrganisationsForm,
|
||||
MessageLimit,
|
||||
PreviewBranding,
|
||||
RenameServiceForm,
|
||||
SearchByNameForm,
|
||||
@@ -938,6 +939,23 @@ def set_free_sms_allowance(service_id):
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/set-message-limit", methods=['GET', 'POST'])
|
||||
@user_is_platform_admin
|
||||
def set_message_limit(service_id):
|
||||
|
||||
form = MessageLimit(message_limit=current_service.message_limit)
|
||||
|
||||
if form.validate_on_submit():
|
||||
current_service.update(message_limit=form.message_limit.data)
|
||||
|
||||
return redirect(url_for('.service_settings', service_id=service_id))
|
||||
|
||||
return render_template(
|
||||
'views/service-settings/set-message-limit.html',
|
||||
form=form,
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/set-email-branding", methods=['GET', 'POST'])
|
||||
@user_is_platform_admin
|
||||
def service_set_email_branding(service_id):
|
||||
|
||||
Reference in New Issue
Block a user