public function renderorderformAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->getHelper("layout")->disableLayout();
     $aJson = null;
     if ($this->_request->isPost()) {
         $aPostData = $this->_request->getPost();
         $nOrderId = (int) $aPostData["order_id"];
         if ($nOrderId) {
             if ($aPostData["module"] == "borrower") {
                 $oModelOrderJournal = new Borrower_Model_VOrderJournal();
                 $oFormOrderSettings = new Borrower_Form_OrderSettings();
             } else {
                 if ($aPostData["module"] == "user") {
                     if ($this->_sRoleName == "superadministrator" || $this->_sRoleName == "administrator" || $this->_sRoleName == "librarian") {
                         $oModelOrderJournal = new User_Model_OrderJournal();
                         $oFormOrderSettings = new User_Form_OrderSettings();
                     }
                 }
             }
             if (isset($oFormOrderSettings)) {
                 $oOrderJournal = $oModelOrderJournal->getRow($nOrderId);
                 $oFormOrderSettings->getOrderFields($oOrderJournal->order_status_id, $oOrderJournal->is_journal_collection);
                 $aJson = $oFormOrderSettings->render();
             }
         }
     }
     header("Content-type: application/json");
     echo Zend_Json::encode($aJson);
     exit;
 }
Ejemplo n.º 2
0
 public function orderformAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->getHelper("layout")->disableLayout();
     $oFormOrderSettings = new User_Form_OrderSettings();
     $sJson = $oFormOrderSettings->render();
     header("Content-type: application/json");
     echo Zend_Json::encode($sJson);
     exit;
 }