Moved Terms aggrement from account to order, display terms and conditions

This commit is contained in:
Julien Chanséaume
2014-07-29 14:08:47 +02:00
committed by Julien Chanseaume
parent 9410881da9
commit 160ccaa4ff
10 changed files with 141 additions and 48 deletions

View File

@@ -309,7 +309,30 @@
</ul>
</div>
</div>
{/form_field}
{form_field form=$form field="agreed"}
<div class="well">
<div class="form-group group-agreed{if $error} has-error{/if}">
<div class="control-input">
<div class="checkbox">
<label class="control-label" for="{$label_attr.for}">
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}"{if $checked} checked{/if} {if $required} aria-required="true" required{/if}>
{$termsAndConditionsId={config key="terms_conditions_content_id"}}
{if $termsAndConditionsId}
{loop name="content-terms" type="content" id=$termsAndConditionsId}
{$termsAndConditionsUrl=$URL}
{/loop}
{/if}
{intl l="I've read and agreed on <a href='%link' class='terms-quickview'>Terms &amp; Conditions</a>" link="$termsAndConditionsUrl"}.
</label>
{if $error }
<span class="help-block">{$message}</span>
{/if}
</div>
</div>
</div><!--/.form-group-->
</div>
{/form_field}
<a href="{url path="/order/delivery"}" role="button" class="btn btn-back"><span>{intl l="Back"}</span></a>
@@ -338,6 +361,25 @@ jQuery(function($) {
return false;
});
});
$(".terms-quickview").on('click', function (ev) {
ev.preventDefault();
$.get(this.href, function (data) {
// Hide all currently active bootbox dialogs
bootbox.hideAll();
// Show dialog
bootbox.dialog({
message : $("#content-main",data),
onEscape: function() {
bootbox.hideAll();
}
});
});
return false;
});
});
</script>
{/block}