]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
Add a label to inline model field
authorAndrey Kutejko <andy128k@gmail.com>
Wed, 31 Aug 2022 18:51:40 +0000 (20:51 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Wed, 31 Aug 2022 18:51:40 +0000 (20:51 +0200)
src/adminmodel.php

index 247f41c0ef694e1d44d50bf7fad26946c51cfe9c..127e79188d16816bf7cf8bcc0905bc4bf3b1d434 100644 (file)
@@ -263,10 +263,13 @@ class IPF_Admin_ModelForm extends IPF_Form_Model
 
         foreach ($this->inlines as $inline) {
             $name = $inline->getModelName();
+            $label = $inline->getLegend();
+
             $this->fields[$name] = $inline->createField($extra);
+            $this->fields[$name]->label = $label;
 
             $this->field_groups[] = array(
-                'label' => $inline->getLegend(),
+                'label' => $label,
                 'fields' => array($name),
             );
         }