Rename other "Admin" forms consistently

I've also tweaked some of the names to make them clearer e.g. that
the form is used to apply a change to a service.

I've constrained the scope of this change to avoid forms that may
be accessible by non-admins in the future.
This commit is contained in:
Ben Thorner
2022-03-15 10:50:18 +00:00
parent fa3e6435a6
commit f02c2b0b1d
6 changed files with 54 additions and 54 deletions

View File

@@ -18,11 +18,11 @@ from app import (
from app.extensions import redis_client
from app.main import main
from app.main.forms import (
AdminClearCacheForm,
AdminReturnedLettersForm,
BillingReportDateFilterForm,
ClearCacheForm,
DateFilterForm,
RequiredDateFilterForm,
ReturnedLettersForm,
)
from app.statistics_utils import (
get_formatted_percentage,
@@ -341,7 +341,7 @@ def platform_admin_list_complaints():
@main.route("/platform-admin/returned-letters", methods=["GET", "POST"])
@user_is_platform_admin
def platform_admin_returned_letters():
form = ReturnedLettersForm()
form = AdminReturnedLettersForm()
if form.validate_on_submit():
references = [
@@ -419,7 +419,7 @@ def clear_cache():
]),
])
form = ClearCacheForm()
form = AdminClearCacheForm()
form.model_type.choices = [
(key, key.replace('_', ' ').title()) for key in CACHE_KEYS