-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gps: Allow to register a new beneficiary
- Loading branch information
1 parent
51991ca
commit 1c5df7a
Showing
21 changed files
with
790 additions
and
143 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
htmx.onLoad((target) => { | ||
// Verify this override when Select2 is updated. | ||
// Overriding the noResults text is extraordinarily complicated. | ||
// https://github.com/select2/select2/issues/3799 | ||
const searchUserInputField = $("#js-search-user-input") | ||
const amdRequire = jQuery.fn.select2.amd.require; | ||
const Translation = amdRequire("select2/translation"); | ||
const frTranslations = Translation.loadPath("./i18n/fr"); | ||
searchUserInputField.select2({ | ||
placeholder: 'Jean DUPONT', | ||
escapeMarkup: function (markup) { return markup; }, | ||
language: { | ||
...frTranslations.dict, | ||
noResults: () => ` | ||
<div class="d-inline-flex w-100 mb-2"> | ||
<span class="text-muted d-block pe-1">Aucun résultat.</span> | ||
<a href="${searchUserInputField.data('noResultsUrl')}" class="link">Enregistrer un nouveau bénéficiaire</a> | ||
</div> | ||
`, | ||
}, | ||
}); | ||
searchUserInputField.on("select2:select", function (e) { | ||
const submit_button = $("#join_group_form .btn-primary.disabled"); | ||
submit_button.attr("disabled", false); | ||
submit_button.removeClass("disabled"); | ||
submit_button.attr("type", "submit"); // hack because button_forms.html don't allow easily to change it. | ||
}); | ||
searchUserInputField.on("select2:unselect", function (e) { | ||
const submit_button = $("#join_group_form .btn-primary"); | ||
submit_button.attr("disabled", true); | ||
submit_button.addClass("disabled"); | ||
}); | ||
}); |
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
19 changes: 17 additions & 2 deletions
19
itou/templates/apply/submit/create_or_update_job_seeker/step_1.html
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
28 changes: 25 additions & 3 deletions
28
itou/templates/apply/submit/create_or_update_job_seeker/step_2.html
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
28 changes: 25 additions & 3 deletions
28
itou/templates/apply/submit/create_or_update_job_seeker/step_3.html
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
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 @@ | ||
<div id="{{ id }}" class="modal fade" tabindex="-1" aria-hidden="true"> | ||
<div class="modal-dialog modal-dialog-centered"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h3 class="modal-title">{{ title }}</h3> | ||
</div> | ||
<div class="modal-body">{{ body }}</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-sm btn-outline-primary" data-bs-dismiss="modal">Retour</button> | ||
<a href="{{ confirm_url }}" class="btn btn-sm {{ confirm_class }}">{{ confirm_text }}</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.