2017-04-12 11:12:05 +02:00
|
|
|
.pieces-justificatives-fields
|
2017-03-29 14:38:54 +02:00
|
|
|
= f.fields_for :types_de_piece_justificative, types_de_piece_justificative, remote: true do |ff|
|
|
|
|
.form-inline
|
|
|
|
.form-group
|
|
|
|
%h4 Libellé
|
|
|
|
= ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé'
|
|
|
|
.form-group
|
|
|
|
%h4 Description
|
|
|
|
= ff.text_area :description, class: 'form-control description', placeholder: 'Description'
|
|
|
|
.form-group
|
|
|
|
%h4
|
|
|
|
Lien du formulaire vierge
|
|
|
|
%small
|
|
|
|
(optionel)
|
|
|
|
= ff.url_field :lien_demarche, class: 'form-control', placeholder: 'Lien du document vierge'
|
2015-11-20 14:17:38 +01:00
|
|
|
|
2016-06-08 16:45:18 +02:00
|
|
|
.form-group
|
2017-03-29 14:38:54 +02:00
|
|
|
= ff.hidden_field :order_place, value: ff.index
|
|
|
|
= ff.hidden_field :id
|
2018-01-11 19:04:39 +01:00
|
|
|
- if ff.object.id.present?
|
2017-03-29 14:38:54 +02:00
|
|
|
.form-group
|
|
|
|
%br
|
|
|
|
= ff.object.button_up(index: ff.index, url: move_up_admin_procedure_pieces_justificatives_path(@procedure, ff.index))
|
|
|
|
= ff.object.button_down(index: ff.index, url: move_down_admin_procedure_pieces_justificatives_path(@procedure, ff.index))
|
2016-06-08 16:45:18 +02:00
|
|
|
|
2017-03-29 14:38:54 +02:00
|
|
|
.form-group
|
|
|
|
%h4 Obligatoire ?
|
|
|
|
.center
|
|
|
|
= ff.check_box :mandatory
|
2015-11-20 15:33:03 +01:00
|
|
|
|
2017-03-29 14:38:54 +02:00
|
|
|
.form-group
|
|
|
|
%br
|
|
|
|
- if ff.object.id.nil?
|
|
|
|
= f.submit('Ajouter la pièce', class: 'btn btn-success', id: 'add_piece_justificative')
|
|
|
|
- else
|
|
|
|
= link_to("", admin_procedure_piece_justificative_path(@procedure, ff.object.id), method: :delete, remote: true, id: "delete_type_de_piece_justificative_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) )
|