<?php 
 class Application_Model_Form_ArticleHasSubjectEdit 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_ArticleHasSubject_edit");
        //nacteni config souboru s definovan7mi fomularovymi prvky
        $config = new Zend_Config_Ini(APPLICATION_PATH . "/forms/ArticleHasSubjectEdit.ini");
        $this->setConfig($config);
        
        $ArticleHasSubject = $this->_model->fetchEntry(NULL);
        
        //***************************************************************************
        $url = new Zend_View_Helper_Url();
        
        $link = '<a href = "'."javascript:load0()".'">subjectlevel</a>';
        $element = $this->getElement('SubjectLevel_id_subjectLevelValue');
        $element->setLabel('Subjectlevel');
        $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',"");
        
        
        
        $SubjectLevel_id_subjectLevelHiddenName1 = new Zend_Form_Element_Hidden('SubjectLevel_id_subjectLevelHiddenName1');
        $SubjectLevel_id_subjectLevelHiddenName1->setValue(NULL);
        
        $SubjectLevel_id_subjectLevelInputName1 = new Zend_Form_Element_Text('SubjectLevel_id_subjectLevelInputName1');
        $SubjectLevel_id_subjectLevelInputName1->setLabel('SubjectLevel_id_subjectLevelInputName1');
        $SubjectLevel_id_subjectLevelHiddenValue2 = new Zend_Form_Element_Hidden('SubjectLevel_id_subjectLevelHiddenValue2');
        $SubjectLevel_id_subjectLevelHiddenValue2->setValue(NULL);
        
        $SubjectLevel_id_subjectLevelInputValue2 = new Zend_Form_Element_Text('SubjectLevel_id_subjectLevelInputValue2');
        $SubjectLevel_id_subjectLevelInputValue2->setLabel('SubjectLevel_id_subjectLevelInputValue2');
        $SubjectLevel_id_subjectLevelHiddenName3 = new Zend_Form_Element_Hidden('SubjectLevel_id_subjectLevelHiddenName3');
        $SubjectLevel_id_subjectLevelHiddenName3->setValue(NULL);
        
        $SubjectLevel_id_subjectLevelInputName3 = new Zend_Form_Element_Text('SubjectLevel_id_subjectLevelInputName3');
        $SubjectLevel_id_subjectLevelInputName3->setLabel('SubjectLevel_id_subjectLevelInputName3');
        $SubjectLevel_id_subjectLevelHiddenValue4 = new Zend_Form_Element_Hidden('SubjectLevel_id_subjectLevelHiddenValue4');
        $SubjectLevel_id_subjectLevelHiddenValue4->setValue(NULL);
        
        $SubjectLevel_id_subjectLevelInputValue4 = new Zend_Form_Element_Text('SubjectLevel_id_subjectLevelInputValue4');
        $SubjectLevel_id_subjectLevelInputValue4->setLabel('SubjectLevel_id_subjectLevelInputValue4');
        // 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('Article_id_article','SubjectLevel_id_subjectLevel'),'formRoleEdit',array('legend' => 'Formular'));
        $this->addElements(array(	$submitInsert,$SubjectLevel_id_subjectLevelHiddenName1, $SubjectLevel_id_subjectLevelInputName1, $SubjectLevel_id_subjectLevelHiddenValue2, $SubjectLevel_id_subjectLevelInputValue2, $SubjectLevel_id_subjectLevelHiddenName3, $SubjectLevel_id_subjectLevelInputName3, $SubjectLevel_id_subjectLevelHiddenValue4, $SubjectLevel_id_subjectLevelInputValue4));
    }


}
