Allow to override attribute settings with the global attribute configuration.
authorGunnar Wrobel <p@rdus.de>
Fri, 26 Jun 2009 07:24:58 +0000 (09:24 +0200)
committerGunnar Wrobel <p@rdus.de>
Fri, 26 Jun 2009 07:24:58 +0000 (09:24 +0200)
koward/lib/Koward/Form/Object.php

index dc80017..a6cd81d 100644 (file)
@@ -154,6 +154,10 @@ class Koward_Form_Object extends Horde_Form {
                 } else {
                     $form_attributes[$key]['label'] = $key;
                 }
+                if (isset($this->koward->attributes[$key])) {
+                    $form_attributes[$key] = array_merge($form_attributes[$key],
+                                                         $this->koward->attributes[$key]);
+                }
                 if (isset($config['attributes']['fields'][$key])) {
                     $form_attributes[$key] = array_merge($form_attributes[$key],
                                                          $config['attributes']['fields'][$key]);