Improve rendering of options and fields

This commit is contained in:
2015-11-27 13:37:07 +01:00
parent f24a088a0d
commit bf99b68a2a
6 changed files with 65 additions and 16 deletions

View File

@@ -122,7 +122,13 @@ class CustomFieldText implements CustomFieldInterface
return $builder
->add(self::MAX_LENGTH, 'integer', array('empty_data' => 256))
->add(self::MULTIPLE_CF_INLINE, 'choice', array(
'choices' => array('1' => 'True', '0' => 'False')))
'choices' => array(
'1' => 'Multiple boxes on the line',
'0' => 'One box on the line'
),
'label' => 'Box appearance',
'expanded' => True
))
;
}
}

View File

@@ -96,10 +96,13 @@ class CustomFieldTitle implements CustomFieldInterface
public function buildOptionsForm(FormBuilderInterface $builder)
{
return $builder->add(self::TYPE, 'choice',
array('choices' => array(
self::TYPE_TITLE => self::TYPE_TITLE,
self::TYPE_SUBTITLE => self::TYPE_SUBTITLE
))
array(
'choices' => array(
self::TYPE_TITLE => 'Main title',
self::TYPE_SUBTITLE => 'Subtitle'
),
'label' => 'Title level'
)
);
}
}