Fix tabbox widget validation to stay with the same tab when the form get submitted

This commit is contained in:
Hadi Nategh 2013-11-12 16:38:23 +00:00
parent b0237ef5a3
commit 639040787b

View File

@ -55,7 +55,8 @@ class etemplate_widget_tabbox extends etemplate_widget
public function validate($cname, array $expand, array $content, &$validated=array())
{
$form_name = self::form_name($cname, $this->id, $expand);
if (!$this->is_readonly($cname, $form_name))
if (!empty($form_name))
{
$value = self::get_array($content, $form_name);
$valid =& self::get_array($validated, $form_name, true);