Skip to content

Commit

Permalink
add choice type and dividers
Browse files Browse the repository at this point in the history
  • Loading branch information
markj0hnst0n committed Feb 17, 2025
1 parent 58cd3db commit 5172dd7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class FormSteps:
PRODUCT_CONTROLLED_UNDER_ITAR = "PRODUCT_CONTROLLED_UNDER_ITAR"
PRODUCT_CONTROLLED_UNDER_ITAR_DETAILS = "PRODUCT_CONTROLLED_UNDER_ITAR_DETAILS"
PRODUCT_INCLUDE_CRYPTOGRAPHY = "PRODUCT_INCLUDE_CRYPTOGRAPHY"
PRODUCT_RATED_UNDER_MCTR = "PRODUCT_RATED_UNDER_MCTR"
PRODUCT_RATED_UNDER_MTCR = "PRODUCT_RATED_UNDER_MTCR"
PRODUCT_MANPAD = "PRODUCT_MANPAD"
PRODUCT_ELECTRONICMODDATA = "PRODUCT_ELECTRONICMODDATA"
PRODUCT_FUNDING = "PRODUCT_FUNDING"
Expand Down
33 changes: 17 additions & 16 deletions exporter/f680/application_sections/approval_details/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.db.models import TextChoices
from django.template.loader import render_to_string

from crispy_forms_gds.choices import Choice
from crispy_forms_gds.layout.content import HTML

from core.common.forms import BaseForm, TextChoice
Expand Down Expand Up @@ -269,19 +270,19 @@ def get_layout_fields(self):
)


class ProductRatedUnderMCTR(BaseForm):
class ProductRatedUnderMTCR(BaseForm):
class Layout:
TITLE = "Do you believe the item is rated under the Missile Technology Control Regime (MTCR)"
SUBMIT_BUTTON_TEXT = "Save and continue"

is_item_rated_under_mctr = forms.ChoiceField(
choices=(
("yes_mtcr_1", "Yes, the product is MTCR Category 1"),
("yes_mtcr_2", "Yes, the product is MTCR Category 2"),
("no_but_supports_mtcr_1", "No, but the item supports a MTCR Category 1 item"),
("no_but_supports_mtcr_2", "No, but the item supports a MTCR Category 2 item"),
("no", "No"),
("dont_know", "Don't know"),
Choice("yes_mtcr_1", "Yes, the product is MTCR Category 1"),
Choice("yes_mtcr_2", "Yes, the product is MTCR Category 2"),
Choice("no_but_supports_mtcr_1", "No, but the item supports a MTCR Category 1 item"),
Choice("no_but_supports_mtcr_2", "No, but the item supports a MTCR Category 2 item"),
Choice("no", "No", divider="Or"),
Choice("dont_know", "Don't know"),
),
widget=forms.RadioSelect,
label="Do you believe the item is rated under the Missile Technology Control Regime (MTCR)",
Expand All @@ -304,9 +305,9 @@ class Layout:

is_item_manpad = forms.ChoiceField(
choices=(
("Yes", "Yes, the product is a MANPAD"),
("No", "No, the product is not a MANPAD"),
("Don't Know", "Don't know"),
Choice("yes", "Yes, the product is a MANPAD"),
Choice("no", "No, the product is not a MANPAD", divider="Or"),
Choice("dont_know", "Don't know"),
),
widget=forms.RadioSelect,
label="Do you believe the item is a man-portable air defence system (MANPAD)?",
Expand All @@ -330,9 +331,9 @@ class Layout:

is_MOD_electronic_data_shared = forms.ChoiceField(
choices=(
("Yes", "Yes"),
("No", "No"),
("Don't Know", "Don't know"),
Choice("yes", "Yes"),
Choice("no", "No"),
Choice("dont_know", "Don't know"),
),
widget=forms.RadioSelect,
label=Layout.TITLE,
Expand Down Expand Up @@ -365,9 +366,9 @@ class Layout:

funding_source = forms.ChoiceField(
choices=(
("MOD", "MOD"),
("Part MOD", "Part MOD"),
("Private venture", "Private venture"),
Choice("mod", "MOD"),
Choice("part_mo", "Part MOD"),
Choice("private_venture", "Private venture"),
),
widget=forms.RadioSelect,
label="Who is funding the item?",
Expand Down
4 changes: 2 additions & 2 deletions exporter/f680/application_sections/approval_details/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ProductControlledUnderItar,
ProductControlledUnderItarDetails,
ProductIncludeCryptography,
ProductRatedUnderMCTR,
ProductRatedUnderMTCR,
ProductMANPADs,
ProductElectronicMODData,
ProductFunding,
Expand Down Expand Up @@ -43,7 +43,7 @@ class ProductInformationView(F680ApplicationSectionWizard):
(FormSteps.PRODUCT_CONTROLLED_UNDER_ITAR, ProductControlledUnderItar),
(FormSteps.PRODUCT_CONTROLLED_UNDER_ITAR_DETAILS, ProductControlledUnderItarDetails),
(FormSteps.PRODUCT_INCLUDE_CRYPTOGRAPHY, ProductIncludeCryptography),
(FormSteps.PRODUCT_RATED_UNDER_MCTR, ProductRatedUnderMCTR),
(FormSteps.PRODUCT_RATED_UNDER_MTCR, ProductRatedUnderMTCR),
(FormSteps.PRODUCT_MANPAD, ProductMANPADs),
(FormSteps.PRODUCT_ELECTRONICMODDATA, ProductElectronicMODData),
(FormSteps.PRODUCT_FUNDING, ProductFunding),
Expand Down

0 comments on commit 5172dd7

Please sign in to comment.