*/ class Mage_Adminhtml_Block_Review_Edit_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $review = Mage::registry('review_data'); $product = Mage::getModel('catalog/product')->load($review->getEntityPkValue()); $customer = Mage::getModel('customer/customer')->load($review->getCustomerId()); $form = new Varien_Data_Form(array( 'id' => 'edit_form', 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'), 'ret' => Mage::registry('ret'))), 'method' => 'post' )); $fieldset = $form->addFieldset('review_details', array('legend' => Mage::helper('review')->__('Review Details'), 'class' => 'fieldset-wide')); $fieldset->addField('product_name', 'note', array( 'label' => Mage::helper('review')->__('Product'), 'text' => '' . $product->getName() . '' )); if ($customer->getId()) { $customerText = Mage::helper('review')->__('%2$s (%3$s)', $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab' => 'review')), $this->escapeHtml($customer->getName()), $this->escapeHtml($customer->getEmail())); } else { if (is_null($review->getCustomerId())) { $customerText = Mage::helper('review')->__('Guest'); } elseif ($review->getCustomerId() == 0) { $customerText = Mage::helper('review')->__('Administrator'); } } $fieldset->addField('customer', 'note', array( 'label' => Mage::helper('review')->__('Posted By'), 'text' => $customerText, )); $fieldset->addField('summary_rating', 'note', array( 'label' => Mage::helper('review')->__('Summary Rating'), 'text' => $this->getLayout()->createBlock('adminhtml/review_rating_summary')->toHtml(), )); $fieldset->addField('detailed_rating', 'note', array( 'label' => Mage::helper('review')->__('Detailed Rating'), 'required' => true, 'text' => '