if (Model.TermsOfServiceOnShoppingCartPage)
{
<div id="terms-of-service-warning-box" title="@T("Checkout.TermsOfService")" style="display:none;">
<p>@T("Checkout.TermsOfService.PleaseAccept")</p>
</div>
<div class="terms-of-service">
<input id="termsofservice" type="checkbox" name="termsofservice" />
@T("Checkout.TermsOfService.IAccept")
@*uncomment below to how simple pop-up*@ @*<span class="read" onclick="javascript:OpenWindow('@Url.RouteUrl("TopicPopup", new { SystemName = "conditionsofUse" })', 450, 500, true)">@T("Checkout.TermsOfService.Read")</span>*@
@*use fancybox to how nice pop-up*@
@{
Html.AddScriptParts("~/Scripts/jquery.fancybox-1.3.4.pack.js");
Html.AddCssFileParts("~/Content/fancybox/jquery.fancybox-1.3.4.css");
}
<a class="read" href='@Url.RouteUrl("TopicPopup", new { SystemName = "conditionsofUse" })'>@T("Checkout.TermsOfService.Read")</a>
<script type="text/javascript">
$(".terms-of-service .read").fancybox({
'speedIn': 600,
'speedOut': 200,
'width': 450,
'height': 500,
'type': 'iframe',
'centerOnScroll': true
});
</script>
</div>
}
<div class="checkout-buttons">
@if (String.IsNullOrEmpty(Model.MinOrderSubtotalWarning))
{
<script type="text/javascript">
$(document).ready(function () {
$('#checkout').click(function () {
//terms of services
var termOfServiceOk = true;
@if (Model.TermsOfServiceEnabled)
{
<text>
if (!$('#termsofservice').is(':checked')) {
$("#terms-of-service-warning-box").dialog();
termOfServiceOk = false;
}
else {
termOfServiceOk = true;
}
</text>
}
return termOfServiceOk;
});
});
</script>
<button type="submit" id="checkout" name="checkout" value="checkout" class="button-1 checkout-button">
<span>@T("Checkout.Button")</span>
</button>
}
</div>
if (Model.TermsOfServiceOnShoppingCartPage)
{
<div id="terms-of-service-warning-box" title="@T("Checkout.TermsOfService")" style="display:none;">
<p>@T("Checkout.TermsOfService.PleaseAccept")</p>
</div>
<div class="terms-of-service">
<input id="termsofservice" type="checkbox" name="termsofservice" />
@T("Checkout.TermsOfService.IAccept")
<span class="read" onclick="javascript:OpenWindow('@Url.RouteUrl("TopicPopup", new { SystemName = "conditionsofUse" })', 450, 500, true)">@T("Checkout.TermsOfService.Read")</span>
</div>
}
<div class="checkout-buttons">
@if (String.IsNullOrEmpty(Model.MinOrderSubtotalWarning))
{
<script type="text/javascript">
$(document).ready(function () {
$('#checkout').click(function () {
//terms of service
var termOfServiceOk = true;
if ($('#termsofservice').length > 0) {
//terms of service element exists
if (!$('#termsofservice').is(':checked')) {
$("#terms-of-service-warning-box").dialog();
termOfServiceOk = false;
} else {
termOfServiceOk = true;
}
}
return termOfServiceOk;
});
});
</script>
<button type="submit" id="checkout" name="checkout" value="checkout" class="button-1 checkout-button">
<span>@T("Checkout.Button")</span>
</button>
}
</div>