[-] BO : fix bug #PSTEST-988 - Attribute values wrong toolbar title
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
|
||||
class AdminAttributesGroupsControllerCore extends AdminController
|
||||
{
|
||||
protected $id_attribute;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->context = Context::getContext();
|
||||
@@ -469,11 +471,11 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'desc' => $this->l('Save')
|
||||
);
|
||||
|
||||
if ($this->display == 'editAttributes')
|
||||
if ($this->display == 'editAttributes' && !$this->id_attribute)
|
||||
$this->toolbar_btn['save-and-stay'] = array(
|
||||
'short' => 'SaveAndStay',
|
||||
'href' => '#',
|
||||
'desc' => $this->l('Save and add'),
|
||||
'desc' => $this->l('Save then add another value'),
|
||||
'force_desc' => true,
|
||||
);
|
||||
|
||||
@@ -507,18 +509,18 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
switch ($this->display)
|
||||
{
|
||||
case 'edit':
|
||||
$current_tab = array_pop($tabs);
|
||||
$tabs[] = array('name' => $this->l('Edit new Attribute'));
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
$current_tab = array_pop($tabs);
|
||||
$tabs[] = array('name' => $this->l('Add new Attribute'));
|
||||
break;
|
||||
|
||||
case 'editAttributes':
|
||||
$current_tab = array_pop($tabs);
|
||||
$tabs[] = array('name' => $this->l('Add new Value'));
|
||||
if ($this->id_attribute)
|
||||
$tabs[] = array('name' => $this->l('Edit Value'));
|
||||
else
|
||||
$tabs[] = array('name' => $this->l('Add new Value'));
|
||||
break;
|
||||
}
|
||||
// note : this should use a tpl file
|
||||
@@ -536,7 +538,10 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
|
||||
parent::initProcess();
|
||||
if ($this->table == 'attribute')
|
||||
{
|
||||
$this->display = 'editAttributes';
|
||||
$this->id_attribute = (int)Tools::getValue('id_attribute');
|
||||
}
|
||||
}
|
||||
|
||||
protected function defineObjectTypeAttribute()
|
||||
|
||||
@@ -162,12 +162,13 @@ $_LANGADM['AdminAttributesGroups4e140ba723a03baa6948340bf90e2ef6'] = 'Nom :';
|
||||
$_LANGADM['AdminAttributesGroups4f7922279a02c666c5504da88da4ae1b'] = 'Choisir le type d\'attribut';
|
||||
$_LANGADM['AdminAttributesGroups5204077231fc7164e2269e96b584dd95'] = 'Liste déroulante';
|
||||
$_LANGADM['AdminAttributesGroups52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Position';
|
||||
$_LANGADM['AdminAttributesGroups577cf2cf1be74419ac04093a2b4cd64d'] = 'Modifier une valeur';
|
||||
$_LANGADM['AdminAttributesGroups6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Caractères interdits :';
|
||||
$_LANGADM['AdminAttributesGroups630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste';
|
||||
$_LANGADM['AdminAttributesGroups689202409e48743b914713f96d93947c'] = 'Valeur';
|
||||
$_LANGADM['AdminAttributesGroups68efc336eb9a43e50d8115b6b712aca9'] = 'Sauvegarde et Ajouter';
|
||||
$_LANGADM['AdminAttributesGroups6c451a8f2e9598b41a6968542cbe6061'] = 'Type d\'attribut:';
|
||||
$_LANGADM['AdminAttributesGroups76a2e1080cd661b42c6653fc8fd57367'] = 'Texture :';
|
||||
$_LANGADM['AdminAttributesGroups7d5672f569de406c85249db6f1c99ec0'] = 'Enregistrer puis ajouter une nouvelle valeur';
|
||||
$_LANGADM['AdminAttributesGroups859c7c7ffc3e60f67f6537f4d7dd98ca'] = 'La texture actuelle :';
|
||||
$_LANGADM['AdminAttributesGroups9a63ec735f057c1366284bda67eee7de'] = 'Performances';
|
||||
$_LANGADM['AdminAttributesGroups9c29287ce313fd9ed3e9a86e1af4f4b3'] = 'Couleurs HTML uniquement (par exemple,';
|
||||
|
||||
Reference in New Issue
Block a user