style(attestation): tools above editor
This commit is contained in:
parent
3492bf398f
commit
e34eca11e4
1 changed files with 8 additions and 9 deletions
|
@ -64,12 +64,19 @@
|
||||||
= render Dsfr::InputComponent.new(form: f, attribute: :label_direction, input_type: :text_area, required: false, opts: { rows: 2, data: { controller: :textarea, textarea_max_rows_value: 2 } }) do |c|
|
= render Dsfr::InputComponent.new(form: f, attribute: :label_direction, input_type: :text_area, required: false, opts: { rows: 2, data: { controller: :textarea, textarea_max_rows_value: 2 } }) do |c|
|
||||||
- c.with_hint { "Exemple: Direction interministérielle du numérique. 2 lignes maximum" }
|
- c.with_hint { "Exemple: Direction interministérielle du numérique. 2 lignes maximum" }
|
||||||
|
|
||||||
.fr-fieldset__element.fr-mt-2w
|
.fr-fieldset__element.fr-mt-3w
|
||||||
.fr-input-group{ class: class_names("fr-input-group--error" => f.object.errors.include?(:json_body)) }
|
.fr-input-group{ class: class_names("fr-input-group--error" => f.object.errors.include?(:json_body)) }
|
||||||
%label.fr-label.fr-h4
|
%label.fr-label.fr-h4
|
||||||
= AttestationTemplate.human_attribute_name :body
|
= AttestationTemplate.human_attribute_name :body
|
||||||
= render EditableChamp::AsteriskMandatoryComponent.new
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
||||||
|
|
||||||
|
.flex.flex-gap-2.fr-mb-2w
|
||||||
|
- @buttons.each do |buttons|
|
||||||
|
.flex.flex-gap-1
|
||||||
|
- buttons.each do |(label, action, icon)|
|
||||||
|
%button.fr-btn.fr-btn--secondary.fr-btn--sm{ type: 'button', title: label, class: icon == :hidden ? "hidden" : "fr-icon-#{icon}", data: { action: 'click->tiptap#menuButton', tiptap_target: 'button', tiptap_action: action } }
|
||||||
|
= label
|
||||||
|
|
||||||
#editor.editor{ data: { tiptap_target: 'editor' }, aria: { describedby: dom_id(f.object, "json-body-messages")} }
|
#editor.editor{ data: { tiptap_target: 'editor' }, aria: { describedby: dom_id(f.object, "json-body-messages")} }
|
||||||
= f.hidden_field :tiptap_body, data: { tiptap_target: 'input' }
|
= f.hidden_field :tiptap_body, data: { tiptap_target: 'input' }
|
||||||
|
|
||||||
|
@ -77,14 +84,6 @@
|
||||||
- if f.object.errors.include?(:json_body)
|
- if f.object.errors.include?(:json_body)
|
||||||
= render partial: "shared/errors_list", locals: { object: f.object, attribute: :json_body }
|
= render partial: "shared/errors_list", locals: { object: f.object, attribute: :json_body }
|
||||||
|
|
||||||
.fr-fieldset__element
|
|
||||||
.flex.flex-gap-2
|
|
||||||
- @buttons.each do |buttons|
|
|
||||||
.flex.flex-gap-1
|
|
||||||
- buttons.each do |(label, action, icon)|
|
|
||||||
%button.fr-btn.fr-btn--secondary.fr-btn--sm{ type: 'button', title: label, class: icon == :hidden ? "hidden" : "fr-icon-#{icon}", data: { action: 'click->tiptap#menuButton', tiptap_target: 'button', tiptap_action: action } }
|
|
||||||
= label
|
|
||||||
|
|
||||||
.fr-fieldset__element
|
.fr-fieldset__element
|
||||||
%p.fr-hint-text
|
%p.fr-hint-text
|
||||||
Tapez le caractère
|
Tapez le caractère
|
||||||
|
|
Loading…
Add table
Reference in a new issue