Skip to content

Commit

Permalink
Merge branch 'dev' into LTD-5734-fix-serial-number-update-error
Browse files Browse the repository at this point in the history
  • Loading branch information
depsiatwal authored Dec 18, 2024
2 parents 7c9bbcb + d22bc81 commit 98e14ff
Show file tree
Hide file tree
Showing 66 changed files with 249 additions and 959 deletions.
2 changes: 1 addition & 1 deletion caseworker/cases/forms/attach_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def attach_documents_form(case_url):
def upload_document_form(queue_pk):
return Form(
UploadEnforcementXML.TITLE,
UploadEnforcementXML.DESCRIPTION,
"",
[
FileUpload(name="file"),
],
Expand Down
6 changes: 3 additions & 3 deletions caseworker/cases/forms/finalise_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def approve_licence_form(queue_pk, case_id, is_open_licence, editable_duration,
title=lite_content.lite_internal_frontend.advice.FinaliseLicenceForm.APPROVE_TITLE,
questions=[
DateInput(
description=lite_content.lite_internal_frontend.advice.FinaliseLicenceForm.DATE_DESCRIPTION,
description="For example, 27 3 2019",
title=lite_content.lite_internal_frontend.advice.FinaliseLicenceForm.DATE_TITLE,
prefix="",
),
Expand Down Expand Up @@ -48,9 +48,9 @@ def approve_licence_form(queue_pk, case_id, is_open_licence, editable_duration,

def deny_licence_form(queue_pk, case_id, is_open_licence, nlr):
if nlr:
description = lite_content.lite_internal_frontend.advice.FinaliseLicenceForm.NLR_DESCRIPTION
description = "You'll be informing the exporter that no licence is required"
else:
description = lite_content.lite_internal_frontend.advice.FinaliseLicenceForm.REFUSE_DESCRIPTION
description = "You'll be denying the case"

return Form(
title=lite_content.lite_internal_frontend.advice.FinaliseLicenceForm.FINALISE_TITLE,
Expand Down
2 changes: 1 addition & 1 deletion caseworker/cases/forms/generate_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def select_template_form(templates, back_url):
def select_addressee_form():
return Form(
title=GenerateDocumentsPage.AddresseeForm.TITLE,
description=GenerateDocumentsPage.AddresseeForm.DESCRIPTION,
description="",
questions=[Custom("components/addressee-table.html")],
default_button_name=letter_templates.LetterTemplatesPage.PickTemplate.BUTTON,
container="case",
Expand Down
2 changes: 1 addition & 1 deletion caseworker/cases/forms/move_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def move_case_form(request: HttpRequest, queue, case: dict):
return Form(
title=Manage.MoveCase.TITLE,
description=Manage.MoveCase.DESCRIPTION,
description="",
questions=[
Filter(),
Checkboxes("queues[]", get_queues(request, convert_to_options=True), filterable=True),
Expand Down
2 changes: 1 addition & 1 deletion caseworker/cases/forms/reissue_ogl_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def reissue_ogl_confirmation_form(case_id, queue_id):
return Form(
title=Manage.ReissueOGL.TITLE,
description=Manage.ReissueOGL.DESCRIPTION,
description="Doing so will allow the exporter to resume using this open general licence",
questions=[
RadioButtons(
name="confirm",
Expand Down
23 changes: 13 additions & 10 deletions caseworker/letter_templates/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
from caseworker.letter_templates.services import get_letter_layouts
from lite_forms.helpers import conditional

EDIT_LETTER_TEMPLATE_HINT = """Call it something that:<br /> • is easy to find<br />
• explains when to use this template<br>For example, 'Refuse a licence' """


def _letter_layout_options(request):
options = []
Expand Down Expand Up @@ -49,7 +52,7 @@ def add_letter_template(request):
forms=[
Form(
title=strings.LetterTemplates.AddLetterTemplate.Name.TITLE,
description=strings.LetterTemplates.AddLetterTemplate.Name.HINT,
description=EDIT_LETTER_TEMPLATE_HINT,
questions=[TextInput(name="name")],
back_link=BackLink(
strings.LetterTemplates.AddLetterTemplate.Name.BACK_LINK,
Expand All @@ -75,7 +78,7 @@ def add_letter_template(request):
is_application_case_types_only,
Form(
title=strings.LetterTemplates.EditLetterTemplate.Decisions.TITLE,
description=strings.LetterTemplates.EditLetterTemplate.Decisions.DESCRIPTION,
description="Select the decisions that apply to your template",
questions=[
Checkboxes(
name="decisions[]",
Expand All @@ -90,7 +93,7 @@ def add_letter_template(request):
),
Form(
title=strings.LetterTemplates.AddLetterTemplate.VisibleToExporter.TITLE,
description=strings.LetterTemplates.AddLetterTemplate.VisibleToExporter.DESCRIPTION,
description="Should documents created with this template be visible to exporters?",
questions=[
RadioButtons(
name="visible_to_exporter",
Expand All @@ -108,7 +111,7 @@ def add_letter_template(request):
),
Form(
title=strings.LetterTemplates.AddLetterTemplate.IncludeSignature.TITLE,
description=strings.LetterTemplates.AddLetterTemplate.IncludeSignature.DESCRIPTION,
description="",
questions=[
RadioButtons(
name="include_digital_signature",
Expand Down Expand Up @@ -138,25 +141,25 @@ def edit_letter_template(request, letter_template, case_type_options, decision_o
title=strings.LetterTemplates.EditLetterTemplate.TITLE % letter_template["name"],
questions=[
TextInput(
title=strings.LetterTemplates.EditLetterTemplate.Name.TITLE,
description=strings.LetterTemplates.EditLetterTemplate.Name.HINT,
title="Give your template a name",
description=EDIT_LETTER_TEMPLATE_HINT,
name="name",
),
Checkboxes(
title=strings.LetterTemplates.EditLetterTemplate.CaseTypes.TITLE,
title="When should someone use this template?",
name="case_types[]",
options=case_type_options,
classes=["govuk-checkboxes--small"],
),
Checkboxes(
title=strings.LetterTemplates.EditLetterTemplate.Decisions.TITLE,
description=strings.LetterTemplates.EditLetterTemplate.Decisions.DESCRIPTION,
title="Decisions (optional)",
description="Select the decisions that apply to your template",
name="decisions[]",
options=decision_options,
classes=["govuk-checkboxes--small"],
),
RadioButtonsImage(
title=strings.LetterTemplates.EditLetterTemplate.Layout.TITLE,
title="Choose a layout",
name="layout",
options=_letter_layout_options(request),
),
Expand Down
8 changes: 3 additions & 5 deletions caseworker/organisations/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,18 @@ def register_organisation_forms(request):
[
Form(
title=RegisterAnOrganisation.CommercialOrIndividual.TITLE,
description=RegisterAnOrganisation.CommercialOrIndividual.DESCRIPTION,
description="",
questions=[
RadioButtons(
name="type",
options=[
Option(
key="commercial",
value=RegisterAnOrganisation.CommercialOrIndividual.COMMERCIAL_TITLE,
description=RegisterAnOrganisation.CommercialOrIndividual.COMMERCIAL_DESCRIPTION,
),
Option(
key="individual",
value=RegisterAnOrganisation.CommercialOrIndividual.INDIVIDUAL_TITLE,
description=RegisterAnOrganisation.CommercialOrIndividual.INDIVIDUAL_DESCRIPTION,
),
],
)
Expand All @@ -65,7 +63,7 @@ def register_organisation_forms(request):
),
Form(
title=RegisterAnOrganisation.WhereIsTheExporterBased.TITLE,
description=RegisterAnOrganisation.WhereIsTheExporterBased.DESCRIPTION,
description="",
questions=[
RadioButtons(
name="location",
Expand Down Expand Up @@ -185,7 +183,7 @@ def create_admin_user_form():
TextInput(title="Contact telephone number", name="user.phone_number", optional=True),
],
default_button_name="Submit",
helpers=[HelpSection("Help", RegisterAnOrganisation.DEFAULT_USER)],
helpers=[HelpSection("Help", "This will be the default user for this organisation.")],
)


Expand Down
8 changes: 4 additions & 4 deletions caseworker/queues/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def new_queue_form(request):
return Form(
title=AddQueueForm.TITLE,
description=AddQueueForm.DESCRIPTION,
description="",
questions=[
TextInput(
title=AddQueueForm.Name.TITLE,
Expand All @@ -31,7 +31,7 @@ def new_queue_form(request):
),
Select(
title=AddQueueForm.CountersigningQueue.TITLE,
description=AddQueueForm.CountersigningQueue.DESCRIPTION,
description="",
options=get_queues(
request=request, disable_pagination=True, convert_to_options=True, users_team_first=True
),
Expand All @@ -55,7 +55,7 @@ def remove_current_queue_id(options, queue_id):
def edit_queue_form(request, queue_id):
return Form(
title=EditQueueForm.TITLE,
description=EditQueueForm.DESCRIPTION,
description="",
questions=[
TextInput(
title=EditQueueForm.Name.TITLE,
Expand All @@ -64,7 +64,7 @@ def edit_queue_form(request, queue_id):
),
Select(
title=EditQueueForm.CountersigningQueue.TITLE,
description=EditQueueForm.CountersigningQueue.DESCRIPTION,
description="",
options=remove_current_queue_id(
get_queues(
request=request, disable_pagination=True, convert_to_options=True, users_team_first=True
Expand Down
2 changes: 1 addition & 1 deletion caseworker/teams/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def add_team_form():
return Form(
title=AddTeamForm.TITLE,
description=AddTeamForm.DESCRIPTION,
description="",
questions=[
TextInput(title=AddTeamForm.Name.TITLE, description=AddTeamForm.Name.DESCRIPTION, name="name"),
RadioButtons(
Expand Down
2 changes: 1 addition & 1 deletion caseworker/templates/core/error.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% extends "error.html" %}

{% block description %}{{ description|markdown }}{% endblock %}
{% block description %}{{ description }}{% endblock %}
12 changes: 6 additions & 6 deletions caseworker/users/forms/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
def add_role(request: HttpRequest):
return Form(
title=AddRoleForm.TITLE,
description=AddRoleForm.DESCRIPTION,
description="",
questions=[
TextInput(title=AddRoleForm.ROLE_NAME, name="name"),
Checkboxes(
name="permissions[]",
options=get_permissions(request, True),
title=AddRoleForm.PERMISSION_CHECKBOXES_TITLE,
description=AddRoleForm.PERMISSION_CHECKBOXES_DESCRIPTION,
description="",
optional=True,
classes=["govuk-checkboxes--small"],
),
Checkboxes(
name="statuses[]",
options=get_statuses(request, True),
title=AddRoleForm.STATUSES_CHECKBOXES_TITLE,
description=AddRoleForm.STATUSES_CHECKBOXES_DESCRIPTION,
description="",
optional=True,
classes=["govuk-checkboxes--small"],
),
Expand All @@ -38,22 +38,22 @@ def add_role(request: HttpRequest):
def edit_role(request: HttpRequest):
return Form(
title=EditRoleForm.TITLE,
description=EditRoleForm.DESCRIPTION,
description="",
questions=[
TextInput(title=EditRoleForm.ROLE_NAME, name="name"),
Checkboxes(
name="permissions[]",
options=get_permissions(request, True),
title=EditRoleForm.PERMISSION_CHECKBOXES_TITLE,
description=EditRoleForm.PERMISSION_CHECKBOXES_DESCRIPTION,
description="",
optional=True,
classes=["govuk-checkboxes--small"],
),
Checkboxes(
name="statuses[]",
options=get_statuses(request, True),
title=AddRoleForm.STATUSES_CHECKBOXES_TITLE,
description=AddRoleForm.STATUSES_CHECKBOXES_DESCRIPTION,
description="",
optional=True,
classes=["govuk-checkboxes--small"],
),
Expand Down
1 change: 0 additions & 1 deletion ci.exporter.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ENVIRONMENT=local
TEST_TYPE_HEADLESS=False
LITE_E2E_HAWK_KEY=LITE_E2E_HAWK_KEY
STATICFILES_STORAGE=django.contrib.staticfiles.storage.StaticFilesStorage
FEATURE_FLAG_ONLY_ALLOW_SIEL=false
REDIS_URL=redis://redis:6379/exporter
NOTIFY_KEY="super-secret-gov-uk-api-key-that-is-quite-long-and-hence-this-text"
NOTIFY_FEEDBACK_TEMPLATE_ID="11111111-2222-3333-4444-555555555555"
Expand Down
2 changes: 1 addition & 1 deletion conf/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

LITE_API_AUTH_HEADER_NAME = "EXPORTER-USER-TOKEN"

FEATURE_FLAG_ONLY_ALLOW_SIEL = env.bool("FEATURE_FLAG_ONLY_ALLOW_SIEL", True)
FEATURE_FLAG_ONLY_ALLOW_SIEL = True
FEATURE_FLAG_ALLOW_CLC_QUERY_AND_PV_GRADING = env.bool("FEATURE_FLAG_ALLOW_CLC_QUERY_AND_PV_GRADING", False)

SPIRE_URL = "https://www.spire.trade.gov.uk/spire/fox/espire/LOGIN/login"
Expand Down
1 change: 0 additions & 1 deletion example.exporter.env
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ AUTHBROKER_LOW_SECURITY=True

STATICFILES_STORAGE=django.contrib.staticfiles.storage.StaticFilesStorage

FEATURE_FLAG_ONLY_ALLOW_SIEL=True
FEATURE_FLAG_GOVUK_SIGNIN_ENABLED=True
FEATURE_FLAG_ONLY_ALLOW_FIREARMS_PRODUCTS=True

Expand Down
4 changes: 3 additions & 1 deletion exporter/applications/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ def back_to_task_list(application_id):

def footer_label(application_id):
url = reverse("applications:task_list", kwargs={"pk": str(application_id)})
return Label(f'Or <a class="govuk-link" href="{url}">return to application overview</a>')
return Label(
f'Or <a class="govuk-link govuk-link--no-visited-state" rel="noreferrer noopener" target="_blank" href="{url}">return to application overview</a>'
)
14 changes: 7 additions & 7 deletions exporter/applications/forms/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ def application_copy_form(application_type=None):

def exhibition_details_form(application_id):
return Form(
title=strings.Exhibition.EXHIBITION_TITLE,
title="Exhibition details",
questions=[
TextInput(title=strings.Exhibition.TITLE, name="title"),
TextInput(title="Name", name="title"),
DateInput(
title=strings.Exhibition.FIRST_EXHIBITION_DATE,
description=strings.Exhibition.DATE_DESCRIPTION,
title="Exhibition start date",
description="Exhibition start date",
prefix="first_exhibition_date",
name="first_exhibition_date",
),
DateInput(
title=strings.Exhibition.REQUIRED_BY_DATE,
description=strings.Exhibition.DATE_DESCRIPTION,
title="Date the clearance is needed",
description="For example, 12 11 2020",
prefix="required_by_date",
name="required_by_date",
),
TextArea(
title=strings.Exhibition.REASON_FOR_CLEARANCE,
title="The reason the clearance is needed by this date",
name="reason_for_clearance",
optional=True,
extras={"max_length": 2000},
Expand Down
6 changes: 3 additions & 3 deletions exporter/applications/forms/countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def countries_form(request, application_id):
return Form(
title=strings.applications.DestinationForm.TITLE,
description=strings.applications.DestinationForm.DESCRIPTION,
description="",
questions=[
Filter(),
Checkboxes(
Expand All @@ -28,7 +28,7 @@ def countries_form(request, application_id):
def choose_contract_type_form():
return Form(
title=contractTypeStrings.ChooseContractTypeForm.TITLE,
description=contractTypeStrings.ChooseContractTypeForm.DESCRIPTION,
description="Examples of sectors and contract types are ‘army’, ‘registered firearm dealers’ and ‘for the exporters own use’.",
questions=[
RadioButtons(
"choice",
Expand All @@ -46,7 +46,7 @@ def choose_contract_type_form():
def contract_type_per_country_form(current_country, country_name):
return Form(
title=contractTypeStrings.AddContractTypesForm.TITLE + country_name,
description=contractTypeStrings.AddContractTypesForm.DESCRIPTION,
description="",
questions=[
HiddenField("countries", current_country),
Checkboxes(
Expand Down
6 changes: 3 additions & 3 deletions exporter/applications/forms/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def reference_name_form(application_id=None):
return Form(
title=applications.InitialApplicationQuestionsForms.ReferenceNameQuestion.TITLE,
description=applications.InitialApplicationQuestionsForms.ReferenceNameQuestion.DESCRIPTION,
description="Give the application a reference name so you can refer back to it when needed.",
questions=[
TextInput(name="name"),
],
Expand All @@ -20,7 +20,7 @@ def reference_name_form(application_id=None):
def firearms_form(application_id=None):
return Form(
title=applications.GoodsCategories.TITLE,
description=applications.GoodsCategories.DESCRIPTION,
description="",
questions=[
RadioButtons(
name="contains_firearm_goods",
Expand All @@ -38,7 +38,7 @@ def firearms_form(application_id=None):
def told_by_an_official_form(application_id=None):
return Form(
title=ExportLicenceQuestions.HaveYouBeenInformedQuestion.TITLE,
description=ExportLicenceQuestions.HaveYouBeenInformedQuestion.DESCRIPTION,
description="Give the application a reference name so you can refer back to it when needed.",
questions=[
RadioButtons(
name="have_you_been_informed",
Expand Down
Loading

0 comments on commit 98e14ff

Please sign in to comment.