views: tell an attestation will be sent only if it is true
Previously the message stating "an attestation will be sent" was displayed even when the attestation was disabled.
This commit is contained in:
parent
17d8167390
commit
0064c2c610
2 changed files with 4 additions and 2 deletions
|
@ -6,8 +6,9 @@
|
|||
= form_tag(terminer_instructeur_dossier_path(dossier.procedure, dossier), remote: true, method: :post, class: 'form') do
|
||||
- if title == 'Accepter'
|
||||
= text_area :dossier, :motivation, class: 'motivation-text-area', placeholder: placeholder, required: false
|
||||
%p.help
|
||||
L'acceptation du dossier envoie automatiquement une attestation à l'usager.
|
||||
- if dossier.procedure.attestation_template&.activated?
|
||||
%p.help
|
||||
L'acceptation du dossier envoie automatiquement une attestation à l'usager.
|
||||
|
||||
- unspecified_attestation_champs = dossier.unspecified_attestation_champs
|
||||
- if unspecified_attestation_champs.present?
|
||||
|
|
|
@ -20,6 +20,7 @@ describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view
|
|||
end
|
||||
|
||||
context 'without an attestation preview' do
|
||||
it { expect(rendered).not_to have_text("envoie automatiquement une attestation") }
|
||||
it { expect(rendered).not_to have_text("Voir l'attestation") }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue