Skip to content

Commit

Permalink
wip: activation
Browse files Browse the repository at this point in the history
  • Loading branch information
colinux committed May 29, 2024
1 parent 124b364 commit f28607f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def retrieve_attestation_template
end

def editor_params
params.required(:attestation_template).permit(:official_layout, :label_logo, :label_direction, :tiptap_body, :footer, :logo, :signature, :activated, :state)
params.required(:attestation_template).permit(:activated, :official_layout, :label_logo, :label_direction, :tiptap_body, :footer, :logo, :signature, :activated, :state)
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

.fr-col-12.fr-col-md-8.text-right

- if attestation_template.published?
- if attestation_template.published? && attestation_template.activated?
%p.fr-hint-text Cette attestation est actuellement délivrée aux usagers.

%span#autosave-notice
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@
L’attestation est émise au moment où un dossier est accepté, elle est jointe à l’email d’accusé d’acceptation.
Elle est également disponible au téléchargement depuis l’espace personnel de l’usager.

.fr-fieldset__element
.fr-toggle.fr-toggle--label-left
= f.check_box :activated, class: "fr-toggle__input", id: dom_id(@attestation_template, :activated)
%label.fr-toggle__label{ for: dom_id(@attestation_template, :activated), data: { fr_checked_label: "Activée", fr_unchecked_label: "Désactivée" } }
L’attestation est délivrée aux usagers.

.fr-fieldset__element
%h2.fr-h4 En-tête

.fr-fieldset__element
.fr-toggle.fr-toggle--label-left
= f.check_box :official_layout, class: "fr-toggle__input", id: dom_id(@attestation_template, :official_layout), data: { "attestation-target": "layoutToggle"}
%label.fr-toggle__label{ for: dom_id(@attestation_template, :official_layout), data: { fr_checked_label: "Activé", fr_unchecked_label: "Désactivé" } }
%label.fr-toggle__label{ for: dom_id(@attestation_template, :official_layout), data: { fr_checked_label: "Oui", fr_unchecked_label: "Non" } }
Je souhaite générer une attestation à la charte de l’état (logo avec Marianne)

.fr-fieldset__element{ class: class_names("hidden" => !@attestation_template.official_layout?), data: { "attestation-target": 'logoMarianneLabelFieldset'} }
Expand Down

0 comments on commit f28607f

Please sign in to comment.