mmsc_app/app/views/public/comments/_form.html.haml
Nicolas Bally a6aa1f6074 Initial
2020-05-25 11:40:11 +02:00

103 lines
4.8 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-if !@new_site
.comment_form_container
%strong=qit "comment-add", "Ajouter un commentaire"
%p
=qit "comment-charte-label-1", "En déposant un commentaire j'accepte"
%a{:href =>"#", :onclick => "$(this).closest('p').next('div').toggle();return false;"}=qit "comment-charte-label-2", "la charte de modération"
=qit "comment-charte-label-3", "des commentaires."
.comment_rules_container{:onclick => "$(this).hide();"}
.inner
=qit "comment-charte" do
%strong Charte de modération des commentaires.
%p
Dans le cadre de notre éthique de non-violence, aucun commentaire incitant à la haine, injurieux, discriminatoire, diffamatoire ne sera publié ; de même ceux à caractère publicitaire et rédigés en langage SMS.
%p
Merci pour votre compréhension
%p
Léquipe de 3P
=semantic_form_for [:public,(@comment || Comment.new(:commentable_id => @article.id, :commentable_type => "Article", :newsletter => true))], :remote => true do |f|
=f.hidden_field :commentable_id
=f.hidden_field :commentable_type
=f.hidden_field :parent_id
=f.inputs do
=f.input :comment, :label => qit("comment-label-comment","Commentaire :")
%table{:style => "width:100%;"}
%tr
%td{:style => "width:50%;"}
=f.inputs do
=f.input :pseudo, :label => qit("comment-label-pseudo","Pseudo :")
=f.input :email, :label => qit("comment-label-email","Email :")
%td{:style => "text-align:center;"}
=f.inputs do
=f.input :newsletter, :label => qit("comment-label-newsletter","Recevoir la newsletter de 3P")
=link_to qit("comment-label-annuler","Annuler"), "#", :onclick => "$(this).closest('.comment_form_container').remove();return false;", :class => "cancel"
  
=f.submit qit("comment-label-envoyer","Envoyer"), :class => "btn"
-else
.comment_form_container
=semantic_form_for [:public,(@comment || Comment.new(:commentable_id => @article.id, :commentable_type => "Article", :newsletter => false))], :remote => true do |f|
=f.hidden_field :commentable_id
=f.hidden_field :commentable_type
=f.hidden_field :parent_id
=f.inputs do
%table{:style => "width:100%;"}
%tr
%td{:style => "width:50%;"}
=f.input :pseudo, :label => qit("comment-label-pseudo","Pseudo :")
%td
=f.input :email, :label => qit("comment-label-email","Email :")
%tr
%td{:colspan => 2}
=f.input :comment, :label => false, :placeholder => qit("Commentaire")
.legals
%p
=qit "comment-charte-label-1", "En déposant un commentaire j'accepte"
%a{:href =>"#", :onclick => "$(this).closest('p').next('div').toggle();return false;"}=qit "comment-charte-label-2", "la charte de modération"
=qit "comment-charte-label-3", "des commentaires."
.comment_rules_container{:onclick => "$(this).hide();", :style => "display:none"}
.inner
=qit "comment-charte" do
%strong Charte de modération des commentaires.
%p
Dans le cadre de notre éthique de non-violence, aucun commentaire incitant à la haine, injurieux, discriminatoire, diffamatoire ne sera publié ; de même ceux à caractère publicitaire et rédigés en langage SMS.
%p
Merci pour votre compréhension
%p
Léquipe de 3P
=f.input :newsletter, :label => qit("rgpd-consentement-newsletter","Je souhaite être tenu au courant des campagnes de 3P et participer à son combat et j'accepte de recevoir des appels aux dons de l'association.")
=f.input :rgdp, :label => qit("rgpd-consentement-commentaire","J'accepte que les informations saisies dans le formulaire soient enregistrées et utilisées par l'association dans le cadre du traitement de ma demande et je certifie avoir 16 ans ou plus.")
%p.rgpd_link_legals=qit "rgpd-detail-line", "Pour en savoir plus sur le traitement de vos données personnelles consultez le détail <a href='/fr/gestion-des-donnees-personnelles.html' target='_blank'>sur cette page</a>."
.cta{:style => "margin-top:-20px;"}
=f.submit qit("comment-label-envoyer","Envoyer"), :class => "btn"
.clear
:scss
.has-error{
color:red;
}