26 lines
1.4 KiB
Text
26 lines
1.4 KiB
Text
|
- types_de_piece_justificative.each do |type_de_piece_justificative|
|
||
|
- type_de_piece_justificative.id.nil? ? object_for = "new_type_de_piece_justificative[#{index}]" : object_for = 'types_de_piece_justificative[]'
|
||
|
|
||
|
= f.fields_for object_for, type_de_piece_justificative do |ff|
|
||
|
.form-inline{id:"type_de_piece_justificative_#{type_de_piece_justificative.id || index}", class: 'type_de_piece_justificative', style: 'padding-bottom:8px'}
|
||
|
.form-group{ style: 'padding-right: 2%' }
|
||
|
%h4 Libellé
|
||
|
=ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé'
|
||
|
|
||
|
.form-group{ style: 'padding-right: 2%' }
|
||
|
%h4
|
||
|
Description
|
||
|
=ff.text_area :description, class: 'form-control description', placeholder: 'Description'
|
||
|
|
||
|
=ff.hidden_field '_destroy', value: 'false', class: 'destroy'
|
||
|
|
||
|
.form-group{ id: "delete_type_de_piece_justificative_#{type_de_piece_justificative.id || index}_button", style: ("display:none" if type_de_piece_justificative.id.nil?) }
|
||
|
%br
|
||
|
%button.form-control.btn.btn-danger.fa.fa-trash-o{type: 'button', id: "delete_type_de_piece_justificative_#{type_de_piece_justificative.id || index}_procedure"}
|
||
|
|
||
|
-if type_de_piece_justificative.id.nil?
|
||
|
.form-group#add_type_de_piece_justificative_button
|
||
|
%br
|
||
|
%button.form-control.btn.btn-success#add_type_de_piece_justificative_procedure{type: 'button'} Ajouter
|
||
|
|