|
@@ -6,6 +6,7 @@ use HostBundle\Utils\DHCPOptions;
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
|
+use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
|
|
|
|
class HostType extends AbstractType
|
|
class HostType extends AbstractType
|
|
{
|
|
{
|
|
@@ -18,12 +19,12 @@ class HostType extends AbstractType
|
|
->add('mac')
|
|
->add('mac')
|
|
->add('hostType')
|
|
->add('hostType')
|
|
->add('state')
|
|
->add('state')
|
|
- ->add('fixedIP', null, [
|
|
|
|
|
|
+ ->add('fixedIP', TextType::class, [
|
|
'required' => false,
|
|
'required' => false,
|
|
])
|
|
])
|
|
;
|
|
;
|
|
foreach (DHCPOptions::getConstants() as $opt) {
|
|
foreach (DHCPOptions::getConstants() as $opt) {
|
|
- $builder->add($opt, 'text', array(
|
|
|
|
|
|
+ $builder->add($opt, TextType::class, array(
|
|
'required'=> false,
|
|
'required'=> false,
|
|
));
|
|
));
|
|
}
|
|
}
|