<?php 
 class Application_Model_Form_FileEdit 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_file_edit");
        //nacteni config souboru s definovan7mi fomularovymi prvky
        $config = new Zend_Config_Ini(APPLICATION_PATH . "/forms/fileEdit.ini");
        $this->setConfig($config);
        
        $file = $this->_model->fetchEntry(NULL);
        
        //***************************************************************************
        $url = new Zend_View_Helper_Url();
        
        $link = '<a href = "'."javascript:load0()".'">typefile</a>';
        $element = $this->getElement('TypeFile_id_typeFileValue');
        $element->setLabel('Typefile');
        $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',"");
        
        
        
        $TypeFile_id_typeFileHiddenName1 = new Zend_Form_Element_Hidden('TypeFile_id_typeFileHiddenName1');
        $TypeFile_id_typeFileHiddenName1->setValue(NULL);
        
        $TypeFile_id_typeFileInputName1 = new Zend_Form_Element_Text('TypeFile_id_typeFileInputName1');
        $TypeFile_id_typeFileInputName1->setLabel('TypeFile_id_typeFileInputName1');
        $TypeFile_id_typeFileHiddenValue2 = new Zend_Form_Element_Hidden('TypeFile_id_typeFileHiddenValue2');
        $TypeFile_id_typeFileHiddenValue2->setValue(NULL);
        
        $TypeFile_id_typeFileInputValue2 = new Zend_Form_Element_Text('TypeFile_id_typeFileInputValue2');
        $TypeFile_id_typeFileInputValue2->setLabel('TypeFile_id_typeFileInputValue2');
        $TypeFile_id_typeFileHiddenName3 = new Zend_Form_Element_Hidden('TypeFile_id_typeFileHiddenName3');
        $TypeFile_id_typeFileHiddenName3->setValue(NULL);
        
        $TypeFile_id_typeFileInputName3 = new Zend_Form_Element_Text('TypeFile_id_typeFileInputName3');
        $TypeFile_id_typeFileInputName3->setLabel('TypeFile_id_typeFileInputName3');
        $TypeFile_id_typeFileHiddenValue4 = new Zend_Form_Element_Hidden('TypeFile_id_typeFileHiddenValue4');
        $TypeFile_id_typeFileHiddenValue4->setValue(NULL);
        
        $TypeFile_id_typeFileInputValue4 = new Zend_Form_Element_Text('TypeFile_id_typeFileInputValue4');
        $TypeFile_id_typeFileInputValue4->setLabel('TypeFile_id_typeFileInputValue4');
        
        //***************************************************************************
        $url = new Zend_View_Helper_Url();
        
        $link = '<a href = "'."javascript:load1()".'">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');
        
        //***************************************************************************
        $url = new Zend_View_Helper_Url();
        
        $link = '<a href = "'."javascript:load2()".'">user</a>';
        $element = $this->getElement('User_id_userValue');
        $element->setLabel('User');
        $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',"");
        
        
        
        $User_id_userHiddenName1 = new Zend_Form_Element_Hidden('User_id_userHiddenName1');
        $User_id_userHiddenName1->setValue(NULL);
        
        $User_id_userInputName1 = new Zend_Form_Element_Text('User_id_userInputName1');
        $User_id_userInputName1->setLabel('User_id_userInputName1');
        $User_id_userHiddenValue2 = new Zend_Form_Element_Hidden('User_id_userHiddenValue2');
        $User_id_userHiddenValue2->setValue(NULL);
        
        $User_id_userInputValue2 = new Zend_Form_Element_Text('User_id_userInputValue2');
        $User_id_userInputValue2->setLabel('User_id_userInputValue2');
        $User_id_userHiddenName3 = new Zend_Form_Element_Hidden('User_id_userHiddenName3');
        $User_id_userHiddenName3->setValue(NULL);
        
        $User_id_userInputName3 = new Zend_Form_Element_Text('User_id_userInputName3');
        $User_id_userInputName3->setLabel('User_id_userInputName3');
        $User_id_userHiddenValue4 = new Zend_Form_Element_Hidden('User_id_userHiddenValue4');
        $User_id_userHiddenValue4->setValue(NULL);
        
        $User_id_userInputValue4 = new Zend_Form_Element_Text('User_id_userInputValue4');
        $User_id_userInputValue4->setLabel('User_id_userInputValue4');
        // 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_file','file_path','file_name','file_dateTime','TypeFile_id_typeFile','State_id_state','User_id_user'),'formRoleEdit',array('legend' => 'Formular'));
        $this->addElements(array(	$submitInsert,$TypeFile_id_typeFileHiddenName1, $TypeFile_id_typeFileInputName1, $TypeFile_id_typeFileHiddenValue2, $TypeFile_id_typeFileInputValue2, $TypeFile_id_typeFileHiddenName3, $TypeFile_id_typeFileInputName3, $TypeFile_id_typeFileHiddenValue4, $TypeFile_id_typeFileInputValue4, $State_id_stateHiddenName1, $State_id_stateInputName1, $State_id_stateHiddenValue2, $State_id_stateInputValue2, $State_id_stateHiddenName3, $State_id_stateInputName3, $State_id_stateHiddenValue4, $State_id_stateInputValue4, $User_id_userHiddenName1, $User_id_userInputName1, $User_id_userHiddenValue2, $User_id_userInputValue2, $User_id_userHiddenName3, $User_id_userInputName3, $User_id_userHiddenValue4, $User_id_userInputValue4));
    }


}
