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


PHP javascript::addFieldGeneric方法代码示例

本文整理汇总了PHP中javascript::addFieldGeneric方法的典型用法代码示例。如果您正苦于以下问题:PHP javascript::addFieldGeneric方法的具体用法?PHP javascript::addFieldGeneric怎么用?PHP javascript::addFieldGeneric使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javascript的用法示例。


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

示例1: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $beanFiles, $mod_strings;
     // the user admin (MLA) cannot edit any administrator holidays
     global $current_user;
     if (isset($_REQUEST['record'])) {
         $result = $GLOBALS['db']->query("SELECT is_admin FROM users WHERE id=(SELECT person_id FROM holidays WHERE id='{$_REQUEST['record']}')");
         $row = $GLOBALS['db']->fetchByAssoc($result);
         if (!is_admin($current_user) && $current_user->isAdminForModule('Users') && $row['is_admin'] == 1) {
             sugar_die('Unauthorized access');
         }
     }
     $this->ev->process();
     if ($_REQUEST['return_module'] == 'Project') {
         $projectBean = BeanFactory::getBean('Project', $_REQUEST['return_id']);
         $userBean = BeanFactory::getBean('Users');
         $contactBean = BeanFactory::getBean('Contacts');
         $projectBean->load_relationship("user_resources");
         $userResources = $projectBean->user_resources->getBeans($userBean);
         $projectBean->load_relationship("contact_resources");
         $contactResources = $projectBean->contact_resources->getBeans($contactBean);
         ksort($userResources);
         ksort($contactResources);
         $this->ss->assign("PROJECT", true);
         $this->ss->assign("USER_RESOURCES", $userResources);
         $this->ss->assign("CONTACT_RESOURCES", $contactResources);
         $this->ss->assign("MOD", $mod_strings);
         $holiday_js = "<script type='text/javascript'>\n";
         $holiday_js .= $projectBean->resourceSelectJS();
         $holiday_js .= "\n</script>";
         echo $holiday_js;
     }
     echo $this->ev->display();
     //echo the javascript that will validate the form
     $javascript = new javascript();
     $javascript->setFormName("EditView");
     $javascript->addFieldGeneric('holiday_date', '', 'LBL_HOLIDAY_DATE', 'true');
     $javascript->addFieldGeneric('person_type', '', 'LBL_PERSON_TYPE', 'true');
     //note that the person type and person id labels are use the resource name label on purpose for a clearer UI
     $javascript->addToValidateBinaryDependency('person_id', 'alpha', 'LBL_RESOURCE_NAME', 'true', '', 'person_type');
     echo $javascript->getScript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:45,代码来源:view.edit.php

示例2: getClassicModuleTitle

$params[] = "<a href='index.php?module=Schedulers&action=index'>{$mod_strings['LBL_MODULE_TITLE']}</a>";
if (empty($focus->id)) {
    $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
} else {
    $params[] = "<a href='index.php?module=Schedulers&action=DetailView&record={$focus->id}'>{$focus->name}</a>";
    $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
}
echo getClassicModuleTitle("Schedulers", $params, true);
Log::info("Scheduler Edit View");
/* End standard EditView setup logic */
// javascript calls
$javascript = new javascript();
$javascript->setSugarBean($focus);
$javascript->setFormName('EditView');
$javascript->addAllFields('');
$javascript->addFieldGeneric('mins', 'alpha', 'Mins', true, $prefix = '');
$javascript->addFieldGeneric('day_of_month', 'alpha', 'Days of Month', true, $prefix = '');
$javascript->addFieldGeneric('months', 'alpha', 'Months', true, $prefix = '');
$javascript->addFieldGeneric('day_of_week', 'alpha', 'Days of Week', true, $prefix = '');
$javascript->addFieldGeneric('date_start', 'date', 'Start Date', true, $prefix = '');
//$javascript->addFieldDateBeforeAllowBlank('date_start', 'date', 'Date End', 'false', $prefix='', 'date_end', 'true'); // cn: disabled because it does not handle user-pref date format
$javascript->addToValidateBinaryDependency('time_hour_from', 'alpha', 'Active From (hr) must be set with Active To (hr) ', 'false', $prefix = '', 'time_hour_to');
$javascript->addToValidateBinaryDependency('time_minute_from', 'alpha', 'Active From (min) must be set with Active To (min) ', 'false', $prefix = '', 'time_minute_to');
//($field, $type,$displayName, $required, $prefix='',$compareTo)
// split the date/time of start/end
$dtStart = $focus->date_time_start;
$dtEnd = $focus->date_time_end;
if (!empty($dtStart)) {
    $exStart = explode(" ", $dtStart);
    $date_start = $exStart[0];
    $time_start = $exStart[1];
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:31,代码来源:EditView.php

示例3: javascript

if (!empty($_POST['restore'])) {
    $configurator->restoreConfig();
}
require_once 'include/Sugar_Smarty.php';
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('APP_LIST', $app_list_strings);
$sugar_smarty->assign('config', $configurator->config);
$sugar_smarty->assign('asterisk_config', $asterisk_config);
$sugar_smarty->assign('error', $configurator->errors);
$sugar_smarty->display('custom/modules/Configurator/asterisk_configurator.tpl');
require_once "include/javascript/javascript.php";
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("asterisk_host", "varchar", $mod_strings['LBL_ASTERISK_HOST'], TRUE, "");
$javascript->addFieldGeneric("asterisk_port", "int", $mod_strings['LBL_ASTERISK_PORT'], TRUE, "");
$javascript->addFieldGeneric("asterisk_user", "varchar", $mod_strings['LBL_ASTERISK_USER'], TRUE, "");
$javascript->addFieldGeneric("asterisk_secret", "varchar", $mod_strings['LBL_ASTERISK_SECRET'], TRUE, "");
$javascript->addFieldGeneric("asterisk_prefix", "varchar", $mod_strings['LBL_ASTERISK_PREFIX'], TRUE, "");
$javascript->addFieldGeneric("asterisk_context", "varchar", $mod_strings['LBL_ASTERISK_CONTEXT'], TRUE, "");
$javascript->addFieldGeneric("asterisk_expr", "varchar", $mod_strings['LBL_ASTERISK_EXPR'], TRUE, "");
$javascript->addFieldGeneric("asterisk_soapuser", "varchar", $mod_strings['LBL_ASTERISK_SOAPUSER'], TRUE, "");
// Added in yaii-2.0
$javascript->addFieldGeneric("asterisk_dialinPrefix", "varchar", $mod_strings['LBL_ASTERISK_DIALINPREFIX'], TRUE, "");
$javascript->addFieldGeneric('asterisk_log_file', "varchar", $mod_strings['LBL_ASTERISK_LOG_FILE'], TRUE, "");
$javascript->addFieldGeneric('asterisk_dialout_channel', "varchar", $mod_strings['LBL_ASTERISK_DIALOUT_CHANNEL'], TRUE, "");
$javascript->addFieldGeneric('asterisk_dialin_ext_match', "varchar", $mod_strings['LBL_ASTERISK_DIALIN_EXT_MATCH'], TRUE, "");
$javascript->addFieldGeneric('asterisk_call_subject_inbound_abbr', "varchar", $mod_strings['LBL_ASTERISK_CALL_SUBJECT_INBOUND_ABBR'], TRUE, "");
$javascript->addFieldGeneric('asterisk_call_subject_outbound_abbr', "varchar", $mod_strings['LBL_ASTERISK_CALL_SUBJECT_OUTBOUND_ABBR'], TRUE, "");
$javascript->addFieldGeneric('asterisk_call_subject_max_length', "varchar", $mod_strings['LBL_ASTERISK_CALL_SUBJECT_MAX_LENGTH'], TRUE, "");
开发者ID:netconstructor,项目名称:yaai,代码行数:31,代码来源:asterisk_configurator.php

示例4: array

}
if (empty($focus->assigned_name) && empty($focus->id)) {
    $focus->assigned_user_name = $current_user->user_name;
}
$assigned_user = get_user_array(TRUE, "Active", $focus->assigned_user_id);
asort($assigned_user);
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id($assigned_user, $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
/// Users Popup
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name'));
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
require_once 'modules/ZuckerReports/SimpleTeams.php';
$xtpl->assign("TEAM_SELECTION", SimpleTeams::xtplGetTeamSelection($xtpl, $focus));
if (!empty($_REQUEST["ZR_ERROR_MSG"])) {
    $xtpl->assign("ERROR_MSG", $_REQUEST["ZR_ERROR_MSG"]);
    $xtpl->parse("main.error");
}
$checkboxes = $focus->get_export_checkbox_array();
$xtpl->assign("EXPORT_TYPES", join("<br/>", $checkboxes));
$xtpl->parse("main");
$xtpl->out("main");
require_once 'include/javascript/javascript.php';
$javascript = new javascript();
$javascript->setFormName('EditView');
$javascript->setSugarBean($focus);
$javascript->addAllFields('');
$javascript->addFieldGeneric('team_name', 'varchar', $app_strings['LBL_TEAM'], 'true');
$javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
echo $javascript->getScript();
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:EditView.php

示例5: 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();
     $configurator->parseLoggerSettings();
     $focus = Administration::getSettings();
     /*
     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', true, true));
     $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');
     }
     $ini_session_val = ini_get('session.gc_maxlifetime');
     if (!empty($focus->settings['system_session_timeout'])) {
         $this->ss->assign("SESSION_TIMEOUT", $focus->settings['system_session_timeout']);
     } else {
         $this->ss->assign("SESSION_TIMEOUT", $ini_session_val);
     }
     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);
     }
     $this->ss->assign('list_entries_per_listview_help', str_replace('{{listEntriesNum}}', '50', $mod_strings['TPL_LIST_ENTRIES_PER_LISTVIEW_HELP']));
     $this->ss->assign('list_entries_per_subpanel_help', str_replace('{{subpanelEntriesNum}}', '25', $mod_strings['TPL_LIST_ENTRIES_PER_SUBPANEL_HELP']));
     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, "");
     $javascript->addFieldRange("system_session_timeout", "int", $mod_strings['SESSION_TIMEOUT'], TRUE, "", 0, $ini_session_val);
     echo $javascript->getScript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:77,代码来源:view.edit.php

示例6: javascript

} else {
    $sugar_smarty->assign("PROXY_AUTH_DISPLAY", 'none');
}
if (!function_exists('mcrypt_cbc')) {
    $sugar_smarty->assign("LDAP_ENC_KEY_READONLY", 'readonly');
    $sugar_smarty->assign("LDAP_ENC_KEY_DESC", $mod_strings['LDAP_ENC_KEY_NO_FUNC_DESC']);
} else {
    $sugar_smarty->assign("LDAP_ENC_KEY_DESC", $mod_strings['LBL_LDAP_ENC_KEY_DESC']);
}
if (!empty($configurator->config['logger']['level'])) {
    $sugar_smarty->assign('log_levels', get_select_options_with_id(SugarLogger::$log_levels, $configurator->config['logger']['level']));
} else {
    $sugar_smarty->assign('log_levels', get_select_options_with_id(SugarLogger::$log_levels, ''));
}
if (!empty($configurator->config['logger']['file']['suffix'])) {
    $sugar_smarty->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix']));
} else {
    $sugar_smarty->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, ''));
}
//nsingh- moved to locale.php , bug 18064.
//$sugar_smarty->assign("exportCharsets", get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));*/
$sugar_smarty->display('modules/Configurator/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:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:31,代码来源:EditView.php

示例7: 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

示例8: header

    $configurator->parseLoggerSettings();
    $configurator->saveConfig();
    $focus->saveConfig();
    header('Location: index.php?module=Administration&action=index');
}
$focus->retrieveSettings();
if (!empty($_POST['restore'])) {
    $configurator->restoreConfig();
}
require_once 'include/Sugar_Smarty.php';
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('APP_LIST', $app_list_strings);
$sugar_smarty->assign('config', $focus->settings);
$sugar_smarty->assign('asterisk_config', $asterisk_config);
$sugar_smarty->assign('error', $configurator->errors);
$sugar_smarty->display('custom/modules/Configurator/asterisk_configurator.tpl');
require_once "include/javascript/javascript.php";
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("asterisk_host", "varchar", $mod_strings['LBL_ASTERISK_HOST'], TRUE, "");
$javascript->addFieldGeneric("asterisk_port", "int", $mod_strings['LBL_ASTERISK_PORT'], TRUE, "");
$javascript->addFieldGeneric("asterisk_user", "varchar", $mod_strings['LBL_ASTERISK_USER'], TRUE, "");
$javascript->addFieldGeneric("asterisk_secret", "varchar", $mod_strings['LBL_ASTERISK_SECRET'], TRUE, "");
$javascript->addFieldGeneric("asterisk_prefix", "varchar", $mod_strings['LBL_ASTERISK_PREFIX'], TRUE, "");
$javascript->addFieldGeneric("asterisk_context", "varchar", $mod_strings['LBL_ASTERISK_CONTEXT'], TRUE, "");
$javascript->addFieldGeneric("asterisk_expr", "varchar", $mod_strings['LBL_ASTERISK_EXPR'], TRUE, "");
$javascript->addFieldGeneric("asterisk_soapuser", "varchar", $mod_strings['LBL_ASTERISK_SOAPUSER'], TRUE, "");
$javascript->addFieldGeneric("asterisk_recordings", "varchar", $mod_strings['LBL_ASTERISK_RECORDINGS'], TRUE, "");
echo $javascript->getScript();
开发者ID:netconstructor,项目名称:SugarAsterisk,代码行数:31,代码来源:asterisk_configurator.php

示例9: 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

示例10: getJSONobj

//$javascript->addAllFields('');
//add custom fields to validation
foreach ($javascript->sugarbean->field_name_map as $field => $value) {
    if (isset($value['custom_type'])) {
        if ($value['custom_type'] != 'link') {
            //pass in required flag if set to required
            if (isset($value['required']) && $value['required']) {
                $javascript->addField($field, true);
            } else {
                //if not required, then just pass in to validate
                $javascript->addField($field, false);
            }
        }
    }
}
$javascript->addFieldGeneric('kbdocument_name', '', 'LBL_ARTICLE_TITLE', 'true');
$javascript->addFieldGeneric('assigned_user_name', 'varchar', $mod_strings['LBL_ARTICLE_AUTHOR'], 'true');
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_ARTICLE_AUTHOR'], 'false', '', 'assigned_user_id');
$javascript->addToValidateBinaryDependency('kbdoc_approver_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_ARTICLE_APPROVED_BY'], 'false', '', 'kbdoc_approver_id');
$javascript->addFieldGeneric('kbdocument_revision_number', '', 'LBL_DOC_VERSION', 'true');
$javascript->addFieldGeneric('team_name', 'varchar', $app_strings['LBL_TEAM'], 'true');
$javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
$javascript->addFieldGeneric('tiny_vals', '', 'LBL_ARTICLE_BODY', 'true');
echo $javascript->getScript();
//Add Custom Fields
require_once 'modules/DynamicFields/templates/Files/EditView.php';
$xtpl->parse("main");
$xtpl->out("main");
$savedSearch = BeanFactory::getBean('SavedSearch');
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('KBDocuments')));
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:EditView.php

示例11: javascript

        $xtpl->assign('GROUP', $parts['group']);
    }
    $xtpl->assign('ASSIGNED_USER_ID', $current_user->id);
    $xtpl->assign('MYINBOX', 'this.form.type.value=\'inbound\';');
}
////	END SPECIAL INBOUND LANDING SCREEN ASSIGNS
///////////////////////////////////////
echo '<script>var disabledModules=' . $json->encode($disabled_parent_types) . ';</script>';
$jsVars = 'var lbl_send_anyways = "' . $mod_strings['LBL_SEND_ANYWAYS'] . '";';
$xtpl->assign('JS_VARS', $jsVars);
$xtpl->parse("main");
$xtpl->out("main");
////	END XTEMPLATE ASSIGNMENT
///////////////////////////////////////////////////////////////////////////////
require_once 'include/javascript/javascript.php';
$javascript = new javascript();
$javascript->setFormName('EditView');
$javascript->setSugarBean($focus);
$skip_fields = array();
if ($email_type == 'out') {
    $skip_fields['name'] = 1;
    $skip_fields['date_start'] = 1;
}
$javascript->addAllFields('', $skip_fields);
$javascript->addToValidateBinaryDependency('parent_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_MEMBER_OF'], 'false', '', 'parent_id');
$javascript->addToValidateBinaryDependency('user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
if ($email_type == 'archived') {
    $javascript->addFieldGeneric('date_start', 'alpha', $mod_strings['ERR_DATE_START'], true);
    $javascript->addFieldGeneric('time_start', 'alpha', $mod_strings['ERR_TIME_START'], true);
}
echo $javascript->getScript();
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:UserNotify.php

示例12: javascript

}
if (empty($lead->assigned_name) && empty($lead->id)) {
    $lead->assigned_user_name = $current_user->user_name;
}
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $lead->assigned_user_id), $lead->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $lead->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $lead->assigned_user_id);
$xtpl->assign("REDIRECT_URL_DEFAULT", 'http://');
//required fields on Webtolead form
$campaign = BeanFactory::getBean('Campaigns');
$javascript = new javascript();
$javascript->setFormName('WebToLeadCreation');
$javascript->setSugarBean($lead);
$javascript->addAllFields('');
//$javascript->addFieldGeneric('redirect_url', '', 'LBL_REDIRECT_URL' ,'true');
$javascript->addFieldGeneric('campaign_name', '', 'LBL_RELATED_CAMPAIGN', 'true');
$javascript->addFieldGeneric('assigned_user_name', '', 'LBL_ASSIGNED_TO', 'true');
$javascript->addToValidateBinaryDependency('campaign_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_LEAD_NOTIFY_CAMPAIGN'], 'false', '', 'campaign_id');
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
$javascript->addFieldGeneric('team_name', 'varchar', $app_strings['LBL_TEAM'], 'true');
$javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
echo $javascript->getScript();
$json = getJSONobj();
$lead_fields = $json->encode($fields);
$xtpl->assign("LEAD_FIELDS", $lead_fields);
$classname = "SUGAR_GRID";
$xtpl->assign("CLASSNAME", $classname);
$xtpl->assign("DRAG_DROP_CHOOSER_WEB_TO_LEAD", constructDDWebToLeadFields($fields, $classname));
$xtpl->parse("main");
$xtpl->out("main");
/*
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:WebToLeadCreation.php

示例13: checkUploadImage

$sugar_smarty->assign("SugarpdfSettings", $SugarpdfSettings);
$sugar_smarty->assign("pdf_class", $pdf_class);
$sugar_smarty->assign("selected_pdf_class", PDF_CLASS);
if (!empty($error)) {
    $sugar_smarty->assign("error", $mod_strings[$error]);
}
if (!function_exists('imagecreatefrompng')) {
    $sugar_smarty->assign("GD_WARNING", $mod_strings['PDF_GD_WARNING']);
}
$sugar_smarty->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();
function checkUploadImage()
{
    $error = "";
    if (isset($_FILES['new_header_logo']) && !empty($_FILES['new_header_logo']['name'])) {
        $file_name = K_PATH_IMAGES . '/pdf_header_logo_' . basename($_FILES['new_header_logo']['name']);
        if (file_exists($file_name)) {
            rmdir_recursive($file_name);
        }
        if (!empty($_FILES['new_header_logo']['error'])) {
            $error = 'ERR_ALERT_FILE_UPLOAD';
        }
        if (empty($error)) {
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:31,代码来源:SugarpdfSettings.php

示例14: isset

$return_action = isset($_REQUEST['return_action']) ? $_REQUEST['return_action'] : '';
if (empty($return_id)) {
    $return_action = 'index';
}
if (isset($_REQUEST['error_string'])) {
    $xtpl->assign("ERROR_STRING", "<span class='error'>Error: " . $_REQUEST['error_string'] . "</span>");
}
$xtpl->assign("RETURN_MODULE", $return_module);
$xtpl->assign("RETURN_ID", $return_id);
$xtpl->assign("RETURN_ACTION", $return_action);
if (isset($_REQUEST['isDuplicate'])) {
    $xtpl->assign("IS_DUPLICATE", $_REQUEST['isDuplicate']);
}
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("NAME", Team::getDisplayName($focus->name, $focus->name_2));
$xtpl->assign("DESCRIPTION", $focus->description);
global $current_user;
if ($current_user->isAdminForModule('Users') && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $record = '';
    if (!empty($_REQUEST['record'])) {
        $record = $_REQUEST['record'];
    }
    $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $record . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>");
}
$javascript = new javascript();
$javascript->setFormName("EditView");
$javascript->addFieldGeneric("name", "varchar", $mod_strings['LBL_NAME'], TRUE, "");
$xtpl->parse("main");
$xtpl->out("main");
echo $javascript->getScript();
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:EditView.php

示例15: Campaign

}
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("REDIRECT_URL_DEFAULT", 'http://');
//required fields on Webtolead form
$campaign = new Campaign();
$javascript = new javascript();
$javascript->setFormName('WebToLeadCreation');
$javascript->setSugarBean($lead);
$javascript->addAllFields('');
//$javascript->addFieldGeneric('redirect_url', '', 'LBL_REDIRECT_URL' ,'true');
$javascript->addFieldGeneric('campaign_name', '', 'LBL_RELATED_CAMPAIGN', 'true');
$javascript->addFieldGeneric('assigned_user_name', '', 'LBL_ASSIGNED_TO', 'true');
$javascript->addToValidateBinaryDependency('campaign_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_LEAD_NOTIFY_CAMPAIGN'], 'false', '', 'campaign_id');
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
echo $javascript->getScript();
$json = getJSONobj();
$lead_fields = $json->encode($fields);
$xtpl->assign("LEAD_FIELDS", $lead_fields);
$classname = "SUGAR_GRID";
$xtpl->assign("CLASSNAME", $classname);
$xtpl->assign("DRAG_DROP_CHOOSER_WEB_TO_LEAD", constructDDWebToLeadFields($fields, $classname));
$xtpl->parse("main");
$xtpl->out("main");
/*
$str = "<script>
WebToLeadForm.lead_fields = {$lead_fields};
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:WebToLeadCreation.php


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