Skip to content

Commit

Permalink
Add checkbox for reissue
Browse files Browse the repository at this point in the history
  • Loading branch information
pskl committed Nov 19, 2024
1 parent 4982a58 commit 14e1c79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
7 changes: 2 additions & 5 deletions app/helpers/home_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ def attributive_decisions_download_button
)
end

def attributive_decisions_reissue_button
def attributive_decisions_reissue_generation_form
return unless current_establishment.with_attributive_decisions?(selected_school_year)

button_to "Rééditer les décisions d'attribution",
school_year_establishment_reissue_attributive_decisions_path(selected_school_year, current_establishment),
method: :post,
class: "fr-btn fr-btn--tertiary"
render partial: "home/attributive_decision_reissue_form"
end

def attributive_decisions_generation_form
Expand Down
2 changes: 1 addition & 1 deletion app/views/classes/_attributive_decisions_panel.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
= attributive_decisions_generation_form
= attributive_decisions_download_button
- if current_establishment.with_attributive_decisions?(selected_school_year) && current_user.director?
= attributive_decisions_reissue_button
= attributive_decisions_reissue_generation_form
7 changes: 7 additions & 0 deletions app/views/home/_attributive_decision_reissue_form.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
= form_with method: :post, url: school_year_establishment_reissue_attributive_decisions_path(selected_school_year, current_establishment) do |form|
.fr-checkbox-group
= form.check_box :confirmed_director, checked: current_user.confirmed_director?
= form.label :confirmed_director, class: "fr-label" do
= t("panels.attributive_decisions.confirm_director").html_safe
.fr-text--sm.fr-mt-1w= confirmed_director_information
= form.submit "Rééditer les décisions d'attribution", class: "fr-btn fr-btn--secondary"

0 comments on commit 14e1c79

Please sign in to comment.