fix column name
This commit is contained in:
parent
c3ec0740ab
commit
2dcffc5c1f
@ -39,10 +39,16 @@ class AdminAntadisSimulatorController extends ModuleAdminController
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
/**
|
||||
* Si formulaire soumis on vérifie que le dossier n'existe pas déjà
|
||||
*
|
||||
*/
|
||||
$path = _PS_ROOT_DIR_.'/themes/simulation';
|
||||
|
||||
if (Tools::isSubmit('submitAddsimulator')) {
|
||||
$name = Tools::getValue('name');
|
||||
$isCreated = mkdir($path.'/'.$name);
|
||||
if (!$isCreated) {
|
||||
$this->errors[] = Tools::displayError("Can't create directory");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
@ -96,7 +102,7 @@ class AdminAntadisSimulatorController extends ModuleAdminController
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Code'),
|
||||
'desc' => $this->l("Code du simulateur - utiliser pour le nom du dossier"),
|
||||
'name' => 'name',
|
||||
'name' => 'code',
|
||||
'empty_message' => $this->l('Le champs code ne peut pas être vide.'),
|
||||
'required' => true,
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user