<?php
class Banner_Form_Admin_Delete extends Zend_Form {

	public function init() {
		$this->setAttrib('class', 'no-ajax');
		$page = new Zend_Navigation_Page_Mvc(array('module' => 'Banner', 'controller' => 'admin_banner', 'action' => 'delete-slide'));

		$this->setAction($page->getHref());
		$this->addElement('Hidden', 'slide_id', array('required' => true,
			'validators' => array(new Zend_Validate_Int()))
		);

		$this->getElement('slide_id')->clearDecorators()
			->addDecorators(array('ViewHelper'));

		$this->addElement('Button', 'execute', array(
			'class' => 'button red',
			'type' => 'submit',
			'label' => 'Usuń',
			'decorators' => array('ViewHelper')
		));

		$page = new Zend_Navigation_Page_Mvc(array('module' => 'admin', 'controller' => 'homepage', 'action' => 'slider'));

		$this->addElement('Button', 'cancel', array(
			'class' => 'button white',
			'label' => 'Anuluj',
			'onclick' => 'javascript:$(document).trigger(\'close.facebox\')',
			'decorators' => array('ViewHelper')
		));
	}

}
