本文整理汇总了PHP中get_set_focus_js函数的典型用法代码示例。如果您正苦于以下问题:PHP get_set_focus_js函数的具体用法?PHP get_set_focus_js怎么用?PHP get_set_focus_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_set_focus_js函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_new_record_form
/**
* Create HTML form to enter a new record with the minimum necessary fields.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
*/
function get_new_record_form()
{
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $currentModule;
global $current_user;
global $timedate;
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
$form = new XTemplate('modules/Campaigns/Forms.html');
$module_select = empty($_REQUEST['module_select']) ? '' : $_REQUEST['module_select'];
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', SugarThemeRegistry::current()->__toString());
$form->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js());
$form->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], "Planning"));
$form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], ""));
$form->assign("USER_ID", $current_user->id);
$form->assign("TEAM_ID", sprintf('<input type="hidden" name="team_id" value="%s">', $current_user->default_team));
$form->assign("CALENDAR_LANG", "en");
$form->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
$form->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$form->parse('main');
$the_form .= $form->text('main');
$focus = BeanFactory::getBean('Campaigns');
$javascript = new javascript();
$javascript->setFormName('quick_save');
$javascript->setSugarBean($focus);
$javascript->addRequiredFields('');
$jscript = $javascript->getScript();
$the_form .= $jscript . get_left_form_footer();
return $the_form;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:39,代码来源:Forms.php
示例2: display
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_list_strings, $sugar_config, $locale, $sugar_version;
if (!is_admin($current_user)) {
sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
}
$themeObject = SugarThemeRegistry::current();
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = Administration::getSettings();
$ut = $GLOBALS['current_user']->getPreference('ut');
if (empty($ut)) {
$this->ss->assign('SKIP_URL', 'index.php?module=Users&action=Wizard&skipwelcome=1');
} else {
$this->ss->assign('SKIP_URL', 'index.php?module=Home&action=index');
}
// Always mark that we have got past this point
$focus->saveSetting('system', 'adminwizard', 1);
$css = $themeObject->getCSS();
$favicon = $themeObject->getImageURL('sugar_icon.ico', false);
$this->ss->assign('FAVICON_URL', getJSPath($favicon));
$this->ss->assign('SUGAR_CSS', $css);
$this->ss->assign('MOD_USERS', return_module_language($GLOBALS['current_language'], 'Users'));
$this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="' . SugarThemeRegistry::current()->getCSSURL('wizard.css') . '" />');
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign('config', $sugar_config);
$this->ss->assign('SUGAR_VERSION', $sugar_version);
$this->ss->assign('settings', $focus->settings);
$this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));
$this->ss->assign('getNameJs', $locale->getNameJs());
$this->ss->assign('NAMEFORMATS', $locale->getUsableLocaleNameOptions($sugar_config['name_formats']));
$this->ss->assign('JAVASCRIPT', get_set_focus_js() . get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png', true, true));
$this->ss->assign('mail_smtptype', $focus->settings['mail_smtptype']);
$this->ss->assign('mail_smtpserver', $focus->settings['mail_smtpserver']);
$this->ss->assign('mail_smtpport', $focus->settings['mail_smtpport']);
$this->ss->assign('mail_smtpuser', $focus->settings['mail_smtpuser']);
$this->ss->assign('mail_smtppass', $focus->settings['mail_smtppass']);
$this->ss->assign('mail_smtpauth_req', $focus->settings['mail_smtpauth_req'] ? "checked='checked'" : '');
$this->ss->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl']));
$this->ss->assign('notify_allow_default_outbound_on', !empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] == 2 ? 'CHECKED' : '');
$this->ss->assign('THEME', SugarThemeRegistry::current()->__toString());
// get javascript
ob_start();
$this->options['show_javascript'] = true;
$this->renderJavascript();
$this->options['show_javascript'] = false;
$this->ss->assign("SUGAR_JS", ob_get_contents() . $themeObject->getJS());
ob_end_clean();
$this->ss->assign('langHeader', get_language_header());
$this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
$this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:56,代码来源:view.adminwizard.php
示例3: get_set_focus_js
} else {
$xtpl->assign('TIME_SEPARATOR', ':');
}
$xtpl->assign('TIME_FORMAT', '(' . $time_format . ')');
$xtpl->assign('USER_DATEFORMAT', '(' . $timedate->get_user_date_format() . ')');
$xtpl->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
// standard assigns
$xtpl->assign('MOD', $mod_strings);
$xtpl->assign('APP', $app_strings);
$xtpl->assign('THEME', SugarThemeRegistry::current()->__toString());
$xtpl->assign('GRIDLINE', $gridline);
if ($use_adv) {
$javascript->script .= 'toggleAdv();';
$xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript());
} else {
$xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript());
}
$xtpl->assign('RETURN_MODULE', 'Schedulers');
$xtpl->assign('RETURN_ID', $focus->id);
$xtpl->assign('RETURN_ACTION', 'DetailView');
// module specific
$xtpl->assign('ID', $focus->id);
$xtpl->assign('NAME', $focus->name);
if ($focus->catch_up == 1) {
$xtpl->assign('CATCH_UP_CHECKED', 'CHECKED');
}
// job
if (strstr($focus->job, 'url::')) {
$job_url = str_replace('url::', '', $focus->job);
} else {
$job_url = 'http://';
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:31,代码来源:EditView.php
示例4: get_select_options_with_id
}
$xtpl->assign('hasGrpFld', $focus->groupfolder_id == null ? '' : 'checked="1"');
$xtpl->assign('LEAVEMESSAGESONMAILSERVER_STYLE', $leaveMessagesOnMailServerStyle);
$xtpl->assign('LEAVEMESSAGESONMAILSERVER', get_select_options_with_id($app_list_strings['dom_int_bool'], $leaveMessagesOnMailServer));
$distributionMethod = get_select_options_with_id($app_list_strings['dom_email_distribution_for_auto_create'], $distrib_method);
$xtpl->assign('DISTRIBUTION_METHOD', $distributionMethod);
$xtpl->assign('CREATE_CASE_ROW_STYLE', $createCaseRowStyle);
$xtpl->assign('CREATE_CASE_EMAIL_TEMPLATE_OPTIONS', get_select_options_with_id($email_templates_arr, $create_case_email_template));
if (!empty($create_case_email_template)) {
$xtpl->assign("CREATE_CASE_EDIT_TEMPLATE", "visibility:inline");
} else {
$xtpl->assign("CREATE_CASE_EDIT_TEMPLATE", "visibility:hidden");
}
$quicksearch_js = "";
//$javascript = get_set_focus_js(). $javascript->getScript() . $quicksearch_js;
$xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript() . $quicksearch_js);
require_once 'include/Smarty/plugins/function.sugar_help.php';
$tipsStrings = array('LBL_SSL_DESC', 'LBL_ASSIGN_TO_TEAM_DESC', 'LBL_ASSIGN_TO_GROUP_FOLDER_DESC', 'LBL_FROM_ADDR_DESC', 'LBL_CREATE_CASE_HELP', 'LBL_CREATE_CASE_REPLY_TEMPLATE_HELP', 'LBL_ALLOW_OUTBOUND_GROUP_USAGE_DESC', 'LBL_AUTOREPLY_HELP', 'LBL_FILTER_DOMAIN_DESC', 'LBL_MAX_AUTO_REPLIES_DESC');
$smarty = null;
$tips = array();
foreach ($tipsStrings as $string) {
if (!empty($mod_strings[$string])) {
$tips[$string] = smarty_function_sugar_help(array('text' => $mod_strings[$string]), $smarty);
}
}
$xtpl->assign('TIPS', $tips);
// WINDOWS work arounds
//if(is_windows()) {
// $xtpl->assign('MAYBE', '<style> div.maybe { display:none; }</style>');
//}
// PARSE AND PRINT
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:31,代码来源:EditView.php
示例5: get_form_header
echo get_form_header($mod_strings['LBL_RELEASE'] . " " . $focus->name . ' ' . $header_text, $edit_button, false);
$GLOBALS['log']->info("Releases edit view");
$xtpl = new XTemplate('modules/Releases/EditView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
if (isset($_REQUEST['return_module'])) {
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (isset($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("JAVASCRIPT", get_set_focus_js());
$xtpl->assign("ID", $focus->id);
$xtpl->assign('NAME', $focus->name);
$xtpl->assign('STATUS', $focus->status);
if (empty($focus->list_order)) {
$xtpl->assign('LIST_ORDER', count($focus->get_releases(FALSE, 'All')) + 1);
} else {
$xtpl->assign('LIST_ORDER', $focus->list_order);
}
$xtpl->assign('STATUS_OPTIONS', get_select_options_with_id($app_list_strings['release_status_dom'], $focus->status));
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/EditView.php';
$xtpl->parse("main");
$xtpl->out("main");
$javascript = new javascript();
$javascript->setFormName('EditView');
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:index.php
示例6: QuickSearchDefaults
// handle Create $module then Cancel
if (empty($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ACTION", 'index');
}
if (isset($_REQUEST['campaign_id'])) {
$xtpl->assign("CAMPAIGN_ID", $_REQUEST['campaign_id']);
}
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
require_once 'include/QuickSearchDefaults.php';
$qsd = new QuickSearchDefaults();
$sqs_objects = array('assigned_user_name' => $qsd->getQSUser());
$quicksearch_js = $qsd->getQSScripts();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js() . $quicksearch_js);
if (empty($focus->assigned_user_id) && empty($focus->id)) {
$focus->assigned_user_id = $current_user->id;
}
if (empty($focus->assigned_name) && empty($focus->id)) {
$focus->assigned_user_name = $current_user->user_name;
}
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("NAME", $focus->name);
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php
示例7: get_set_focus_js
}
}
if ($focus->campaign_id) {
$campaign_id = $focus->campaign_id;
} else {
$campaign_id = $_REQUEST['campaign_id'];
}
$xtpl->assign("CAMPAIGN_ID", $campaign_id);
if (empty($time_ampm) || empty($focus->time_start)) {
$time_start = $focus->time_start;
} else {
$split = $timedate->splitTime($focus->time_start, $timedate->get_time_format());
$time_start = $split['h'] . $timedate->timeSeparator() . $split['m'];
}
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js());
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("NAME", $focus->name);
$xtpl->assign("FROM_NAME", $focus->from_name);
$xtpl->assign("FROM_ADDR", $focus->from_addr);
$xtpl->assign("REPLY_NAME", $focus->reply_to_name);
$xtpl->assign("REPLY_ADDR", $focus->reply_to_addr);
$xtpl->assign("DATE_START", $focus->date_start);
$xtpl->assign("TIME_START", $time_start);
$xtpl->assign("TIME_FORMAT", '(' . $timedate->get_user_time_format() . ')');
$email_templates_arr = get_bean_select_array(true, 'EmailTemplate', 'name', "(type IS NULL OR type='' OR type='campaign')", 'name');
if ($focus->template_id) {
$xtpl->assign("TEMPLATE_ID", $focus->template_id);
$xtpl->assign("EMAIL_TEMPLATE_OPTIONS", get_select_options_with_id($email_templates_arr, $focus->template_id));
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:EditView.php
示例8: display
/**
* @see SugarView::display()
*/
public function display()
{
global $mod_strings, $app_strings, $app_list_strings;
require_once "modules/Configurator/metadata/SugarpdfSettingsdefs.php";
if (file_exists('custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php')) {
require_once 'custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php';
}
if (!empty($_POST['save'])) {
// Save the logos
$error = $this->checkUploadImage();
if (empty($error)) {
$focus = new Administration();
foreach ($SugarpdfSettings as $k => $v) {
if ($v['type'] == 'password') {
if (isset($_POST[$k])) {
$_POST[$k] = blowfishEncode(blowfishGetKey($k), $_POST[$k]);
}
}
}
if (!empty($_POST["sugarpdf_pdf_class"]) && $_POST["sugarpdf_pdf_class"] != PDF_CLASS) {
// clear the cache for quotes detailview in order to switch the pdf class.
if (is_file($cachedfile = sugar_cached('modules/Quotes/DetailView.tpl'))) {
unlink($cachedfile);
}
}
$focus->saveConfig();
header('Location: index.php?module=Administration&action=index');
}
}
if (!empty($_POST['restore'])) {
$focus = new Administration();
foreach ($_POST as $key => $val) {
$prefix = $focus->get_config_prefix($key);
if (in_array($prefix[0], $focus->config_categories)) {
$result = $focus->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'");
$row = $focus->db->fetchByAssoc($result);
if ($row['the_count'] != 0) {
$focus->db->query("DELETE FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'");
}
}
}
header('Location: index.php?module=Configurator&action=SugarpdfSettings');
}
echo getClassicModuleTitle("Administration", array("<a href='index.php?module=Administration&action=index'>" . translate('LBL_MODULE_NAME', 'Administration') . "</a>", $mod_strings['LBL_PDFMODULE_NAME']), false);
$pdf_class = array("TCPDF" => "TCPDF", "EZPDF" => "EZPDF");
$this->ss->assign('APP_LIST', $app_list_strings);
$this->ss->assign("JAVASCRIPT", get_set_focus_js());
$this->ss->assign("SugarpdfSettings", $SugarpdfSettings);
$this->ss->assign("pdf_enable_ezpdf", PDF_ENABLE_EZPDF);
if (PDF_ENABLE_EZPDF == "0" && PDF_CLASS == "EZPDF") {
$error = "ERR_EZPDF_DISABLE";
$this->ss->assign("selected_pdf_class", "TCPDF");
} else {
$this->ss->assign("selected_pdf_class", PDF_CLASS);
}
$this->ss->assign("pdf_class", $pdf_class);
if (!empty($error)) {
$this->ss->assign("error", $mod_strings[$error]);
}
if (!function_exists('imagecreatefrompng')) {
$this->ss->assign("GD_WARNING", 1);
} else {
$this->ss->assign("GD_WARNING", 0);
}
$this->ss->display('modules/Configurator/tpls/SugarpdfSettings.tpl');
require_once "include/javascript/javascript.php";
$javascript = new javascript();
$javascript->setFormName("ConfigureSugarpdfSettings");
foreach ($SugarpdfSettings as $k => $v) {
if (isset($v["required"]) && $v["required"] == true) {
$javascript->addFieldGeneric($k, "varchar", $v['label'], TRUE, "");
}
}
echo $javascript->getScript();
}
开发者ID:omusico,项目名称:sugar_work,代码行数:78,代码来源:view.sugarpdfsettings.php
示例9: display
/**
* display
* This method makes the Smarty variable assignments and then displays the
* generated view.
* @param $showTitle boolean value indicating whether or not to show a title on the resulting page
* @param $ajaxSave boolean value indicating whether or not the operation is an Ajax save request
* @return HTML display for view as String
*/
function display($showTitle = true, $ajaxSave = false)
{
global $mod_strings, $sugar_config, $app_strings, $app_list_strings, $theme, $current_user;
if (isset($this->defs['templateMeta']['javascript'])) {
if (is_array($this->defs['templateMeta']['javascript'])) {
//$this->th->ss->assign('externalJSFile', 'modules/' . $this->module . '/metadata/editvewdefs.js');
$this->th->ss->assign('externalJSFile', $this->defs['templateMeta']['javascript']);
} else {
$this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']);
}
}
$this->th->ss->assign('id', $this->fieldDefs['id']['value']);
$this->th->ss->assign('offset', $this->offset + 1);
$this->th->ss->assign('APP', $app_strings);
$this->th->ss->assign('MOD', $mod_strings);
$this->th->ss->assign('fields', $this->fieldDefs);
$this->th->ss->assign('sectionPanels', $this->sectionPanels);
$this->th->ss->assign('config', $sugar_config);
$this->th->ss->assign('returnModule', $this->returnModule);
$this->th->ss->assign('returnAction', $this->returnAction);
$this->th->ss->assign('returnId', $this->returnId);
$this->th->ss->assign('isDuplicate', $this->isDuplicate);
$this->th->ss->assign('def', $this->defs);
$this->th->ss->assign('useTabs', isset($this->defs['templateMeta']['useTabs']) && isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['useTabs'] : false);
$this->th->ss->assign('maxColumns', isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2);
$this->th->ss->assign('module', $this->module);
$this->th->ss->assign('headerTpl', isset($this->defs['templateMeta']['form']['headerTpl']) ? $this->defs['templateMeta']['form']['headerTpl'] : 'include/' . $this->view . '/header.tpl');
$this->th->ss->assign('footerTpl', isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : 'include/' . $this->view . '/footer.tpl');
$this->th->ss->assign('current_user', $current_user);
$this->th->ss->assign('bean', $this->focus);
$this->th->ss->assign('isAuditEnabled', $this->focus->is_AuditEnabled());
$this->th->ss->assign('gridline', $current_user->getPreference('gridline') == 'on' ? '1' : '0');
$this->th->ss->assign('tabDefs', isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['tabDefs'] : false);
$this->th->ss->assign('VERSION_MARK', getVersionedPath(''));
global $js_custom_version;
global $sugar_version;
$this->th->ss->assign('SUGAR_VERSION', $sugar_version);
$this->th->ss->assign('JS_CUSTOM_VERSION', $js_custom_version);
//this is used for multiple forms on one page
if (!empty($this->formName)) {
$form_id = $this->formName;
$form_name = $this->formName;
} else {
$form_id = $this->view;
$form_name = $this->view;
}
if ($ajaxSave && empty($this->formName)) {
$form_id = 'form_' . $this->view . '_' . $this->module;
$form_name = $form_id;
$this->view = $form_name;
//$this->defs['templateMeta']['form']['buttons'] = array();
//$this->defs['templateMeta']['form']['buttons']['ajax_save'] = array('id' => 'AjaxSave', 'customCode'=>'<input type="button" class="button" value="Save" onclick="this.form.action.value=\'AjaxFormSave\';return saveForm(\''.$form_name.'\', \'multiedit_form_{$module}\', \'Saving {$module}...\');"/>');
}
$form_name = $form_name == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_name;
$form_id = $form_id == 'QuickCreate' ? "QuickCreate_{$this->module}" : $form_id;
if (isset($this->defs['templateMeta']['preForm'])) {
$this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']);
}
if (isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) {
$this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']);
}
if (isset($this->defs['templateMeta']['form']['enctype'])) {
$this->th->ss->assign('enctype', 'enctype="' . $this->defs['templateMeta']['form']['enctype'] . '"');
}
//for SugarFieldImage, we must set form enctype to "multipart/form-data"
foreach ($this->fieldDefs as $field) {
if (isset($field['type']) && $field['type'] == 'image') {
$this->th->ss->assign('enctype', 'enctype="multipart/form-data"');
break;
}
}
$this->th->ss->assign('showDetailData', $this->showDetailData);
$this->th->ss->assign('showSectionPanelsTitles', $this->showSectionPanelsTitles);
$this->th->ss->assign('form_id', $form_id);
$this->th->ss->assign('form_name', $form_name);
$this->th->ss->assign('set_focus_block', get_set_focus_js());
$this->th->ss->assign('form', isset($this->defs['templateMeta']['form']) ? $this->defs['templateMeta']['form'] : null);
$this->th->ss->assign('includes', isset($this->defs['templateMeta']['includes']) ? $this->defs['templateMeta']['includes'] : null);
$this->th->ss->assign('view', $this->view);
//Calculate time & date formatting (may need to calculate this depending on a setting)
global $timedate;
$this->th->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
$this->th->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format());
$time_format = $timedate->get_user_time_format();
$this->th->ss->assign('TIME_FORMAT', $time_format);
$date_format = $timedate->get_cal_date_format();
$time_separator = ':';
if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) {
$time_separator = $match[1];
}
// Create Smarty variables for the Calendar picker widget
$t23 = strpos($time_format, '23') !== false ? '%H' : '%I';
//.........这里部分代码省略.........
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:101,代码来源:EditView2.php
示例10: display
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = new Administration();
$configurator->parseLoggerSettings();
$focus->retrieveSettings();
if (!empty($_POST['restore'])) {
$configurator->restoreConfig();
}
$this->ss->assign('MOD', $mod_strings);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('APP_LIST', $app_list_strings);
$this->ss->assign('config', $configurator->config);
$this->ss->assign('error', $configurator->errors);
$this->ss->assign('THEMES', SugarThemeRegistry::availableThemes());
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
$this->ss->assign("settings", $focus->settings);
$this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype']));
if (!empty($focus->settings['proxy_on'])) {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'none');
}
if (!empty($focus->settings['proxy_auth'])) {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'none');
}
if (!empty($configurator->config['logger']['level'])) {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level']));
} else {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), ''));
}
if (!empty($configurator->config['logger']['file']['suffix'])) {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix']));
} else {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, ''));
}
echo $this->getModuleTitle();
$this->ss->display('modules/Configurator/tpls/EditView.tpl');
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, "");
$javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, "");
$javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, "");
$javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, "");
$javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, "");
$javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, "");
echo $javascript->getScript();
}
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:57,代码来源:view.edit.php
示例11: display
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = new Administration();
$configurator->parseLoggerSettings();
$focus->retrieveSettings();
if (!empty($_POST['restore'])) {
$configurator->restoreConfig();
}
$this->ss->assign('MOD', $mod_strings);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('APP_LIST', $app_list_strings);
$this->ss->assign('config', $configurator->config);
$this->ss->assign('error', $configurator->errors);
$this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30));
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
$this->ss->assign("settings", $focus->settings);
$this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype']));
if (!empty($focus->settings['proxy_on'])) {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'none');
}
if (!empty($focus->settings['proxy_auth'])) {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'inline');
} else {
$this->ss->assign("PROXY_AUTH_DISPLAY", 'none');
}
if (!empty($configurator->config['logger']['level'])) {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level']));
} else {
$this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), ''));
}
if (!empty($configurator->config['lead_conv_activity_opt'])) {
$this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), $configurator->config['lead_conv_activity_opt']));
} else {
$this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), ''));
}
if (!empty($configurator->config['logger']['file']['suffix'])) {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix']));
} else {
$this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, ''));
}
if (isset($configurator->config['logger_visible'])) {
$this->ss->assign('logger_visible', $configurator->config['logger_visible']);
} else {
$this->ss->assign('logger_visible', true);
}
$ebay_site_ids = array('0' => 'eBay United States', '2' => 'eBay Canada (English)', '3' => 'eBay UK', '15' => 'eBay Australia', '16' => 'eBay Austria', '23' => 'eBay Belgium (French)', '71' => 'eBay France', '77' => 'eBay Germany', '100' => 'eBay Motors', '101' => 'eBay Italy', '123' => 'eBay Belgium (Dutch)', '146' => 'eBay Netherlands', '186' => 'eBay Spain', '193' => 'eBay Switzerland', '201' => 'eBay Hong Kong', '203' => 'eBay India', '205' => 'eBay Ireland', '207' => 'eBay Malaysia', '210' => 'eBay Canada (French)', '211' => 'eBay Philippines', '212' => 'eBay Poland', '216' => 'eBay Singapore');
$this->ss->assign("EBAY_SITE_ID_OPTIONS", get_select_options_with_id($ebay_site_ids, isset($configurator->config['ebay_primary_site_id']) ? $configurator->config['ebay_primary_site_id'] : 0));
require_once 'modules/xeBayOrders/xeBayOrder.php';
$this->ss->assign("EBAY_SHIPPING_SERVICE_OPTIONS", get_select_options_with_id(getShippingServiceDropDown(), isset($configurator->config['ebay_shipping_service']) ? $configurator->config['ebay_shipping_service'] : 'HKBAM'));
$this->ss->assign("EBAY_EXPRESS_CARRIER_OPTIONS", get_select_options_with_id(getExpressCarrierDropDown(), isset($configurator->config['ebay_express_carrier']) ? $configurator->config['ebay_express_carrier'] : 'default'));
echo $this->getModuleTitle(false);
$this->ss->display('modules/Configurator/tpls/EditView.tpl');
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, "");
$javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, "");
$javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, "");
$javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, "");
$javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, "");
$javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, "");
echo $javascript->getScript();
}
开发者ID:sunmo,项目名称:snowlotus,代码行数:72,代码来源:view.edit.php
示例12: get_set_focus_js
<?php
require_once 'XTemplate/xtpl.php';
require_once 'include/formbase.php';
require_once 'modules/ZuckerReportParameter/ReportParameter.php';
require_once 'modules/ZuckerReportParameter/Forms.php';
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $current_user;
global $current_language;
echo get_set_focus_js();
$mod_list_strings = return_mod_list_strings_language($current_language, "ZuckerReports");
$focus = new ReportParameter();
if (isset($_REQUEST['record']) && !empty($_REQUEST['record'])) {
$focus->retrieve($_REQUEST['record']);
$friendly_name = $focus->friendly_name;
$default_name = $focus->default_name;
$default_value = $focus->default_value;
$description = $focus->description;
$range_name = $focus->range_name;
$range_options = $focus->range_options;
$title = $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->default_name;
} else {
$title = $mod_strings['LBL_PARAM_NEW'];
}
if (!empty($_REQUEST['friendly_name'])) {
$friendly_name = $_REQUEST['friendly_name'];
}
if (!empty($_REQUEST['default_name'])) {
$default_name = $_REQUEST['default_name'];
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:EditView.php
示例13: get_set_focus_js
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (isset($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
// handle Create $module then Cancel
if (empty($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ACTION", 'index');
}
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$javascript = get_set_focus_js() . get_validate_record_js();
$xtpl->assign("JAVASCRIPT", $javascript);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("DOCUMENT_NAME", $focus->document_name);
$xtpl->assign("DESCRIPTION", $focus->description);
$xtpl->assign("FILENAME_TEXT", $focus->filename);
$xtpl->assign("REVISION", $focus->latest_revision);
$xtpl->assign("OLD_ID", $old_id);
if (isset($focus->id)) {
$xtpl->assign("FILE_OR_HIDDEN", "hidden");
if (!isset($_REQUEST['isDuplicate']) || empty($_REQUEST['isDuplicate'])) {
$xtpl->assign("DISABLED", "disabled");
}
} else {
$xtpl->assign("FILE_OR_HIDDEN", "file");
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php
示例14: setupAll
public function setupAll($showTitle = false, $ajaxSave = false, $moduleName = '', $readonly = false)
{
global $mod_strings, $sugar_config, $app_strings, $app_list_strings, $theme, $current_user;
if (isset($this->defs['templateMeta']['javascript'])) {
if (is_array($this->defs['templateMeta']['javascript'])) {
$this->th->ss->assign('externalJSFile', $this->defs['templateMeta']['javascript']);
} else {
$this->th->ss->assign('scriptBlocks', $this->defs['templateMeta']['javascript']);
}
}
$this->setupOriginalEditView();
$this->th->ss->assign('id', $this->fieldDefs['id']['value']);
$this->th->ss->assign('offset', $this->offset + 1);
$this->th->ss->assign('APP', $app_strings);
$this->th->ss->assign('MOD', $mod_strings);
$this->th->ss->assign('footerTpl', isset($this->defs['templateMeta']['form']['footerTpl']) ? $this->defs['templateMeta']['form']['footerTpl'] : null);
$this->fieldDefs = $this->setDefaultAllFields($this->fieldDefs);
// default editview
if ($readonly) {
$this->fieldDefs = $this->setReadOnlyAllFields($this->fieldDefs);
} else {
$this->fieldDefs = $this->processReadOnlyFields($this->fieldDefs);
$this->fieldDefs = $this->processRequiredFields($this->fieldDefs);
}
$this->th->ss->assign('fields', $this->fieldDefs);
$this->sectionPanels = $this->processSectionPanels($this->sectionPanels);
$this->th->ss->assign('sectionPanels', $this->sectionPanels);
$this->th->ss->assign('config', $sugar_config);
$this->th->ss->assign('returnModule', $this->returnModule);
$this->th->ss->assign('returnAction', $this->returnAction);
$this->th->ss->assign('returnId', $this->returnId);
$this->th->ss->assign('isDuplicate', $this->isDuplicate);
$this->th->ss->assign('def', $this->defs);
$this->th->ss->assign('useTabs', isset($this->defs['templateMeta']['useTabs']) && isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['useTabs'] : false);
$this->th->ss->assign('maxColumns', isset($this->defs['templateMeta']['maxColumns']) ? $this->defs['templateMeta']['maxColumns'] : 2);
$this->th->ss->assign('module', $moduleName);
$this->th->ss->assign('current_user', $current_user);
$this->th->ss->assign('bean', $this->focus);
$this->th->ss->assign('gridline', $current_user->getPreference('gridline') == 'on' ? '1' : '0');
$this->th->ss->assign('tabDefs', isset($this->defs['templateMeta']['tabDefs']) ? $this->defs['templateMeta']['tabDefs'] : false);
$this->th->ss->assign('VERSION_MARK', getVersionedPath(''));
if (isset($this->relationshipChart[$moduleName])) {
foreach ($this->relationshipChart[$moduleName] as $relName => $ssName) {
$this->bean->load_relationship($relName);
$tempBeanList = $this->bean->{$relName}->getBeans();
$this->th->ss->assign($ssName, $tempBeanList);
}
}
global $js_custom_version;
global $sugar_version;
$this->th->ss->assign('SUGAR_VERSION', $sugar_version);
$this->th->ss->assign('JS_CUSTOM_VERSION', $js_custom_version);
//this is used for multiple forms on one page
if (!empty($this->formName)) {
$form_id = $this->formName;
$form_name = $this->formName;
} else {
$form_id = $this->view;
$form_name = $this->view;
}
if ($ajaxSave && empty($this->formName)) {
$form_id = 'form_' . $this->view . '_' . $moduleName;
$form_name = $form_id;
$this->view = $form_name;
}
$form_name = $form_name == 'QuickCreate' ? "QuickCreate_{$moduleName}" : $form_name;
$form_id = $form_id == 'QuickCreate' ? "QuickCreate_{$moduleName}" : $form_id;
if (isset($this->defs['templateMeta']['preForm'])) {
$this->th->ss->assign('preForm', $this->defs['templateMeta']['preForm']);
}
if (isset($this->defs['templateMeta']['form']['closeFormBeforeCustomButtons'])) {
$this->th->ss->assign('closeFormBeforeCustomButtons', $this->defs['templateMeta']['form']['closeFormBeforeCustomButtons']);
}
if (isset($this->defs['templateMeta']['form']['enctype'])) {
$this->th->ss->assign('enctype', 'enctype="' . $this->defs['templateMeta']['form']['enctype'] . '"');
}
//for SugarFieldImage, we must set form enctype to "multipart/form-data"
foreach ($this->fieldDefs as $field) {
if (isset($field['type']) && $field['type'] == 'image') {
$this->th->ss->assign('enctype', 'enctype="multipart/form-data"');
break;
}
}
$this->th->ss->assign('showDetailData', $this->showDetailData);
$this->th->ss->assign('showSectionPanelsTitles', $this->showSectionPanelsTitles);
$this->th->ss->assign('form_id', $form_id);
$this->th->ss->assign('form_name', $form_name);
//$form_name change by id form showCaseForm
$this->th->ss->assign('set_focus_block', get_set_focus_js());
$this->th->ss->assign('form', isset($this->defs['templateMeta']['form']) ? $this->defs['templateMeta']['form'] : null);
$this->th->ss->assign('includes', isset($this->defs['templateMeta']['includes']) ? $this->defs['templateMeta']['includes'] : null);
$this->th->ss->assign('view', $this->view);
$admin = new Administration();
$admin->retrieveSettings();
if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
$this->th->ss->assign("PORTAL_ENABLED", true);
} else {
$this->th->ss->assign("PORTAL_ENABLED", false);
}
//Calculate time & date formatting (may need to calculate this depending on a setting)
//.........这里部分代码省略.........
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:101,代码来源:view.showcase.php
示例15: get_new_record_form
-
Windows Boot Manager Security Feature Bypass Vulnerability.
阅读:894|2022-07-29
-
PacktPublishing/Python-Machine-Learning-Second-Edition: Python Machine Learning
阅读:975|2022-08-18
-
altair-viz/altair: Declarative statistical visualization library for Python
阅读:1108|2022-08-15
-
sussillo/hfopt-matlab: A parallel, cpu-based matlab implemention of the Hessian
阅读:999|2022-08-17
-
win7系统电脑使用过程中有不少朋友表示遇到过win7系统USB驱动器RAM的状况,当出现win7
阅读:891|2022-11-06
-
emersion/go-ostatus: An OStatus library written in Go
阅读:752|2022-08-17
-
这篇文章讲的很好
但是那位老哥 你唯一没有说的就是 最后结局方法里面的 env:“jnfrie
阅读:575|2022-07-18
-
elipapa/markdown-cv: a simple template to write your CV in a readable markdown f
阅读:514|2022-08-17
-
zju-sclab/NDT-library: These is ndt library for ndt_mapping and ndt_localization
阅读:735|2022-08-16
-
Call Me Maybe 中英字幕 对于加拿大歌手卡莉·蕾·吉普森很多人有些陌生,她隶属于贾
阅读:632|2022-11-06
|
请发表评论