feat(autosave): conditional spinner on all manager champs
This commit is contained in:
parent
c6bdfc7401
commit
26236a11ba
8 changed files with 21 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
= @form.check_box :value,
|
||||
{ required: @champ.required?, id: @champ.input_id, checked: @champ.true?, aria: { describedby: @champ.describedby_id } },
|
||||
{ required: @champ.required?, id: @champ.input_id, checked: @champ.true?, aria: { describedby: @champ.describedby_id }, data: data_dependent_conditions },
|
||||
'true',
|
||||
'false'
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
aria: { describedby: @champ.describedby_id },
|
||||
step: :any,
|
||||
placeholder: "3.14",
|
||||
required: @champ.required?
|
||||
required: @champ.required?,
|
||||
data: data_dependent_conditions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- if @champ.options?
|
||||
- if @champ.render_as_radios?
|
||||
%fieldset.radios
|
||||
%fieldset.radios{ data: data_dependent_conditions }
|
||||
- @champ.enabled_non_empty_options.each do |option|
|
||||
%label
|
||||
= @form.radio_button :value, option
|
||||
|
@ -16,7 +16,7 @@
|
|||
= @form.radio_button :value, Champs::DropDownListChamp::OTHER, checked: @champ.other_value_present?
|
||||
Autre
|
||||
- else
|
||||
= @form.select :value, @champ.options_without_empty_value_when_mandatory(@champ.options), { selected: @champ.selected }, required: @champ.mandatory?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }
|
||||
= @form.select :value, @champ.options_without_empty_value_when_mandatory(@champ.options), { selected: @champ.selected }, required: @champ.mandatory?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, data: data_dependent_conditions
|
||||
|
||||
- if @champ.drop_down_other?
|
||||
= render EditableChamp::DropDownOtherInputComponent.new(form: @form, champ: @champ)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.drop_down_other{ class: @champ.other_value_present? ? '' : 'hidden' }
|
||||
.notice
|
||||
%p Veuillez saisir votre autre choix
|
||||
= @form.text_field :value_other, maxlength: 200, size: nil, disabled: !@champ.other_value_present?
|
||||
= @form.text_field :value_other, maxlength: 200, size: nil, disabled: !@champ.other_value_present?, data: data_dependent_conditions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- if @champ.options?
|
||||
- if @champ.render_as_checkboxes?
|
||||
= @form.collection_check_boxes(:value, @champ.enabled_non_empty_options, :to_s, :to_s) do |b|
|
||||
= @form.collection_check_boxes(:value, @champ.enabled_non_empty_options, :to_s, :to_s, data: data_dependent_conditions) do |b|
|
||||
- tag.div(class: 'editable-champ editable-champ-checkbox') do
|
||||
- b.label do
|
||||
- b.check_box({ multiple: true, checked: @champ&.selected_options&.include?(b.value), aria: { describedby: @champ.describedby_id } }) + b.text
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%fieldset.radios
|
||||
%fieldset.radios{ data: data_dependent_conditions }
|
||||
%label
|
||||
= @form.radio_button :value, true
|
||||
Oui
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue