Merge branch 'develop' into staging
This commit is contained in:
commit
7d835b9fa1
3 changed files with 6 additions and 6 deletions
|
@ -3,7 +3,7 @@ class Cerfa < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
mount_uploader :content, CerfaUploader
|
mount_uploader :content, CerfaUploader
|
||||||
validates :content, :file_size => {:maximum => 3.megabytes}
|
validates :content, :file_size => {:maximum => 6.megabytes}
|
||||||
|
|
||||||
def empty?
|
def empty?
|
||||||
content.blank?
|
content.blank?
|
||||||
|
|
|
@ -10,7 +10,7 @@ class PieceJustificative < ActiveRecord::Base
|
||||||
alias_attribute :type, :type_de_piece_justificative_id
|
alias_attribute :type, :type_de_piece_justificative_id
|
||||||
|
|
||||||
mount_uploader :content, PieceJustificativeUploader
|
mount_uploader :content, PieceJustificativeUploader
|
||||||
validates :content, :file_size => {:maximum => 3.megabytes}
|
validates :content, :file_size => {:maximum => 6.megabytes}
|
||||||
validates :content, presence: true, allow_blank: false, allow_nil: false
|
validates :content, presence: true, allow_blank: false, allow_nil: false
|
||||||
|
|
||||||
def empty?
|
def empty?
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
-if @dossier.cerfa_available?
|
-if @dossier.cerfa_available?
|
||||||
%span.btn.btn-sm.btn-file.btn-success
|
%span.btn.btn-sm.btn-file.btn-success
|
||||||
Modifier
|
Modifier
|
||||||
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 3.megabytes }
|
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
||||||
-else
|
-else
|
||||||
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 3.megabytes }
|
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
||||||
|
|
||||||
- @dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
|
- @dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
|
||||||
%tr
|
%tr
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
%span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous.
|
%span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous.
|
||||||
-else
|
-else
|
||||||
-if @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id).nil?
|
-if @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id).nil?
|
||||||
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 3.megabytes
|
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes
|
||||||
-else
|
-else
|
||||||
%span.btn.btn-sm.btn-file.btn-success
|
%span.btn.btn-sm.btn-file.btn-success
|
||||||
Modifier
|
Modifier
|
||||||
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 3.megabytes
|
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes
|
||||||
|
|
Loading…
Add table
Reference in a new issue