public function edittranslationAction() { $id = $this->_getParam('id'); $form = new Admin_Form_PartnerForm(); $form->submit->setLabel('Save'); $form->name->setAttrib('disabled', true); $form->logo->setAttrib('disabled', true); $form->website->setAttrib('disabled', true); if (null == $id) { $this->_helper->redirector('index'); } else { $partner = $this->_partner->fetchWithDescription($id, Model_DbTable_PartnerDescription::LANG_EN); if (null == $partner) { $this->_helper->redirector('index'); } } $form->populate($partner->toArray()); if ($this->getRequest()->isPost()) { $post = $this->getRequest()->getPost(); $description = $post['partner']['description']; if ($form->description->isValid($description)) { $data = array('description' => $form->getValue('description')); $where = array('partner_id = ?' => $id, 'language_id = ?' => Model_DbTable_PartnerDescription::LANG_EN); $this->_partnerDescription->update($data, $where); $this->_helper->redirector('index'); } } $this->view->logo = $partner->logo; $this->view->form = $form; }