From 81bbd7d5ac4519c00251068cc32c179b093dc642 Mon Sep 17 00:00:00 2001 From: Nicolas VARROT Date: Thu, 29 Sep 2016 12:21:35 +0200 Subject: [PATCH] Bug fix --- app/mailers/admin_mailer.rb | 1 + app/views/public/documents/_document.html.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 35812e3..126b49a 100755 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -48,6 +48,7 @@ class AdminMailer < ApplicationMailer # a faire def customer_upload_document(admin, document, customer) @document = document + @customer = customer mail to: admin.email, subject: "Un client a renvoyé un document" end diff --git a/app/views/public/documents/_document.html.haml b/app/views/public/documents/_document.html.haml index a188e6d..c02d057 100755 --- a/app/views/public/documents/_document.html.haml +++ b/app/views/public/documents/_document.html.haml @@ -9,7 +9,7 @@ %td{style:"text-align:center"} -if !document.not_available? -if !document.returned_document? - = form_tag public_download_document_path(document.download_token), name: :returned_document, method: :post, multipart: true do + = form_tag upload_returned_public_accepted_offer_document_path(@accepted_offer, document), name: :returned_document, method: :post, multipart: true do %span.btn.btn-default.btn-file ="Ouvrir (PDF)" = file_field_tag :returned_document