diff --git a/admin-dev/themes/template/helper/form/form.tpl b/admin-dev/themes/template/helper/form/form.tpl
index 81effb159..779638375 100644
--- a/admin-dev/themes/template/helper/form/form.tpl
+++ b/admin-dev/themes/template/helper/form/form.tpl
@@ -322,14 +322,4 @@
{/if}
{block name="other_fieldsets"}{/block}
-
-
-
-{if $firstCall && !$no_back}
- {if $back}
-
{l s='Back'}
- {else}
-
{l s='Back to list'}
- {/if}
-
-{/if}
+
\ No newline at end of file
diff --git a/admin-dev/themes/template/helper/list/list_footer.tpl b/admin-dev/themes/template/helper/list/list_footer.tpl
index e49811289..858109471 100644
--- a/admin-dev/themes/template/helper/list/list_footer.tpl
+++ b/admin-dev/themes/template/helper/list/list_footer.tpl
@@ -41,14 +41,4 @@
{*
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
echo '
';
-*}
-
-{if !$no_back}
-
- {if $back}
-
{l s='Back'}
- {else}
-
{l s='Back to list'}
- {/if}
-
-{/if}
\ No newline at end of file
+*}
\ No newline at end of file
diff --git a/classes/AdminController.php b/classes/AdminController.php
index c0d1314f6..8fbd9340f 100644
--- a/classes/AdminController.php
+++ b/classes/AdminController.php
@@ -738,10 +738,25 @@ class AdminControllerCore extends Controller
// @todo defining default buttons
case 'add':
case 'edit':
+ // Default save button - action dynamically handled in javascript
$this->toolbar_btn['save'] = array(
'href' => '#',
'desc' => $this->l('Save')
);
+
+ case 'view':
+ // Default cancel button - like old back link
+ if (!isset($this->no_back) || $this->no_back == false)
+ {
+ $back = Tools::safeOutput(Tools::getValue('back', ''));
+ if (empty($back))
+ $back = self::$currentIndex.'&token='.$this->token;
+
+ $this->toolbar_btn['cancel'] = array(
+ 'href' => $back,
+ 'desc' => $this->l('Cancel')
+ );
+ }
break;
case 'options':
break;
diff --git a/classes/HelperForm.php b/classes/HelperForm.php
index 381260281..6c0b905ec 100644
--- a/classes/HelperForm.php
+++ b/classes/HelperForm.php
@@ -50,12 +50,6 @@ class HelperFormCore extends Helper
*/
public $submit_action = '';
- /**
- * @var bool
- * Usage : Set the value to true if you want to simply remove the back button
- */
- public $no_back = false;
-
public $token;
public $languages = null;
@@ -93,8 +87,6 @@ class HelperFormCore extends Helper
'defaultFormLanguage' => $this->default_form_language,
'allowEmployeeFormLang' => $this->allow_employee_form_lang,
'form_id' => $this->id,
- 'back' => Tools::getValue('back'),
- 'no_back' => $this->no_back,
'fields' => $this->fields_form,
'fields_value' => $this->fields_value,
'required_fields' => $this->getFieldsRequired(),
diff --git a/classes/HelperList.php b/classes/HelperList.php
index b45426411..d7c49cdee 100644
--- a/classes/HelperList.php
+++ b/classes/HelperList.php
@@ -134,12 +134,6 @@ class HelperListCore extends Helper
$this->footer_tpl = $this->context->smarty->createTemplate($this->footer_tpl);
}
- /**
- * @var bool
- * Usage : Set the value to false if you want to simply display the back button
- */
- public $no_back = true;
-
/**
* Return an html list given the data to fill it up
*
@@ -599,8 +593,6 @@ class HelperListCore extends Helper
'name' => isset($name) ? $name : null,
'name_id' => isset($name_id) ? $name_id : null,
'show_toolbar' => $this->show_toolbar,
- 'back' => Tools::getValue('back'),
- 'no_back' => $this->no_back
));
return $this->header_tpl->fetch();
@@ -617,8 +609,6 @@ class HelperListCore extends Helper
'current' => $this->currentIndex,
'simple_header' => $this->simple_header,
'bulk_actions' => $this->bulk_actions,
- 'back' => Tools::getValue('back'),
- 'no_back' => $this->no_back
));
return $this->footer_tpl->fetch();
}