Changeset View
Changeset View
Standalone View
Standalone View
templates/settings/membership_edit.html
- This file was added.
| {% extends "settings/membership_base.html" %} | |||||
| {% load looper %} | |||||
| {% load humanize %} | |||||
| {% block after_membership_info %} | |||||
| {% if subscription.status %} | |||||
| <hr/>{% if subscription.next_payment %} | |||||
| {% if subscription.status == 'active' or subscription.status == 'on-hold' %} | |||||
| {% if subscription.next_payment_in_future %} | |||||
| <p> | |||||
| The next {{ subscription.collection_method }} charge of {{ subscription | pricing }} | |||||
| will be <abbr title="{{ subscription.next_payment }}">{{ subscription.next_payment | naturaltime }}</abbr>. | |||||
| </p> {% else %} | |||||
| <p> | |||||
| The last {{ subscription.collection_method }} charge of {{ subscription | pricing }} | |||||
| was due <abbr title="{{ subscription.next_payment }}">{{ subscription.next_payment | naturaltime }}</abbr>. | |||||
| </p> {% endif %} | |||||
| {% elif subscription.status == 'pending-cancellation' %} | |||||
| <p>Your membership is pending cancellation. It will be deactivated <abbr title="{{ subscription.next_payment }}">{{ subscription.next_payment | naturaltime }}</abbr>.</p> {% endif %} | |||||
| {% endif %} | |||||
| {% if not membership.is_managed %} | |||||
| {% with subscription.payment_method as pay_meth %} | |||||
| <p> | |||||
| {% if not pay_meth %} | |||||
| Payment method: Unknown | |||||
| {% elif pay_meth.is_deleted %} | |||||
| Payment method: The payment method previously used for this membership was removed. | |||||
| {% else %} | |||||
| Your payment method is: {{ pay_meth.recognisable_name }} | |||||
| {% endif %} | |||||
| {% if subscription %}<small>(<a href="{% url 'looper:payment_method_change' subscription_id=subscription.id %}">change</a>)</small>{% endif %} | |||||
| </p>{% endwith %} | |||||
| {% if subscription.status == 'on-hold' %} | |||||
| <p><a class="btn btn-filled-success px-5" href="{% url 'looper:checkout_existing_order' order_id=order.pk %}"><i class="fa fa-check"></i>Pay Membership</a></p>{% endif %} | |||||
| {% endif %} | |||||
| {% if user.is_staff and perms.looper.change_subscription %} | |||||
| <div class="bg-light p-3 m-3 rounded border" title="For admin eyes only"> | |||||
| <h4 class="m-0 pb-2">Admin Tools</h4> | |||||
| <ul> | |||||
| <li><a class="font-weight-bold" href="{% url 'admin:looper_subscription_change' object_id=subscription.pk %}" title="Edit in Admin">Subscription</a><span class="text-secondary pl-2">#{{ subscription.id }} ({{ subscription.status }})</span></li>{% if order %} | |||||
| <li><a class="font-weight-bold" href="{% url 'admin:looper_order_change' object_id=order.pk %}" title="Edit order in Admin">Order</a><span class="text-secondary pl-2">#{{ order.pk }} ({{ order.status }})</span></li>{% endif %} | |||||
| {% if transaction %} | |||||
| <li><a class="font-weight-bold" href="{% url 'admin:looper_transaction_change' object_id=transaction.pk %}" title="Edit transaction in Admin">Transaction</a><span class="text-secondary pl-2">#{{ transaction.pk }} ({{ transaction.status }})</span></li>{% endif %} | |||||
| </ul> | |||||
| </div>{% endif %} | |||||
| {% endif %} | |||||
| {% if subscription and subscription.collection_method == 'automatic' and 'cancel' not in subscription.status %} | |||||
| <hr/> | |||||
| <h3>Automatic Payment</h3>{% if order %} | |||||
| {% if order.status == 'created' %} | |||||
| {% elif order.status == 'soft-failed' %} | |||||
| <p> | |||||
| Automatic payment failed on {{ transaction.recorded_at }}, but we will automatically try again | |||||
| soon. We have made {{ order.collection_attempts }} of a maximum of | |||||
| {{ settings.LOOPER_CLOCK_MAX_AUTO_ATTEMPTS }} collection attemps. In the mean time, your | |||||
| membership will remain active. | |||||
| </p> | |||||
| <p>The last error we received was: <span class="transaction-error">{{ transaction.failure_message }}</span></p> {% elif order.status == 'failed' %} | |||||
| <p> | |||||
| Automatic payment failed multiple times, even after trying | |||||
| {{ order.collection_attempts }} times. As a result, your membership | |||||
| has been deactivated. | |||||
| </p> | |||||
| <p>The error we received was: <span class="transaction-error">{{ transaction.failure_message }}</span></p> {% elif order.status == 'paid' or order.status == 'fulfilled' %} | |||||
| <p><i class="fa fa-check-circle text-success px-2"></i> Payment was successful <abbr title="{{ transaction.created_at }}">{{ transaction.created_at | naturaltime }}</abbr>.</p> {% elif order.status == 'cancelled' %} | |||||
| <p>Automatic payment cancelled and will not be retried.</p> {% endif %} | |||||
| {% endif %} | |||||
| {% if subscription.next_payment %} | |||||
| <p>The next automatic payment is scheduled for {{ subscription.next_payment }}.</p>{% else %} | |||||
| <p> | |||||
| There is no next automatic payment scheduled. Please contact | |||||
| <a href="mailto:{{ settings.ADMIN_MAIL }}?subject=No next payment for membership {{ membership.id }}">{{ settings.ADMIN_MAIL }}</a> about this. | |||||
| </p>{% endif %} | |||||
| {% endif %} | |||||
| {% if may_be_charged %} | |||||
| <h3>Extend your Membership</h3> | |||||
| <p>You can arbitrarily extend your membership by paying any amount. <a href="{% url 'membership_extend' membership_id=membership.id %}">Extend my membership now!</a></p>{% endif %} | |||||
| {% if subscription and subscription.status == 'cancelled' %} | |||||
| <h3>Membership Cancelled</h3> | |||||
| <p>This membership has been cancelled. :(</p>{% else %} | |||||
| <hr/> | |||||
| <h3>Public Information</h3>{% if membership.level.visible_attributes_list %} | |||||
| <p>Show off! Fill in your/your company info to be displayed in the Sponsors section of the Development Fund frontpage.</p>{% else %} | |||||
| <p>Your subscription does not have public attributes. Consider upgrading to get your name, a link to your website, or your logo out there!</p>{% endif %} | |||||
| <form class="checkout-form p-3" id="payment-form" method="post" enctype="multipart/form-data" action="{% url 'settings_membership_edit' membership.id %}"> | |||||
| <ul class="form"> | |||||
| {% csrf_token %} | |||||
| {{ form.as_ul }} | |||||
| </ul> | |||||
| <div class="clearfix"></div>{% if membership.level.bid_badge_name %} | |||||
| <p>You can view your membership badge in your <a href="{{ settings.BLENDER_ID.BASE_URL }}">Blender ID Profile</a>. | |||||
| For your badge to show up on other websites may take some time (less than a day), and may require you to log in at that site again. | |||||
| </p>{% endif %} | |||||
| <div class="d-flex align-items-center pt-3"> | |||||
| <button class="btn btn-success px-5" id="submit-button" type="submit"><i class="fa fa-check"></i>Save Changes</button>{% if subscription.status != 'pending-cancellation' and subscription.status != 'cancelled' %}<a class="ml-auto text-danger" href="{% url 'settings_membership_cancel' membership_id=membership.id %}"><span>Cancel Membership</span></a>{% endif %} | |||||
| </div> | |||||
| </form>{% endif %} | |||||
| {% endblock after_membership_info %} | |||||
| No newline at end of file | |||||