public function configure() { parent::configure(); unset($this['range']); $this->setWidget('option_host-name', new sfWidgetFormInputText()); $this->setWidget('option_routers', new sfWidgetFormInputText()); $this->setWidget('option_subnet-mask', new sfWidgetFormInputText()); $this->setWidget('option_broadcast-address', new sfWidgetFormInputText()); $this->setWidget('option_domain-name', new sfWidgetFormInputText()); $this->setWidget('option_domain-name-servers', new sfWidgetFormInputText()); $this->setWidget('option_time-servers', new sfWidgetFormInputText()); $this->setWidget('option_log-servers', new sfWidgetFormInputText()); $this->setWidget('option_swap-server', new sfWidgetFormInputText()); $this->setWidget('option_root-path', new sfWidgetFormInputText()); $this->setWidget('option_nis-domain', new sfWidgetFormInputText()); $this->setWidget('option_nis-servers', new sfWidgetFormInputText()); $this->setWidget('option_font-servers', new sfWidgetFormInputText()); $this->setWidget('option_x-display-manager', new sfWidgetFormInputText()); $this->setWidget('option_static-routes', new sfWidgetFormInputText()); $this->setWidget('option_ntp-servers', new sfWidgetFormInputText()); $this->setWidget('option_netbios-name-servers', new sfWidgetFormInputText()); $this->setWidget('option_netbios-scope', new sfWidgetFormInputText()); $this->setWidget('option_netbios-node-type', new sfWidgetFormInputText()); $this->setWidget('option_time-offset', new sfWidgetFormInputText()); $this->setWidget('option_dhcp-server-identifier', new sfWidgetFormInputText()); $this->setWidget('option_slp-directory-agent', new sfWidgetFormInputText()); $this->setWidget('option_slp-service-scope', new sfWidgetFormInputText()); $this->setWidget('use-host-decl-names', new sfWidgetFormInputText()); $this->setWidget('ddns-update-style', new sfWidgetFormInputText()); $this->widgetSchema->setLabel('option_host-name', 'Client hostname'); $this->widgetSchema->setLabel('option_routers', 'Default routers'); $this->widgetSchema->setLabel('option_subnet-mask', 'Subnet mask'); $this->widgetSchema->setLabel('option_broadcast-address', 'Broadcast address'); $this->widgetSchema->setLabel('option_domain-name', 'Domain name'); $this->widgetSchema->setLabel('option_domain-name-servers', 'DNS servers'); $this->widgetSchema->setLabel('option_time-servers', 'Time servers'); $this->widgetSchema->setLabel('option_log-servers', 'Log servers'); $this->widgetSchema->setLabel('option_swap-server', 'Swap server'); $this->widgetSchema->setLabel('option_root-path', 'Root disk path'); $this->widgetSchema->setLabel('option_nis-domain', 'NIS domain'); $this->widgetSchema->setLabel('option_nis-servers', 'NIS servers'); $this->widgetSchema->setLabel('option_font-servers', 'Font servers'); $this->widgetSchema->setLabel('option_x-display-manager', 'XDM servers'); $this->widgetSchema->setLabel('option_static-routes', 'Static routes'); $this->widgetSchema->setLabel('option_ntp-servers', 'NTP servers'); $this->widgetSchema->setLabel('option_netbios-name-servers', 'NetBIOS name servers'); $this->widgetSchema->setLabel('option_netbios-scope', 'NetBIOS scope'); $this->widgetSchema->setLabel('option_netbios-node-type', 'NetBIOS node type'); $this->widgetSchema->setLabel('option_time-offset', 'Time offset'); $this->widgetSchema->setLabel('option_dhcp-server-identifier', 'DHCP server identifier'); $this->widgetSchema->setLabel('option_slp-directory-agent', 'SLP directory agent IPs'); $this->widgetSchema->setLabel('option_slp-service-scope', 'SLP service scope'); $this->widgetSchema->setLabel('use-host-decl-names', 'Use name as client hostname'); $this->widgetSchema->setLabel('ddns-update-style', 'Dynamic DNS update style'); $valSchema = $this->getValidatorSchema(); $valSchema->offsetSet('option', new ValidatorDhcpClientOptions(array('required' => false))); $valSchema->offsetSet('use-host-decl-names', new sfValidatorChoice(array('required' => true, 'choices' => self::$on_off))); $valSchema->offsetSet('ddns-update-style', new sfValidatorChoice(array('required' => false, 'choices' => self::$ddns_update_style))); $valSchema->offsetSet('authoritative', new sfValidatorPass()); }
public function configure() { parent::configure(); $this->setWidget('failover', new sfWidgetFormInputText()); $this->setWidget('allow', new sfWidgetFormInputText()); $this->setWidget('deny', new sfWidgetFormInputText()); $this->widgetSchema->setLabel('failover', 'Failover Peer'); $this->widgetSchema->setLabel('allow', 'Clients to allow'); $this->widgetSchema->setLabel('deny', 'Clients to deny'); $valSchema = $this->getValidatorSchema(); $valSchema->offsetSet('failover', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('parent', new sfValidatorString(array('required' => false))); }
public function configure() { parent::configure(); unset($this['range'], $this['authoritative']); $this->setWidget('lastcomment', new sfWidgetFormInputText()); $this->setWidget('hosts', new sfWidgetFormInputText()); $this->setWidget('parent', new sfWidgetFormInputText()); $this->setWidget('use-host-decl-names', new sfWidgetFormInputText()); $this->widgetSchema->setLabel('lastcomment', 'Group description'); $this->widgetSchema->setLabel('hosts', 'Hosts in this group'); $this->widgetSchema->setLabel('parent', 'Group assigned to'); $this->widgetSchema->setLabel('use-host-decl-names', 'Use name as client hostname'); $valSchema = $this->getValidatorSchema(); $valSchema->offsetSet('lastcomment', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('hosts', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('parent', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('use-host-decl-names', new sfValidatorChoice(array('required' => false, 'choices' => self::$on_off))); }
public function configure() { parent::configure(); unset($this['range']); $this->setWidget('name', new sfWidgetFormInputText()); $this->setWidget('lastcomment', new sfWidgetFormInputText()); $this->setWidget('hosts', new sfWidgetFormInputText()); $this->setWidget('groups', new sfWidgetFormInputText()); $this->setWidget('subnets', new sfWidgetFormInputText()); $this->widgetSchema->setLabel('name', 'Network name'); $this->widgetSchema->setLabel('lastcomment', 'Shared network description'); $this->widgetSchema->setLabel('hosts', 'Hosts directly in this shared network'); $this->widgetSchema->setLabel('groups', 'Groups directly in this shared network'); $this->widgetSchema->setLabel('subnets', 'Subnets in this shared network'); $valSchema = $this->getValidatorSchema(); $valSchema->offsetSet('name', new sfValidatorString(array('required' => true))); $valSchema->offsetSet('lastcomment', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('hosts', new ValidatorArray(array('required' => false))); $valSchema->offsetSet('groups', new ValidatorArray(array('required' => false))); $valSchema->offsetSet('subnets', new ValidatorArray(array('required' => false))); }
public function configure() { parent::configure(); unset($this['range'], $this['authoritative']); $this->setWidget('host', new sfWidgetFormInputText()); $this->setWidget('lastcomment', new sfWidgetFormInputText()); $this->setWidget('parent', new sfWidgetFormInputText()); $this->setWidget('fixed-address', new sfWidgetFormInputText()); $this->setWidget('hardware', new sfWidgetFormInputText()); $this->widgetSchema->setLabel('host', 'Host name'); $this->widgetSchema->setLabel('lastcomment', 'Host description'); $this->widgetSchema->setLabel('parent', 'Host assigned to'); $this->widgetSchema->setLabel('fixed-address', 'Fixed IP address'); $this->widgetSchema->setLabel('hardware', 'Hardware Address'); $valSchema = $this->getValidatorSchema(); $valSchema->offsetSet('host', new sfValidatorString(array('required' => true))); $valSchema->offsetSet('lastcomment', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('parent', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('fixed-address', new ValidatorIP(array('required' => false))); $valSchema->offsetSet('hardware', new sfValidatorString(array('required' => false))); }
public function configure() { parent::configure(); $this->setWidget('address', new sfWidgetFormInputText()); $this->setWidget('netmask', new sfWidgetFormInputText()); $this->setWidget('lastcomment', new sfWidgetFormInputText()); $this->setWidget('parent', new sfWidgetFormInputText()); $this->setWidget('hosts', new sfWidgetFormInputText()); $this->setWidget('groups', new sfWidgetFormInputText()); $this->widgetSchema->setLabel('address', 'Network address'); $this->widgetSchema->setLabel('netmask', 'Netmask'); $this->widgetSchema->setLabel('lastcomment', 'Subnet description'); $this->widgetSchema->setLabel('parent', 'Shared network'); $this->widgetSchema->setLabel('hosts', 'Hosts directly in this subnet'); $this->widgetSchema->setLabel('groups', 'Groups directly in this subnet'); $valSchema = $this->getValidatorSchema(); $valSchema->offsetSet('address', new ValidatorIP(array('required' => true))); $valSchema->offsetSet('netmask', new ValidatorIP(array('required' => true))); $valSchema->offsetSet('lastcomment', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('parent', new sfValidatorString(array('required' => false))); $valSchema->offsetSet('hosts', new ValidatorArray(array('required' => false))); $valSchema->offsetSet('groups', new ValidatorArray(array('required' => false))); }