Skip to content

Commit

Permalink
job_seekers_views: better HTML rendering in the modal
Browse files Browse the repository at this point in the history
When finding a job seeker with their email address, and if the NIR was
filled in the previous step, a sentence is added to the "User found"
modal. This sentence is now better rendered (the final `.` was after a
newline, creating a space between the last word and the `.`).
  • Loading branch information
EwenKorr committed Feb 4, 2025
1 parent 95a3551 commit e2743a3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,26 @@ <h3 class="modal-title" id="email-confirmation-label">Email existant</h3>
</p>
{% if can_add_nir %}
<p>
En cliquant sur « Continuer », <b>vous acceptez que le numéro de sécurité sociale {{ nir|format_nir }} soit associé à ce
{{ is_gps|default:False|yesno:"bénéficiaire,candidat" }}
.</b>
</p>
{% endif %}
</div>
<div class="modal-footer">
En cliquant sur « Continuer », <b>vous acceptez que le numéro de sécurité sociale {{ nir|format_nir }} soit associé à ce {{ is_gps|default:False|yesno:"bénéficiaire,candidat" }}.</b>
</p>
{% endif %}
</div>
<div class="modal-footer">

{# Reload this page with a new form. #}
{% if is_gps|default:False %}
{% bootstrap_button "Suivre un autre bénéficiaire" button_type="submit" button_class="btn btn-sm btn-outline-primary" name="cancel" value="1" %}
{% else %}
{% bootstrap_button "Ce n'est pas mon candidat" button_type="submit" button_class="btn btn-sm btn-outline-primary" name="cancel" value="1" %}
{% endif %}
{# Go to the next step. #}
{% bootstrap_button "Continuer" button_type="submit" button_class="btn btn-sm btn-primary" name="confirm" value="1" %}
{# Reload this page with a new form. #}
{% if is_gps|default:False %}
{% bootstrap_button "Suivre un autre bénéficiaire" button_type="submit" button_class="btn btn-sm btn-outline-primary" name="cancel" value="1" %}
{% else %}
{% bootstrap_button "Ce n'est pas mon candidat" button_type="submit" button_class="btn btn-sm btn-outline-primary" name="cancel" value="1" %}
{% endif %}
{# Go to the next step. #}
{% bootstrap_button "Continuer" button_type="submit" button_class="btn btn-sm btn-primary" name="confirm" value="1" %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
</form>
{% endif %}
</form>
{% endblock %}

{% block script %}
Expand Down
2 changes: 1 addition & 1 deletion tests/gps/test_create_beneficiary.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def assert_contains_email_modal_gps(response, job_seeker, nir_to_add=None):
f"""
<p>
En cliquant sur « Continuer », <b>vous acceptez que le numéro de sécurité sociale
{format_nir(nir_to_add)} soit associé à ce bénéficiaire .</b>
{format_nir(nir_to_add)} soit associé à ce bénéficiaire.</b>
</p>
"""
if nir_to_add is not None
Expand Down
2 changes: 1 addition & 1 deletion tests/www/apply/test_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def assert_contains_email_modal_apply(response, job_seeker, with_personal_inform
f"""
<p>
En cliquant sur « Continuer », <b>vous acceptez que le numéro de sécurité sociale
{format_nir(nir_to_add)} soit associé à ce candidat .</b>
{format_nir(nir_to_add)} soit associé à ce candidat.</b>
</p>
"""
if nir_to_add is not None
Expand Down

0 comments on commit e2743a3

Please sign in to comment.