refresh list of pj when adding new one
This commit is contained in:
parent
bcf712828e
commit
bd5dc1e35a
5 changed files with 38 additions and 23 deletions
|
@ -1,16 +1,7 @@
|
|||
= form_for [:admin, @procedure], url: admin_procedure_pieces_justificatives_path(@procedure) , remote: true do |f|
|
||||
#liste_piece_justificative
|
||||
= render partial: 'fields', locals:{ types_de_piece_justificative: @procedure.types_de_piece_justificative, f: f }
|
||||
%hr
|
||||
|
||||
= f.fields_for :types_de_piece_justificative, types_de_piece_justificative 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'
|
||||
|
||||
-if ff.object.id.nil?
|
||||
.form-group#add_type_de_piece_justificative_button
|
||||
%br
|
||||
= f.submit('Ajouter la pièce')
|
||||
|
||||
#new_type_de_piece_justificative
|
||||
= render partial: 'fields', locals:{ types_de_piece_justificative: TypeDePieceJustificative.new, f: f }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue