- Fix bug message erreur "Pas de dessin"

- Fix warning SIADETOKEN existant
This commit is contained in:
Xavier J 2015-08-12 10:38:34 +02:00
parent a8f9237ec1
commit 6e2c0f733c
4 changed files with 15 additions and 2 deletions

View file

@ -26,7 +26,7 @@ function get_ref_dossier (){
}
function submit_check_draw(e) {
if (window.featureCollection.features.length == 0) {
if (window.location.href.indexOf('carte') > -1 && window.featureCollection.features.length == 0) {
$("#flash_message").html('<div class="alert alert-danger">Un dessin est obligatoire.</div>');
e.preventDefault();
return false;

View file

@ -10,6 +10,7 @@ class Admin::DossierController < ApplicationController
@commentaires = @commentaires.all.decorate
@commentaire_email = current_user.email
@formulaire = RefFormulaire.find(@dossier.ref_formulaire)
@liste_pieces_jointes = RefPiecesJointe.get_liste_piece_jointe @dossier.ref_formulaire
@array_id_pj_valides = DossierPdf.get_array_id_pj_valid_for_dossier @dossier.id

View file

@ -17,6 +17,16 @@
%h3.text-info Liste des pièces jointes
%br
%table.table
-if @formulaire.lien_demarche != nil
%tr{id: "piece_jointe_0"}
%th{class:'col-lg-6'}
='CERFA'
%td.col-lg-4.col-md-4
- if @array_id_pj_valides.include?(0)
%a{ href: "#{@dossier.get_pj(0).ref_dossier_pdf}", target: '_blank' } Consulter
- else
= 'Pièce non fournie'
-@liste_pieces_jointes.each do |pj|
%tr{id: "piece_jointe_#{pj.id}"}
%th{class:'col-lg-6'}

View file

@ -54,7 +54,9 @@ class ActiveRecord::Base
end
end
SIADETOKEN = :valid_token
if !(defined? SIADETOKEN)
SIADETOKEN = :valid_token
end
include Warden::Test::Helpers