Rename branding forms to clarify who they're for

I've often struggled to find the form associated with a particular
page due to the overlapping names e.g. "SetEmailBranding" sounds
more like the radio button form a user sees than "BrandingOptions".

Almost every form in forms.py also ends with "Form", so this also
makes the branding forms consistent with that naming convention.
This commit is contained in:
Ben Thorner
2022-03-15 11:47:14 +00:00
parent bdcdfa6d0f
commit 26d1222f1c
5 changed files with 28 additions and 28 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ from notifications_python_client.errors import HTTPError
from app import letter_branding_client
from app.main import main
from app.main.forms import (
AdminEditLetterBrandingForm,
SearchByNameForm,
ServiceLetterBrandingDetails,
SVGFileUpload,
)
from app.s3_client.s3_logo_client import (
@@ -48,7 +48,7 @@ def update_letter_branding(branding_id, logo=None):
letter_branding = letter_branding_client.get_letter_branding(branding_id)
file_upload_form = SVGFileUpload()
letter_branding_details_form = ServiceLetterBrandingDetails(
letter_branding_details_form = AdminEditLetterBrandingForm(
name=letter_branding['name'],
)
@@ -123,7 +123,7 @@ def update_letter_branding(branding_id, logo=None):
@user_is_platform_admin
def create_letter_branding(logo=None):
file_upload_form = SVGFileUpload()
letter_branding_details_form = ServiceLetterBrandingDetails()
letter_branding_details_form = AdminEditLetterBrandingForm()
file_upload_form_submitted = file_upload_form.file.data
details_form_submitted = request.form.get('operation') == 'branding-details'