[IMP] remove client action goBack and add client action redirect
bzr revid: chm@openerp.com-20130726092643-onck6ad1e2aj7gbo
This commit is contained in:
parent
6a9bbba17e
commit
8bc4e0e8a4
|
@ -25,6 +25,7 @@ def template_values():
|
|||
'uid': uid,
|
||||
'script': script,
|
||||
'css': css,
|
||||
'host_url': request.httprequest.host_url,
|
||||
}
|
||||
return values
|
||||
|
||||
|
|
|
@ -184,13 +184,12 @@ $(function(){
|
|||
});
|
||||
|
||||
|
||||
/**
|
||||
* Client action to go back in global history.
|
||||
* If can't go back in history stack, will go back to home.
|
||||
*/
|
||||
instance.web.ActionGoBack = function(parent, action) {
|
||||
window.location.href = document.referrer;
|
||||
instance.web.ActionRedirect = function(parent, action) {
|
||||
var url = $.deparam(window.location.href).url;
|
||||
if (url) {
|
||||
window.location.href = url;
|
||||
}
|
||||
};
|
||||
instance.web.client_actions.add("goback", "instance.web.ActionGoBack");
|
||||
instance.web.client_actions.add("redirect", "instance.web.ActionRedirect");
|
||||
|
||||
};
|
||||
|
|
|
@ -204,7 +204,7 @@
|
|||
</div>
|
||||
<div class="span8 oe_checkout">
|
||||
<div class="js_inputs row">
|
||||
<a t-if="not partner" href="/admin#action=goback" class="btn btn-primary">Log me, I have an account</a>
|
||||
<a t-if="not partner" t-att-href="'/admin#action=redirect&url=%%s/shop/checkout' %% host_url" class="btn btn-primary">Log me, I have an account</a>
|
||||
<h3 class="span8">Billing Information</h3>
|
||||
<label class="span8 css_required">Name and firstname<input class="span7" type="text" name="name" placeholder="Name and firstname" t-att-value="partner.name or ''"/></label>
|
||||
<label class="span4 css_required">Telephone<input type="tel" name="phone" placeholder="Telephone" t-att-value="partner.phone or ''"/></label>
|
||||
|
|
Loading…
Reference in New Issue