Save Champs value since description page
This commit is contained in:
parent
27dbd3a878
commit
6fbe735793
3 changed files with 29 additions and 1 deletions
|
@ -31,6 +31,11 @@ class Users::DescriptionController < UsersController
|
|||
cerfa.save
|
||||
end
|
||||
|
||||
@dossier.champs.each do |champ|
|
||||
champ.value = params[:champs]["'#{champ.id}'"]
|
||||
champ.save
|
||||
end
|
||||
|
||||
@dossier.pieces_justificatives.each do |piece_justificative|
|
||||
unless params["piece_justificative_#{piece_justificative.type}"].nil?
|
||||
piece_justificative.content = params["piece_justificative_#{piece_justificative.type}"]
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
= champ.libelle
|
||||
|
||||
-if champ.type_champs == 'textarea'
|
||||
%textarea.form-control{name:"champs[#{champ.id}]",
|
||||
%textarea.form-control{name:"champs['#{champ.id}']",
|
||||
placeholder: champ.libelle,
|
||||
id: "champs_#{champ.id}"}
|
||||
=champ.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue