From b3be667183f7cdcd5814bcfe1e93e6d94571f815 Mon Sep 17 00:00:00 2001 From: Kristina Yin Date: Tue, 21 Nov 2023 18:31:47 -0800 Subject: [PATCH] trying another way to get rid of asterisk in one-field forms --- src/registrar/forms/application_wizard.py | 6 +++++- src/registrar/templates/django/forms/label.html | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index aa763b534..ee0c19605 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -170,10 +170,14 @@ class TribalGovernmentForm(RegistrarForm): ) tribe_name = forms.CharField( - label="What is the name of the tribe you represent?", + label1="What is the name of the tribe you represent? " + label2="*", + label={label1+label2} error_messages={"required": "Enter the tribe you represent."}, ) + tribe_name.widget.attrs.update({"class": "no_asterisk"}) + def clean(self): """Needs to be either state or federally recognized.""" if not (self.cleaned_data["federally_recognized_tribe"] or self.cleaned_data["state_recognized_tribe"]): diff --git a/src/registrar/templates/django/forms/label.html b/src/registrar/templates/django/forms/label.html index 17d528d4e..9a6fcad69 100644 --- a/src/registrar/templates/django/forms/label.html +++ b/src/registrar/templates/django/forms/label.html @@ -7,4 +7,9 @@ {% else %} {{ field.label }} {% endif %} +