-
Notifications
You must be signed in to change notification settings - Fork 16
/
admin_address_verification.jinja2
118 lines (117 loc) · 4.29 KB
/
admin_address_verification.jinja2
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
{% extends "sitebase.jinja2" %}
{% set page_title = _("Admin Address Verification") %}
{% set show_breadcrumbs = False %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<table>
<tr>
<td colspan="2" align="center">{{ _('Verify CSV File of Addresses') }}</td>
<td> </td>
</tr>
<tr>
<td><label for="address_csv">{{ _('CSV File') }}:</label></td>
<td><input type="file" name="address_csv"></td>
<td>NOTE: Header must be Address 1,Address 2,Address 3,City,State,Postal Code,Country</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="verify_csv" value="{{ _('Verify') }}"></td>
<td> </td>
</tr>
</table>
</form>
<hr />
<form method="get">
<table>
<tr>
<td colspan="2" align="center">{{ _('Verify Single Address') }}</td>
</tr>
<tr>
<td><label for="address_1">{{ _('Address 1') }}:</label></td>
<td><input type="text" name="address_1" value="{{ address_1 |e if address_1 is not none}}"></td>
</tr>
<tr>
<td><label for="address_2">{{ _('Address 2') }}:</label></td>
<td><input type="text" name="address_2" value="{{ address_2 |e if address_2 is not none}}"></td>
</tr>
<tr>
<td><label for="address_3">{{ _('Address 3') }}:</label></td>
<td><input type="text" name="address_3" value="{{ address_3 |e if address_3 is not none}}"></td>
</tr>
<tr>
<td><label for="City">{{ _('City') }}:</label></td>
<td><input type="text" name="city" value="{{ city |e if city is not none}}"></td>
</tr>
<tr>
<td><label for="state">{{ _('State') }}:</label></td>
<td><input type="text" name="state" value="{{ state |e if state is not none}}"></td>
</tr>
<tr>
<td><label for="postal">{{ _('Postal Code') }}:</label></td>
<td><input type="text" name="postal" value="{{ postal |e if postal is not none}}"></td>
</tr>
<tr>
<td><label for="country">{{ _('Country') }}:</label></td>
<td><input type="text" name="country" value="{{ country |e if country is not none}}"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="{{ _('Verify') }}"></td>
</tr>
</table>
</form>
<hr />
{% if error is not none %}
<font color="red">{{ error }}
{% endif %}
{% if diagnostics is not none %}
<table>
<tr>
<td colspan="2" align="center">Verification Results</td>
</tr>
<tr>
<td colspan="2" align="center">
{% if diagnostics['valid'] %}
<font color="green">VALID ADDRESS</font>
{% else %}
<font color="red">INVALID ADDRESS</font>
{% endif %}
</td>
</tr>
<tr>
<td>{{ _('Address 1') }}:</td>
<td>{{ diagnostics['address_1'] }}</td>
</tr>
<tr>
<td>{{ _('Address 2') }}:</td>
<td>{{ diagnostics['address_2'] }}</td>
</tr>
<tr>
<td>{{ _('Address 3') }}:</td>
<td>{{ diagnostics['address_3'] }}</td>
</tr>
<tr>
<td>{{ _('City') }}:</td>
<td>{{ diagnostics['city'] }}</td>
</tr>
<tr>
<td>{{ _('State') }}:</td>
<td>{{ diagnostics['state'] }}</td>
</tr>
<tr>
<td>{{ _('Postal Code') }}:</td>
<td>{{ diagnostics['postal'] }}</td>
</tr>
<tr>
<td>{{ _('Country') }}:</td>
<td>{{ diagnostics['country'] }}</td>
</tr>
<tr>
<td>{{ _('Latitude') }}:</td>
<td>{{ diagnostics['latitude'] }}</td>
</tr>
<tr>
<td>{{ _('Longitude') }}:</td>
<td>{{ diagnostics['longitude'] }}</td>
</tr>
</table>
{% endif %}
{% endblock %}