当前位置: 首页>>代码示例>>PHP>>正文


PHP Vtiger_Util_Helper类代码示例

本文整理汇总了PHP中Vtiger_Util_Helper的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Util_Helper类的具体用法?PHP Vtiger_Util_Helper怎么用?PHP Vtiger_Util_Helper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Vtiger_Util_Helper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: populateTo

 public function populateTo($request)
 {
     $viewer = $this->getViewer($request);
     $inventoryRecordId = $request->get('record');
     $recordModel = Vtiger_Record_Model::getInstanceById($inventoryRecordId, $request->getModule());
     $inventoryModule = $recordModel->getModule();
     $inventotyfields = $inventoryModule->getFields();
     $toEmailConsiderableFields = array('contact_id', 'account_id', 'vendor_id');
     $db = PearDatabase::getInstance();
     $to = array();
     $to_info = array();
     $toMailNamesList = array();
     foreach ($toEmailConsiderableFields as $fieldName) {
         if (!array_key_exists($fieldName, $inventotyfields)) {
             continue;
         }
         $fieldModel = $inventotyfields[$fieldName];
         if (!$fieldModel->isViewable()) {
             continue;
         }
         $fieldValue = $recordModel->get($fieldName);
         if (empty($fieldValue)) {
             continue;
         }
         $referenceList = $fieldModel->getReferenceList();
         $referenceModule = $referenceList[0];
         $fieldLabel = Vtiger_Util_Helper::getLabel($fieldValue);
         $referenceModuleModel = Vtiger_Module_Model::getInstance($referenceModule);
         $emailFields = $referenceModuleModel->getFieldsByType('email');
         if (count($emailFields) <= 0) {
             continue;
         }
         $current_user = Users_Record_Model::getCurrentUserModel();
         $queryGenerator = new QueryGenerator($referenceModule, $current_user);
         $queryGenerator->setFields(array_keys($emailFields));
         $query = $queryGenerator->getQuery();
         $query .= ' AND crmid = ' . $fieldValue;
         $result = $db->pquery($query, array());
         $num_rows = $db->num_rows($result);
         if ($num_rows <= 0) {
             continue;
         }
         foreach ($emailFields as $fieldName => $emailFieldModel) {
             $emailValue = $db->query_result($result, 0, $fieldName);
             if (!empty($emailValue)) {
                 $to[] = $emailValue;
                 $to_info[$fieldValue][] = $emailValue;
                 $toMailNamesList[$fieldValue][] = array('label' => $fieldLabel, 'value' => $emailValue);
                 break;
             }
         }
         if (!empty($to)) {
             break;
         }
     }
     $viewer->assign('TO', $to);
     $viewer->assign('TOMAIL_NAMES_LIST', $toMailNamesList);
     $viewer->assign('TOMAIL_INFO', $to_info);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:59,代码来源:SendEmail.php

示例2: process

 public function process(Vtiger_Request $request)
 {
     $recordModel = $this->saveRecord($request);
     $fieldModelList = $recordModel->getModule()->getFields();
     $result = array();
     foreach ($fieldModelList as $fieldName => $fieldModel) {
         $recordFieldValue = $recordModel->get($fieldName);
         if (is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') {
             $recordFieldValue = implode(' |##| ', $recordFieldValue);
         }
         if (is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'sharedOwner') {
             $recordFieldValue = implode(',', $recordFieldValue);
         }
         $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue);
         if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date') {
             $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId());
         }
         $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue);
     }
     //Handling salutation type
     if ($request->get('field') === 'firstname' && in_array($request->getModule(), array('Contacts'))) {
         $salutationType = $recordModel->getDisplayValue('salutationtype');
         $firstNameDetails = $result['firstname'];
         $firstNameDetails['display_value'] = $salutationType . " " . $firstNameDetails['display_value'];
         if ($salutationType != '--None--') {
             $result['firstname'] = $firstNameDetails;
         }
     }
     $result['_recordLabel'] = $recordModel->getName();
     $result['_recordId'] = $recordModel->getId();
     $response = new Vtiger_Response();
     $response->setEmitType(Vtiger_Response::$EMIT_JSON);
     $response->setResult($result);
     $response->emit();
 }
开发者ID:krzychab,项目名称:YetiForceCRM,代码行数:35,代码来源:SaveAjax.php

示例3: process

 public function process(Vtiger_Request $request)
 {
     $mode = $request->get('mode');
     if (!empty($mode)) {
         $this->invokeExposedMethod($mode, $request);
         return;
     }
     $recordModel = $this->saveRecord($request);
     $settingsModuleModel = Settings_Users_Module_Model::getInstance();
     $settingsModuleModel->refreshSwitchUsers();
     $fieldModelList = $recordModel->getModule()->getFields();
     $result = array();
     foreach ($fieldModelList as $fieldName => $fieldModel) {
         $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordModel->get($fieldName));
         if ($fieldModel->getFieldDataType() !== 'currency') {
             $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId());
         }
         if ($fieldName == 'language') {
             $displayValue = Vtiger_Language_Handler::getLanguageLabel($fieldValue);
         }
         if (($fieldName == 'currency_decimal_separator' || $fieldName == 'currency_grouping_separator') && $displayValue == '&nbsp;') {
             $displayValue = vtranslate('LBL_SPACE', 'Users');
         }
         $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue);
     }
     $result['_recordLabel'] = $recordModel->getName();
     $result['_recordId'] = $recordModel->getId();
     $response = new Vtiger_Response();
     $response->setEmitType(Vtiger_Response::$EMIT_JSON);
     $response->setResult($result);
     $response->emit();
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:32,代码来源:SaveAjax.php

示例4: content_56755d06176cd

    function content_56755d06176cd($_smarty_tpl)
    {
        ?>
<div class="quickWidgetContainer accordion"><?php 
        $_smarty_tpl->tpl_vars['val'] = new Smarty_variable(1, null, 0);
        $_smarty_tpl->tpl_vars['SIDEBARWIDGET'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->_loop = false;
        $_smarty_tpl->tpl_vars['index'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['QUICK_LINKS']->value['SIDEBARWIDGET'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->key => $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value) {
            $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->_loop = true;
            $_smarty_tpl->tpl_vars['index']->value = $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->key;
            ?>
<div class="quickWidget"><div class="accordion-heading accordion-toggle quickWidgetHeader" data-target="#<?php 
            echo $_smarty_tpl->tpl_vars['MODULE']->value;
            ?>
_sideBar_<?php 
            echo Vtiger_Util_Helper::replaceSpaceWithUnderScores($_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getLabel());
            ?>
"data-toggle="collapse" data-parent="#quickWidgets" data-label="<?php 
            echo $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getLabel();
            ?>
"data-widget-url="<?php 
            echo $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getUrl();
            ?>
" ><span class="pull-left"><img class="imageElement" data-rightimage="<?php 
            echo vimage_path('rightArrowWhite.png');
            ?>
" data-downimage="<?php 
            echo vimage_path('downArrowWhite.png');
            ?>
" src="<?php 
            echo vimage_path('rightArrowWhite.png');
            ?>
" /></span><h5 class="title widgetTextOverflowEllipsis pull-right" title="<?php 
            echo vtranslate($_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getLabel(), $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
"><?php 
            echo vtranslate($_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getLabel(), $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
</h5><div class="loadingImg hide pull-right"><div class="loadingWidgetMsg"><strong><?php 
            echo vtranslate('LBL_LOADING_WIDGET', $_smarty_tpl->tpl_vars['MODULE']->value);
            ?>
</strong></div></div><div class="clearfix"></div></div><div class="widgetContainer accordion-body collapse" id="<?php 
            echo $_smarty_tpl->tpl_vars['MODULE']->value;
            ?>
_sideBar_<?php 
            echo Vtiger_Util_Helper::replaceSpaceWithUnderScores($_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getLabel());
            ?>
" data-url="<?php 
            echo $_smarty_tpl->tpl_vars['SIDEBARWIDGET']->value->getUrl();
            ?>
"></div></div><?php 
        }
        ?>
</div><?php 
    }
开发者ID:wsLapshin,项目名称:charter_crm,代码行数:60,代码来源:9be48198bb63a34d80ac3c1b2bbc45e031f79948.file.SideBarWidgets.tpl.php

示例5: process

 public function process(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $record = $request->get('record');
     if (!empty($record) && $request->get('isDuplicate') == true) {
         $recordModel = Vtiger_Record_Model::getInstanceById($record, $moduleName);
         $viewer->assign('MODE', '');
     } else {
         if (!empty($record)) {
             $recordModel = Vtiger_Record_Model::getInstanceById($record, $moduleName);
             $viewer->assign('RECORD_ID', $record);
             $viewer->assign('MODE', 'edit');
         } else {
             $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
             $viewer->assign('MODE', '');
             $parentId = $request->get('parentId');
             $parentModule = $request->get('parentModule');
             if ($parentId && $parentModule === 'HelpDesk') {
                 $parentRecordModel = Vtiger_Record_Model::getInstanceById($parentId, $parentModule);
                 $recordModel = Faq_Record_Model::getInstanceFromHelpDesk($parentRecordModel);
             }
         }
     }
     $moduleModel = $recordModel->getModule();
     $fieldList = $moduleModel->getFields();
     $requestFieldList = array_intersect_key($request->getAll(), $fieldList);
     foreach ($requestFieldList as $fieldName => $fieldValue) {
         $fieldModel = $fieldList[$fieldName];
         if ($fieldModel->isEditable()) {
             $recordModel->set($fieldName, $fieldModel->getDBInsertValue($fieldValue));
         }
     }
     $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_EDIT);
     $viewMode = $request->get('view_mode');
     if (!empty($viewMode)) {
         $viewer->assign('VIEW_MODE', $viewMode);
     }
     $picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($moduleName);
     $viewer->assign('PICKIST_DEPENDENCY_DATASOURCE', Zend_Json::encode($picklistDependencyDatasource));
     $mappingRelatedField = $moduleModel->getMappingRelatedField($moduleName);
     $viewer->assign('MAPPING_RELATED_FIELD', Zend_Json::encode($mappingRelatedField));
     $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
     $viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('RECORD', $recordModel);
     $viewer->assign('BLOCK_LIST', $moduleModel->getBlocks());
     $viewer->assign('CURRENTDATE', date('Y-n-j'));
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $isRelationOperation = $request->get('relationOperation');
     //if it is relation edit
     $viewer->assign('IS_RELATION_OPERATION', $isRelationOperation);
     if ($isRelationOperation) {
         $viewer->assign('SOURCE_MODULE', $request->get('sourceModule'));
         $viewer->assign('SOURCE_RECORD', $request->get('sourceRecord'));
     }
     $viewer->assign('MAX_UPLOAD_LIMIT_MB', Vtiger_Util_Helper::getMaxUploadSize());
     $viewer->assign('MAX_UPLOAD_LIMIT', vglobal('upload_maxsize'));
     $viewer->view('EditView.tpl', $moduleName);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:60,代码来源:Edit.php

示例6: content_5694a5cf68a7b

    function content_5694a5cf68a7b($_smarty_tpl)
    {
        $_smarty_tpl->tpl_vars["FIELD_INFO"] = new Smarty_variable(Vtiger_Util_Helper::toSafeHTML(Zend_Json::encode($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo())), null, 0);
        $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0);
        ?>
<input id="<?php 
        echo $_smarty_tpl->tpl_vars['MODULE']->value;
        ?>
_editView_fieldName_<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');
        ?>
" type="text" class="input-large" data-validation-engine="validate[<?php 
        if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory() == true) {
            ?>
 required,<?php 
        }
        ?>
funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" name="<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();
        ?>
"value="<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue');
        ?>
" data-fieldinfo='<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;
        ?>
' <?php 
        if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)) {
            ?>
data-validator=<?php 
            echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);
        }
        ?>
 /><?php 
    }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:35,代码来源:1d807fb6928e3e7b7d33738ad954b370d787a974.file.Phone.tpl.php

示例7: if

<?php if ($_valid && !is_callable('content_56059ccb0f8b0')) {function content_56059ccb0f8b0($_smarty_tpl) {?>
<?php $_smarty_tpl->tpl_vars["FIELD_INFO"] = new Smarty_variable(Vtiger_Util_Helper::toSafeHTML(Zend_Json::encode($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo())), null, 0);?><?php $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0);?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='53'){?><?php $_smarty_tpl->tpl_vars['ALL_ACTIVEUSER_LIST'] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->getAccessibleUsers(), null, 0);?><?php $_smarty_tpl->tpl_vars['ALL_ACTIVEGROUP_LIST'] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->getAccessibleGroups(), null, 0);?><?php $_smarty_tpl->tpl_vars['ASSIGNED_USER_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name'), null, 0);?><?php $_smarty_tpl->tpl_vars['CURRENT_USER_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->get('id'), null, 0);?><?php $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'), null, 0);?><?php $_smarty_tpl->tpl_vars['ACCESSIBLE_USER_LIST'] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->getAccessibleUsersForModule($_smarty_tpl->tpl_vars['MODULE']->value), null, 0);?><?php $_smarty_tpl->tpl_vars['ACCESSIBLE_GROUP_LIST'] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->getAccessibleGroupForModule($_smarty_tpl->tpl_vars['MODULE']->value), null, 0);?><?php if ($_smarty_tpl->tpl_vars['FIELD_VALUE']->value==''){?><?php $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['CURRENT_USER_ID']->value, null, 0);?><?php }?><select class="chzn-select <?php echo $_smarty_tpl->tpl_vars['ASSIGNED_USER_ID']->value;?>
" data-validation-engine="validate[<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> required,<?php }?>funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" data-name="<?php echo $_smarty_tpl->tpl_vars['ASSIGNED_USER_ID']->value;?>
" name="<?php echo $_smarty_tpl->tpl_vars['ASSIGNED_USER_ID']->value;?>
" data-fieldinfo='<?php echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;?>
' <?php if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)){?>data-validator=<?php echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);?>
<?php }?>><optgroup label="<?php echo vtranslate('LBL_USERS');?>
"><?php  $_smarty_tpl->tpl_vars['OWNER_NAME'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['OWNER_NAME']->_loop = false;
 $_smarty_tpl->tpl_vars['OWNER_ID'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['ALL_ACTIVEUSER_LIST']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['OWNER_NAME']->key => $_smarty_tpl->tpl_vars['OWNER_NAME']->value){
$_smarty_tpl->tpl_vars['OWNER_NAME']->_loop = true;
 $_smarty_tpl->tpl_vars['OWNER_ID']->value = $_smarty_tpl->tpl_vars['OWNER_NAME']->key;
?><option value="<?php echo $_smarty_tpl->tpl_vars['OWNER_ID']->value;?>
" data-picklistvalue= '<?php echo $_smarty_tpl->tpl_vars['OWNER_NAME']->value;?>
' <?php if ($_smarty_tpl->tpl_vars['FIELD_VALUE']->value==$_smarty_tpl->tpl_vars['OWNER_ID']->value){?> selected <?php }?><?php if (array_key_exists($_smarty_tpl->tpl_vars['OWNER_ID']->value,$_smarty_tpl->tpl_vars['ACCESSIBLE_USER_LIST']->value)){?> data-recordaccess=true <?php }else{ ?> data-recordaccess=false <?php }?>data-userId="<?php echo $_smarty_tpl->tpl_vars['CURRENT_USER_ID']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['OWNER_NAME']->value;?>
</option><?php } ?></optgroup><optgroup label="<?php echo vtranslate('LBL_GROUPS');?>
"><?php  $_smarty_tpl->tpl_vars['OWNER_NAME'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['OWNER_NAME']->_loop = false;
 $_smarty_tpl->tpl_vars['OWNER_ID'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['ALL_ACTIVEGROUP_LIST']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['OWNER_NAME']->key => $_smarty_tpl->tpl_vars['OWNER_NAME']->value){
$_smarty_tpl->tpl_vars['OWNER_NAME']->_loop = true;
 $_smarty_tpl->tpl_vars['OWNER_ID']->value = $_smarty_tpl->tpl_vars['OWNER_NAME']->key;
?><option value="<?php echo $_smarty_tpl->tpl_vars['OWNER_ID']->value;?>
" data-picklistvalue= '<?php echo $_smarty_tpl->tpl_vars['OWNER_NAME']->value;?>
' <?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue')==$_smarty_tpl->tpl_vars['OWNER_ID']->value){?> selected <?php }?><?php if (array_key_exists($_smarty_tpl->tpl_vars['OWNER_ID']->value,$_smarty_tpl->tpl_vars['ACCESSIBLE_GROUP_LIST']->value)){?> data-recordaccess=true <?php }else{ ?> data-recordaccess=false <?php }?> ><?php echo $_smarty_tpl->tpl_vars['OWNER_NAME']->value;?>
</option><?php } ?></optgroup></select><?php }?><?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:28,代码来源:3f8e9ef8574fa5951390e589a04c25ab5bbe9dc0.file.Owner.tpl.php

示例8: process

 public function process(Vtiger_Request $request)
 {
     global $log;
     $log->debug("Entering ./views/QuickCreateAjax.php::process");
     $moduleName = $request->getModule();
     $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
     $moduleModel = $recordModel->getModule();
     $fieldList = $moduleModel->getFields();
     $requestFieldList = array_intersect_key($request->getAll(), $fieldList);
     foreach ($requestFieldList as $fieldName => $fieldValue) {
         $fieldModel = $fieldList[$fieldName];
         if ($fieldModel->isEditable()) {
             $recordModel->set($fieldName, $fieldModel->getDBInsertValue($fieldValue));
         }
     }
     $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_QUICKCREATE);
     $picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($moduleName);
     $viewer = $this->getViewer($request);
     $viewer->assign('PICKIST_DEPENDENCY_DATASOURCE', Zend_Json::encode($picklistDependencyDatasource));
     $viewer->assign('CURRENTDATE', date('Y-n-j'));
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('SINGLE_MODULE', 'SINGLE_' . $moduleName);
     $viewer->assign('MODULE_MODEL', $moduleModel);
     $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
     $viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('SCRIPTS', $this->getHeaderScripts($request));
     $viewer->assign('MAX_UPLOAD_LIMIT_MB', Vtiger_Util_Helper::getMaxUploadSize());
     $viewer->assign('MAX_UPLOAD_LIMIT', vglobal('upload_maxsize'));
     echo $viewer->view('QuickCreate.tpl', $moduleName, true);
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:31,代码来源:QuickCreateAjax.php

示例9: if

<?php if ($_valid && !is_callable('content_56059e7652532')) {function content_56059e7652532($_smarty_tpl) {?>
<?php $_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name'), null, 0);?><?php $_smarty_tpl->tpl_vars["REFERENCE_LIST"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getReferenceList(), null, 0);?><?php $_smarty_tpl->tpl_vars["REFERENCE_LIST_COUNT"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['REFERENCE_LIST']->value), null, 0);?><?php $_smarty_tpl->tpl_vars["FIELD_INFO"] = new Smarty_variable(Vtiger_Util_Helper::toSafeHTML(Zend_Json::encode($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo())), null, 0);?><?php $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0);?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['REFERENCE_LIST_COUNT']->value;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?><input name="popupReferenceModule" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['REFERENCE_LIST']->value[0];?>
" /><?php }?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['REFERENCE_LIST_COUNT']->value;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2>1){?><?php $_smarty_tpl->tpl_vars["DISPLAYID"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'), null, 0);?><?php $_smarty_tpl->tpl_vars["REFERENCED_MODULE_STRUCT"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getReferenceModule($_smarty_tpl->tpl_vars['DISPLAYID']->value), null, 0);?><?php if (!empty($_smarty_tpl->tpl_vars['REFERENCED_MODULE_STRUCT']->value)){?><?php $_smarty_tpl->tpl_vars["REFERENCED_MODULE_NAME"] = new Smarty_variable($_smarty_tpl->tpl_vars['REFERENCED_MODULE_STRUCT']->value->get('name'), null, 0);?><?php }?><?php if (in_array($_smarty_tpl->tpl_vars['REFERENCED_MODULE_NAME']->value,$_smarty_tpl->tpl_vars['REFERENCE_LIST']->value)){?><input name="popupReferenceModule" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['REFERENCED_MODULE_NAME']->value;?>
" /><?php }else{ ?><input name="popupReferenceModule" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['REFERENCE_LIST']->value[0];?>
" /><?php }?><?php }?><input name="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue');?>
" class="sourceField" data-displayvalue='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getEditViewDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
' data-fieldinfo='<?php echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;?>
' /><?php $_smarty_tpl->tpl_vars["displayId"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'), null, 0);?><div class="row-fluid input-prepend input-append"><span class="add-on clearReferenceSelection cursorPointer"><i id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
_editView_fieldName_<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value;?>
_clear" class='icon-remove-sign' title="<?php echo vtranslate('LBL_CLEAR',$_smarty_tpl->tpl_vars['MODULE']->value);?>
"></i></span><input id="<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value;?>
_display" name="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
_display" type="text" class="<?php if ((($_REQUEST['view']=='Edit')||($_REQUEST['module']=='Webforms'))){?> span7 <?php }else{ ?> span8 <?php }?>	marginLeftZero autoComplete" <?php if (!empty($_smarty_tpl->tpl_vars['displayId']->value)){?>readonly="true"<?php }?>value="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getEditViewDisplayValue($_smarty_tpl->tpl_vars['displayId']->value);?>
" data-validation-engine="validate[<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> required,<?php }?>funcCall[Vtiger_Base_Validator_Js.invokeValidation]]"data-fieldinfo='<?php echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;?>
' placeholder="<?php echo vtranslate('LBL_TYPE_SEARCH',$_smarty_tpl->tpl_vars['MODULE']->value);?>
"<?php if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)){?>data-validator='<?php echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);?>
'<?php }?>/><span class="add-on relatedPopup cursorPointer"><i id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
_editView_fieldName_<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value;?>
_select" class="icon-search relatedPopup" title="<?php echo vtranslate('LBL_SELECT',$_smarty_tpl->tpl_vars['MODULE']->value);?>
" ></i></span><?php $_smarty_tpl->tpl_vars['QUICKCREATE_RESTRICTED_MODULES'] = new Smarty_variable(array('SalesOrder','Quotes','Invoice','PurchaseOrder'), null, 0);?><!-- Show the add button only if it is edit view  --><?php if ((($_REQUEST['view']=='Edit')||($_smarty_tpl->tpl_vars['MODULE_NAME']->value=='Webforms'))&&!in_array($_smarty_tpl->tpl_vars['REFERENCE_LIST']->value[0],$_smarty_tpl->tpl_vars['QUICKCREATE_RESTRICTED_MODULES']->value)){?><span class="add-on cursorPointer createReferenceRecord"><i id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
_editView_fieldName_<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value;?>
_create" class='icon-plus' title="<?php echo vtranslate('LBL_CREATE',$_smarty_tpl->tpl_vars['MODULE']->value);?>
"></i></span><?php }?></div>
<?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:27,代码来源:7150f68f2aad69289d124db22f181bbfba7f0e9b.file.Reference.tpl.php

示例10: if

<?php if ($_valid && !is_callable('content_56059e5ce69ac')) {function content_56059e5ce69ac($_smarty_tpl) {?>
<table class="summary-table" style="width:100%;"><tbody><?php  $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false;
 $_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['SUMMARY_RECORD_STRUCTURE']->value['SUMMARY_FIELDS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value){
$_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true;
 $_smarty_tpl->tpl_vars['FIELD_NAME']->value = $_smarty_tpl->tpl_vars['FIELD_MODEL']->key;
?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name')!='modifiedtime'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name')!='createdtime'){?><tr class="summaryViewEntries"><td class="fieldLabel" style="width:35%"><label class="muted"><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</label></td><td class="fieldValue" style="width:65%"><div class="row-fluid"><span class="value" <?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='19'||$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='20'||$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='21'){?>style="word-wrap: break-word;white-space:pre-wrap;"<?php }?>><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getDetailViewTemplateName()), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('FIELD_MODEL'=>$_smarty_tpl->tpl_vars['FIELD_MODEL']->value,'USER_MODEL'=>$_smarty_tpl->tpl_vars['USER_MODEL']->value,'MODULE'=>$_smarty_tpl->tpl_vars['MODULE_NAME']->value,'RECORD'=>$_smarty_tpl->tpl_vars['RECORD']->value), 0);?>
</span><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isEditable()=='true'&&($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType()!=Vtiger_Field_Model::REFERENCE_TYPE)&&$_smarty_tpl->tpl_vars['IS_AJAX_ENABLED']->value&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isAjaxEditable()=='true'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')!=69){?><span class="hide edit"><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getTemplateName(),$_smarty_tpl->tpl_vars['MODULE_NAME']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('FIELD_MODEL'=>$_smarty_tpl->tpl_vars['FIELD_MODEL']->value,'USER_MODEL'=>$_smarty_tpl->tpl_vars['USER_MODEL']->value,'MODULE'=>$_smarty_tpl->tpl_vars['MODULE_NAME']->value), 0);?>
<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType()=='multipicklist'){?><input type="hidden" class="fieldname" value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');?>
[]' data-prev-value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
' /><?php }else{ ?><input type="hidden" class="fieldname" value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');?>
' data-prev-value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue');?>
' /><?php }?></span><span class="summaryViewEdit cursorPointer pull-right">&nbsp;<i class="icon-pencil" title="<?php echo vtranslate('LBL_EDIT',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
"></i></span><?php }?></div></td></tr><?php }?><?php } ?></tbody></table><hr><div class="row-fluid"><div class="span4 toggleViewByMode"><?php $_smarty_tpl->tpl_vars["CURRENT_VIEW"] = new Smarty_variable("full", null, 0);?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
<?php $_tmp1=ob_get_clean();?><?php ob_start();?><?php echo vtranslate('LBL_COMPLETE_DETAILS',$_tmp1);?>
<?php $_tmp2=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["CURRENT_MODE_LABEL"] = new Smarty_variable($_tmp2, null, 0);?><button type="button" class="btn changeDetailViewMode cursorPointer"><strong><?php echo vtranslate('LBL_SHOW_FULL_DETAILS',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</strong></button><?php ob_start();?><?php echo ($_smarty_tpl->tpl_vars['RECORD']->value->getDetailViewUrl()).('&mode=showDetailViewByMode&requestMode=full');?>
<?php $_tmp3=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["FULL_MODE_URL"] = new Smarty_variable($_tmp3, null, 0);?><input type="hidden" name="viewMode" value="<?php echo $_smarty_tpl->tpl_vars['CURRENT_VIEW']->value;?>
" data-nextviewname="full" data-currentviewlabel="<?php echo $_smarty_tpl->tpl_vars['CURRENT_MODE_LABEL']->value;?>
"data-full-url="<?php echo $_smarty_tpl->tpl_vars['FULL_MODE_URL']->value;?>
"  /></div><div class="span8"><div class="pull-right"><div><p><small><?php echo vtranslate('LBL_CREATED_ON',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
 <?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECORD']->value->get('createdtime'));?>
</small></p></div><div><p><small><?php echo vtranslate('LBL_MODIFIED_ON',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
 <?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECORD']->value->get('modifiedtime'));?>
</small></p></div></div></div></div><?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:27,代码来源:33e48621f9021078a695668197e56668702bfe38.file.SummaryViewContents.tpl.php

示例11: if

<?php if ($_valid && !is_callable('content_56059ccaece74')) {function content_56059ccaece74($_smarty_tpl) {?>
<?php $_smarty_tpl->tpl_vars["FIELD_INFO"] = new Smarty_variable(Vtiger_Util_Helper::toSafeHTML(Zend_Json::encode($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo())), null, 0);?><?php $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0);?><?php $_smarty_tpl->tpl_vars["FIELD_NAME"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name'), null, 0);?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='71'){?><div class="input-prepend"><span class="add-on"><?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_symbol');?>
</span><input id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
_editView_fieldName_<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value;?>
" type="text" class="input-medium currencyField" data-validation-engine="validate[<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> required,<?php }?>funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" name="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
"data-fieldinfo='<?php echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;?>
' value="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getEditViewDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
" <?php if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)){?>data-validator='<?php echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);?>
'<?php }?>data-decimal-seperator='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_decimal_separator');?>
' data-group-seperator='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_grouping_separator');?>
' data-number-of-decimal-places='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('no_of_currency_decimals');?>
'/></div><?php }elseif(($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='72')&&($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getName()=='unit_price')){?><div class="input-prepend"><div class="row-fluid"><span class="span1"><span class="add-on row-fluid"><?php echo $_smarty_tpl->tpl_vars['BASE_CURRENCY_SYMBOL']->value;?>
</span></span><span class="span10 row-fluid"><input id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
-editview-fieldname-<?php echo $_smarty_tpl->tpl_vars['FIELD_NAME']->value;?>
" type="text" class="span6 unitPrice currencyField" name="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
" data-validation-engine="validate[<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> required,<?php }?>funcCall[Vtiger_Base_Validator_Js.invokeValidation]]"data-fieldinfo='<?php echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;?>
'  value="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
" <?php if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)){?>data-validator='<?php echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);?>
'<?php }?>data-decimal-seperator='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_decimal_separator');?>
' data-group-seperator='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_grouping_separator');?>
' data-number-of-decimal-places='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('no_of_currency_decimals');?>
'/><?php if ($_REQUEST['view']=='Edit'){?><a id="moreCurrencies" class="span cursorPointer"><?php echo vtranslate('LBL_MORE_CURRENCIES',$_smarty_tpl->tpl_vars['MODULE']->value);?>
>></a><span id="moreCurrenciesContainer" class="hide"></span><?php }?><input type="hidden" name="base_currency" value="<?php echo $_smarty_tpl->tpl_vars['BASE_CURRENCY_NAME']->value;?>
"><input type="hidden" name="cur_<?php echo $_smarty_tpl->tpl_vars['BASE_CURRENCY_ID']->value;?>
_check" value="on"><input type="hidden" id="requstedUnitPrice" name="<?php echo $_smarty_tpl->tpl_vars['BASE_CURRENCY_NAME']->value;?>
" value=""></span></div></div><?php }else{ ?><div class="input-prepend"><div class="row-fluid"><span class="span1"><span class="add-on row-fluid"><?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_symbol');?>
</span></span><span class="span7"><input type="text" class="row-fluid currencyField" name="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
" data-validation-engine="validate[<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> required,<?php }?>funcCall[Vtiger_Base_Validator_Js.invokeValidation]]"data-fieldinfo='<?php echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;?>
' value="<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getEditViewDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
" <?php if (!empty($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value)){?>data-validator=<?php echo Zend_Json::encode($_smarty_tpl->tpl_vars['SPECIAL_VALIDATOR']->value);?>
<?php }?> data-decimal-seperator='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_decimal_separator');?>
' data-group-seperator='<?php echo $_smarty_tpl->tpl_vars['USER_MODEL']->value->get('currency_grouping_separator');?>
' /></span></div></div><?php }?><?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:33,代码来源:beabb76d8239160d53595b37990313ca274ffffb.file.Currency.tpl.php

示例12: process

 public function process(Vtiger_Request $request)
 {
     $qualifiedModuleName = $request->getModule(false);
     $moduleModel = Settings_Vtiger_CompanyDetails_Model::getInstance();
     $saveLogo = $securityError = false;
     $logoDetails = $_FILES['logo'];
     $fileType = explode('/', $logoDetails['type']);
     $fileType = $fileType[1];
     $logoContent = file_get_contents($logoDetails['tmp_name']);
     if (preg_match('(<\\?php?(.*?))', $imageContent) != 0) {
         $securityError = true;
     }
     if (!$securityError) {
         if ($logoDetails['size'] && in_array($fileType, Settings_Vtiger_CompanyDetails_Model::$logoSupportedFormats)) {
             $saveLogo = true;
         }
         if ($saveLogo) {
             $moduleModel->saveLogo();
             $moduleModel->set('logoname', ltrim(basename(' ' . Vtiger_Util_Helper::sanitizeUploadFileName($logoDetails['name'], vglobal('upload_badext')))));
             $moduleModel->save();
         }
     }
     $reloadUrl = $moduleModel->getIndexViewUrl();
     if ($securityError) {
         $reloadUrl .= '&error=LBL_IMAGE_CORRUPTED';
     } else {
         if (!$saveLogo) {
             $reloadUrl .= '&error=LBL_INVALID_IMAGE';
         }
     }
     header('Location: ' . $reloadUrl);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:32,代码来源:UpdateCompanyLogo.php

示例13: process

 public function process(Vtiger_Request $request)
 {
     $mode = $request->get('mode');
     if (!empty($mode)) {
         $this->invokeExposedMethod($mode, $request);
         return;
     }
     $recordModel = $this->saveRecord($request);
     $fieldModelList = $recordModel->getModule()->getFields();
     $result = array();
     foreach ($fieldModelList as $fieldName => $fieldModel) {
         $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordModel->get($fieldName));
         if ($fieldModel->getFieldDataType() !== 'currency') {
             $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId());
         }
         if ($fieldName == 'language') {
             $displayValue = Vtiger_Language_Handler::getLanguageLabel($fieldValue);
         }
         $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue);
     }
     $result['_recordLabel'] = $recordModel->getName();
     $result['_recordId'] = $recordModel->getId();
     $response = new Vtiger_Response();
     $response->setEmitType(Vtiger_Response::$EMIT_JSON);
     $response->setResult($result);
     $response->emit();
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:27,代码来源:SaveAjax.php

示例14: content_56755345cdc90

    function content_56755345cdc90($_smarty_tpl)
    {
        $_smarty_tpl->tpl_vars["FIELD_INFO"] = new Smarty_variable(Vtiger_Util_Helper::toSafeHTML(Zend_Json::encode($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldInfo())), null, 0);
        $_smarty_tpl->tpl_vars["SEARCH_VALUE"] = new Smarty_variable($_smarty_tpl->tpl_vars['SEARCH_INFO']->value['searchValue'], null, 0);
        if (!empty($_smarty_tpl->tpl_vars['SEARCH_VALUE']->value)) {
            $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getEditViewDisplayValue($_smarty_tpl->tpl_vars['SEARCH_INFO']->value['searchValue']), null, 0);
        } else {
            $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable('', null, 0);
        }
        $_smarty_tpl->tpl_vars["TIME_FORMAT"] = new Smarty_variable($_smarty_tpl->tpl_vars['USER_MODEL']->value->get('hour_format'), null, 0);
        ?>
<div class="row-fluid"><input type="text" data-format="<?php 
        echo $_smarty_tpl->tpl_vars['TIME_FORMAT']->value;
        ?>
" class="span9 timepicker-default listSearchContributor" value="<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_VALUE']->value;
        ?>
" name="<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();
        ?>
" data-fieldinfo='<?php 
        echo $_smarty_tpl->tpl_vars['FIELD_INFO']->value;
        ?>
' /></div><?php 
    }
开发者ID:wsLapshin,项目名称:charter_crm,代码行数:25,代码来源:c4efe93ef64d598f7c7504fb8ae83507f19829c1.file.TimeFieldSearchView.tpl.php

示例15: content_5697a81ee1ed5

    function content_5697a81ee1ed5($_smarty_tpl)
    {
        ?>
<div style='padding:5px'><div class="row-fluid"><div class="dashboard_notebookWidget_view row-fluid"><div class="row-fluid"><span class="span10 muted"><i><?php 
        echo vtranslate('LBL_LAST_SAVED_ON', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</i> <?php 
        echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['WIDGET']->value->getLastSavedDate());
        ?>
</span><span class="span2"><span class="pull-right"><button class="btn btn-mini pull-right dashboard_notebookWidget_edit"><strong><?php 
        echo vtranslate('LBL_EDIT', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</strong></button></span></span></div><div class="row-fluid pushDown2per"><div class="dashboard_notebookWidget_viewarea boxSizingBorderBox" style="background-color:white;border: 1px solid #CCC"><?php 
        echo nl2br($_smarty_tpl->tpl_vars['WIDGET']->value->getContent());
        ?>
</div></div></div><div class="dashboard_notebookWidget_text row-fluid" style="display:none;"><div class="row-fluid"><span class="span10 muted"><i><?php 
        echo vtranslate('LBL_LAST_SAVED_ON', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</i> <?php 
        echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['WIDGET']->value->getLastSavedDate());
        ?>
</span><span class="span2"><span class="pull-right"><button class="btn btn-mini btn-success pull-right dashboard_notebookWidget_save"><strong><?php 
        echo vtranslate('LBL_SAVE', $_smarty_tpl->tpl_vars['MODULE']->value);
        ?>
</strong></button></span></span></div><div class="row-fluid pushDown2per"><span class="span12"><textarea class="dashboard_notebookWidget_textarea row-fluid boxSizingBorderBox" style="min-height: 200px;background-color: #ffffdd;resize: none;padding: 0px;" data-note-book-id="<?php 
        echo $_smarty_tpl->tpl_vars['WIDGET']->value->get('id');
        ?>
"><?php 
        echo $_smarty_tpl->tpl_vars['WIDGET']->value->getContent();
        ?>
</textarea></span></div></div></div></div>
<?php 
    }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:33,代码来源:d6883a8591e5c347a5a79fc284281b5caaf2d3c1.file.NotebookContents.tpl.php


注:本文中的Vtiger_Util_Helper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。