feat(procedure): update archiving to add closing reason and closing details
This commit is contained in:
parent
6651b36fe4
commit
74903d79bf
8 changed files with 136 additions and 21 deletions
|
@ -8,15 +8,21 @@
|
|||
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
|
||||
%h1= t('administrateurs.procedures.close.page_title')
|
||||
|
||||
%p= t('administrateurs.procedures.close.replacement_procedure_title')
|
||||
= render Dsfr::CalloutComponent.new(title: t("administrateurs.procedures.close.replacement_procedure_callout_title"), icon: "fr-fi-information-line") do |c|
|
||||
- c.with_body do
|
||||
= t('administrateurs.procedures.close.replacement_procedure_callout_content')
|
||||
|
||||
= form_tag admin_procedure_archive_path(@procedure), method: :put do
|
||||
= form_for @procedure, url: admin_procedure_archive_path(@procedure), method: :put, html: { "data-controller" => "closing-reason" } do |f|
|
||||
.fr-select-group
|
||||
= f.label :closing_reason, class: 'fr-label'
|
||||
= f.select :closing_reason, options_for_select(@closing_reason_options), {}, { class: 'fr-select', "data-closing-reason-target" => "closingReason" }
|
||||
- if @published_procedures.present?
|
||||
.fr-select-group
|
||||
= label_tag :new_procedure, class: 'fr-label' do
|
||||
= t('activerecord.attributes.procedure.new_procedure')
|
||||
= t('utils.no_mandatory')
|
||||
|
||||
= select_tag :new_procedure, options_for_select(@published_procedures), include_blank: true, class: 'fr-select'
|
||||
.fr-select-group#js_replaced_by_procedure_id{ "data-closing-reason-target" => "replacedByProcedureId" }
|
||||
= f.label :replaced_by_procedure_id, class: 'fr-label'
|
||||
= f.select :replaced_by_procedure_id, options_for_select(@published_procedures), { include_blank: "Sélectionnez la nouvelle démarche" }, { class: 'fr-select' }
|
||||
|
||||
.fr-input-group#js_closing_details{ "data-closing-reason-target" => "closingDetails" }
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :closing_details, input_type: :text_area, opts: { rows: '10', placeholder: t('activerecord.attributes.procedure.hints.closing_details_placeholder')}, required: false)
|
||||
|
||||
= submit_tag t('administrateurs.procedures.close.actions.close_procedure'), { class: "fr-btn", id: 'publish', data: { confirm: "Voulez-vous vraiment clore la démarche ? \nLes dossiers en cours pourront être instruits, mais aucun nouveau dossier ne pourra plus être déposé.", disable_with: "Archivage..."} }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue