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

@@ -226,10 +226,6 @@
<input type="hidden" name="{$name}" value="random" />
{/form_field}
{form_field form=$form field="agreed"}
<input type="hidden" name="{$name}" value="on" />
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>

View File

@@ -31,7 +31,7 @@
{block name="main-content"}
<div class="main layout-col-2-left">
<article class="col-main" role="main" aria-labelledby="main-label">
<article id="content-main" class="col-main" role="main" aria-labelledby="main-label">
{loop name="blog.content" type="content" current="yes"}
<h1 id="main-label" class="page-header">{$TITLE}</h1>
{if $CHAPO}

View File

@@ -414,11 +414,12 @@ GNU General Public License : http://www.gnu.org/licenses/
<div class="info">
<nav class="nav-footer" role="navigation">
<ul>
{loop name="footer_links" type="content" folder="2"}
<li><a href="{$URL}">{$TITLE}</a></li>
{/loop}
{*<li><a href="#">Site Map</a></li>
<li><a href="#">Terms & Conditions</a></li>*}
{$folder_information={config key="information_folder_id"}}
{if $folder_information}
{loop name="footer_links" type="content" folder=$folder_information}
<li><a href="{$URL}">{$TITLE}</a></li>
{/loop}
{/if}
<li><a href="{url path="/contact"}">{intl l="Contact Us"}</a></li>
</ul>
</nav>

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}

View File

@@ -262,21 +262,6 @@
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="agreed"}
<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}>{intl l="I've read and agreed on <a href='#'>Terms &amp; Conditions</a>"}.
</label>
{if $error }
<span class="help-block">{$message}</span>
{/if}
</div>
</div>
</div><!--/.form-group-->
{/form_field}
<div class="form-group group-btn">
<div class="control-btn">
<button type="submit" class="btn btn-register">{intl l="Register"}</button>