-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2243 from uktrade/LTD_5653_DESNZ_multiple_licence…
…_conditions Ltd 5653 desnz multiple licence conditions
- Loading branch information
Showing
15 changed files
with
910 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from caseworker.advice import services | ||
|
||
|
||
def form_add_licence_conditions(step_name): | ||
"""Returns the boolean value for add_licence_conditions from the approval form""" | ||
|
||
def _get_form_field_boolean(wizard): | ||
cleaned_data = wizard.get_cleaned_data_for_step(step_name) | ||
return cleaned_data.get("add_licence_conditions", False) | ||
|
||
return _get_form_field_boolean | ||
|
||
|
||
def is_desnz_team(wizard): | ||
return wizard.caseworker["team"]["alias"] in services.DESNZ_TEAMS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from caseworker.advice.constants import AdviceSteps | ||
from core.wizard.payloads import MergingPayloadBuilder | ||
|
||
|
||
def get_cleaned_data(form): | ||
return form.cleaned_data | ||
|
||
|
||
class GiveApprovalAdvicePayloadBuilder(MergingPayloadBuilder): | ||
payload_dict = { | ||
AdviceSteps.RECOMMEND_APPROVAL: get_cleaned_data, | ||
AdviceSteps.LICENCE_CONDITIONS: get_cleaned_data, | ||
AdviceSteps.LICENCE_FOOTNOTES: get_cleaned_data, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.