Merge pull request #8784 from tchak/fix-use-required
fix(champ): use champ.required?
This commit is contained in:
commit
dcf1bcc16c
7 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
#{@champ.libelle}
|
||||
- if @champ.type_de_champ.mandatory?
|
||||
- if @champ.mandatory?
|
||||
%span.mandatory *
|
||||
|
||||
- if @champ.updated_at.present? && @seen_at.present?
|
||||
|
|
|
@ -1 +1 @@
|
|||
= @form.select :value, options, select_options, required: @champ.mandatory?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
= @form.select :value, options, select_options, required: @champ.required?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
|
|
|
@ -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.required?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }
|
||||
|
||||
- if @champ.drop_down_other?
|
||||
= render EditableChamp::DropDownOtherInputComponent.new(form: @form, champ: @champ)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%label.notice{ for: departement_input_id } Le département de l’EPCI
|
||||
= @form.select :code_departement, departement_options, departement_select_options, required: @champ.mandatory?, id: departement_input_id, class: "width-33-desktop width-100-mobile"
|
||||
= @form.select :code_departement, departement_options, departement_select_options, required: @champ.required?, id: departement_input_id, class: "width-33-desktop width-100-mobile"
|
||||
- if @champ.departement?
|
||||
= @form.select :value, epci_options, epci_select_options, required: @champ.mandatory?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
= @form.select :value, epci_options, epci_select_options, required: @champ.required?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.secondary{ class: @champ.has_secondary_options_for_primary? ? '' : 'hidden' }
|
||||
= @form.label :secondary_value, for: "#{@champ.input_id}-secondary" do
|
||||
- sanitize((@champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première") + (@champ.type_de_champ.mandatory? ? tag.span(' *', class: 'mandatory') : ''))
|
||||
- sanitize((@champ.drop_down_secondary_libelle.presence || "Valeur secondaire dépendant de la première") + (@champ.mandatory? ? tag.span(' *', class: 'mandatory') : ''))
|
||||
- if @champ.drop_down_secondary_description.present?
|
||||
.notice{ id: "#{@champ.describedby_id}-secondary" }= render SimpleFormatComponent.new(@champ.drop_down_secondary_description, allow_a: true)
|
||||
= @form.select :secondary_value,
|
||||
|
|
|
@ -1 +1 @@
|
|||
= @form.select :value, options, select_options, required: @champ.mandatory?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
= @form.select :value, options, select_options, required: @champ.required?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
|
|
|
@ -1 +1 @@
|
|||
= @form.select :value, options, select_options, required: @champ.mandatory?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
= @form.select :value, options, select_options, required: @champ.required?, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: "width-33-desktop width-100-mobile"
|
||||
|
|
Loading…
Add table
Reference in a new issue