1. Guillaume Piot
  2. Cotidia Social Share


Guillaume Piot  committed 048ebec

Fixed share email template

  • Participants
  • Parent commits da3f653
  • Branches master

Comments (0)

Files changed (4)

File README.md

View file
 ### Share email
+Add the AJAX submission url to your patterns:
+	url(r'^share/', include('socialshare.urls', namespace='socialshare')),
+The html:
 	<a href="http://example.com/page-to-share" class="socialshare email">Share by email</a>
 The `href` attribute will be the URL that you would like to share.

File socialshare/templates/socialshare/_share_email.html

View file
     <div class="modal-content">
       <div class="modal-header">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
-        <h4 class="modal-title"{% trans "Share by email" %}</h4>
+        <h4 class="modal-title">{% trans "Share by email" %}</h4>
       <div class="modal-body">
         <form method="POST" action="{% url 'socialshare:social-share-email' %}" id="form-share-email">{% csrf_token %}

File socialshare/urls.py

View file
 urlpatterns = patterns('socialshare.views',
     url(r'^send-friend/$', 'share_email', name='social-share-email'),

File socialshare/views.py

View file
 			friend_email = form.cleaned_data['friend_email']
 			url = form.cleaned_data['url']
-			subject = _('Link referral from %s' % sender_name)
+			subject = 'Link referral from %s' % sender_name
 			context={'sender_name':sender_name, 'sender_email':sender_email, 'friend_name':friend_name, 'friend_email':friend_email, 'subject':subject, 'url':url} 
 			text_content = render_to_string('email/share_email.txt', context)
 			html_content = render_to_string('email/share_email.html', context)