Changeset View
Changeset View
Standalone View
Standalone View
templates/settings/payment_method_replace.html
- This file was added.
| {% extends "settings/base.html" %} | |||||
| {% block content_settings %} | |||||
| {{ block.super }} | |||||
| <h2 class="mt-2 text-secondary">Replace Payment Method</h2> | |||||
| <p> | |||||
| Here you can change your payment method. Anything using | |||||
| <strong>{{ paymeth.recognisable_name }}</strong> will switch over to whatever payment method | |||||
| you select here. | |||||
| </p> | |||||
| <p> | |||||
| You can use this for switching future automatic payments, as well as payments that failed | |||||
| and are currently being retried; we try a few times before giving up. | |||||
| </p> | |||||
| <p>Previously you used <strong>{{ paymeth.recognisable_name }}</strong> to pay in | |||||
| <strong>{{ currency }}</strong>, so you can only replace it with payment methods that are compatible | |||||
| with that currency. | |||||
| </p> | |||||
| <div class="m-3"> | |||||
| <form class="form" id="payment-method-change-form" method="post">{% csrf_token %} | |||||
| <section class="checkout-form-fields pt-3"> | |||||
| <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="pl-3" href="{% url 'looper:payment_methods' %}">Cancel</a> | |||||
| <button class="ml-auto btn-success form-submit px-5 mt-3" id="change_payment_method_button" type="submit"><i class="fa fa-check"></i>Replace Payment method</button> | |||||
| </div> | |||||
| </form> | |||||
| </div>{% endblock content_settings %} | |||||
| {% block footer_scripts%} | |||||
| <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 | |||||