public function viewpopupAction()
 {
     Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
     $id = $this->getRequest()->getParam('id');
     if ($id == '') {
         $id = $loginUserId;
     }
     $callval = $this->getRequest()->getParam('call');
     if ($callval == 'ajaxcall') {
         $this->_helper->layout->disableLayout();
     }
     $objName = 'empleaves';
     $empleavesform = new Default_Form_empleaves();
     $employeeleavesModal = new Default_Model_Employeeleaves();
     $leavemanagementModel = new Default_Model_Leavemanagement();
     $empleavesform->removeElement("submit");
     $elements = $empleavesform->getElements();
     if (count($elements) > 0) {
         foreach ($elements as $key => $element) {
             if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                 $element->setAttrib("disabled", "disabled");
             }
         }
     }
     $data = $employeeleavesModal->getsingleEmpleavesrow($id);
     if (!empty($data)) {
         $leaveTypeCount = $leavemanagementModel->getEmployeeUsedLeavesName($data['user_id'], $data['alloted_year']);
     }
     if (!empty($data)) {
         $empleavesform->populate($data);
         $empleavesform->leave_limit->setValue($data['emp_leave_limit']);
     }
     $this->view->controllername = $objName;
     $this->view->leaveTypeCount = $leaveTypeCount;
     $this->view->id = $id;
     $this->view->form = $empleavesform;
 }