本文整理汇总了PHP中get_assigned_user_name函数的典型用法代码示例。如果您正苦于以下问题:PHP get_assigned_user_name函数的具体用法?PHP get_assigned_user_name怎么用?PHP get_assigned_user_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_assigned_user_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
global $current_language, $theme;
$mod_strings = return_module_language($current_language, "ZuckerWordTemplate");
if (!empty($this->filename)) {
$this->template_url = $this->get_resources_dir() . $this->filename;
$this->extension = substr($this->filename, strrpos($this->filename, ".") + 1);
}
$this->action_module = $this->module_dir;
$seed = new QueryTemplate();
$this->querytemplate = $seed->retrieve($this->querytemplate_id);
if (empty($this->querytemplate)) {
$seed = new ListingTemplate();
$this->querytemplate = $seed->retrieve($this->querytemplate_id);
}
if (!empty($this->querytemplate)) {
$this->querytemplate_name = $this->querytemplate->name;
$this->querytemplate_link = "index.php?module=" . $this->querytemplate->module_dir . "&action=DetailView&record=" . $this->querytemplate->id;
}
if ($this->extension == "stw" || $this->extension == "odt") {
$this->type_desc = $mod_strings["LBL_OPENOFFICE"];
$this->image_html = get_image("themes/" . $theme . "/images/ZuckerOpenOfficeTemplate", "alt=\"ZuckerOpenOfficeTemplate\"");
$this->image_module = "ZuckerOpenOfficeTemplate";
} else {
if ($this->extension == "doc") {
$this->type_desc = $mod_strings["LBL_WORD"];
$this->image_html = get_image("themes/" . $theme . "/images/ZuckerWordTemplate", "alt=\"ZuckerWordTemplate\"");
$this->image_module = "ZuckerWordTemplate";
}
}
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->team_name = SimpleTeams::get_assigned_team_name($this);
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:33,代码来源:WordTemplate.php
示例2: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
global $current_language;
$mod_list_strings = return_mod_list_strings_language($current_language, "ZuckerReports");
$intervals = $mod_list_strings["SCHEDULE_INTERVALS"];
$this->schedule_interval_desc = $intervals[$this->schedule_interval];
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->team_name = SimpleTeams::get_assigned_team_name($this);
}
开发者ID:omusico,项目名称:sugar_work,代码行数:9,代码来源:RunnableReport.php
示例3: display
/**
* display
*/
function display()
{
$this->bean->parseInterval();
$this->bean->setIntervalHumanReadable();
$this->ss->assign('JOB_INTERVAL', $this->bean->intervalHumanReadable);
$this->bean->created_by_name = get_assigned_user_name($this->bean->created_by);
$this->bean->modified_by_name = get_assigned_user_name($this->bean->modified_user_id);
parent::display();
}
开发者ID:omusico,项目名称:sugar_work,代码行数:12,代码来源:view.detail.php
示例4: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
global $current_language, $theme;
$mod_strings = return_module_language($current_language, "ZuckerQueryTemplate");
$this->action_module = $this->module_dir;
$this->type_desc = $mod_strings["LBL_QUERY"];
$this->image_html = get_image("themes/" . $theme . "/images/ZuckerQueryTemplate", "alt=\"ZuckerQueryTemplate\"");
$this->image_module = "ZuckerQueryTemplate";
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->team_name = SimpleTeams::get_assigned_team_name($this);
}
开发者ID:omusico,项目名称:sugar_work,代码行数:11,代码来源:QueryTemplate.php
示例5: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
global $current_language, $theme;
global $png_support;
$mod_strings = return_module_language($current_language, "ZuckerListingTemplate");
$this->action_module = $this->module_dir;
$this->type_desc = $mod_strings["LBL_LISTING"];
$this->image_html = get_image("themes/" . $theme . "/images/" . $this->mainmodule, $this->mainmodule);
$this->image_module = $this->mainmodule;
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->team_name = SimpleTeams::get_assigned_team_name($this);
}
开发者ID:omusico,项目名称:sugar_work,代码行数:12,代码来源:ListingTemplate.php
示例6: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
$this->parent_name = "";
if (!empty($this->parent_id)) {
$query = "select name from zucker_reportcontainer where id = '{$this->parent_id}' and deleted=0";
$result =& $this->db->query($query);
if ($result) {
$row = $this->db->fetchByAssoc($result);
if ($row) {
$this->parent_name = $row["name"];
}
}
}
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->team_name = SimpleTeams::get_assigned_team_name($this);
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:16,代码来源:ReportContainer.php
示例7: display
function display()
{
if (is_admin($GLOBALS['current_user'])) {
$json = getJSONobj();
require_once 'include/QuickSearchDefaults.php';
$qsd = QuickSearchDefaults::getQuickSearchDefaults();
$sqs_objects = ['EditView_reports_to_name' => $qsd->getQSUser()];
$sqs_objects['EditView_reports_to_name']['populate_list'] = ['reports_to_name', 'reports_to_id'];
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>';
$this->ss->assign('REPORTS_TO_JS', $quicksearch_js);
$this->ss->assign('EDIT_REPORTS_TO', true);
}
//retrieve employee bean if it is not already in focus
if (empty($this->bean->id) && !empty($_REQUEST['record'])) {
$this->bean->retrieve($_REQUEST['record']);
}
//populate values for non admin users
if (!empty($this->bean->id)) {
global $app_list_strings;
if (!empty($this->bean->status)) {
$this->ss->assign('STATUS_READONLY', $app_list_strings['user_status_dom'][$this->bean->status]);
}
if (!empty($this->bean->employee_status)) {
$this->ss->assign('EMPLOYEE_STATUS_READONLY', $app_list_strings['employee_status_dom'][$this->bean->employee_status]);
}
if (!empty($this->bean->reports_to_id)) {
$reportsToUser = get_assigned_user_name($this->bean->reports_to_id);
$reportsToUserField = "<input type='text' name='reports_to_name' id='reports_to_name' value='{$reportsToUser}' disabled>\n";
$reportsToUserField .= "<input type='hidden' name='reports_to_id' id='reports_to_id' value='{$this->bean->reports_to_id}'>";
$this->ss->assign('REPORTS_TO_READONLY', $reportsToUserField);
}
if (!empty($this->bean->title)) {
$this->ss->assign('TITLE_READONLY', $this->bean->title);
}
if (!empty($this->bean->department)) {
$this->ss->assign('DEPT_READONLY', $this->bean->department);
}
}
parent::display();
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:40,代码来源:view.edit.php
示例8: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
parent::fill_in_additional_detail_fields();
// Fill in the assigned_user_name
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
$account_info = $this->getAccount($this->id);
$this->account_name = $account_info['account_name'];
$this->account_id = $account_info['account_id'];
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:11,代码来源:Case.php
示例9: getVersionedScript
$jsLang = getVersionedScript("cache/jsLanguage/{$GLOBALS['current_language']}.js", $GLOBALS['sugar_config']['js_lang_version']);
$xtpl->assign("JSLANG", $jsLang);
$xtpl->assign("ID", $focus->id);
if(isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", "");
//Bug45632
/* BEGIN - SECURITY GROUPS */
/**
if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", "");
*/
if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
else if(empty($focus->id) && empty($focus->assigned_user_id)) {
global $current_user;
$xtpl->assign("ASSIGNED_USER_ID", $current_user->id);
$xtpl->assign("ASSIGNED_USER_NAME", get_assigned_user_name($current_user->id));
}
else $xtpl->assign("ASSIGNED_USER_ID", "");
/* END - SECURITY GROUPS */
//Bug45632
if(isset($focus->description)) $xtpl->assign("DESCRIPTION", $focus->description); else $xtpl->assign("DESCRIPTION", "");
if(isset($focus->subject)) $xtpl->assign("SUBJECT", $focus->subject); else $xtpl->assign("SUBJECT", "");
if( $focus->published == 'on')
{
$xtpl->assign("PUBLISHED","CHECKED");
}
//if text only is set to true, then make sure input is checked and value set to 1
if(isset($focus->text_only) && $focus->text_only){
$xtpl->assign("TEXTONLY_CHECKED","CHECKED");
$xtpl->assign("TEXTONLY_VALUE","1");
开发者ID:BilalArcher,项目名称:SuiteCRM,代码行数:31,代码来源:EditView.php
示例10: getModuleField
//.........这里部分代码省略.........
if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) {
$time_separator = $match[1];
}
$t23 = strpos($time_format, '23') !== false ? '%H' : '%I';
if (!isset($match[2]) || $match[2] == '') {
$ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M");
} else {
$pm = $match[2] == "pm" ? "%P" : "%p";
$ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M" . $pm);
}
$ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week());
// populate the fieldlist from the vardefs
$fieldlist = array();
if (!isset($focus) || !$focus instanceof SugarBean) {
require_once $beanFiles[$beanList[$module]];
}
$focus = new $beanList[$module]();
// create the dropdowns for the parent type fields
if (isset($vardef['type']) && $vardef['type'] == 'parent_type') {
$focus->field_defs[$vardef['name']]['options'] = $focus->field_defs[$vardef['group']]['options'];
}
$vardefFields = $focus->getFieldDefinitions();
foreach ($vardefFields as $name => $properties) {
$fieldlist[$name] = $properties;
// fill in enums
if (isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($app_list_strings[$fieldlist[$name]['options']])) {
$fieldlist[$name]['options'] = $app_list_strings[$fieldlist[$name]['options']];
} elseif (isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($mod_strings[$fieldlist[$name]['options']])) {
$fieldlist[$name]['options'] = $mod_strings[$fieldlist[$name]['options']];
}
// Bug 22730: make sure all enums have the ability to select blank as the default value.
if (!isset($fieldlist[$name]['options'][''])) {
$fieldlist[$name]['options'][''] = '';
}
}
// fill in function return values
if (!in_array($fieldname, array('email1', 'email2'))) {
if (!empty($fieldlist[$fieldname]['function']['returns']) && $fieldlist[$fieldname]['function']['returns'] == 'html') {
$function = $fieldlist[$fieldname]['function']['name'];
// include various functions required in the various vardefs
if (isset($fieldlist[$fieldname]['function']['include']) && is_file($fieldlist[$fieldname]['function']['include'])) {
require_once $fieldlist[$fieldname]['function']['include'];
}
$_REQUEST[$fieldname] = $value;
$value = $function($focus, $fieldname, $value, $view);
$value = str_ireplace($fieldname, $aow_field, $value);
}
}
if ($fieldlist[$fieldname]['type'] == 'link') {
$fieldlist[$fieldname]['id_name'] = $fieldlist[$fieldname]['name'] . '_id';
if ((!isset($fieldlist[$fieldname]['module']) || $fieldlist[$fieldname]['module'] == '') && $focus->load_relationship($fieldlist[$fieldname]['name'])) {
$fieldlist[$fieldname]['module'] = $focus->{$fieldlist}[$fieldname]['name']->getRelatedModuleName();
}
}
if (isset($fieldlist[$fieldname]['name']) && ($fieldlist[$fieldname]['name'] == 'date_entered' || $fieldlist[$fieldname]['name'] == 'date_modified')) {
$fieldlist[$fieldname]['name'] = 'aow_temp_date';
$fieldlist['aow_temp_date'] = $fieldlist[$fieldname];
$fieldname = 'aow_temp_date';
}
if (isset($fieldlist[$fieldname]['id_name']) && $fieldlist[$fieldname]['id_name'] != '' && $fieldlist[$fieldname]['id_name'] != $fieldlist[$fieldname]['name']) {
$rel_value = $value;
if (isset($fieldlist[$fieldname]['module']) && $fieldlist[$fieldname]['module'] == 'Users') {
$rel_value = get_assigned_user_name($value);
} else {
if (isset($fieldlist[$fieldname]['module'])) {
require_once $beanFiles[$beanList[$fieldlist[$fieldname]['module']]];
$rel_focus = new $beanList[$fieldlist[$fieldname]['module']]();
$rel_focus->retrieve($value);
if (isset($fieldlist[$fieldname]['rname']) && $fieldlist[$fieldname]['rname'] != '') {
$rel_value = $rel_focus->{$fieldlist}[$fieldname]['rname'];
} else {
$rel_value = $rel_focus->name;
}
}
}
$fieldlist[$fieldlist[$fieldname]['id_name']]['value'] = $value;
$fieldlist[$fieldname]['value'] = $rel_value;
$fieldlist[$fieldname]['id_name'] = $aow_field;
$fieldlist[$fieldlist[$fieldname]['id_name']]['name'] = $aow_field;
$fieldlist[$fieldname]['name'] = $aow_field . '_display';
} else {
if (isset($fieldlist[$fieldname]['type']) && ($fieldlist[$fieldname]['type'] == 'datetimecombo' || $fieldlist[$fieldname]['type'] == 'datetime' || $fieldlist[$fieldname]['type'] == 'date')) {
$fieldlist[$fieldname]['value'] = $timedate->to_display_date($value);
//$fieldlist[$fieldname]['value'] = $timedate->to_display_date_time($value, true, true);
//$fieldlist[$fieldname]['value'] = $value;
$fieldlist[$fieldname]['name'] = $aow_field;
} else {
$fieldlist[$fieldname]['value'] = $value;
$fieldlist[$fieldname]['name'] = $aow_field;
}
}
$ss->assign("fields", $fieldlist);
$ss->assign("form_name", $view);
$ss->assign("bean", $focus);
// add in any additional strings
$ss->assign("MOD", $mod_strings);
$ss->assign("APP", $app_strings);
//$return = str_replace($fieldname,$ss->fetch($file));
return $ss->fetch($file);
}
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:101,代码来源:aow_utils.php
示例11: fill_in_additional_list_fields
/**
*
*/
function fill_in_additional_list_fields()
{
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:7,代码来源:Ink.php
示例12: fill_in_additional_list_fields
/**
*
*/
function fill_in_additional_list_fields()
{
parent::fill_in_additional_list_fields();
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
//$this->total_estimated_effort = $this->_get_total_estimated_effort($this->id);
//$this->total_actual_effort = $this->_get_total_actual_effort($this->id);
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:Project.php
示例13: fill_in_additional_list_fields
function fill_in_additional_list_fields()
{
global $app_list_strings;
// Fill in the assigned_user_name
$this->search_module = $app_list_strings['moduleList'][$this->contents['search_module']];
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:7,代码来源:SavedSearch.php
示例14: process
function process($checkFormName = false, $formName = '')
{
global $mod_strings, $sugar_config, $app_strings, $app_list_strings;
//the retrieve already did this work;
//$this->focus->fill_in_relationship_fields();
if (!$this->th->checkTemplate($this->module, $this->view, $checkFormName, $formName)) {
$this->render();
}
if (isset($_REQUEST['offset'])) {
$this->offset = $_REQUEST['offset'] - 1;
}
if ($this->showVCRControl) {
$this->th->ss->assign('PAGINATION', SugarVCR::menu($this->module, $this->offset, $this->focus->is_AuditEnabled(), $this->view == 'EditView'));
}
if (isset($_REQUEST['return_module'])) {
$this->returnModule = $_REQUEST['return_module'];
}
if (isset($_REQUEST['return_action'])) {
$this->returnAction = $_REQUEST['return_action'];
}
if (isset($_REQUEST['return_id'])) {
$this->returnId = $_REQUEST['return_id'];
}
if (isset($_REQUEST['return_relationship'])) {
$this->returnRelationship = $_REQUEST['return_relationship'];
}
if (isset($_REQUEST['return_name'])) {
$this->returnName = $this->getValueFromRequest($_REQUEST, 'return_name');
}
// handle Create $module then Cancel
if (empty($this->returnId)) {
$this->returnAction = 'index';
}
$is_owner = $this->focus->isOwner($GLOBALS['current_user']->id);
$this->fieldDefs = array();
if ($this->focus) {
global $current_user;
if (!empty($this->focus->assigned_user_id)) {
$this->focus->assigned_user_name = get_assigned_user_name($this->focus->assigned_user_id);
}
foreach ($this->focus->toArray() as $name => $value) {
$valueFormatted = false;
//if ($this->focus->field_defs[$name]['type']=='link')continue;
$this->fieldDefs[$name] = !empty($this->fieldDefs[$name]) && !empty($this->fieldDefs[$name]['value']) ? array_merge($this->focus->field_defs[$name], $this->fieldDefs[$name]) : $this->focus->field_defs[$name];
foreach (array("formula", "default", "comments", "help") as $toEscape) {
if (!empty($this->fieldDefs[$name][$toEscape])) {
$this->fieldDefs[$name][$toEscape] = htmlentities($this->fieldDefs[$name][$toEscape], ENT_QUOTES, 'UTF-8');
}
}
if (isset($this->fieldDefs[$name]['options']) && isset($app_list_strings[$this->fieldDefs[$name]['options']])) {
$this->fieldDefs[$name]['options'] = $app_list_strings[$this->fieldDefs[$name]['options']];
if (isset($GLOBALS['sugar_config']['enable_autocomplete']) && $GLOBALS['sugar_config']['enable_autocomplete'] == true) {
$this->fieldDefs[$name]['autocomplete'] = true;
$this->fieldDefs[$name]['autocomplete_options'] = $this->fieldDefs[$name]['options'];
// we need the name for autocomplete
} else {
$this->fieldDefs[$name]['autocomplete'] = false;
}
}
if (isset($this->fieldDefs[$name]['function'])) {
$function = $this->fieldDefs[$name]['function'];
$function = is_array($function) && isset($function['name']) ? $this->fieldDefs[$name]['function']['name'] : $this->fieldDefs[$name]['function'];
if (!empty($this->fieldDefs[$name]['function']['returns']) && $this->fieldDefs[$name]['function']['returns'] == 'html') {
if (!empty($this->fieldDefs[$name]['function']['include'])) {
require_once $this->fieldDefs[$name]['function']['include'];
}
$value = $function($this->focus, $name, $value, $this->view);
$valueFormatted = true;
} else {
$this->fieldDefs[$name]['options'] = $function($this->focus, $name, $value, $this->view);
}
}
if (isset($this->fieldDefs[$name]['function'])) {
$function = $this->fieldDefs[$name]['function'];
if (is_array($function) && isset($function['name'])) {
$function = $this->fieldDefs[$name]['function']['name'];
} else {
$function = $this->fieldDefs[$name]['function'];
}
if (!empty($this->fieldDefs[$name]['function']['returns']) && $this->fieldDefs[$name]['function']['returns'] == 'html') {
if (!empty($this->fieldDefs[$name]['function']['include'])) {
require_once $this->fieldDefs[$name]['function']['include'];
}
$value = $function($this->focus, $name, $value, $this->view);
$valueFormatted = true;
} else {
$this->fieldDefs[$name]['options'] = $function($this->focus, $name, $value, $this->view);
}
}
if (isset($this->fieldDefs[$name]['type']) && $this->fieldDefs[$name]['type'] == 'function' && isset($this->fieldDefs[$name]['function_name'])) {
$value = $this->callFunction($this->fieldDefs[$name]);
$valueFormatted = true;
}
if (!$valueFormatted) {
// $this->focus->format_field($this->focus->field_defs[$name]);
$value = isset($this->focus->{$name}) ? $this->focus->{$name} : '';
}
if (empty($this->fieldDefs[$name]['value'])) {
$this->fieldDefs[$name]['value'] = $value;
}
//.........这里部分代码省略.........
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:101,代码来源:EditView2.php
示例15: get_list_view_data
function get_list_view_data()
{
$ret_array = parent::get_list_view_array();
if (!empty($ret_array['STATUS']) && $ret_array['STATUS'] > 0) {
$ret_array['STATUS'] = '<input type="checkbox" class="checkbox" style="checkbox" checked disabled>';
} else {
$ret_array['STATUS'] = '<input type="checkbox" class="checkbox" style="checkbox" disabled>';
}
if (strlen($ret_array['URL']) > 63) {
$ret_array['URL'] = substr($ret_array['URL'], 0, 50) . '...' . substr($ret_array['URL'], -10);
}
$ret_array['CREATED_BY'] = get_assigned_user_name($this->created_by);
$ret_array['PLACEMENT'] = translate('DROPDOWN_PLACEMENT', 'iFrames', $ret_array['PLACEMENT']);
$ret_array['TYPE'] = translate('DROPDOWN_TYPE', 'iFrames', $ret_array['TYPE']);
return $ret_array;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:16,代码来源:iFrame.php
示例16: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
$this->fill_in_additional_parent_fields();
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:6,代码来源:EmailTemplate.php
示例17: getControl
//.........这里部分代码省略.........
if ($vardef['type'] == 'parent_type') {
$vardef['type'] = 'enum';
}
// remove the special text entry field function 'getEmailAddressWidget'
if (isset($vardef['function']) && ($vardef['function'] == 'getEmailAddressWidget' || $vardef['function']['name'] == 'getEmailAddressWidget')) {
unset($vardef['function']);
}
// load SugarFieldHandler to render the field tpl file
static $sfh;
if (!isset($sfh)) {
require_once 'include/SugarFields/SugarFieldHandler.php';
$sfh = new SugarFieldHandler();
}
$displayParams = array();
$displayParams['formName'] = 'importstep3';
$contents = $sfh->displaySmarty('fields', $vardef, 'ImportView', $displayParams);
// Remove all the copyright comments
$contents = preg_replace('/\\{\\*[^\\}]*?\\*\\}/', '', $contents);
// hack to disable one of the js calls in this control
if (isset($vardef['function']) && ($vardef['function'] == 'getCurrencyDropDown' || $vardef['function']['name'] == 'getCurrencyDropDown')) {
$contents .= "{literal}<script>function CurrencyConvertAll() { return; }</script>{/literal}";
}
// Save it to the cache file
if ($fh = @sugar_fopen($file, 'w')) {
fputs($fh, $contents);
fclose($fh);
}
}
// Now render the template we received
$ss = new Sugar_Smarty();
// Create Smarty variables for the Calendar picker widget
global $timedate;
$time_format = $timedate->get_user_time_format();
$date_format = $timedate->get_cal_date_format();
$ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format());
$ss->assign('TIME_FORMAT', $time_format);
$time_separator = ":";
$match = array();
if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) {
$time_separator = $match[1];
}
$t23 = strpos($time_format, '23') !== false ? '%H' : '%I';
if (!isset($match[2]) || $match[2] == '') {
$ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M");
} else {
$pm = $match[2] == "pm" ? "%P" : "%p";
$ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M" . $pm);
}
// populate the fieldlist from the vardefs
$fieldlist = array();
if (!isset($focus) || !$focus instanceof SugarBean) {
$focus = loadBean($module);
}
// create the dropdowns for the parent type fields
if ($vardef['type'] == 'parent_type') {
$focus->field_defs[$vardef['name']]['options'] = $focus->field_defs[$vardef['group']]['options'];
}
$vardefFields = $focus->getFieldDefinitions();
foreach ($vardefFields as $name => $properties) {
$fieldlist[$name] = $properties;
// fill in enums
if (isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($app_list_strings[$fieldlist[$name]['options']])) {
$fieldlist[$name]['options'] = $app_list_strings[$fieldlist[$name]['options']];
} elseif (isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($mod_strings[$fieldlist[$name]['options']])) {
$fieldlist[$name]['options'] = $mod_strings[$fieldlist[$name]['options']];
}
// Bug 22730: make sure all enums have the ability to select blank as the default value.
if (!isset($fieldlist[$name]['options'][''])) {
$fieldlist[$name]['options'][''] = '';
}
}
// fill in function return values
if (!in_array($fieldname, array('email1', 'email2'))) {
if (!empty($fieldlist[$fieldname]['function']['returns']) && $fieldlist[$fieldname]['function']['returns'] == 'html') {
$function = $fieldlist[$fieldname]['function']['name'];
// include various functions required in the various vardefs
if (isset($fieldlist[$fieldname]['function']['include']) && is_file($fieldlist[$fieldname]['function']['include'])) {
require_once $fieldlist[$fieldname]['function']['include'];
}
$value = $function($focus, $fieldname, $value, 'EditView');
// Bug 22730 - add a hack for the currency type dropdown, since it's built by a function.
if (preg_match('/getCurrency.*DropDown/s', $function)) {
$value = str_ireplace('</select>', '<option value="">' . $app_strings['LBL_NONE'] . '</option></select>', $value);
}
} elseif ($fieldname == 'assigned_user_name' && empty($value)) {
$fieldlist['assigned_user_id']['value'] = $GLOBALS['current_user']->id;
$value = get_assigned_user_name($GLOBALS['current_user']->id);
} elseif ($fieldname == 'team_name' && empty($value)) {
$value = json_encode(array());
}
}
$fieldlist[$fieldname]['value'] = $value;
$ss->assign("fields", $fieldlist);
$ss->assign("form_name", 'importstep3');
$ss->assign("bean", $focus);
// add in any additional strings
$ss->assign("MOD", $mod_strings);
$ss->assign("APP", $app_strings);
return $ss->fetch($file);
}
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:101,代码来源:Forms.php
示例18: process
/**
* Does all dashlet processing, here's your chance to modify the rows being displayed!
*/
function process($lvsParams = array())
{
$currentSearchFields = array();
$configureView = true;
// configure view or regular view
$query = false;
$whereArray = array();
$lvsParams['massupdate'] = false;
// apply filters
$whereArray = $this->buildWhere();
$this->lvs->export = false;
$this->lvs->multiSelect = false;
$this->addCustomFields();
// columns
$displayColumns = array();
if (isset($this->displayColumns)) {
// use user specified columns
foreach ($this->displayColumns as $name => $val) {
$displayColumns[strtoupper($val)] = $this->columns[$val];
$displayColumns[strtoupper($val)]['label'] = trim($displayColumns[strtoupper($val)]['label'], ':');
// strip : at the end of headers
}
} else {
// use the default
foreach ($this->columns as $name => $val) {
if (!empty($val['default']) && $val['default']) {
$displayColumns[strtoupper($name)] = $val;
$displayColumns[strtoupper($name)]['label'] = trim($displayColumns[strtoupper($name)]['label'], ':');
}
}
}
$this->lvs->displayColumns = $displayColumns;
$this->lvs->lvd->setVariableName($this->seedBean->object_name, array());
$lvdOrderBy = $this->lvs->lvd->getOrderBy();
// has this list been ordered, if not use default
if (empty($lvdOrderBy['orderBy'])) {
foreach ($displayColumns as $colName => $colParams) {
if (!empty($colParams['defaultOrderColumn'])) {
$lvsParams['overrideOrder'] = true;
$lvsParams['orderBy'] = $colName;
$lvsParams['sortOrder'] = $colParams['defaultOrderColumn']['sortOrder'];
}
}
}
if (!empty($this->displayTpl)) {
$this->lvs->setup($this->seedBean, $this->displayTpl, implode(' AND ', $whereArray), $lvsParams, 0, $this->displayRows);
if (in_array('CREATED_BY', array_keys($displayColumns))) {
// handle the created by field
foreach ($this->lvs->data['data'] as $row => $data) {
$this->lvs->data['data'][$row]['CREATED_BY'] = get_assigned_user_name($data['CREATED_BY']);
}
}
// assign a baseURL w/ the action set as DisplayDashlet
foreach ($this->lvs->data['pageData']['urls'] as $type => $url) {
if ($type == 'orderBy') {
$this->lvs->data['pageData']['urls'][$type] = preg_replace('/(action=.*&)/Ui', 'action=DisplayDashlet&', $url);
} else {
$this->lvs->data['pageData']['urls'][$type] = preg_replace('/(action=.*&)/Ui', 'action=DisplayDashlet&', $url) . '&sugar_body_only=1&id=' . $this->id;
}
}
$this->lvs->ss->assign('dashletId', $this->id);
}
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:66,代码来源:DashletGeneric.php
示例19: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
// Fill in the assigned_user_name
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$query = "SELECT acc.id, acc.name from accounts acc, cases where acc.id = cases.account_id and cases.id = '{$this->id}' and cases.deleted=0 and acc.deleted=0";
$result = $this->db->query($query, true, " Error filling in additional detail fields: ");
// Get the id and the name.
$row = $this->db->fetchByAssoc($result);
if ($row != null) {
$this->account_name = stripslashes($row['name']);
$this->account_id = $row['id'];
} else {
$this->account_name = '';
$this->account_id = '';
}
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:18,代码来源:Case.php
示例20: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
if (empty($this->body) && !empty($this->body_html)) {
$this->body = strip_tags(html_entity_decode($this->body_html));
}
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
$this->fill_in_additional_parent_fields();
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:9,代码来源:EmailTemplate.php
注:本文中的get_assigned_user_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论