<?php

/**
 * Group
 *
 * @author Arkadiusz Rychlik <a.rychlik at eppe.com.pl>
 */
class Main_Faq_Form_Admin_Group extends Eppe_Form {
	
	public function init() {
		
		$e = new Zend_Form_Element_Text('name',[
			'required' => true,
			'label' => __('Group name')
		]);
		$e->addValidator(new Eppe_Validate_Db_NoRecordExists([
			'bean' => 'faqgroup',
			'column' => 'name',
			'exclude_id' => $this->getAttrib('beanId')
		]));
		$this->addElement($e);

		$this->addStandardButtons();
		
	}
	
}
