feat(attestation): can create an attestation v2
This commit is contained in:
parent
fd829351e8
commit
fe2661d37c
3 changed files with 6 additions and 2 deletions
|
@ -69,6 +69,10 @@ module Administrateurs
|
||||||
@attestation_template.update!(attestation_params)
|
@attestation_template.update!(attestation_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
@attestation_template.update!(editor_params)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def ensure_feature_active
|
def ensure_feature_active
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
%h2.fr-h6 En-tête
|
%h2.fr-h6 En-tête
|
||||||
|
|
||||||
.fr-fieldset__element{ class: class_names("hidden" => !@attestation_template.official_layout?), data: { "attestation-target": 'logoMarianneLabelFieldset'} }
|
.fr-fieldset__element{ class: class_names("hidden" => !@attestation_template.official_layout?), data: { "attestation-target": 'logoMarianneLabelFieldset'} }
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :label_logo, input_type: :text_area, required: false, opts: { rows: 3, data: { controller: :textarea, textarea_max_rows_value: 3 } }) do |c|
|
= render Dsfr::InputComponent.new(form: f, attribute: :label_logo, input_type: :text_area, required: @attestation_template.official_layout?, opts: { rows: 3, data: { controller: :textarea, textarea_max_rows_value: 3 } }) do |c|
|
||||||
- c.with_hint { "Exemple: Ministère de la Mer. 3 lignes maximum" }
|
- c.with_hint { "Exemple: Ministère de la Mer. 3 lignes maximum" }
|
||||||
|
|
||||||
.fr-fieldset__element{ data: { attestation_target: 'logoAttachmentFieldset' } }
|
.fr-fieldset__element{ data: { attestation_target: 'logoAttachmentFieldset' } }
|
||||||
|
|
|
@ -647,7 +647,7 @@ Rails.application.routes.draw do
|
||||||
get 'add_champ_engagement_juridique'
|
get 'add_champ_engagement_juridique'
|
||||||
end
|
end
|
||||||
|
|
||||||
resource :attestation_template_v2, only: [:show, :edit, :update]
|
resource :attestation_template_v2, only: [:show, :edit, :update, :create]
|
||||||
|
|
||||||
resource :dossier_submitted_message, only: [:edit, :update, :create]
|
resource :dossier_submitted_message, only: [:edit, :update, :create]
|
||||||
# ADDED TO ACCESS IT FROM THE IFRAME
|
# ADDED TO ACCESS IT FROM THE IFRAME
|
||||||
|
|
Loading…
Add table
Reference in a new issue