Changeset View
Changeset View
Standalone View
Standalone View
templates/settings/payment_method_change.html
- This file was added.
| {% extends "settings/base.html" %} | |||||
| {% block content_settings %} | |||||
| {{ block.super }} | |||||
| <h2 class="mt-2 text-secondary"> | |||||
| Change Payment Method | |||||
| </h2> | |||||
| <p>Your <strong>{{ subscription.plan.name }} {{ subscription.plan.product.name }}</strong> is currently using | |||||
| <strong>{{ current_payment_method.recognisable_name }}</strong> as payment method. | |||||
| Feel free to change it below. | |||||
| </p> | |||||
| <div class="m-3"> | |||||
| <form class="form" id="payment-method-change-form" method="post">{% csrf_token %} | |||||
| <section class="checkout-form-fields pt-4"> | |||||
| <ul class="form">{{ form.as_ul }}</ul> | |||||
| <div id="gateway-errors"></div> | |||||
| </section> | |||||
| <hr/> | |||||
| <div class="d-flex align-items-center pt-3"><a class="p-3" href="{% url 'settings_home' %}">Cancel</a> | |||||
| <button class="ml-auto btn-success form-submit px-5" id="change_payment_method_button" type="submit"><i class="fa fa-check"></i>Switch Payment method</button> | |||||
| </div> | |||||
| </form> | |||||
| </div>{% endblock content_settings %} | |||||
| {% block footer_scripts%}{{ block.super }} | |||||
| <script src="https://js.braintreegateway.com/web/3.68.0/js/data-collector.min.js"></script> | |||||
| <script src="https://js.braintreegateway.com/web/dropin/1.25.0/js/dropin.min.js"></script> | |||||
| <script> | |||||
| let client_token = '{{ client_token }}'; | |||||
| $("div[data-gateway-name='braintree']").braintree_gateway_group( | |||||
| '#change_payment_method_button', '#gateway-errors', | |||||
| '#id_payment_method_nonce', client_token); | |||||
| </script>{% endblock footer_scripts%} | |||||
| No newline at end of file | |||||