mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user