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
|
||||
|
||||
mount_uploader :content, CerfaUploader
|
||||
validates :content, :file_size => {:maximum => 3.megabytes}
|
||||
validates :content, :file_size => {:maximum => 6.megabytes}
|
||||
|
||||
def empty?
|
||||
content.blank?
|
||||
|
|
|
@ -10,7 +10,7 @@ class PieceJustificative < ActiveRecord::Base
|
|||
alias_attribute :type, :type_de_piece_justificative_id
|
||||
|
||||
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
|
||||
|
||||
def empty?
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
-if @dossier.cerfa_available?
|
||||
%span.btn.btn-sm.btn-file.btn-success
|
||||
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
|
||||
%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|
|
||||
%tr
|
||||
|
@ -21,8 +21,8 @@
|
|||
%span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous.
|
||||
-else
|
||||
-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
|
||||
%span.btn.btn-sm.btn-file.btn-success
|
||||
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…
Reference in a new issue