lien_demarche not necessary to validate procedure

This commit is contained in:
Xavier J 2015-10-26 16:48:41 +01:00
parent f4db1a16f8
commit d75ed802d2
5 changed files with 17 additions and 4 deletions

View file

@ -5,5 +5,5 @@ class Procedure < ActiveRecord::Base
validates :libelle, presence: true, allow_blank: false, allow_nil: false
validates :description, presence: true, allow_blank: false, allow_nil: false
validates :lien_demarche, presence: true, allow_blank: false, allow_nil: false
#validates :lien_demarche, presence: true, allow_blank: false, allow_nil: false
end

View file

@ -8,7 +8,7 @@
=f.text_area :description, class: 'form-control', placeholder: 'Description'
.form-group{class: ('has-error' if @procedure.errors.messages[:lien_demarche])}
%h4 Lien Démarche*
%h4 Lien Démarche
=f.text_field :lien_demarche, class: 'form-control', placeholder: 'Lien Démarche'
.form-group{class: ('has-error' if @procedure.errors.messages[:organisation])}
@ -34,3 +34,8 @@
%br
%h4
Liste des pièces justificatives à fournir pour un dossier
%br
%div.small{style:'text-align:right'}
*Attributs obligatoires

View file

@ -3,5 +3,4 @@
#procedure_new.section.section-label
= form_for @procedure, url: {controller: 'admin/procedures', action: :create} do |f|
=render partial: 'informations', locals: {f: f}
%br
=f.submit 'Valider', class: 'btn btn-info', style: 'float:right'

View file

@ -4,5 +4,4 @@
#procedure_new.section.section-label
= form_for @procedure, url: {controller: 'admin/procedures', action: :update} do |f|
=render partial: 'informations', locals: {f: f}
%br
=f.submit 'Editer', class: 'btn btn-success', style: 'float:right'

View file

@ -30,5 +30,15 @@
= render "users/shared/links"
%div{style:'text-align:center'}
\-
%br
%a{href: '/gestionnaires/sign_in'}
= 'Gestionnaire'
%br
%a{href: '/administrateurs/sign_in'}
= 'Administrateur'