-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DST-514/licensing grounds views (#18)
* Data model * Updating models * Migrations and tidying up user flows * Fix third party flows * Adding business employing individual view * Types of service * Services views * remove unneeded file * Squash migrations * Service views update * service views updates * case switch * remove migration * Choices field * remove unnecessary repeated code * recipients initial views * updating field sizes * Required fields on recipient models * Remove sanctions regimes unneeded js * Remove unneeded JS for sanctions regimes * Review comments * Licensing grounds views * squash migrations * Licesngin grounds with legal advisory * purpose of licesning * Edit comments * Add variable for clarity --------- Co-authored-by: Morgan Rees <[email protected]>
- Loading branch information
1 parent
84eb14e
commit ceca0db
Showing
6 changed files
with
177 additions
and
7 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
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
17 changes: 17 additions & 0 deletions
17
django_app/apply_for_a_licence/static/apply_for_a_licence/javascript/licensing_grounds.js
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,17 @@ | ||
document.addEventListener("DOMContentLoaded", function (event) { | ||
$(document).on('change', 'input[value="Unknown grounds"], input[value="None of these"]', function(){ | ||
if ($(this).is(':checked')) { | ||
// clear the other inputs | ||
$('input[name$="licensing_grounds"]').not($(this)).prop('checked', false); | ||
} | ||
}) | ||
|
||
$('.govuk-checkboxes__divider').prevAll().find('input[name$="licensing_grounds"]').on('change', function () { | ||
if ($(this).is(':checked')) { | ||
// clear the unknown grounds input or the none of these input | ||
$('input[name$="licensing_grounds"][value="Unknown grounds"]').prop('checked', false); | ||
$('input[name$="licensing_grounds"][value="None of these"]').prop('checked', false); | ||
} | ||
}); | ||
|
||
}); |
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