示例#1
0
 /**
  * ExtensionDetailsForm constructor.
  *
  * @global <type> $shout->extensions
  * @param <type> $vars
  * @return <type>
  */
 function __construct(&$vars)
 {
     $action = $vars->get('action');
     if ($action == 'edit') {
         $formtitle = "Edit User";
     } else {
         $formtitle = "Add User";
     }
     $accountname = $GLOBALS['session']->get('shout', 'curaccount_name');
     $title = sprintf(_("{$formtitle} - Account: %s"), $accountname);
     parent::__construct($vars, $title);
     $extension = $vars->get('extension');
     $this->addHidden('', 'action', 'text', true);
     $this->addHidden('', 'oldextension', 'text', false);
     $this->addVariable(_("Full Name"), 'name', 'text', true);
     $this->addVariable(_("Extension"), 'extension', 'int', true);
     $this->addVariable(_("E-Mail Address"), 'email', 'email', true);
     //$this->addVariable(_("Pager E-Mail Address"), 'pageremail', 'email', false);
     $this->addVariable(_("PIN"), 'mailboxpin', 'int', true);
     return true;
 }
示例#2
0
 /**
  * Function shows basic detail for the record
  * @param <type> $request
  */
 function showModuleBasicView($request)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     $detailViewLinkParams = array('MODULE' => $moduleName, 'RECORD' => $recordId);
     $detailViewLinks = $this->record->getDetailViewLinks($detailViewLinkParams);
     $this->record->getWidgets($detailViewLinkParams);
     $viewer = $this->getViewer($request);
     $viewer->assign('RECORD', $recordModel);
     $viewer->assign('MODULE_SUMMARY', $this->showModuleSummaryView($request));
     $viewer->assign('DETAILVIEW_WIDGETS', $this->record->widgets);
     $viewer->assign('DETAILVIEW_LINKS', $detailViewLinks);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('IS_AJAX_ENABLED', $this->isAjaxEnabled($recordModel));
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('VIEW', $request->get('view'));
     $recordStrucure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_DETAIL);
     $structuredValues = $recordStrucure->getStructure();
     $moduleModel = $recordModel->getModule();
     $viewer->assign('RECORD_STRUCTURE', $structuredValues);
     $viewer->assign('BLOCK_LIST', $moduleModel->getBlocks());
     echo $viewer->view('DetailViewSummaryContents.tpl', $moduleName, true);
 }
示例#3
0
 /**
  * Function shows basic detail for the record
  * @param <type> $request
  */
 function showModuleBasicView($request)
 {
     global $log;
     $log->debug("Entering Vtiger/views/Detail.php::showModuleBasicView");
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     $detailViewLinkParams = array('MODULE' => $moduleName, 'RECORD' => $recordId);
     $detailViewLinks = $this->record->getDetailViewLinks($detailViewLinkParams);
     // begin tao - (2016/01/22)
     $recordModel->set("invoice", CRMEntity::getInstance("Accounts")->get_billing_amount($recordId));
     $recordModel->set("payment", CRMEntity::getInstance("Accounts")->get_payment_amount($recordId));
     // end tao - (2016/01/22)
     $viewer = $this->getViewer($request);
     $viewer->assign('RECORD', $recordModel);
     $viewer->assign('MODULE_SUMMARY', $this->showModuleSummaryView($request));
     //		$viewer->assign('DETAILVIEW_LINKS', $detailViewLinks);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('IS_AJAX_ENABLED', $this->isAjaxEnabled($recordModel));
     $viewer->assign('MODULE_NAME', $moduleName);
     $recordStrucure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_DETAIL);
     $structuredValues = $recordStrucure->getStructure();
     $moduleModel = $recordModel->getModule();
     $viewer->assign('RECORD_STRUCTURE', $structuredValues);
     $viewer->assign('BLOCK_LIST', $moduleModel->getBlocks());
     echo $viewer->view('DetailViewSummaryContents.tpl', $moduleName, true);
 }