Merge pull request #147 from levivm/feature/new_digitalglarus

Feature/new digitalglarus
This commit is contained in:
Levi Velázquez 2016-12-06 21:56:05 -05:00 committed by GitHub
commit b26e491a7d
5 changed files with 11 additions and 3 deletions

View file

@ -48,6 +48,7 @@ class Ordereable(models.Model):
@classmethod @classmethod
def create(cls, data): def create(cls, data):
stripe_charge = data.pop('stripe_charge', None) stripe_charge = data.pop('stripe_charge', None)
del(data['status'])
instance = cls.objects.create(**data) instance = cls.objects.create(**data)
if not stripe_charge: if not stripe_charge:
return instance return instance

View file

@ -11,8 +11,12 @@
<div class="signup-box"> <div class="signup-box">
<span class="glyphicon glyphicon-plus"></span> <span class="glyphicon glyphicon-plus"></span>
<h2 class="section-heading">Booking</h2> <h2 class="section-heading">Booking</h2>
<h2 class="signup-lead">Start coworking at Digital Glarus! <br> Membership costs only <h2 class="signup-lead">
<strong>35CHF</strong> per month.<br> 2 free working days included!</h2>
When do you want to cowork? <br>
All members have 2 free days per month! <br>
Additional days cost <strong>15CHF</strong>. <br>
Work more, get more days free!
<hr class="primary"> <hr class="primary">
<div class="signup-form form-group row"> <div class="signup-form form-group row">
<div class="col-md-12"> <div class="col-md-12">

View file

@ -87,9 +87,11 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>Do you want to cancel your booking?</p> <p>Do you want to cancel your booking?</p>
{% if booking_required %}
<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. 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> </p>
{% endif %}
</div> </div>
<div class="modal-footer text-center"> <div class="modal-footer text-center">
<button type="button" class="btn btn-primary btn-grey" data-dismiss="modal">No</button> <button type="button" class="btn btn-primary btn-grey" data-dismiss="modal">No</button>

View file

@ -56,7 +56,7 @@
<hr class="greyline-long"> <hr class="greyline-long">
<br/> <br/>
<h2 class="billing-head">Your Booking is TOTALLY FREE</h2> <h2 class="billing-head">Your booking is FREE of charge! You can change or cancel the booking freely 7 days before the booking date.</h2>
<br/><br/> <br/><br/>
{% else %} {% else %}
<h2 class="billing-head">Billing Adress</h2> <h2 class="billing-head">Billing Adress</h2>

View file

@ -718,6 +718,7 @@ class OrdersBookingDetailView(LoginRequiredMixin, UpdateView):
'free_days': free_days, 'free_days': free_days,
'start_date': start_date.strftime('%m/%d/%Y'), 'start_date': start_date.strftime('%m/%d/%Y'),
'end_date': end_date.strftime('%m/%d/%Y'), 'end_date': end_date.strftime('%m/%d/%Y'),
'booking_required': bookig_order.refund_required(),
}) })
return context return context