-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecurring_info.html
More file actions
200 lines (175 loc) · 7.8 KB
/
recurring_info.html
File metadata and controls
200 lines (175 loc) · 7.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{% with profile.payment_processor_information as pp %}
<form id="change_profile_{{ profile.id }}" {% if pp.processor == "stripe" %}data-stripe-pub-key="{{ pp.pub_key }}"{% endif %} class="action_form" name="act" method="POST" action="/act/" accept-charset="utf-8">
<input type="hidden" name="page" value="{{ page.name }}">
<input type="hidden" name="profile_id" value="{{ profile.id }}">
{% comment %} akid is needed to tell javascript required field checking we have a user, but the view requires a user to be logged in. {% endcomment %}
<input type="hidden" name="akid" value="{{ logged_in_user.token }}">
<div class="ak-field-box">
<div class="ak-styled-fields ak-labels-before {{templateset.custom_fields.field_errors_class|default:"ak-errs-below"}}">
<div>
<label>
Next Payment
</label>
<div class="ak-readonly-value">
<div>
{{ profile.next_payment_date|date }}
</div>
<div>
<a href = "/cms/pledge/cancel/monthly/">Cancel donation</a>
</div>
</div>
</div>
<div class="ak-show-amount">
<label>
{{ profile.get_period_display }} Amount
</label>
<div class="ak-readonly-value">
<div>
{{ profile.amt }}
</div>
<div>
<a href="#" onclick="return ak_recurring_change_amount('{{ profile.id }}');" class="ak-change-amount-link">Change amount</a>
</div>
</div>
</div>
<div class="ak-change-amount" style="display: none">
<label>
{{ profile.get_period_display }} Amount
</label>
<input type="text" name="amount" size="6" value="{{ profile.amount }}">
</div>
<div>
<label>
First Payment
</label>
<div class="ak-readonly-value">
<div>
{{ profile.created_at|date }}
</div>
</div>
</div>
{% if profile.order.payment_method == "cc" %}
<div class="ak-show-cc">
<label>
Credit Card
</label>
<div class="ak-readonly-value">
<div>
Card ending in {{ profile.card_num }}
<br>
Expiration {{ profile.display_expiration_date }}
</div>
<div>
<a href="#" onclick="return ak_recurring_change_card('{{ profile.id }}');">Change credit card information</a>
</div>
</div>
</div>
<div class="ak-change-cc" style="display: none">
<label for="card_num_{{ profile.id }}">
Credit Card Number
</label>
<input id="card_num_{{ profile.id }}" type="text" name="card_num" disabled=true>
<div class="ak-card_num-hosted"></div>
</div>
<div class="ak-change-cc" style="display: none">
<label for="exp_date_{{ profile.id }}">
Expiration Date
</label>
<input id="exp_date_{{ profile.id }}" type="text" name="exp_date" size="6" placeholder="MMYY" style="max-width: 33%" disabled=true>
<div class="ak-exp_date-hosted"></div>
</div>
<div class="ak-change-cc" style="display: none">
<label for="card_code_{{ profile.id }}">
Verification Number
</label>
<input id="card_code_{{ profile.id }}" type="text" name="card_code" size="6" style="max-width: 33%" disabled=true>
<div class="ak-card_code-hosted"></div>
</div>
{% endif %}
{% if profile.order.payment_method == "cc" %}
<div class="ak-show-address" style="display: none">
<label>
Address
</label>
<div class="ak-readonly-value">
<div class="ak-full-address">{{ profile.user.full_address }}</div>
{% if profile.payment_processor.recurring_update_supports_address %}
<div>
<a href="#" onclick="return ak_recurring_change_address('{{ profile.id }}');">Change billing information</a>
</div>
{% endif %}
</div>
</div>
{% if profile.payment_processor.recurring_update_supports_address %}
<div class="ak-change-address" style="display: none">
<div style="text-align: center">
Optionally also enter your credit card billing address:
</div>
<div>
<label for="id_address1_{{ profile.id }}">
Street Address
</label>
<input name="address1" id="id_address1_{{ profile.id }}" type="text" value="{{ profile.order.user_detail.address1 }}" disabled=true>
</div>
<div>
<label for="id_city_{{ profile.id }}">
City
</label>
<input name="city" id="id_city_{{ profile.id }}" type="text" value="{{ profile.order.user_detail.city }}" disabled=true>
</div>
<div class="state_select_box">
<label>
State
</label>
{% include "./state_select.html" %}
</div>
<div>
<label for="id_zip_{{ profile.id }}">
ZIP Code
</label>
<input name="zip" id="id_zip_{{ profile.id }}" type="text" value="{{ profile.order.user_detail.zip }}" disabled=true>
</div>
<div>
<label for="id_region_{{ profile.id }}">
Region
</label>
<input name="region" id="id_region_{{ profile.id }}" type="text" value="{{ profile.order.user_detail.region }}" disabled=true>
</div>
<div>
<label for="id_postal_{{ profile.id }}">
Postal
</label>
<input name="postal" id="id_postal_{{ profile.id }}" type="text" value="{{ profile.order.user_detail.postal }}" disabled=true>
</div>
<div class="country_select_box">
<label>
Country
</label>
{% include "./country_select.html" %}
</div>
<script>
$(function () {
{% if profile.order.user_detail.country %}
$("#change_profile_{{ profile.id }} .country_select_box select").val("{{ profile.order.user_detail.country }}");
{% endif %}
{% if profile.order.user_detail.state %}
$("#change_profile_{{ profile.id }} .state_select_box select").val("{{ profile.order.user_detail.state }}");
{% endif %}
actionkit.forms.reflectCountryChange();
});
</script>
</div>
{% endif %}
{% endif %}
<div class="ak-change-submit ak-align-right" style="display: none">
<button name="submit_form" type="submit">Save Changes</button>
</div>
</div>
</div>
</form>
{% if pp.use_vzero %}
<script>
initVZeroForForm('#change_profile_{{ profile.id }}', '{{ pp.client_token }}');
</script>
{% endif %}
{% endwith %}