Skip to content

Commit

Permalink
Add F680 question to initial apply flow
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincarrogan committed Jan 21, 2025
1 parent 7699fd9 commit b929216
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 1 deletion.
2 changes: 2 additions & 0 deletions conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,5 @@ def show_toolbar(request):
GTM_ID = env.str("GTM_ID", default="")

GIT_COMMIT = env.str("GIT_COMMIT", default="")

FEATURE_FLAG_F680 = env.bool("FEATURE_FLAG_F680", default=False)
8 changes: 8 additions & 0 deletions exporter/apply_for_a_licence/forms/triage_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def opening_question():
"before you provide access to controlled technology, software or data."
),
),
Option(
key="f680",
value="MOD F680",
description=(
"Select if you need approval to release security classified products or information to foreign entities."
),
disabled=not settings.FEATURE_FLAG_F680,
),
Option(
key="transhipment",
value="Transhipment licence",
Expand Down
5 changes: 5 additions & 0 deletions exporter/apply_for_a_licence/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
path("export/", views.ExportLicenceQuestions.as_view(), name="export_licence_questions"),
]

if settings.FEATURE_FLAG_F680:
urlpatterns += [
path("f680/", views.F680Questions.as_view(), name="f680_questions"), # /PS-IGNORE
]

if not settings.FEATURE_FLAG_ONLY_ALLOW_SIEL:
urlpatterns += [
path("transhipment/", views.TranshipmentQuestions.as_view(), name="transhipment_questions"),
Expand Down
10 changes: 9 additions & 1 deletion exporter/apply_for_a_licence/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from django.urls import reverse_lazy, reverse
from django.views.generic import TemplateView
from django.views.generic import (
RedirectView,
TemplateView,
)

from exporter.applications.services import post_applications, post_open_general_licences_applications
from exporter.apply_for_a_licence.forms.open_general_licences import (
Expand Down Expand Up @@ -101,3 +104,8 @@ def get_success_url(self):
class OpenGeneralLicenceSubmit(LoginRequiredMixin, TemplateView):
def get(self, request, *args, **kwargs):
return open_general_licence_submit_success_page(request, **kwargs)


class F680Questions(LoginRequiredMixin, RedirectView): # /PS-IGNORE
def get_redirect_url(self, *args, **kwargs):
return reverse("f680:apply")
Empty file added exporter/f680/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions exporter/f680/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.urls import path

from . import views


app_name = "f680"

urlpatterns = [
path("apply/", views.ApplyView.as_view(), name="apply"),
]
7 changes: 7 additions & 0 deletions exporter/f680/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.http import HttpResponse
from django.views import View


class ApplyView(View):
def get(self, request, *args, **kwargs):
return HttpResponse("OK")
5 changes: 5 additions & 0 deletions exporter/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@
urlpatterns = [
path("__debug__/", include(debug_toolbar.urls)),
] + urlpatterns

if settings.FEATURE_FLAG_F680:
urlpatterns += [
path("f680/", include("exporter.f680.urls")),
]

0 comments on commit b929216

Please sign in to comment.