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