add mailto
This commit is contained in:
parent
12760a43d7
commit
54b4679d19
8 changed files with 34 additions and 2 deletions
3
app/controllers/admin/commentaires_controller.rb
Normal file
3
app/controllers/admin/commentaires_controller.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
class Admin::CommentairesController < CommentairesController
|
||||
before_action :authenticate_user!
|
||||
end
|
|
@ -32,10 +32,15 @@ class Dossier < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def mailto
|
||||
"mailto:#{formulaire.email_contact}?subject=Demande%20de%20contact&body=Bonjour,%0A%0AJe%20vous%20informe%20que%20j'ai%20rempli%20le%20dossier%20sur%20admi_facile.%20Vous%20pouvez%20y%20acc%C3%A9der%20en%20suivant%20le%20lien%20suivant%20:%20%0Ahttps://admi_facile.apientreprise.fr/admin/dossiers/#{id}%20%0A%20Le%20num%C3%A9ro%20de%20mon%20dossier%20est%20le%20#{id}"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def build_default_cerfa
|
||||
build_cerfa
|
||||
true
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%br
|
||||
|
||||
%h4{style: 'margin-bottom:2%'} Nouveau
|
||||
= form_tag(url_for({controller: '/commentaires', action: :create}), class: 'form-inline', method: 'POST') do
|
||||
= form_tag(url_for({ controller: :commentaires, action: :create, dossier_id: @dossier.id }), class: 'form-inline', method: 'POST') do
|
||||
%input.form-control{:type => 'text', style: 'width: 30%; margin-bottom:2%', :id => 'email_commentaire', :name => 'email_commentaire', :value => @commentaire_email}
|
||||
%textarea.form-control{:id => 'texte_commentaire', :name => 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', maxlength: '255'}
|
||||
%br
|
||||
|
|
|
@ -20,4 +20,8 @@
|
|||
|
||||
= render partial: '/dossiers/infos_dossier'
|
||||
%br
|
||||
%a.btn.btn-success{ href: @dossier.mailto }
|
||||
Contacter l'administration
|
||||
|
||||
|
||||
= render partial: 'commentaires_flux'
|
Loading…
Add table
Add a link
Reference in a new issue