add E-Mail support via celery task, untested, closes #17
This commit is contained in:
		
							
								
								
									
										84
									
								
								passbook/core/templates/email/account_confirm.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								passbook/core/templates/email/account_confirm.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,84 @@ | ||||
| {% extends 'email/base.html' %} | ||||
|  | ||||
| {% load inline %} | ||||
| {% load i18n %} | ||||
|  | ||||
| {% block pre_header %} | ||||
| {% trans "We're thrilled to have you here! Get ready to dive into your new account." %} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block content %} | ||||
| <!-- HERO --> | ||||
| <tr> | ||||
|     <td bgcolor="#3625b7" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|         <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|             <tr> | ||||
|                 <td bgcolor="#566572" align="center" valign="top" | ||||
|                     style="padding: 40px 20px 20px 20px; border-radius: 4px 4px 0px 0px; color: #8F9BA3; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 48px; font-weight: 400; letter-spacing: 4px; line-height: 48px;"> | ||||
|                     <h1 style="font-size: 32px; font-weight: 400; margin: 0; color: #E9ECEF;">{% trans 'Welcome!' %} | ||||
|                     </h1> | ||||
|                 </td> | ||||
|             </tr> | ||||
|         </table> | ||||
|     </td> | ||||
| </tr> | ||||
| <!-- COPY BLOCK --> | ||||
| <tr> | ||||
|     <td bgcolor="#1b2a32" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|         <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|             <!-- COPY --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#566572" align="left" | ||||
|                     style="padding: 20px 30px 40px 30px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|                     <p style="margin: 0;"> | ||||
|                         {% trans "We're excited to have you get started. First, you need to confirm your account. Just press the button below."%} | ||||
|                     </p> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             <!-- BULLETPROOF BUTTON --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#566572" align="left"> | ||||
|                     <table width="100%" border="0" cellspacing="0" cellpadding="0"> | ||||
|                         <tr> | ||||
|                             <td bgcolor="#566572" align="center" style="padding: 20px 30px 60px 30px;"> | ||||
|                                 <table border="0" cellspacing="0" cellpadding="0"> | ||||
|                                     <tr> | ||||
|                                         <td align="center" style="border-radius: 3px;" bgcolor="#3625b7"><a | ||||
|                                                 href="{{ url }}" target="_blank" | ||||
|                                                 style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3625b7; display: inline-block;">{% trans 'Confirm Account' %}</a> | ||||
|                                         </td> | ||||
|                                     </tr> | ||||
|                                 </table> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </table> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             <!-- COPY --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#566572" align="left" | ||||
|                     style="padding: 0px 30px 0px 30px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|                     <p style="margin: 0;"> | ||||
|                         {% trans "If that doesn't work, copy and paste the following link in your browser:" %}</p> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             <!-- COPY --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#566572" align="left" | ||||
|                     style="padding: 20px 30px 20px 30px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|                     <p style="margin: 0;"><a href="{{ url }}" target="_blank" style="color: #3625b7;">{{ url }}</a></p> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             <!-- COPY --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#566572" align="left" | ||||
|                     style="padding: 0px 30px 20px 30px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|                     <p style="margin: 0;"> | ||||
|                         {% trans "If you have any questions, just reply to this email—we're always happy to help out." %} | ||||
|                     </p> | ||||
|                 </td> | ||||
|             </tr> | ||||
|         </table> | ||||
|     </td> | ||||
| </tr> | ||||
| {% endblock %} | ||||
							
								
								
									
										78
									
								
								passbook/core/templates/email/account_password_reset.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								passbook/core/templates/email/account_password_reset.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,78 @@ | ||||
| {% extends "email/base.html" %} | ||||
|  | ||||
| {% load utils %} | ||||
| {% load i18n %} | ||||
|  | ||||
| {% block pre_header %} | ||||
| {% trans "Looks like you tried signing in a few too many times. Let's see if we can get you back into your account." %} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block content %} | ||||
| {% config 'passbook.branding' as branding %} | ||||
| <!-- HERO --> | ||||
| <tr> | ||||
|   <td bgcolor="#7c72dc" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|     <table border="0" cellpadding="0" cellspacing="0" width="600" class="wrapper"> | ||||
|       <tr> | ||||
|         <td bgcolor="#ffffff" align="center" valign="top" style="padding: 40px 20px 20px 20px; border-radius: 4px 4px 0px 0px; color: #111111; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 48px; font-weight: 400; letter-spacing: 4px; line-height: 48px;"> | ||||
|           <h1 style="font-size: 48px; font-weight: 400; margin: 0;">{% trans 'Trouble signing in?' %}</h1> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </table> | ||||
|   </td> | ||||
| </tr> | ||||
| <!-- COPY BLOCK --> | ||||
| <tr> | ||||
|   <td bgcolor="#f4f4f4" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|     <table border="0" cellpadding="0" cellspacing="0" width="600" class="wrapper"> | ||||
|       <!-- COPY --> | ||||
|       <tr> | ||||
|         <td bgcolor="#ffffff" align="left" style="padding: 20px 30px 40px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|           <p style="margin: 0;">{% trans "Resetting your password is easy. Just press the button below and follow the instructions. We'll have you up and running in no time." %}</p> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <!-- BULLETPROOF BUTTON --> | ||||
|       <tr> | ||||
|         <td bgcolor="#ffffff" align="left"> | ||||
|           <table width="100%" border="0" cellspacing="0" cellpadding="0"> | ||||
|             <tr> | ||||
|               <td bgcolor="#ffffff" align="center" style="padding: 20px 30px 60px 30px;"> | ||||
|                 <table border="0" cellspacing="0" cellpadding="0"> | ||||
|                   <tr> | ||||
|                     <td align="center" style="border-radius: 3px;" bgcolor="#7c72dc"><a href="{{ url }}" target="_blank" style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #7c72dc; display: inline-block;">{% trans 'Reset Password' %}</a></td> | ||||
|                   </tr> | ||||
|                 </table> | ||||
|               </td> | ||||
|             </tr> | ||||
|           </table> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </table> | ||||
|   </td> | ||||
| </tr> | ||||
| <!-- COPY CALLOUT --> | ||||
| <tr> | ||||
|   <td bgcolor="#f4f4f4" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|     <table border="0" cellpadding="0" cellspacing="0" width="600" class="wrapper"> | ||||
|       <!-- HEADLINE --> | ||||
|       <tr> | ||||
|         <td bgcolor="#111111" align="left" style="padding: 40px 30px 20px 30px; color: #ffffff; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|           <h2 style="font-size: 24px; font-weight: 400; margin: 0;">{% trans 'Want a more secure account?' %}</h2> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <!-- COPY --> | ||||
|       <tr> | ||||
|         <td bgcolor="#111111" align="left" style="padding: 0px 30px 20px 30px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|           <p style="margin: 0;">{% trans 'We support two-factor authentication to help keep your information private.' %}</p> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <!-- COPY --> | ||||
|       <tr> | ||||
|         <td bgcolor="#111111" align="left" style="padding: 0px 30px 40px 30px; border-radius: 0px 0px 4px 4px; color: #666666; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|           <p style="margin: 0;"><a href="http://litmus.com" target="_blank" style="color: #7c72dc;">{% trans 'See how easy it is to get started' %}</a></p> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </table> | ||||
|   </td> | ||||
| </tr> | ||||
| {% endblock %} | ||||
							
								
								
									
										129
									
								
								passbook/core/templates/email/base.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								passbook/core/templates/email/base.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,129 @@ | ||||
| {% load inline %} | ||||
| {% load utils %} | ||||
| {% load static %} | ||||
| {% load i18n %} | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
| <head> | ||||
|     <title>{% config passbook.branding %}</title> | ||||
|     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|     <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||||
|     <style type="text/css"> | ||||
|         /* CLIENT-SPECIFIC STYLES */ | ||||
|         body, table, td, a { | ||||
|             -webkit-text-size-adjust: 100%; | ||||
|             -ms-text-size-adjust: 100%; | ||||
|         } | ||||
|  | ||||
|         table, td { | ||||
|             mso-table-lspace: 0pt; | ||||
|             mso-table-rspace: 0pt; | ||||
|         } | ||||
|  | ||||
|         img { | ||||
|             -ms-interpolation-mode: bicubic; | ||||
|         } | ||||
|  | ||||
|         /* RESET STYLES */ | ||||
|         img { | ||||
|             border: 0; | ||||
|             height: auto; | ||||
|             line-height: 100%; | ||||
|             outline: none; | ||||
|             text-decoration: none; | ||||
|         } | ||||
|  | ||||
|         table { | ||||
|             border-collapse: collapse !important; | ||||
|         } | ||||
|  | ||||
|         body { | ||||
|             height: 100% !important; | ||||
|             margin: 0 !important; | ||||
|             padding: 0 !important; | ||||
|             width: 100% !important; | ||||
|         } | ||||
|  | ||||
|         /* iOS BLUE LINKS */ | ||||
|         a[x-apple-data-detectors] { | ||||
|             color: inherit !important; | ||||
|             text-decoration: none !important; | ||||
|             font-size: inherit !important; | ||||
|             font-family: inherit !important; | ||||
|             font-weight: inherit !important; | ||||
|             line-height: inherit !important; | ||||
|         } | ||||
|  | ||||
|         /* ANDROID CENTER FIX */ | ||||
|         div[style*="margin: 16px 0;"] { | ||||
|             margin: 0 !important; | ||||
|         } | ||||
|     </style> | ||||
|     </head> | ||||
|  | ||||
|     <body style="background-color: #1b2a32; margin: 0 !important; padding: 0 !important;"> | ||||
|  | ||||
|         <!-- HIDDEN PREHEADER TEXT --> | ||||
|         <div style="display: none; font-size: 1px; color: #fefefe; line-height: 1px; font-family: 'Metropolis', Helvetica, Arial, sans-serif; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;"> | ||||
|             {% block pre_header %} | ||||
|             {% endblock %} | ||||
|         </div> | ||||
|  | ||||
|         <table border="0" cellpadding="0" cellspacing="0" width="100%"> | ||||
|             <!-- LOGO --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#3625b7" align="center"> | ||||
|                     <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|                         <tr> | ||||
|                             <td align="center" valign="top" style="padding: 40px 10px 40px 10px;"> | ||||
|                                 <a href="" target="_blank"> | ||||
|                                     <img alt="Logo" src="{% inline_static 'assets/dark.svg' %}" width="64" height="64" | ||||
|                                     style="display: block; width: 64px; max-width: 64px; min-width: 64px; font-family: 'Metropolis', Helvetica, Arial, sans-serif; color: #ffffff; font-size: 18px;" | ||||
|                                     border="0"> | ||||
|                                 </a> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </table> | ||||
|                 </td> | ||||
|             </tr> | ||||
|             {% block content %} | ||||
|             {% endblock %} | ||||
|             <!-- SUPPORT CALLOUT --> | ||||
|             <!-- <tr> | ||||
|                 <td bgcolor="#1b2a32" align="center" style="padding: 30px 10px 0px 10px;"> | ||||
|                     <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|                         HEADLINE | ||||
|                         <tr> | ||||
|                             <td bgcolor="#566572" align="center" style="padding: 30px 30px 30px 30px; border-radius: 4px 4px 4px 4px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|                                 <h2 style="font-size: 20px; font-weight: 400; color: ##E9ECEF; margin: 0;">Need more help?</h2> | ||||
|                                 <p style="margin: 0;"><a href="http://litmus.com" target="_blank" style="color: #3625b7;">We’re | ||||
|                                     here, ready to talk</a></p> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </table> | ||||
|                 </td> | ||||
|             </tr> --> | ||||
|             <!-- FOOTER --> | ||||
|             <tr> | ||||
|                 <td bgcolor="#1b2a32" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|                     <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|                         <!-- NAVIGATION --> | ||||
|                         <tr> | ||||
|                             <td bgcolor="#1b2a32" align="left" style="padding: 30px 30px 30px 30px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;"> | ||||
|                                 <p style="margin: 0;"> | ||||
|                                 </p> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                         <!-- ADDRESS --> | ||||
|                         <tr> | ||||
|                             <td bgcolor="#1b2a32" align="left" style="padding: 0px 30px 30px 30px; color: #E9ECEF; font-family: 'Metropolis', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;"> | ||||
|                                 <p style="margin: 0;"><a href="{% config 'passbook.branding' %}">{% config 'passbook.branding' %}</a></p> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     </table> | ||||
|                 </td> | ||||
|             </tr> | ||||
|         </table> | ||||
|     </body> | ||||
| </html> | ||||
							
								
								
									
										26
									
								
								passbook/core/templates/email/generic_email.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								passbook/core/templates/email/generic_email.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | ||||
| {% extends "email/base.html" %} | ||||
|  | ||||
| {% block content %} | ||||
| <tr> | ||||
|   <td bgcolor="#3625b7" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|     <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|       <tr> | ||||
|         <td bgcolor="#566572" align="center" valign="top" style="padding: 40px 20px 20px 20px; border-radius: 4px 4px 0px 0px; color: #8F9BA3; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 48px; font-weight: 400; letter-spacing: 4px; line-height: 48px;"> | ||||
|           <h1 style="font-size: 32px; font-weight: 400; margin: 0; color: #E9ECEF;">{{ title }}!</h1> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </table> | ||||
|   </td> | ||||
| </tr> | ||||
| <tr> | ||||
|   <td bgcolor="#1b2a32" align="center" style="padding: 0px 10px 0px 10px;"> | ||||
|     <table border="0" cellpadding="0" cellspacing="0" width="480"> | ||||
|       <tr> | ||||
|         <td bgcolor="#566572" align="left" style="padding: 20px 30px 40px 30px; color: #E9ECEF; font-family: 'Lato', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"> | ||||
|           <p style="margin: 0;">{{ body }}</p> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </table> | ||||
|   </td> | ||||
| </tr> | ||||
| {% endblock %} | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer