Merge pull request #144 from levivm/feature/new_digitalglarus
Fixed #2759 #2748 #2747 #2715 #2716 #2717
This commit is contained in:
		
				commit
				
					
						51d9214fb4
					
				
			
		
					 15 changed files with 819 additions and 14 deletions
				
			
		|  | @ -1,15 +1,29 @@ | ||||||
| from django.contrib import admin | from django.contrib import admin | ||||||
| from .models import Supporter, DGGallery, DGPicture, Booking, BookingPrice,\ | from .models import Supporter, DGGallery, DGPicture, Booking, BookingPrice,\ | ||||||
|     MembershipOrder, Membership, MembershipType, BookingOrder |     MembershipOrder, Membership, MembershipType, BookingOrder, BookingCancellation | ||||||
| 
 | 
 | ||||||
|  | from django.core.urlresolvers import reverse | ||||||
| from utils.models import ContactMessage | from utils.models import ContactMessage | ||||||
| # | from django.utils.html import format_html | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| class DGPictureInline(admin.StackedInline): | class DGPictureInline(admin.StackedInline): | ||||||
|     model = DGPicture |     model = DGPicture | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| class DGGalleryAdmin(admin.ModelAdmin): | class DGGalleryAdmin(admin.ModelAdmin): | ||||||
|     inlines = [DGPictureInline] |     inlines = [DGPictureInline] | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | class BookingCancellationAdmin(admin.ModelAdmin): | ||||||
|  |     list_display = ('id', 'get_order', 'created_at', 'required_refund', 'refund') | ||||||
|  | 
 | ||||||
|  |     def get_order(self, obj): | ||||||
|  |         order = obj.order | ||||||
|  |         order_url = reverse("admin:digitalglarus_bookingorder_change", args=[order.id]) | ||||||
|  |         return format_html("<a href='{url}'>{order_id}</a>", url=order_url, order_id=order.id) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| admin.site.register(DGGallery, DGGalleryAdmin) | admin.site.register(DGGallery, DGGalleryAdmin) | ||||||
| admin.site.register(ContactMessage) | admin.site.register(ContactMessage) | ||||||
| admin.site.register(Booking) | admin.site.register(Booking) | ||||||
|  | @ -18,3 +32,4 @@ admin.site.register(MembershipOrder) | ||||||
| admin.site.register(Membership) | admin.site.register(Membership) | ||||||
| admin.site.register(MembershipType) | admin.site.register(MembershipType) | ||||||
| admin.site.register(BookingOrder) | admin.site.register(BookingOrder) | ||||||
|  | admin.site.register(BookingCancellation, BookingCancellationAdmin) | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ from utils.models import BillingAddress | ||||||
| from utils.forms import LoginFormMixin, SignupFormMixin, BillingAddressForm | from utils.forms import LoginFormMixin, SignupFormMixin, BillingAddressForm | ||||||
| 
 | 
 | ||||||
| from .models import MembershipType, MembershipOrder | from .models import MembershipType, MembershipOrder | ||||||
| from .models import Booking | from .models import Booking, BookingOrder | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class LoginForm(LoginFormMixin): | class LoginForm(LoginFormMixin): | ||||||
|  | @ -74,6 +74,21 @@ class BookingBillingForm(BillingAddressForm): | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | class CancelBookingForm(forms.ModelForm): | ||||||
|  |     status = forms.CharField(widget=forms.HiddenInput(), required=False) | ||||||
|  | 
 | ||||||
|  |     class Meta: | ||||||
|  |         model = BookingOrder | ||||||
|  |         fields = ['status'] | ||||||
|  | 
 | ||||||
|  |     # def clean(self): | ||||||
|  |     #     booking = self.instance.booking | ||||||
|  |     #     days_to_start = (booking.start_date - datetime.today().date()).days | ||||||
|  |     #     if days_to_start < 7: | ||||||
|  |     #         raise forms.ValidationError("You can't cancel your booking") | ||||||
|  |     #     return self.cleaned_data | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| class BookingDateForm(forms.Form): | class BookingDateForm(forms.Form): | ||||||
|     start_date = forms.DateField(required=False, |     start_date = forms.DateField(required=False, | ||||||
|                                  widget=forms.TextInput(attrs={'id': 'booking-date-1', |                                  widget=forms.TextInput(attrs={'id': 'booking-date-1', | ||||||
|  |  | ||||||
							
								
								
									
										20
									
								
								digitalglarus/migrations/0023_bookingorder_status.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								digitalglarus/migrations/0023_bookingorder_status.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  | # Generated by Django 1.9.4 on 2016-11-25 03:04 | ||||||
|  | from __future__ import unicode_literals | ||||||
|  | 
 | ||||||
|  | from django.db import migrations, models | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  | 
 | ||||||
|  |     dependencies = [ | ||||||
|  |         ('digitalglarus', '0022_auto_20161023_0218'), | ||||||
|  |     ] | ||||||
|  | 
 | ||||||
|  |     operations = [ | ||||||
|  |         migrations.AddField( | ||||||
|  |             model_name='bookingorder', | ||||||
|  |             name='status', | ||||||
|  |             field=models.PositiveIntegerField(choices=[(1, 'Approved'), (2, 'Cancelled')], default=1), | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
							
								
								
									
										26
									
								
								digitalglarus/migrations/0024_bookingcancellation.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								digitalglarus/migrations/0024_bookingcancellation.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  | # Generated by Django 1.9.4 on 2016-12-02 02:22 | ||||||
|  | from __future__ import unicode_literals | ||||||
|  | 
 | ||||||
|  | from django.db import migrations, models | ||||||
|  | import django.db.models.deletion | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  | 
 | ||||||
|  |     dependencies = [ | ||||||
|  |         ('digitalglarus', '0023_bookingorder_status'), | ||||||
|  |     ] | ||||||
|  | 
 | ||||||
|  |     operations = [ | ||||||
|  |         migrations.CreateModel( | ||||||
|  |             name='BookingCancellation', | ||||||
|  |             fields=[ | ||||||
|  |                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||||||
|  |                 ('created_at', models.DateTimeField(auto_now=True)), | ||||||
|  |                 ('required_refund', models.BooleanField(default=True)), | ||||||
|  |                 ('refund', models.BooleanField(default=False)), | ||||||
|  |                 ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.BookingOrder')), | ||||||
|  |             ], | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
|  | @ -238,9 +238,18 @@ class Booking(models.Model): | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class BookingOrder(Ordereable, models.Model): | class BookingOrder(Ordereable, models.Model): | ||||||
|  | 
 | ||||||
|  |     APPROVED, CANCELLED = range(1, 3) | ||||||
|  | 
 | ||||||
|  |     STATUS_CHOICES = ( | ||||||
|  |         (APPROVED, 'Approved'), | ||||||
|  |         (CANCELLED, 'Cancelled') | ||||||
|  |     ) | ||||||
|  | 
 | ||||||
|     booking = models.OneToOneField(Booking) |     booking = models.OneToOneField(Booking) | ||||||
|     original_price = models.FloatField() |     original_price = models.FloatField() | ||||||
|     special_month_price = models.FloatField() |     special_month_price = models.FloatField() | ||||||
|  |     status = models.PositiveIntegerField(choices=STATUS_CHOICES, default=1) | ||||||
| 
 | 
 | ||||||
|     @classmethod |     @classmethod | ||||||
|     def user_has_not_bookings(cls, user): |     def user_has_not_bookings(cls, user): | ||||||
|  | @ -255,6 +264,30 @@ class BookingOrder(Ordereable, models.Model): | ||||||
|     def booking_days(self): |     def booking_days(self): | ||||||
|         return (self.booking.end_date - self.booking.start_date).days + 1 |         return (self.booking.end_date - self.booking.start_date).days + 1 | ||||||
| 
 | 
 | ||||||
|  |     def refund_required(self): | ||||||
|  |         days_to_start = (self.booking.start_date - datetime.today().date()).days | ||||||
|  |         return True if days_to_start < 7 else False | ||||||
|  | 
 | ||||||
|  |     def cancel(self): | ||||||
|  |         self.status = self.CANCELLED | ||||||
|  |         self.save() | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class BookingCancellation(models.Model): | ||||||
|  | 
 | ||||||
|  |     order = models.ForeignKey(BookingOrder) | ||||||
|  |     created_at = models.DateTimeField(auto_now=True) | ||||||
|  |     required_refund = models.BooleanField(default=True) | ||||||
|  |     refund = models.BooleanField(default=False) | ||||||
|  | 
 | ||||||
|  |     def __str__(self): | ||||||
|  |         return "Order: {} - Required Refund: {}".format(self.order.id, self.refund) | ||||||
|  | 
 | ||||||
|  |     @classmethod | ||||||
|  |     def create(cls, booking_order): | ||||||
|  |         required_refund = booking_order.refund_required() | ||||||
|  |         cls.objects.create(order=booking_order, required_refund=required_refund) | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| class Supporter(models.Model): | class Supporter(models.Model): | ||||||
|     name = models.CharField(max_length=200) |     name = models.CharField(max_length=200) | ||||||
|  |  | ||||||
|  | @ -20,11 +20,23 @@ | ||||||
|           <div class="payment-box"> |           <div class="payment-box"> | ||||||
|             <h2 class="section-heading payment-head">Your Booking Detail</h2> |             <h2 class="section-heading payment-head">Your Booking Detail</h2> | ||||||
|             <hr class="greyline-long"> |             <hr class="greyline-long"> | ||||||
|  |             {% bootstrap_form_errors form type='non_fields'%} | ||||||
|  |             {% if messages %} | ||||||
|  |                 <ul class="list-unstyled"> | ||||||
|  |                 {% for message in messages %} | ||||||
|  |                     <li>{{ message }}</li> | ||||||
|  |                 {% endfor %} | ||||||
|  |                 </ul> | ||||||
|  |             {% endif %} | ||||||
|  | 
 | ||||||
|             <h2 class="billing-head">Invoice<btn class="btn btn-primary btn-grey btn-edit  print hidden-print" data-print="price">Get PDF</btn></h2>                               |             <h2 class="billing-head">Invoice<btn class="btn btn-primary btn-grey btn-edit  print hidden-print" data-print="price">Get PDF</btn></h2>                               | ||||||
|                                 |                                 | ||||||
|             <h2 class="order-head">Order Number</h2> |             <h2 class="order-head">Order Number</h2> | ||||||
|             <h2 class="member-name">#{{order.id}}</h2> |             <h2 class="member-name">#{{order.id}}</h2> | ||||||
| 
 | 
 | ||||||
|  |             <h2 class="order-head">Status</h2> | ||||||
|  |             <h2 class="member-name">{{order.get_status_display}}</h2> | ||||||
|  |                                  | ||||||
|             <h2 class="order-head">Billed to :</h2> |             <h2 class="order-head">Billed to :</h2> | ||||||
|             <h2 class="history-name">{{user.name}}<br> |             <h2 class="history-name">{{user.name}}<br> | ||||||
|               {{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br> |               {{order.billing_address.street_address}},{{order.billing_address.postal_code}}<br> | ||||||
|  | @ -56,10 +68,52 @@ | ||||||
|             <p class=""> |             <p class=""> | ||||||
|               View my bookings <br/><a class="btn btn-primary btn-sm btn-blck "  href="{% url 'digitalglarus:booking_orders_list' %}">Go to my page</a>             |               View my bookings <br/><a class="btn btn-primary btn-sm btn-blck "  href="{% url 'digitalglarus:booking_orders_list' %}">Go to my page</a>             | ||||||
|             </p>  |             </p>  | ||||||
|  |             {% if not order.get_status_display == 'Cancelled' %} | ||||||
|  |             <form method="POST" action=""> | ||||||
|  |               {% csrf_token %}  | ||||||
|  |               <p class=""> | ||||||
|  |                 <input type="hidden" name="start_date" value="{{order.booking.start_date}}"> | ||||||
|  |                 <!-- <a class=""  href="{% url 'digitalglarus:booking_orders_list' %}" data-toggle="modal" data-target="#cancel-booking-modal">Cancel booking</a> --> | ||||||
|  |                 <button type="button" class="btn btn-edit btn-sm btn-blue" data-toggle="modal" data-target="#cancel-booking-modal">Cancel booking</button> | ||||||
|  |               </p> | ||||||
|  |                | ||||||
|  | 
 | ||||||
|  |               <div class="modal fade bs-example-modal-sm" id="cancel-booking-modal" tabindex="-1" role="dialog"> | ||||||
|  |                 <div class="modal-dialog" role="document"> | ||||||
|  |                   <div class="modal-content"> | ||||||
|  |                     <div class="modal-header"> | ||||||
|  |                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||||||
|  |                       <h4 class="modal-title">Cancel booking</h4> | ||||||
|  |                     </div> | ||||||
|  |                     <div class="modal-body"> | ||||||
|  |                       <p>Do you want to cancel your booking?</p> | ||||||
|  |                       <p> | ||||||
|  |                         Your booking is within 7 days. You may cancel your booking but the fees will not be refunded. Your booking can be only cancelled freely until 7 days before the booked date. | ||||||
|  |                       </p> | ||||||
|  |                     </div> | ||||||
|  |                     <div class="modal-footer text-center"> | ||||||
|  |                       <button type="button" class="btn btn-primary btn-grey" data-dismiss="modal">No</button> | ||||||
|  |                       <button type="submit" class="btn btn-primary">Yes</button> | ||||||
|  |                     </div> | ||||||
|  |                   </div><!-- /.modal-content --> | ||||||
|  |                 </div><!-- /.modal-dialog --> | ||||||
|  |               </div><!-- /.modal --> | ||||||
|  | 
 | ||||||
|  |             </form> | ||||||
|  |             {% endif %} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|           </div> |           </div> | ||||||
| 
 | 
 | ||||||
|     </div>               |     </div>               | ||||||
|       |       | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     <div class="col-xs-12 col-sm-4 col-lg-4 wow fadeInDown hidden-print">  |     <div class="col-xs-12 col-sm-4 col-lg-4 wow fadeInDown hidden-print">  | ||||||
|         <div class="order-summary"> |         <div class="order-summary"> | ||||||
|            <div class="header text-center"> |            <div class="header text-center"> | ||||||
|  |  | ||||||
|  | @ -0,0 +1,137 @@ | ||||||
|  | {% load static from staticfiles %} | ||||||
|  | <!-- Inliner Build Version 4380b7741bb759d6cb997545f3add21ad48f010b --> | ||||||
|  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||||||
|  | <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <head> | ||||||
|  | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||||||
|  | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||||
|  | <title>Oxygen Invoice</title> | ||||||
|  | </head> | ||||||
|  | <body bgcolor="#f7f7f7" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;"> | ||||||
|  | <style type="text/css"> | ||||||
|  | @media only screen and (max-width: 480px) { | ||||||
|  |   table[class*="container-for-gmail-android"] { | ||||||
|  |     min-width: 290px !important; width: 100% !important; | ||||||
|  |   } | ||||||
|  |   img[class="force-width-gmail"] { | ||||||
|  |     display: none !important; width: 0 !important; height: 0 !important; | ||||||
|  |   } | ||||||
|  |   table[class="w320"] { | ||||||
|  |     width: 320px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-left"] { | ||||||
|  |     width: 160px !important; padding-left: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-right"] { | ||||||
|  |     width: 160px !important; padding-right: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class="header-lg"] { | ||||||
|  |     font-size: 24px !important; padding-bottom: 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="content-padding"] { | ||||||
|  |     padding: 5px 0 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="button"] { | ||||||
|  |     padding: 5px 5px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="free-text"] { | ||||||
|  |     padding: 10px 18px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="mobile-hide-img"] { | ||||||
|  |     display: none !important; height: 0 !important; width: 0 !important; line-height: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class~="item"] { | ||||||
|  |     width: 140px !important; vertical-align: top !important; | ||||||
|  |   } | ||||||
|  |   td[class~="quantity"] { | ||||||
|  |     width: 50px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="price"] { | ||||||
|  |     width: 90px !important; | ||||||
|  |   } | ||||||
|  |   td[class="item-table"] { | ||||||
|  |     padding: 30px 20px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-left"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-right"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | <table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%" style="border-collapse: collapse !important; min-width: 600px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="left" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) repeat-x;" bgcolor="#ffffff"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |       <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; background: transparent;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td width="100%" height="80" valign="top" style="text-align: center; vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; line-height: 21px; background-color: #0f1221" align="center"> | ||||||
|  |             <!--[if gte mso 9]> | ||||||
|  |             <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:80px; v-text-anchor:middle;"> | ||||||
|  |               <v:fill type="tile" src="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" color="#ffffff" /> | ||||||
|  |               <v:textbox inset="0,0,0,0"> | ||||||
|  |             <![endif]--> | ||||||
|  |               <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |                 <table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle"> | ||||||
|  |                       <a href="{{base_url}}" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'digitalglarus/img/logo_white.svg' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a> | ||||||
|  |                     </td> | ||||||
|  |                     <td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right"> | ||||||
|  |                     </td> | ||||||
|  |                   </tr></table> | ||||||
|  | </center> | ||||||
|  |               <!--[if gte mso 9]> | ||||||
|  |               </v:textbox> | ||||||
|  |             </v:rect> | ||||||
|  |             <![endif]--> | ||||||
|  |             </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7; padding: 20px 0 5px;" class="content-padding" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="header-lg" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 32px; color: #4d4d4d; text-align: center; line-height: normal; font-weight: 700; padding: 35px 0 0;" align="center"> | ||||||
|  |               Your booking is cancelled. | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="free-text" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; width: 100% !important; padding: 40px 60px 20px;" align="center"> | ||||||
|  |              Your booking order from following dates has been cancelled. <br/> {{booking.start_date|date}} to {{booking.end_date|date}} <br/> | ||||||
|  |              You can book new dates by visiting our homepage,<br/> or simply clicking the button below.  | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="button" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 30px 0;" align="center"> | ||||||
|  |               <div style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <!--[if mso]> | ||||||
|  |                 <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f"> | ||||||
|  |                   <w:anchorlock/> | ||||||
|  |                   <center style="color:#ffffff;font-family:Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;">My Account</center> | ||||||
|  |                 </v:roundrect> | ||||||
|  |               <![endif]--><a href="{{ base_url }}{% url 'digitalglarus:booking' %}" style="border-radius: 2px; color: #ffffff; display: inline-block; font-family: 'Montserrat', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 13px; font-weight: 600; line-height: 37px; text-align: center; text-decoration: none !important; width: 120px; -webkit-text-size-adjust: none; mso-hide: all; background: #5699b9;">BOOK A DATE</a> | ||||||
|  | </div> | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | </table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="height: 100px; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7;" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 15px; color: #777777; text-align: center; line-height: 21px;;" align="center"> | ||||||
|  |               <strong style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">Your Digital Glarus Team</strong><br style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | </table> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,137 @@ | ||||||
|  | {% load static from staticfiles %} | ||||||
|  | <!-- Inliner Build Version 4380b7741bb759d6cb997545f3add21ad48f010b --> | ||||||
|  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||||||
|  | <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <head> | ||||||
|  | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||||||
|  | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||||
|  | <title>Oxygen Invoice</title> | ||||||
|  | </head> | ||||||
|  | <body bgcolor="#f7f7f7" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;"> | ||||||
|  | <style type="text/css"> | ||||||
|  | @media only screen and (max-width: 480px) { | ||||||
|  |   table[class*="container-for-gmail-android"] { | ||||||
|  |     min-width: 290px !important; width: 100% !important; | ||||||
|  |   } | ||||||
|  |   img[class="force-width-gmail"] { | ||||||
|  |     display: none !important; width: 0 !important; height: 0 !important; | ||||||
|  |   } | ||||||
|  |   table[class="w320"] { | ||||||
|  |     width: 320px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-left"] { | ||||||
|  |     width: 160px !important; padding-left: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-right"] { | ||||||
|  |     width: 160px !important; padding-right: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class="header-lg"] { | ||||||
|  |     font-size: 24px !important; padding-bottom: 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="content-padding"] { | ||||||
|  |     padding: 5px 0 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="button"] { | ||||||
|  |     padding: 5px 5px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="free-text"] { | ||||||
|  |     padding: 10px 18px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="mobile-hide-img"] { | ||||||
|  |     display: none !important; height: 0 !important; width: 0 !important; line-height: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class~="item"] { | ||||||
|  |     width: 140px !important; vertical-align: top !important; | ||||||
|  |   } | ||||||
|  |   td[class~="quantity"] { | ||||||
|  |     width: 50px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="price"] { | ||||||
|  |     width: 90px !important; | ||||||
|  |   } | ||||||
|  |   td[class="item-table"] { | ||||||
|  |     padding: 30px 20px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-left"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-right"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | <table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%" style="border-collapse: collapse !important; min-width: 600px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="left" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) repeat-x;" bgcolor="#ffffff"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |       <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; background: transparent;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td width="100%" height="80" valign="top" style="text-align: center; vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; line-height: 21px; background-color: #0f1221" align="center"> | ||||||
|  |             <!--[if gte mso 9]> | ||||||
|  |             <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:80px; v-text-anchor:middle;"> | ||||||
|  |               <v:fill type="tile" src="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" color="#ffffff" /> | ||||||
|  |               <v:textbox inset="0,0,0,0"> | ||||||
|  |             <![endif]--> | ||||||
|  |               <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |                 <table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle"> | ||||||
|  |                       <a href="{{base_url}}" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'digitalglarus/img/logo_white.svg' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a> | ||||||
|  |                     </td> | ||||||
|  |                     <td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right"> | ||||||
|  |                     </td> | ||||||
|  |                   </tr></table> | ||||||
|  | </center> | ||||||
|  |               <!--[if gte mso 9]> | ||||||
|  |               </v:textbox> | ||||||
|  |             </v:rect> | ||||||
|  |             <![endif]--> | ||||||
|  |             </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7; padding: 20px 0 5px;" class="content-padding" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="header-lg" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 32px; color: #4d4d4d; text-align: center; line-height: normal; font-weight: 700; padding: 35px 0 0;" align="center"> | ||||||
|  |               Your booking is cancelled. | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="free-text" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; width: 100% !important; padding: 40px 60px 20px;" align="center"> | ||||||
|  |              Your booking order from following dates has been cancelled. <br/> {{booking.start_date|date}} to {{booking.end_date|date}} <br/> | ||||||
|  |              You can book new dates by visiting our homepage,<br/> or simply clicking the button below.  | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="button" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 30px 0;" align="center"> | ||||||
|  |               <div style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <!--[if mso]> | ||||||
|  |                 <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f"> | ||||||
|  |                   <w:anchorlock/> | ||||||
|  |                   <center style="color:#ffffff;font-family:Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;">My Account</center> | ||||||
|  |                 </v:roundrect> | ||||||
|  |               <![endif]--><a href="{{ base_url }}{% url 'digitalglarus:booking' %}" style="border-radius: 2px; color: #ffffff; display: inline-block; font-family: 'Montserrat', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 13px; font-weight: 600; line-height: 37px; text-align: center; text-decoration: none !important; width: 120px; -webkit-text-size-adjust: none; mso-hide: all; background: #5699b9;">BOOK A DATE</a> | ||||||
|  | </div> | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | </table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="height: 100px; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7;" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 15px; color: #777777; text-align: center; line-height: 21px;;" align="center"> | ||||||
|  |               <strong style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">Your Digital Glarus Team</strong><br style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | </table> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,136 @@ | ||||||
|  | {% load static from staticfiles %} | ||||||
|  | <!-- Inliner Build Version 4380b7741bb759d6cb997545f3add21ad48f010b --> | ||||||
|  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||||||
|  | <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <head> | ||||||
|  | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||||||
|  | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||||
|  | <title>Oxygen Invoice</title> | ||||||
|  | </head> | ||||||
|  | <body bgcolor="#f7f7f7" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;"> | ||||||
|  | <style type="text/css"> | ||||||
|  | @media only screen and (max-width: 480px) { | ||||||
|  |   table[class*="container-for-gmail-android"] { | ||||||
|  |     min-width: 290px !important; width: 100% !important; | ||||||
|  |   } | ||||||
|  |   img[class="force-width-gmail"] { | ||||||
|  |     display: none !important; width: 0 !important; height: 0 !important; | ||||||
|  |   } | ||||||
|  |   table[class="w320"] { | ||||||
|  |     width: 320px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-left"] { | ||||||
|  |     width: 160px !important; padding-left: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-right"] { | ||||||
|  |     width: 160px !important; padding-right: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class="header-lg"] { | ||||||
|  |     font-size: 24px !important; padding-bottom: 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="content-padding"] { | ||||||
|  |     padding: 5px 0 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="button"] { | ||||||
|  |     padding: 5px 5px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="free-text"] { | ||||||
|  |     padding: 10px 18px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="mobile-hide-img"] { | ||||||
|  |     display: none !important; height: 0 !important; width: 0 !important; line-height: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class~="item"] { | ||||||
|  |     width: 140px !important; vertical-align: top !important; | ||||||
|  |   } | ||||||
|  |   td[class~="quantity"] { | ||||||
|  |     width: 50px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="price"] { | ||||||
|  |     width: 90px !important; | ||||||
|  |   } | ||||||
|  |   td[class="item-table"] { | ||||||
|  |     padding: 30px 20px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-left"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-right"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | <table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%" style="border-collapse: collapse !important; min-width: 600px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="left" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) repeat-x;" bgcolor="#ffffff"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |       <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; background: transparent;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td width="100%" height="80" valign="top" style="text-align: center; vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; line-height: 21px; background-color: #0f1221" align="center"> | ||||||
|  |             <!--[if gte mso 9]> | ||||||
|  |             <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:80px; v-text-anchor:middle;"> | ||||||
|  |               <v:fill type="tile" src="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" color="#ffffff" /> | ||||||
|  |               <v:textbox inset="0,0,0,0"> | ||||||
|  |             <![endif]--> | ||||||
|  |               <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |                 <table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle"> | ||||||
|  |                       <a href="{{base_url}}" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'digitalglarus/img/logo_white.svg' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a> | ||||||
|  |                     </td> | ||||||
|  |                     <td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right"> | ||||||
|  |                     </td> | ||||||
|  |                   </tr></table> | ||||||
|  | </center> | ||||||
|  |               <!--[if gte mso 9]> | ||||||
|  |               </v:textbox> | ||||||
|  |             </v:rect> | ||||||
|  |             <![endif]--> | ||||||
|  |             </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7; padding: 20px 0 5px;" class="content-padding" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="header-lg" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 32px; color: #4d4d4d; text-align: center; line-height: normal; font-weight: 700; padding: 35px 0 0;" align="center"> | ||||||
|  |               User {{user.name}}/{{user.email}} requested a booking cancellation | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="free-text" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; width: 100% !important; padding: 40px 60px 20px;" align="center"> | ||||||
|  |              {{user.name}} requested a booking cancellation from following dates. <br/> {{booking.start_date|date}} to {{booking.end_date|date}} <br/>  | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="button" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 30px 0;" align="center"> | ||||||
|  |               <div style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <!--[if mso]> | ||||||
|  |                 <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f"> | ||||||
|  |                   <w:anchorlock/> | ||||||
|  |                   <center style="color:#ffffff;font-family:Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;">My Account</center> | ||||||
|  |                 </v:roundrect> | ||||||
|  |               <![endif]--> | ||||||
|  | </div> | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | </table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="height: 100px; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7;" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 15px; color: #777777; text-align: center; line-height: 21px;;" align="center"> | ||||||
|  |               <strong style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">Your Digital Glarus Team</strong><br style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | </table> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,136 @@ | ||||||
|  | {% load static from staticfiles %} | ||||||
|  | <!-- Inliner Build Version 4380b7741bb759d6cb997545f3add21ad48f010b --> | ||||||
|  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||||||
|  | <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <head> | ||||||
|  | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||||||
|  | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||||
|  | <title>Oxygen Invoice</title> | ||||||
|  | </head> | ||||||
|  | <body bgcolor="#f7f7f7" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;"> | ||||||
|  | <style type="text/css"> | ||||||
|  | @media only screen and (max-width: 480px) { | ||||||
|  |   table[class*="container-for-gmail-android"] { | ||||||
|  |     min-width: 290px !important; width: 100% !important; | ||||||
|  |   } | ||||||
|  |   img[class="force-width-gmail"] { | ||||||
|  |     display: none !important; width: 0 !important; height: 0 !important; | ||||||
|  |   } | ||||||
|  |   table[class="w320"] { | ||||||
|  |     width: 320px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-left"] { | ||||||
|  |     width: 160px !important; padding-left: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class*="mobile-header-padding-right"] { | ||||||
|  |     width: 160px !important; padding-right: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class="header-lg"] { | ||||||
|  |     font-size: 24px !important; padding-bottom: 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="content-padding"] { | ||||||
|  |     padding: 5px 0 5px !important; | ||||||
|  |   } | ||||||
|  |   td[class="button"] { | ||||||
|  |     padding: 5px 5px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class*="free-text"] { | ||||||
|  |     padding: 10px 18px 30px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="mobile-hide-img"] { | ||||||
|  |     display: none !important; height: 0 !important; width: 0 !important; line-height: 0 !important; | ||||||
|  |   } | ||||||
|  |   td[class~="item"] { | ||||||
|  |     width: 140px !important; vertical-align: top !important; | ||||||
|  |   } | ||||||
|  |   td[class~="quantity"] { | ||||||
|  |     width: 50px !important; | ||||||
|  |   } | ||||||
|  |   td[class~="price"] { | ||||||
|  |     width: 90px !important; | ||||||
|  |   } | ||||||
|  |   td[class="item-table"] { | ||||||
|  |     padding: 30px 20px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-left"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  |   td[class="mini-container-right"] { | ||||||
|  |     padding: 0 15px 15px !important; display: block !important; width: 290px !important; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | <table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%" style="border-collapse: collapse !important; min-width: 600px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="left" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) repeat-x;" bgcolor="#ffffff"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |       <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; background: transparent;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td width="100%" height="80" valign="top" style="text-align: center; vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; line-height: 21px; background-color: #0f1221" align="center"> | ||||||
|  |             <!--[if gte mso 9]> | ||||||
|  |             <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:80px; v-text-anchor:middle;"> | ||||||
|  |               <v:fill type="tile" src="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" color="#ffffff" /> | ||||||
|  |               <v:textbox inset="0,0,0,0"> | ||||||
|  |             <![endif]--> | ||||||
|  |               <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |                 <table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle"> | ||||||
|  |                       <a href="{{base_url}}" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'digitalglarus/img/logo_white.svg' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a> | ||||||
|  |                     </td> | ||||||
|  |                     <td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right"> | ||||||
|  |                     </td> | ||||||
|  |                   </tr></table> | ||||||
|  | </center> | ||||||
|  |               <!--[if gte mso 9]> | ||||||
|  |               </v:textbox> | ||||||
|  |             </v:rect> | ||||||
|  |             <![endif]--> | ||||||
|  |             </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7; padding: 20px 0 5px;" class="content-padding" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="header-lg" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 32px; color: #4d4d4d; text-align: center; line-height: normal; font-weight: 700; padding: 35px 0 0;" align="center"> | ||||||
|  |               User {{user.name}}/{{user.email}} requested a booking cancellation | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="free-text" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; width: 100% !important; padding: 40px 60px 20px;" align="center"> | ||||||
|  |              {{user.name}} requested a booking cancellation from following dates. <br/> {{booking.start_date|date}} to {{booking.end_date|date}} <br/>  | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td class="button" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 30px 0;" align="center"> | ||||||
|  |               <div style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <!--[if mso]> | ||||||
|  |                 <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f"> | ||||||
|  |                   <w:anchorlock/> | ||||||
|  |                   <center style="color:#ffffff;font-family:Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;">My Account</center> | ||||||
|  |                 </v:roundrect> | ||||||
|  |               <![endif]--> | ||||||
|  | </div> | ||||||
|  |             </td> | ||||||
|  |           </tr> | ||||||
|  | </table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | <tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td align="center" valign="top" width="100%" style="height: 100px; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #f7f7f7;" bgcolor="#f7f7f7"> | ||||||
|  |       <center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  |         <table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Oxygen', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | <td style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 15px; color: #777777; text-align: center; line-height: 21px;;" align="center"> | ||||||
|  |               <strong style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">Your Digital Glarus Team</strong><br style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"> | ||||||
|  | </td> | ||||||
|  |           </tr></table> | ||||||
|  | </center> | ||||||
|  |     </td> | ||||||
|  |   </tr> | ||||||
|  | </table> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
|  | 
 | ||||||
|  | @ -71,7 +71,7 @@ | ||||||
|                                     </div> |                                     </div> | ||||||
|                                 </div> |                                 </div> | ||||||
|                                 <div class="row"> |                                 <div class="row"> | ||||||
|                                     <div class="col-xs-6 col-md-6 nopadding"> |                                     <div class="col-xs-12 col-md-6 nopadding"> | ||||||
|                                       <label for="expMonth">EXPIRATION DATE</label><br/> |                                       <label for="expMonth">EXPIRATION DATE</label><br/> | ||||||
|                                       <div class="col-xs-6 col-lg-6 col-md-6"> |                                       <div class="col-xs-6 col-lg-6 col-md-6"> | ||||||
|                                         <div class="form-group"> |                                         <div class="form-group"> | ||||||
|  | @ -84,13 +84,22 @@ | ||||||
|                                         </div> |                                         </div> | ||||||
|                                       </div> |                                       </div> | ||||||
|                                     </div> |                                     </div> | ||||||
|                                     <div class="col-xs-4 col-md-6 pull-right"> |                                     <div class="col-xs-12 col-md-6 pull-right"> | ||||||
|                                         <div class="form-group"> |                                         <div class="form-group"> | ||||||
|                                             <label for="cvCode">CV CODE</label> |                                             <label for="cvCode">CV CODE</label> | ||||||
|                                             <input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" /> |                                             <input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" /> | ||||||
|                                         </div> |                                         </div> | ||||||
|                                     </div> |                                     </div> | ||||||
|  | 
 | ||||||
|                                 </div> |                                 </div> | ||||||
|  | <!--                                 <div class="row-fluid"> | ||||||
|  |                                   <div class="col-xs-12 col-md-6 col-md-offset-6"> | ||||||
|  |                                       <div class="form-group"> | ||||||
|  |                                           <label for="cvCode">CV CODE</label> | ||||||
|  |                                           <input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" /> | ||||||
|  |                                       </div> | ||||||
|  |                                   </div> | ||||||
|  |                                 </div> --> | ||||||
|                                 <div class="row"> |                                 <div class="row"> | ||||||
|                                     <label class="custom-control custom-checkbox"> |                                     <label class="custom-control custom-checkbox"> | ||||||
|                                      <br/> |                                      <br/> | ||||||
|  |  | ||||||
|  | @ -136,7 +136,7 @@ | ||||||
|                |                | ||||||
|                 </p> |                 </p> | ||||||
|                 <div class="text-center"> |                 <div class="text-center"> | ||||||
|               <button type="submit" class="btn btn-primary btn-blue">Still have a question?</button> |               <a href="mailto:info@ungleich.ch" class="btn btn-primary btn-blue">Still have a question?</a> | ||||||
|               </div> |               </div> | ||||||
|               <div class="row col-md-2 text-center wow fadeInDown">  |               <div class="row col-md-2 text-center wow fadeInDown">  | ||||||
|               </div> |               </div> | ||||||
|  |  | ||||||
|  | @ -29,6 +29,7 @@ | ||||||
|                  <hr class="greyline-long"> |                  <hr class="greyline-long"> | ||||||
|                   <h2 class="billing-head">Billing Adress</h2> |                   <h2 class="billing-head">Billing Adress</h2> | ||||||
|                     <div class="signup-form form-group row"> |                     <div class="signup-form form-group row"> | ||||||
|  |                       {% if current_billing_address %} | ||||||
|                       <form role="form" id="billing-address-form" method="post" action="{% url 'digitalglarus:user_billing_address' %}" novalidate> |                       <form role="form" id="billing-address-form" method="post" action="{% url 'digitalglarus:user_billing_address' %}" novalidate> | ||||||
|                       {% for field in form %} |                       {% for field in form %} | ||||||
|                         {% csrf_token %} |                         {% csrf_token %} | ||||||
|  | @ -49,6 +50,12 @@ | ||||||
|                         </div> |                         </div> | ||||||
|                       </div>  |                       </div>  | ||||||
|                       </form> |                       </form> | ||||||
|  |                       {% else %} | ||||||
|  |                         <div class="text-center"> | ||||||
|  |                           <h2 class="billing-head text-center">You don't have any order yet</h2> | ||||||
|  |                         </div> | ||||||
|  |                          | ||||||
|  |                       {% endif %} | ||||||
|                     </div> |                     </div> | ||||||
| 
 | 
 | ||||||
|           </div>                 |           </div>                 | ||||||
|  |  | ||||||
|  | @ -33,6 +33,8 @@ urlpatterns = [ | ||||||
|     url(_(r'booking/payment/?$'), BookingPaymentView.as_view(), name='booking_payment'), |     url(_(r'booking/payment/?$'), BookingPaymentView.as_view(), name='booking_payment'), | ||||||
|     url(_(r'booking/orders/(?P<pk>\d+)/?$'), OrdersBookingDetailView.as_view(), |     url(_(r'booking/orders/(?P<pk>\d+)/?$'), OrdersBookingDetailView.as_view(), | ||||||
|         name='booking_orders_detail'), |         name='booking_orders_detail'), | ||||||
|  |     # url(_(r'booking/orders/(?P<pk>\d+)/cancel/?$'), BookingCancelView.as_view(), | ||||||
|  |     #     name='booking_orders_cancel'), | ||||||
|     url(_(r'booking/orders/?$'), BookingOrdersListView.as_view(), |     url(_(r'booking/orders/?$'), BookingOrdersListView.as_view(), | ||||||
|         name='booking_orders_list'), |         name='booking_orders_list'), | ||||||
|     url(_(r'membership/payment/?$'), MembershipPaymentView.as_view(), name='membership_payment'), |     url(_(r'membership/payment/?$'), MembershipPaymentView.as_view(), name='membership_payment'), | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ from django.utils.translation import get_language | ||||||
| from djangocms_blog.models import Post | from djangocms_blog.models import Post | ||||||
| from django.contrib import messages | from django.contrib import messages | ||||||
| from django.http import JsonResponse | from django.http import JsonResponse | ||||||
| from django.views.generic import View, DetailView, ListView | from django.views.generic import View, DetailView, ListView, DeleteView | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| from .models import Supporter | from .models import Supporter | ||||||
|  | @ -34,10 +34,10 @@ from utils.models import UserBillingAddress | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| from .forms import LoginForm, SignupForm, MembershipBillingForm, BookingDateForm,\ | from .forms import LoginForm, SignupForm, MembershipBillingForm, BookingDateForm,\ | ||||||
|     BookingBillingForm |     BookingBillingForm, CancelBookingForm | ||||||
| 
 | 
 | ||||||
| from .models import MembershipType, Membership, MembershipOrder, Booking, BookingPrice,\ | from .models import MembershipType, Membership, MembershipOrder, Booking, BookingPrice,\ | ||||||
|     BookingOrder |     BookingOrder, BookingCancellation | ||||||
| 
 | 
 | ||||||
| from .mixins import MembershipRequiredMixin, IsNotMemberMixin | from .mixins import MembershipRequiredMixin, IsNotMemberMixin | ||||||
| 
 | 
 | ||||||
|  | @ -519,6 +519,14 @@ class UserBillingAddressView(LoginRequiredMixin, UpdateView): | ||||||
| 
 | 
 | ||||||
|         return next_url |         return next_url | ||||||
| 
 | 
 | ||||||
|  |     def get_context_data(self, **kwargs): | ||||||
|  |         context = super(UserBillingAddressView, self).get_context_data(**kwargs) | ||||||
|  |         current_billing_address = self.request.user.billing_addresses.first() | ||||||
|  |         context.update({ | ||||||
|  |             'current_billing_address': current_billing_address | ||||||
|  |         }) | ||||||
|  |         return current_billing_address | ||||||
|  | 
 | ||||||
|     def form_valid(self, form): |     def form_valid(self, form): | ||||||
|         """ |         """ | ||||||
|         If the form is valid, save the associated model. |         If the form is valid, save the associated model. | ||||||
|  | @ -546,8 +554,8 @@ class UserBillingAddressView(LoginRequiredMixin, UpdateView): | ||||||
| 
 | 
 | ||||||
|     def get_object(self): |     def get_object(self): | ||||||
|         current_billing_address = self.request.user.billing_addresses.filter(current=True).last() |         current_billing_address = self.request.user.billing_addresses.filter(current=True).last() | ||||||
|         if not current_billing_address: |         # if not current_billing_address: | ||||||
|             raise AttributeError("Billing Address does not exists") |         #     raise AttributeError("Billing Address does not exists") | ||||||
|         return current_billing_address |         return current_billing_address | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -603,14 +611,84 @@ class OrdersMembershipDetailView(LoginRequiredMixin, DetailView): | ||||||
|         return context |         return context | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class OrdersBookingDetailView(LoginRequiredMixin, DetailView): | # class BookingCancelView(FormView): | ||||||
|  | #     success_message = "Your booking has been cancelled" | ||||||
|  | #     model = BookingOrder | ||||||
|  | #     form_class = CancelBookingForm | ||||||
|  | 
 | ||||||
|  | #     def get_success_url(self): | ||||||
|  | #         pk = self.kwargs.get(self.pk_url_kwarg) | ||||||
|  | #         return reverse_lazy('digitalglarus:booking_orders_list', kwargs={'pk': pk}) | ||||||
|  | 
 | ||||||
|  | #     def form_valid(self, form): | ||||||
|  | #         booking_order = self.get_object() | ||||||
|  | #         # booking_order.cancel() | ||||||
|  | #         request = self.request | ||||||
|  | 
 | ||||||
|  | #         return HttpResponseRedirect(self.get_success_url()) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class OrdersBookingDetailView(LoginRequiredMixin, UpdateView): | ||||||
|     template_name = "digitalglarus/booking_orders_detail.html" |     template_name = "digitalglarus/booking_orders_detail.html" | ||||||
|     context_object_name = "order" |     context_object_name = "order" | ||||||
|     login_url = reverse_lazy('digitalglarus:login') |     login_url = reverse_lazy('digitalglarus:login') | ||||||
|  |     form_class = CancelBookingForm | ||||||
|  |     success_message = "You booking has been cancelled" | ||||||
|     # permission_required = ['view_hostingorder'] |     # permission_required = ['view_hostingorder'] | ||||||
|     model = BookingOrder |     model = BookingOrder | ||||||
| 
 | 
 | ||||||
|     def get_context_data(self, *args, **kwargs): |     def get_success_url(self): | ||||||
|  |         pk = self.kwargs.get(self.pk_url_kwarg) | ||||||
|  |         return reverse_lazy('digitalglarus:booking_orders_detail', kwargs={'pk': pk}) | ||||||
|  | 
 | ||||||
|  |     def form_valid(self, form): | ||||||
|  | 
 | ||||||
|  |         booking_order = self.get_object() | ||||||
|  |         booking_order.cancel() | ||||||
|  |         request = self.request | ||||||
|  | 
 | ||||||
|  |         BookingCancellation.create(booking_order) | ||||||
|  | 
 | ||||||
|  |         context = { | ||||||
|  |             'order': booking_order, | ||||||
|  |             'booking': booking_order.booking, | ||||||
|  |             'base_url': "{0}://{1}".format(request.scheme, request.get_host()), | ||||||
|  |             'user': request.user | ||||||
|  | 
 | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         email_data = { | ||||||
|  |             'subject': 'A cancellation has been requested', | ||||||
|  |             'to': 'info@ungleich.ch', | ||||||
|  |             'context': context, | ||||||
|  |             'template_name': 'booking_cancellation_notification', | ||||||
|  |             'template_path': 'digitalglarus/emails/' | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         email = BaseEmail(**email_data) | ||||||
|  |         email.send() | ||||||
|  | 
 | ||||||
|  |         context = { | ||||||
|  |             'order': booking_order, | ||||||
|  |             'booking': booking_order.booking, | ||||||
|  |             'base_url': "{0}://{1}".format(request.scheme, request.get_host()) | ||||||
|  | 
 | ||||||
|  |         } | ||||||
|  |         email_data = { | ||||||
|  |             'subject': 'Your booking has been cancelled', | ||||||
|  |             'to': request.user.email, | ||||||
|  |             'context': context, | ||||||
|  |             'template_name': 'booking_cancellation', | ||||||
|  |             'template_path': 'digitalglarus/emails/' | ||||||
|  |         } | ||||||
|  |         email = BaseEmail(**email_data) | ||||||
|  |         email.send() | ||||||
|  | 
 | ||||||
|  |         messages.add_message(self.request, messages.SUCCESS, self.success_message) | ||||||
|  | 
 | ||||||
|  |         return HttpResponseRedirect(self.get_success_url()) | ||||||
|  | 
 | ||||||
|  |     def get_context_data(self, **kwargs): | ||||||
| 
 | 
 | ||||||
|         context = super(OrdersBookingDetailView, self).get_context_data(**kwargs) |         context = super(OrdersBookingDetailView, self).get_context_data(**kwargs) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue