diff --git a/src/registrar/assets/src/js/getgov/domain-purpose-form.js b/src/registrar/assets/src/js/getgov/domain-purpose-form.js index fa13305b6..7cde5bc35 100644 --- a/src/registrar/assets/src/js/getgov/domain-purpose-form.js +++ b/src/registrar/assets/src/js/getgov/domain-purpose-form.js @@ -3,7 +3,6 @@ import { showElement } from './helpers.js'; export const domain_purpose_choice_callbacks = { 'new': { callback: function(value, element) { - console.log("Callback for new") //show the purpose details container showElement(element); // change just the text inside the em tag @@ -15,11 +14,10 @@ export const domain_purpose_choice_callbacks = { 'evidence user need for this new domain. ' + '*'; }, - element: document.getElementById('domain-purpose-details-container') + element: document.getElementById('purpose-details-container') }, 'redirect': { callback: function(value, element) { - console.log("Callback for redirect") // show the purpose details container showElement(element); // change just the text inside the em tag @@ -27,11 +25,10 @@ export const domain_purpose_choice_callbacks = { labelElement.innerHTML = 'Explain why a redirect is necessary. ' + '*'; }, - element: document.getElementById('domain-purpose-details-container') + element: document.getElementById('purpose-details-container') }, 'other': { callback: function(value, element) { - console.log("Callback for other") // Show the purpose details container showElement(element); // change just the text inside the em tag @@ -39,6 +36,6 @@ export const domain_purpose_choice_callbacks = { labelElement.innerHTML = 'Describe how this domain will be used. ' + '*'; }, - element: document.getElementById('domain-purpose-details-container') + element: document.getElementById('purpose-details-container') } } \ No newline at end of file diff --git a/src/registrar/assets/src/js/getgov/main.js b/src/registrar/assets/src/js/getgov/main.js index 184fd05cb..139c8484a 100644 --- a/src/registrar/assets/src/js/getgov/main.js +++ b/src/registrar/assets/src/js/getgov/main.js @@ -29,8 +29,8 @@ hookupYesNoListener("dotgov_domain-feb_naming_requirements", null, "domain-namin hookupCallbacksToRadioToggler("purpose-feb_purpose_choice", domain_purpose_choice_callbacks); -hookupYesNoListener("purpose-has_timeframe", "domain-timeframe-details-container", null); -hookupYesNoListener("purpose-is_interagency_initiative", "domain-interagency-initaitive-details-container", null); +hookupYesNoListener("purpose-has_timeframe", "purpose-timeframe-details-container", null); +hookupYesNoListener("purpose-is_interagency_initiative", "purpose-interagency-initaitive-details-container", null); initializeUrbanizationToggle(); @@ -56,4 +56,4 @@ initFormErrorHandling(); // Init the portfolio new member page initPortfolioMemberPageRadio(); initPortfolioNewMemberPageToggle(); -initAddNewMemberPageListeners(); +initAddNewMemberPageListeners(); \ No newline at end of file diff --git a/src/registrar/forms/domainrequestwizard/purpose.py b/src/registrar/forms/domainrequestwizard/purpose.py index 52946a5e6..43dd62290 100644 --- a/src/registrar/forms/domainrequestwizard/purpose.py +++ b/src/registrar/forms/domainrequestwizard/purpose.py @@ -1,12 +1,17 @@ from django import forms from django.core.validators import MaxLengthValidator -from registrar.forms.utility.wizard_form_helper import BaseDeletableRegistrarForm, BaseYesNoForm, RegistrarForm +from registrar.forms.utility.wizard_form_helper import BaseDeletableRegistrarForm, BaseYesNoForm + class FEBPurposeOptionsForm(BaseDeletableRegistrarForm): field_name = "feb_purpose_choice" - form_choices = (("new", "Used for a new website"), ("redirect", "Used as a redirect for an existing website"), ("other", "Not for a website")) + form_choices = ( + ("new", "Used for a new website"), + ("redirect", "Used as a redirect for an existing website"), + ("other", "Not for a website"), + ) feb_purpose_choice = forms.ChoiceField( required=True, @@ -15,12 +20,13 @@ class FEBPurposeOptionsForm(BaseDeletableRegistrarForm): error_messages={ "required": "This question is required.", }, - label = "Select one" + label="Select one", ) + class PurposeDetailsForm(BaseDeletableRegistrarForm): - field_name="purpose" + field_name = "purpose" purpose = forms.CharField( label="Purpose", @@ -39,6 +45,7 @@ class PurposeDetailsForm(BaseDeletableRegistrarForm): error_messages={"required": "Describe how you’ll use the .gov domain you’re requesting."}, ) + class FEBTimeFrameYesNoForm(BaseDeletableRegistrarForm, BaseYesNoForm): """ Form for determining whether the domain request comes with a target timeframe for launch. @@ -73,6 +80,7 @@ class FEBTimeFrameDetailsForm(BaseDeletableRegistrarForm): error_messages={"required": "Provide details on your target timeframe."}, ) + class FEBInteragencyInitiativeYesNoForm(BaseDeletableRegistrarForm, BaseYesNoForm): """ Form for determining whether the domain request is part of an interagency initative. @@ -92,11 +100,7 @@ class FEBInteragencyInitiativeYesNoForm(BaseDeletableRegistrarForm, BaseYesNoFor class FEBInteragencyInitiativeDetailsForm(BaseDeletableRegistrarForm): interagency_initiative_details = forms.CharField( label="interagency_initiative_details", - widget=forms.Textarea( - attrs={ - "aria-label": "Name the agencies that will be involved in this initiative." - } - ), + widget=forms.Textarea(attrs={"aria-label": "Name the agencies that will be involved in this initiative."}), validators=[ MaxLengthValidator( 2000, @@ -104,4 +108,4 @@ class FEBInteragencyInitiativeDetailsForm(BaseDeletableRegistrarForm): ) ], error_messages={"required": "Name the agencies that will be involved in this initiative."}, - ) \ No newline at end of file + ) diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py index b45767598..b7aaff65d 100644 --- a/src/registrar/models/domain_request.py +++ b/src/registrar/models/domain_request.py @@ -53,7 +53,7 @@ class DomainRequest(TimeStampedModel): def get_status_label(cls, status_name: str): """Returns the associated label for a given status name""" return cls(status_name).label if status_name else None - + class FEBPurposeChoices(models.TextChoices): WEBSITE = "website" REDIRECT = "redirect" @@ -558,8 +558,6 @@ class DomainRequest(TimeStampedModel): help_text="Other domain names the creator provided for consideration", ) - - other_contacts = models.ManyToManyField( "registrar.Contact", blank=True, diff --git a/src/registrar/templates/domain_request_purpose.html b/src/registrar/templates/domain_request_purpose.html index a7d5ddbfd..fb5145476 100644 --- a/src/registrar/templates/domain_request_purpose.html +++ b/src/registrar/templates/domain_request_purpose.html @@ -7,6 +7,10 @@