diff --git a/app/mailers/question_mailer.rb b/app/mailers/question_mailer.rb new file mode 100755 index 0000000..3b98af9 --- /dev/null +++ b/app/mailers/question_mailer.rb @@ -0,0 +1,16 @@ +class QuestionMailer < ActionMailer::Base + default from: "contact@basiclabs.fr" + + # Subject can be set in your I18n file at config/locales/en.yml + # with the following lookup: + # + # en.question.deliver.subject + # + def send_contact(contact) + @contact = contact + + mail to: "contact@basiclabs.fr",:reply_to => @contact.email.to_s, :subject => "[Contact site]" + end + + +end diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index dd37e68..adfc497 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -97,23 +97,7 @@ =yield - #footer - .center - %h1 - Réalisons ensemble - %strong votre projet - ="!" - - %h2 - Posez votre question à un expert - - %br - - -@contact = @contact || Contact.new() - - .animated-block.contact_form#form - =render :partial => "public/contacts/form" - + .clear :scss diff --git a/app/views/public/contacts/_form.html.haml b/app/views/public/contacts/_form.html.haml index a4bc7fe..0af2716 100755 --- a/app/views/public/contacts/_form.html.haml +++ b/app/views/public/contacts/_form.html.haml @@ -1,38 +1,37 @@ - @contact = @contact || Contact.new -=semantic_form_for [:public, @contact], :remote => true do |f| - =f.inputs do +.animated-block.contact_form#form + =semantic_form_for [:public, @contact], :remote => true do |f| + =f.inputs do - =f.hidden_field :raison_id - =f.hidden_field :survey_set_id + =f.hidden_field :raison_id + =f.hidden_field :survey_set_id - =f.input :name, :label => false, :placeholder => qit("contact nom","Nom*") + =f.input :name, :label => false, :placeholder => qit("contact nom","Nom*") - =f.input :email, :label => false , :placeholder =>"Email" - =f.input :phone, :label => false, :placeholder => qit("contact tel","Téléphone") + =f.input :email, :label => false , :placeholder =>"Email" + =f.input :phone, :label => false, :placeholder => qit("contact tel","Téléphone") - =f.input :message, :label =>false , :placeholder => "Message" + =f.input :message, :label =>false , :placeholder => "Message" - %p{:style => "text-align:left;"} - Prenez connaissance de notre déclaration de protection des données - %br - En soumettant ce formulaire j'accepte que Basic utilise mes données pour me communiquer des informations sur ses domaines d’activités + %p{:style => "text-align:left;"} + En soumettant ce formulaire j'accepte que Basic me contacte - =f.submit "Envoyer", :class => "btn" + %center=f.submit "Envoyer", :class => "btn" - %br - %br + %br + %br diff --git a/app/views/public/contacts/_inline_thank.html.haml b/app/views/public/contacts/_inline_thank.html.haml index 383f14f..e69de29 100755 --- a/app/views/public/contacts/_inline_thank.html.haml +++ b/app/views/public/contacts/_inline_thank.html.haml @@ -1,4 +0,0 @@ -%div{:style => "text-align:center;max-width:400px;margin:auto;margin-top:30px"} - %p - Merci beaucoup pour votre demande, je vous recontacterai dans les meilleurs délais. - %p Muriel Arnal \ No newline at end of file diff --git a/app/views/public/contacts/_thank.html.haml b/app/views/public/contacts/_thank.html.haml index df5bd99..202e124 100755 --- a/app/views/public/contacts/_thank.html.haml +++ b/app/views/public/contacts/_thank.html.haml @@ -1,26 +1,6 @@ --if !@new_site - %div{:style => "text-align:center;"} - %h3 Merci pour votre message ! + + - %p Nous mettons tout en œuvre pour vous répondre dans les meilleurs délais. - %p L’équipe de 3P +%p Merci pour votre message, nous mettons tout en œuvre pour vous répondre dans les meilleurs délais. +%p L’équipe de Basic Labs --else - .title - -if @contact.raison_id == 2 || @contact.raison_id == 4 - =qit "contact-raison2-thank", "Merci pour votre message !" - -else - =qit "contact-raison3-thank", "Merci pour votre demande" - - - - .inner{:style => "text-align:center;"} - -if @contact.raison_id == 3 - %p.intro - =qit "contact-raison3-thank-s", "Nous vous enverrons ces documents dans les meilleurs délais." - -else - %p.intro - =qit "contact-raison-thank-s", "Nous vous contacterons dans les meilleurs délais." - - - \ No newline at end of file diff --git a/app/views/question_mailer/send_contact.html.haml b/app/views/question_mailer/send_contact.html.haml index af779b2..712b7e0 100755 --- a/app/views/question_mailer/send_contact.html.haml +++ b/app/views/question_mailer/send_contact.html.haml @@ -47,23 +47,6 @@ =simple_format @contact.message %hr -.row - -@contact.document_orders.each do |document_order| - -data_file = document_order.data_file - -if data_file.image_file - - .data_file#data_file{:id => data_file.token} - =image_tag "https://3p.quartz.xyz"+data_file.image_file.file.large.medium.small.thumb.url.to_s - - =data_file.title - %br - Quantité : - =document_order.qte - %br - %br - .clear{:style => "clear:both;"} - - :scss .data_file{ img{