forked from osiloke/template-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreditcard.tpl
More file actions
279 lines (268 loc) · 11 KB
/
creditcard.tpl
File metadata and controls
279 lines (268 loc) · 11 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<section>
<div class="container">
<div class="page-header">
<h1>{$LANG.creditcard}</h1>
</div>
<div class="alert alert-warning text-center">
<h3 class="alert-heading">Paying Invoice #{$invoiceid}</h3>
Balance Due: <strong>{$balance}</strong>
</div>
{if $remotecode}
<div id="submitfrm" class="text-center">
{$remotecode}
<iframe name="3dauth" width="90%" height="600" scrolling="auto" src="about:blank" style="border:1px solid #fff;"></iframe>
</div>
{literal}
<script language="javascript">
setTimeout ( "autoForward()" , 1000 );
function autoForward() {
var submitForm = $("#submitfrm").find("form");
submitForm.submit();
}
</script>
{/literal}
{else}
<form method="post" action="creditcard.php" class="form-horizontal">
<input type="hidden" name="action" value="submit">
<input type="hidden" name="invoiceid" value="{$invoiceid}">
{if $errormessage}
<div class="alert alert-danger">
<h4 class="alert-heading">{$LANG.clientareaerrors}</h4>
<ul>
{$errormessage}
</ul>
</div>
{/if}
<div class="row">
<div class="col-md-6">
<div class="page-header">
<h2>{$LANG.creditcardyourinfo}</h2>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="firstname">{$LANG.clientareafirstname}</label>
<div class="col-md-8">
<input type="text" name="firstname" id="firstname" value="{$firstname}"{if in_array('firstname',$uneditablefields)} disabled="disabled" class="form-control disabled"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="lastname">{$LANG.clientarealastname}</label>
<div class="col-md-8">
<input type="text" name="lastname" id="lastname" value="{$lastname}"{if in_array('lastname',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="address1">{$LANG.clientareaaddress1}</label>
<div class="col-md-8">
<input type="text" name="address1" id="address1" value="{$address1}"{if in_array('address1',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="address2">{$LANG.clientareaaddress2}</label>
<div class="col-md-8">
<input type="text" name="address2" id="address2" value="{$address2}"{if in_array('address2',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="city">{$LANG.clientareacity}</label>
<div class="col-md-8">
<input type="text" name="city" id="city" value="{$city}"{if in_array('city',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="state">{$LANG.clientareastate}</label>
<div class="col-md-8">
<input type="text" name="state" id="state" value="{$state}"{if in_array('state',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="postcode">{$LANG.clientareapostcode}</label>
<div class="col-md-8">
<input type="text" name="postcode" id="postcode" value="{$postcode}"{if in_array('postcode',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="country">{$LANG.clientareacountry}</label>
<div class="col-md-8">
{$countriesdropdown}
{literal}<script type="text/javascript">$("#country").addClass("form-control");</script>{/literal}
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="phonenumber">{$LANG.clientareaphonenumber}</label>
<div class="col-md-8">
<input type="text" name="phonenumber" id="phonenumber" value="{$phonenumber}"{if in_array('phonenumber',$uneditablefields)} disabled="disabled" class="disabled form-control"{else} class="form-control"{/if}>
</div>
</div>
</div>
<div class="col-md-6">
<div class="page-header">
<h2>{$LANG.creditcarddetails}</h2>
</div>
<div class="well well-sm">
<div class="radio">
<label>
<input type="radio" name="ccinfo" value="useexisting" {if $cardnum} checked="checked"{else} disabled="disabled"{/if}>
{$LANG.creditcarduseexisting}{if $cardnum} ({$cardnum}){/if}
</label>
</div>
<div class="radio">
<label for="ccinfo">
<input type="radio" name="ccinfo" id="ccinfo" value="new" {if !$cardnum || $ccinfo eq "new"} checked="checked"{/if}>
{$LANG.creditcardenternewcard}
</label>
</div>
</div>
<fieldset name="useexistingfields" id="useexistingfields">
{if $cardnum}
<div class="form-group">
<label class="col-md-4 control-label" for="cccvv2">{$LANG.creditcardcvvnumber}</label>
<div class="col-md-2">
<input type="text" name="cccvv2" id="cccvv2" class="form-control" value="{$cccvv}" autocomplete="off">
</div>
<div class="col-md-6">
<span class="help-block"><a href="images/ccv.gif" onclick="$('#cvv2-help').modal();return false;">{$LANG.creditcardcvvwhere}</a></span>
</div>
</div>
{/if}
</fieldset>
<fieldset name="usenewfields" id="usenewfields">
<div class="form-group">
<label class="col-md-4 control-label" for="cctype">{$LANG.creditcardcardtype}</label>
<div class="col-md-8">
<select name="cctype" id="cctype" class="newccinfo form-control">
{foreach from=$acceptedcctypes item=cardtype}
<option{if $cctype eq $cardtype} selected{/if}>{$cardtype}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="ccnumber">{$LANG.creditcardcardnumber}</label>
<div class="col-md-8">
<input type="text" name="ccnumber" id="ccnumber" value="{$ccnumber}" autocomplete="off" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="ccexpirymonth">{$LANG.creditcardcardexpires}</label>
<div class="col-md-8">
<div class="input-group">
<select name="ccexpirymonth" id="ccexpirymonth" class="form-control">
{foreach from=$months item=month}
<option{if $ccexpirymonth eq $month} selected="selected"{/if}>{$month}</option>
{/foreach}
</select>
<span class="input-group-addon"> / </span>
<select name="ccexpiryyear" class="form-control">
{foreach from=$expiryyears item=year}
<option{if $ccexpiryyear eq $year} selected="selected"{/if}>{$year}</option>
{/foreach}
</select>
</div>
</div>
</div>
{if $showccissuestart}
<div class="form-group">
<label class="col-md-4 control-label" for="ccstartmonth">{$LANG.creditcardcardstart}</label>
<div class="col-md-8">
<div class="input-group">
<select name="ccstartmonth" id="ccstartmonth" class="form-control">
{foreach from=$months item=month}
<option>{$month}</option>{/foreach}
</select>
<span class="input-group-addon"> / </span>
<select name="ccstartyear" id="ccstartmonth" class="form-control">
{foreach from=$years item=year}
<option>{$year}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="ccissuenum">{$LANG.creditcardcardissuenum}</label>
<div class="col-md-3">
<input type="text" name="ccissuenum" id="ccissuenum" maxlength="3" value="{$ccissuenum}" class="form-control">
</div>
</div>
{/if}
<div class="form-group">
<label class="col-md-4 control-label" for="cccvv">{$LANG.creditcardcvvnumber}</label>
<div class="col-md-3">
<input type="text" name="cccvv" id="cccvv" size="5" value="{$cccvv}" autocomplete="off" class="form-control">
</div>
<div class="col-md-5">
<div class="help-block"><a href="images/ccv.gif" onclick="$('#cvv2-help').modal();return false;">{$LANG.creditcardcvvwhere}</a></div>
</div>
</div>
{if $shownostore}
<div class="form-group">
<label class="col-md-4 control-label" for="nostore"></label>
<div class="col-md-8">
<div class="checkbox">
<label>
<input type="checkbox" name="nostore" id="nostore">
{$LANG.creditcardnostore}
</label>
</div>
</div>
</div>
{/if}
</fieldset>
<script type="text/javascript">
{literal}
$(function() {
$('input[name=ccinfo]').click(function() {
if($(this).val() == 'useexisting') {
$('#usenewfields').hide();
$('#useexistingfields').fadeIn();
} else {
$('#useexistingfields').hide();
$('#usenewfields').fadeIn();
}
});
$('input[name=ccinfo]:checked').click();
});
{/literal}
</script>
</div>
</div>
<div class="text-center alert alert-warning">
<img src="images/padlock.gif" alt="Secure" style="vertical-align:text-bottom"> {$LANG.creditcardsecuritynotice}
</div>
<div class="text-center form-group">
<button class="btn btn-primary" type="submit" onclick="$('#modalpleasewait').modal();">{$LANG.ordercontinuebutton}</button>
</div>
</form>
<div class="modal fade" id="modalpleasewait">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header text-center">
<img src="images/loadingsml.gif" alt="{$LANG.pleasewait}" style="vertical-align:baseline;">
<span class="lead">{$LANG.pleasewait}</span>
</div>
</div>
</div>
</div>
<div id="cvv2-help" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">{$LANG.creditcardcvvnumber}, {$LANG.creditcardcvvwhere}</h4>
</div>
<div class="modal-body text-center">
<img src="images/ccv.gif" alt="cvv2 image">
</div>
</div>
</div>
</div>
{/if}
</div>
</section>
<script type="text/javascript" src="includes/jscript/statesdropdown.js"></script>
<script type="text/javascript" src="includes/jscript/creditcard.js"></script>
<script type="text/javascript">
$(function() {
$('#country').on('change', function() { $('#stateselect').addClass('form-control'); });
});
</script>