forked from WHMCS/orderforms-standard_cart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domainoptions.tpl
184 lines (152 loc) · 8.13 KB
/
domainoptions.tpl
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
{if $invalid}
<div class="domain-checker-result-headline domain-checker-unavailable">
{if $reason}
{$reason}
{else}
{$LANG.cartdomaininvalid}
{/if}
</div>
{elseif $alreadyindb}
<div class="domain-checker-result-headline domain-checker-unavailable">
{$LANG.cartdomainexists}
</div>
{else}
{if $checktype=="register" && $regenabled}
<input type="hidden" name="domainoption" value="register" />
{if $status eq "available" || $status eq "error"}
<div class="domain-checker-result-headline domain-checker-available">
{$LANG.cartcongratsdomainavailable|sprintf2:$domain}
</div>
<input type="hidden" name="domains[]" value="{$searchResults.domainName}" />
<input type="hidden" name="domainsregperiod[{$domain}]" value="{$searchResults.shortestPeriod.period}" />
<div class="text-center">
{if count($searchResults.pricing) == 1}
<p class="margin-bottom">{$LANG.orderForm.domainAddedToCart}</p>
<button type="button" class="btn btn-default btn-lg margin-bottom">
<span class="glyphicon glyphicon-shopping-cart"></span>
{$searchResults.shortestPeriod.register}
</button>
{else}
<p class="margin-bottom">{$LANG.orderForm.registerLongerAndSave}</p>
<div class="btn-group btn-group-lg margin-bottom">
<button type="button" class="btn btn-default btn-sm">
<span name="{$searchResults.domainName}-selected-price">
<b class="glyphicon glyphicon-shopping-cart"></b>
{$searchResults.shortestPeriod.period} {$LANG.orderyears} @ {$searchResults.shortestPeriod.register}
</span>
</button>
<button type="button" class="btn btn-default btn-sm dropdown-toggle additional-options" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<b class="caret"></b>
<span class="sr-only">
{lang key="domainChecker.additionalPricingOptions" domain=$searchResults.domainName}
</span>
</button>
<ul class="dropdown-menu" role="menu">
{foreach $searchResults.pricing as $years => $price}
<li>
<a href="#" onclick="selectDomainPricing('{$searchResults.domainName}', '{$price.register}', {$years}, '{$LANG.orderyears}');return false;">
<b class="glyphicon glyphicon-shopping-cart"></b>
{$years} {$LANG.orderyears} @ {$price.register}
</a>
</li>
{/foreach}
</ul>
</div>
{/if}
</div>
{assign var='continueok' value=true}
{elseif $status eq "unavailable"}
<div class="domain-checker-result-headline domain-checker-unavailable">
{$LANG.cartdomaintaken|sprintf2:$domain}
</div>
{/if}
{elseif $checktype=="transfer" && $transferenabled}
<input type="hidden" name="domainoption" value="transfer" />
{if $status eq "available"}
<div class="domain-checker-result-headline domain-checker-unavailable">
{$LANG.carttransfernotregistered|sprintf2:$domain}
</div>
<p class="text-center">{$LANG.orderForm.tryRegisteringInstead}</p>
{elseif $status eq "unavailable" || $status eq "error"}
<div class="domain-checker-result-headline domain-checker-available">
{$LANG.carttransferpossible|sprintf2:$domain:$transferprice}
</div>
<input type="hidden" name="domains[]" value="{$domain}" />
<input type="hidden" name="domainsregperiod[{$domain}]" value="{$transferterm}" />
{assign var='continueok' value=true}
{/if}
{elseif $checktype=="owndomain" || $checktype=="subdomain"}
<input type="hidden" name="domainoption" value="{$checktype}" />
<input type="hidden" name="sld" value="{$sld}" />
<input type="hidden" name="tld" value="{$tld}" />
<script language="javascript">
domainGotoNextStep();
</script>
{/if}
{if $searchResults.suggestions}
<div class="sub-heading">
<span>{$LANG.cartotherdomainsuggestions}</span>
</div>
<div class="row domain-suggestions">
{foreach $searchResults.suggestions as $num => $result}
<div class="col-sm-6 margin-bottom-5">
<input type="hidden" name="domainsregperiod[{$result.domainName}]" value="{$result.shortestPeriod.period}" />
<label>
<input type="checkbox" name="domains[]" value="{$result.domainName}" id="domainSuggestion{$num}" class="suggested-domains" />
{$result.domainName}
</label>
<div class="pull-right">
{if count($result.pricing) > 1}
<div class="btn-group domain-suggestion-pricing">
{/if}
<button type="button" class="btn btn-default btn-sm" onclick="selectDomainPricing('{$result.domainName}', '{$result.shortestPeriod.register}', {$result.shortestPeriod.period}, '{$LANG.orderyears}', '{$num}')">
<span name="{$result.domainName}-selected-price">
<b class="glyphicon glyphicon-shopping-cart"></b>
{$result.shortestPeriod.period} {$LANG.orderyears} @ {$result.shortestPeriod.register}
</span>
</button>
{if count($result.pricing) > 1}
<button type="button" class="btn btn-default btn-sm dropdown-toggle additional-options" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<b class="caret"></b>
<span class="sr-only">
{lang key="domainChecker.additionalPricingOptions" domain=$result.domainName}
</span>
</button>
<ul class="dropdown-menu" role="menu">
{foreach $result.pricing as $years => $price}
<li>
<a href="#" onclick="selectDomainPricing('{$result.domainName}', '{$price.register}', {$years}, '{$LANG.orderyears}', '{$num}');return false;">
<b class="glyphicon glyphicon-shopping-cart"></b>
{$years} {$LANG.orderyears} @ {$price.register}
</a>
</li>
{/foreach}
</ul>
</div>
{/if}
</div>
</div>
{/foreach}
</div>
{assign var='continueok' value=true}
{/if}
{if $continueok}
<div class="alert alert-info info-text-sm">
<i class="fas fa-info-circle"></i>
{$LANG.orderForm.domainAvailabilityCached}
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary btn-lg">
{$LANG.continue}
<i class="fas fa-arrow-circle-right"></i>
</button>
</div>
{/if}
{/if}
<script>
jQuery('input.suggested-domains').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
increaseArea: '20%'
});
</script>