<?php 
 class Application_Model_Form_SubjectEdit extends MyWeb_Form
{

    public function init()
    {
        $root = 'index.php';
        $request = Zend_Controller_Front::getInstance()->getRequest();
        $getValue = $request->getParams();
        $path = explode($root, $request->getRequestUri());
        
        
        // nastaví atributy formuláře
        $this->setAction("edit");
        $this->setMethod("post");
        $this->setAttrib("id", "form_subject_edit");
        //nacteni config souboru s definovan7mi fomularovymi prvky
        $config = new Zend_Config_Ini(APPLICATION_PATH . "/forms/subjectEdit.ini");
        $this->setConfig($config);
        
        $subject = $this->_model->fetchEntry(NULL);
        
        //***************************************************************************
        $url = new Zend_View_Helper_Url();
        
        $link = '<a href = "'."javascript:load0()".'">state</a>';
        $element = $this->getElement('State_id_stateValue');
        $element->setLabel('State');
        $element->setDescription( $link );
        $element->setDecorators(	array('ViewHelper',array('Description', array('escape' => false, 'tag' => false)),
        array('HtmlTag', array('tag' => 'dd')),
        array('Label', array('tag' => 'dt')),
        'Errors')); 
        $element->setAttrib('disabled',"");
        
        
        
        $State_id_stateHiddenName1 = new Zend_Form_Element_Hidden('State_id_stateHiddenName1');
        $State_id_stateHiddenName1->setValue(NULL);
        
        $State_id_stateInputName1 = new Zend_Form_Element_Text('State_id_stateInputName1');
        $State_id_stateInputName1->setLabel('State_id_stateInputName1');
        $State_id_stateHiddenValue2 = new Zend_Form_Element_Hidden('State_id_stateHiddenValue2');
        $State_id_stateHiddenValue2->setValue(NULL);
        
        $State_id_stateInputValue2 = new Zend_Form_Element_Text('State_id_stateInputValue2');
        $State_id_stateInputValue2->setLabel('State_id_stateInputValue2');
        $State_id_stateHiddenName3 = new Zend_Form_Element_Hidden('State_id_stateHiddenName3');
        $State_id_stateHiddenName3->setValue(NULL);
        
        $State_id_stateInputName3 = new Zend_Form_Element_Text('State_id_stateInputName3');
        $State_id_stateInputName3->setLabel('State_id_stateInputName3');
        $State_id_stateHiddenValue4 = new Zend_Form_Element_Hidden('State_id_stateHiddenValue4');
        $State_id_stateHiddenValue4->setValue(NULL);
        
        $State_id_stateInputValue4 = new Zend_Form_Element_Text('State_id_stateInputValue4');
        $State_id_stateInputValue4->setLabel('State_id_stateInputValue4');
        // vytvoří formulářový prvek odesílací tlačítko
        $submitInsert = new Zend_Form_Element_Submit("send", array("label" => "edit"));
        // přidá formulářové prvky do formuláře
        //$this->addElements(array($option_state,$hidden_role));
        $this->addDisplayGroup(array('id_subject','subject_name','State_id_state'),'formRoleEdit',array('legend' => 'Formular'));
        $this->addElements(array(	$submitInsert,$State_id_stateHiddenName1, $State_id_stateInputName1, $State_id_stateHiddenValue2, $State_id_stateInputValue2, $State_id_stateHiddenName3, $State_id_stateInputName3, $State_id_stateHiddenValue4, $State_id_stateInputValue4));
    }


}
