// Add HelperOptions to generate preferences forms

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9369 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-10-14 14:30:07 +00:00
parent 5bd7821915
commit 92565efe43
11 changed files with 1120 additions and 70 deletions
+4 -7
View File
@@ -49,8 +49,6 @@ class HelperFormCore extends Helper
public $default_form_language = null;
public $allow_employee_form_lang = null;
public static $currentIndex;
public $tpl = 'form.tpl';
public function generateForm($fields_form)
@@ -64,7 +62,7 @@ class HelperFormCore extends Helper
{
$this->context->smarty->assign(array(
'firstCall' => $this->first_call,
'current' => self::$currentIndex,
'current' => $this->currentIndex,
'token' => $this->token,
'table' => $this->table,
'languages' => $this->languages,
@@ -85,10 +83,9 @@ class HelperFormCore extends Helper
public function getFieldsRequired()
{
if (isset($this->fields_form['input']))
foreach ($this->fields_form['input'] as $input)
if (array_key_exists('required', $input) && $input['required'])
return true;
foreach ($this->fields_form['input'] as $input)
if (array_key_exists('required', $input) && $input['required'])
return true;
return false;
}