本文整理汇总了PHP中javascript::setFormName方法的典型用法代码示例。如果您正苦于以下问题:PHP javascript::setFormName方法的具体用法?PHP javascript::setFormName怎么用?PHP javascript::setFormName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javascript
的用法示例。
在下文中一共展示了javascript::setFormName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: getFormBody
function getFormBody($prefix, $mod = '', $formname = '', $size = '30', $script = true)
{
if (!ACLController::checkAccess('Notes', 'edit', true)) {
return '';
}
global $mod_strings;
$temp_strings = $mod_strings;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
}
global $app_strings;
global $app_list_strings;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_note_subject = $mod_strings['LBL_NOTE_SUBJECT'];
$lbl_note_description = $mod_strings['LBL_NOTE'];
$default_parent_type = $app_list_strings['record_type_default_key'];
$form = <<<EOF
\t\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t\t<input type="hidden" name="{$prefix}parent_type" value="{$default_parent_type}">
<p>\t\t\t\t<table cellspacing="0" cellpadding="0" border="0">
\t\t\t\t<tr>
\t\t\t\t <td class="dataLabel">{$lbl_note_subject} <span class="required">{$lbl_required_symbol}</span></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t <td class="dataField"><input name='{$prefix}name' size='{$size}' maxlength='255' type="text" value=""></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t <td class="dataLabel">{$lbl_note_description}</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t <td class="dataField"><textarea name='{$prefix}description' cols='{$size}' rows='4' ></textarea></td>
\t\t\t\t</tr>
\t\t\t\t</table></p>
EOF;
if ($script) {
require_once 'include/javascript/javascript.php';
require_once 'modules/Notes/Note.php';
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Note());
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
}
$mod_strings = $temp_strings;
return $form;
}
示例3: 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 $mod_strings;
global $app_strings;
global $app_list_strings;
global $theme;
global $current_user;
global $sugar_version, $sugar_config;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_subject = $mod_strings['LBL_SUBJECT'];
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
$user_id = $current_user->id;
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
$the_form .= '<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
$the_form .= <<<EOQ
\t\t<form name="MachineSave" onSubmit="return check_form('MachineSave')" method="POST" action="index.php">
\t\t\t<input type="hidden" name="module" value="Machines">
\t\t\t<input type="hidden" name="record" value="">
\t\t\t<input type="hidden" name="assigned_user_id" value='{$user_id}'>
\t\t\t<input type="hidden" name="action" value="Save">
\t\t{$lbl_subject} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<p><input name='name' type="text" size='27' maxlength="255"value=""><br>
EOQ;
global $sugar_config;
$the_form .= <<<EOQ
<p>\t\t<input title="{$lbl_save_button_title}" accessKey="{$lbl_save_button_key}" class="button" type="submit" name="button" value=" {$lbl_save_button_label} " ></p>
\t\t
\t\t</form>
EOQ;
require_once 'include/javascript/javascript.php';
require_once 'modules/Machines/Machine.php';
$javascript = new javascript();
$javascript->setFormName('MachineSave');
$javascript->setSugarBean(new Machine());
$javascript->addRequiredFields('');
$the_form .= $javascript->getScript();
$the_form .= get_left_form_footer();
return $the_form;
}
示例4: 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();
}
示例5: getFormBody
function getFormBody($prefix, $mod = '', $formname = '', $size = '30')
{
global $mod_strings;
$temp_strings = $mod_strings;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
}
global $app_strings;
global $app_list_strings;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_subject = $mod_strings['LBL_NOTE_SUBJECT'];
$lbl_description = $mod_strings['LBL_NOTE'];
$default_parent_type = $app_list_strings['record_type_default_key'];
$form = <<<EOF
\t\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t\t<input type="hidden" name="{$prefix}parent_type" value="{$default_parent_type}">
\t\t\t\t<p>
\t\t\t\t<table cellspacing="0" cellpadding="0" border="0">
\t\t\t\t<tr>
\t\t\t\t <td scope="row">{$lbl_subject} <span class="required">{$lbl_required_symbol}</span></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t <td ><input name='{$prefix}name' size='{$size}' maxlength='255' type="text" value=""></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t <td scope="row">{$lbl_description}</td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t <td ><textarea name='{$prefix}description' cols='{$size}' rows='4' ></textarea></td>
\t\t\t\t</tr>
\t\t\t\t</table></p>
EOF;
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new EmailTemplate());
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
示例6: getFormBody
function getFormBody($prefix, $mod = '', $formname = '')
{
if (!ACLController::checkAccess('Leads', 'edit', true)) {
return '';
}
global $mod_strings;
$temp_strings = $mod_strings;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
}
global $app_strings;
global $current_user;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
$lbl_last_name = $mod_strings['LBL_LAST_NAME'];
$lbl_phone = $mod_strings['LBL_PHONE'];
$user_id = $current_user->id;
$lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
$form = <<<EOQ
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}email2" value="">
\t\t<input type="hidden" name="{$prefix}status" value="New">
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
<p>\t\t{$lbl_first_name}<br>
\t\t<input name="{$prefix}first_name" type="text" value=""><br>
\t\t{$lbl_last_name} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input name='{$prefix}last_name' type="text" value=""><br>
\t\t{$lbl_phone}<br>
\t\t<input name='{$prefix}phone_work' type="text" value=""><br>
\t\t{$lbl_email_address}<br>
\t\t<input name='{$prefix}email1' type="text" value=""></p>
EOQ;
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Lead());
$javascript->addField('email1', 'false', $prefix);
$javascript->addField('email2', 'false', $prefix);
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
示例7: getWideFormBody
//.........这里部分代码省略.........
global $theme;
$lbl_subject = $mod_strings['LBL_SUBJECT'];
// Unimplemented until jscalendar language files are fixed
// global $current_language;
// global $default_language;
// global $cal_codes;
// Unimplemented until jscalendar language files are fixed
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
$cal_lang = "en";
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_date = $mod_strings['LBL_DATE'];
$lbl_time = $mod_strings['LBL_TIME'];
global $timedate;
$ntc_date_format = '(' . $timedate->get_user_date_format() . ')';
$ntc_time_format = '(' . $timedate->get_user_time_format() . ')';
$cal_dateformat = $timedate->get_cal_date_format();
$user_id = $current_user->id;
$default_status = $app_list_strings['call_status_default'];
$default_parent_type = $app_list_strings['record_type_default_key'];
$date = TimeDate::getInstance()->nowDb();
$default_date_start = $timedate->to_display_date($date);
$default_time_start = $timedate->to_display_time($date, true);
$time_ampm = $timedate->AMPMMenu($prefix, $default_time_start);
$form = <<<EOQ
\t\t\t<input type="hidden" name="{$prefix}direction" value="Outbound">
\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t<input type="hidden" name="{$prefix}status" value="{$default_status}">
\t\t\t<input type="hidden" name="{$prefix}parent_type" value="{$default_parent_type}">
\t\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t\t<input type="hidden" name="{$prefix}duration_hours" value="1">
\t\t\t<input type="hidden" name="{$prefix}duration_minutes" value="0">
\t\t\t<input type="hidden" name="{$prefix}user_id" value="{$user_id}">
\t\t<table cellspacing='0' cellpadding='0' border='0' width="100%">
<tr>
EOQ;
if ($wide) {
$form .= <<<EOQ
<td scope='row' width="20%"><input type='radio' name='appointment' value='Call' class='radio' checked> {$mod_strings['LNK_NEW_CALL']}</td>
<td scope='row' width="80%">{$mod_strings['LBL_DESCRIPTION']}</td>
</tr>
<tr>
<td scope='row'><input type='radio' name='appointment' value='Meeting' class='radio'> {$mod_strings['LNK_NEW_MEETING']}</td>
<td rowspan='8' ><textarea name='Appointmentsdescription' cols='50' rows='5'></textarea></td>
</tr>
EOQ;
} else {
$form .= <<<EOQ
<td scope='row' width="20%"><input type='radio' name='appointment' value='Call' class='radio' onchange='document.{$formname}.module.value="Calls";' checked> {$mod_strings['LNK_NEW_CALL']}</td>
</tr>
<tr>
<td scope='row'><input type='radio' name='appointment' value='Meeting' class='radio' onchange='document.{$formname}.module.value="Meetings";'> {$mod_strings['LNK_NEW_MEETING']}</td>
</tr>
EOQ;
}
$jscalenderImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
$form .= <<<EOQ
<tr>
<td scope='row'>{$lbl_subject} <span class="required">{$lbl_required_symbol}</span></td>
</tr>
<tr>
<td ><input name='{$prefix}name' maxlength='255' type="text"></td>
</tr>
<tr>
<td scope='row'>{$lbl_date} <span class="required">{$lbl_required_symbol}</span> <span class="dateFormat">{$ntc_date_format}</span></td>
</tr>
<tr>
<td ><input onblur="parseDate(this, '{$cal_dateformat}');" name='{$prefix}date_start' size="12" id='{$prefix}jscal_field' maxlength='10' type="text" value="{$default_date_start}"> <!--not_in_theme!--><img src="{$jscalenderImage}" alt="{$app_strings['LBL_ENTER_DATE']}" id="{$prefix}jscal_trigger" align="absmiddle"></td>
</tr>
<tr>
<td scope='row'>{$lbl_time} <span class="required">{$lbl_required_symbol}</span> <span class="dateFormat">{$ntc_time_format}</span></td>
</tr>
<tr>
<td ><input name='{$prefix}time_start' size="12" type="text" maxlength='5' value="{$default_time_start}">{$time_ampm}</td>
</tr>
</table>
\t\t<script type="text/javascript">
\t\tCalendar.setup ({
\t\t\tinputField : "{$prefix}jscal_field", daFormat : "{$cal_dateformat}", ifFormat : "{$cal_dateformat}", showsTime : false, button : "{$prefix}jscal_trigger", singleClick : true, step : 1, weekNumbers:false
\t\t});
\t\t</script>
EOQ;
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Call());
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
示例8: javascript
$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', $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, "");
示例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();
}
示例10: Campaign
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
$xtpl->assign("JAVASCRIPT", $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("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");
示例11: getFormBody
function getFormBody($prefix, $mod = 'Opportunities', $formname = '')
{
if (!ACLController::checkAccess('Opportunities', 'edit', true)) {
return '';
}
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
global $app_list_strings;
global $theme;
global $current_user;
global $sugar_config;
global $timedate;
// Unimplemented until jscalendar language files are fixed
// global $current_language;
// global $default_language;
// global $cal_codes;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_opportunity_name = $mod_strings['LBL_OPPORTUNITY_NAME'];
$lbl_sales_stage = $mod_strings['LBL_SALES_STAGE'];
$lbl_date_closed = $mod_strings['LBL_DATE_CLOSED'];
$lbl_amount = $mod_strings['LBL_AMOUNT'];
$ntc_date_format = $timedate->get_user_date_format();
$cal_dateformat = $timedate->get_cal_date_format();
$user_id = $current_user->id;
// Unimplemented until jscalendar language files are fixed
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
$cal_lang = "en";
$the_form = <<<EOQ
<p>
\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t{$lbl_opportunity_name} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input name='{$prefix}name' type="text" value="">
EOQ;
if ($sugar_config['require_accounts']) {
///////////////////////////////////////
///
/// SETUP ACCOUNT POPUP
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => "{$prefix}OppSave", 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
$json = getJSONobj();
$encoded_popup_request_data = $json->encode($popup_request_data);
//
///////////////////////////////////////
$the_form .= <<<EOQ
\t\t{$mod_strings['LBL_ACCOUNT_NAME']} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input class='sqsEnabled' autocomplete='off' id='qc_account_name' name='account_name' type='text' value="" size="16"><input id='qc_account_id' name='account_id' type="hidden" value=''> <input title="{$app_strings['LBL_SELECT_BUTTON_TITLE']}" type="button" class="button" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1
\t\t\tonclick='open_popup("Accounts", 600, 400, "", true, false, {$encoded_popup_request_data});' /><br>
EOQ;
}
$jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
$the_form .= <<<EOQ
\t\t{$lbl_date_closed} <span class="required">{$lbl_required_symbol}</span> <br><span class="dateFormat">{$ntc_date_format}</span><br>
\t\t<input name='{$prefix}date_closed' size='12' maxlength='10' id='{$prefix}jscal_field' type="text" value=""> <!--not_in_theme!--><img src="{$jsCalendarImage}" alt="{$app_strings['LBL_ENTER_DATE']}" id="jscal_trigger" align="absmiddle"><br>
\t\t{$lbl_sales_stage} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<select name='{$prefix}sales_stage'>
EOQ;
$the_form .= get_select_options_with_id($app_list_strings['sales_stage_dom'], "");
$the_form .= <<<EOQ
\t\t</select><br>
\t\t{$lbl_amount} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input name='{$prefix}amount' type="text"></p>
\t\t<input type='hidden' name='lead_source' value=''>
\t\t<script type="text/javascript">
\t\tCalendar.setup ({
\t\t\tinputField : "{$prefix}jscal_field", daFormat : "{$cal_dateformat}", ifFormat : "{$cal_dateformat}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1, weekNumbers:false
\t\t});
\t\t</script>
EOQ;
require_once 'include/QuickSearchDefaults.php';
$qsd = QuickSearchDefaults::getQuickSearchDefaults();
$sqs_objects = array('qc_account_name' => $qsd->getQSParent());
$sqs_objects['qc_account_name']['populate_list'] = array('qc_account_name', 'qc_account_id');
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
$the_form .= $quicksearch_js;
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Opportunity());
$javascript->addRequiredFields($prefix);
$the_form .= $javascript->getScript();
return $the_form;
}
示例12: getFormBody
function getFormBody($prefix, $mod = '', $formname = '')
{
if (!ACLController::checkAccess('Ink', 'edit', true)) {
return '';
}
global $mod_strings;
$temp_strings = $mod_strings;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
}
global $app_strings;
global $app_list_strings;
global $current_user;
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$name = $mod_strings['LBL_NAME'];
$short_symbol = $mod_strings['LBL_SHORT_SYMBOL'];
$type = $mod_strings['LBL_TYPE'];
$type_options = get_select_options_with_id($app_list_strings['ink_type_options'], "");
$cmyk_type = $mod_strings['LBL_CMYK_TYPE'];
$cmyk_type_options = get_select_options_with_id($app_list_strings['cmyk_ink_type_options'], "");
$pantone = $mod_strings['LBL_PANTONE'];
$pantone_options = get_select_options_with_id($app_list_strings['pantone_ink_type_options'], "");
$user_id = $current_user->id;
$form = <<<EOQ
\t\t</tr>
\t\t<tr>
\t\t<td>
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t{$name}<br>
\t\t<input name="{$prefix}name" type="text" value=""><br></td>
\t\t<td>{$short_symbol}<br>
\t\t<input name='{$prefix}short_symbol' type="text" value=""></td>
\t\t</tr>
\t\t<tr>
\t\t<td>{$type}<br>
\t\t<select name='{$prefix}type'>{$type_options}</select><br>
\t\t</td>
\t\t<td>{$cmyk_type}<br>
\t\t<select name='{$prefix}cmyk_type'>{$cmyk_type_options}</select><br>
\t\t</td>
\t\t<td>{$pantone}<br>
\t\t<select name='{$prefix}pantone'>{$pantone_options}</select><br>
\t\t</td>
\t\t
EOQ;
require_once 'include/javascript/javascript.php';
require_once 'modules/Ink/Ink.php';
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Ink());
//$javascript->addField('name','true',$prefix);
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
示例13: getFormBody
function getFormBody($prefix, $mod = '', $formname = '')
{
if (!ACLController::checkAccess('Meetings', 'edit', true)) {
return '';
}
global $mod_strings;
global $app_strings;
global $app_list_strings;
global $current_user;
global $theme;
global $timedate;
$temp_strings = $mod_strings;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
}
// Unimplemented until jscalendar language files are fixed
// global $current_language;
// global $default_language;
// global $cal_codes;
$cal_lang = "en";
$cal_dateformat = $timedate->get_cal_date_format();
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_date = $mod_strings['LBL_DATE'];
$lbl_time = $mod_strings['LBL_TIME'];
$ntc_date_format = $timedate->get_user_date_format();
$ntc_time_format = '(' . $timedate->get_user_time_format() . ')';
$user_id = $current_user->id;
$default_status = $app_list_strings['meeting_status_default'];
$default_parent_type = $app_list_strings['record_type_default_key'];
$default_date_start = $timedate->nowDbDate();
$default_time_start = $timedate->nowDbTime();
$time_ampm = $timedate->AMPMMenu($prefix, $timedate->nowDbTime());
// Unimplemented until jscalendar language files are fixed
// $cal_lang =(empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
$jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
$form = <<<EOF
\t\t\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t\t\t<input type="hidden" name="{$prefix}status" value="{$default_status}">
\t\t\t\t\t<input type="hidden" name="{$prefix}parent_type" value="{$default_parent_type}">
\t\t\t\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t\t\t\t<input type="hidden" name="{$prefix}duration_hours" value="1">
\t\t\t\t\t<input type="hidden" name="{$prefix}duration_minutes" value="00">
\t\t\t\t\t<p>{$lbl_subject}<span class="required">{$lbl_required_symbol}</span><br>
\t\t\t\t\t<input name='{$prefix}name' size='25' maxlength='255' type="text"><br>
\t\t\t\t\t{$lbl_date} <span class="required">{$lbl_required_symbol}</span> <span class="dateFormat">{$ntc_date_format}</span><br>
\t\t\t\t\t<input name='{$prefix}date_start' id='jscal_field' onblur="parseDate(this, '{$cal_dateformat}');" type="text" maxlength="10" value="{$default_date_start}"> <!--not_in_theme!--><img src="{$jscalendarImage}" alt="{$app_strings['LBL_ENTER_DATE']}" id="jscal_trigger" align="absmiddle"><br>
\t\t\t\t\t{$lbl_time} <span class="required">{$lbl_required_symbol}</span> <span class="dateFormat">{$ntc_time_format}</span><br>
\t\t\t\t\t<input name='{$prefix}time_start' type="text" maxlength='5' value="{$default_time_start}">{$time_ampm}</p>
\t\t\t\t\t<script type="text/javascript">
\t\t\t\t\tCalendar.setup({
\t\t\t\t\t\tinputField : "jscal_field", daFormat : "{$cal_dateformat}", ifFormat : "{$cal_dateformat}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1, weekNumbers:false
\t\t\t\t\t});
\t\t\t\t\t</script>
EOF;
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new Meeting());
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
示例14: getFormBody
function getFormBody($prefix, $mod = '', $formname = '')
{
//Goodwill
if (!ACLController::checkAccess('ClientOrders', 'edit', true)) {
return '';
}
//End Goodwill
global $mod_strings;
$temp_strings = $mod_strings;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
}
global $mod_strings;
global $app_strings;
global $current_user;
//Goodwill
global $app_list_strings;
$unit_options = get_select_options_with_id($app_list_strings['unit_of_measure'], "Each");
//End Goodwill
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_number = $mod_strings['LBL_NUMBER'];
$lbl_name = $mod_strings['LBL_NAME'];
$user_id = $current_user->id;
$form = <<<EOQ
\t\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t\t<input type="hidden" name="{$prefix}status" value="New">
\t<p>\t\t{$lbl_number}<span class="required">{$lbl_required_symbol}</span><br>
\t\t\t<input name="{$prefix}number" type="text" value=""><br>
\t\t\t{$lbl_name} <span class="required">{$lbl_required_symbol}</span><br>
\t\t\t
EOQ;
require_once 'include/javascript/javascript.php';
require_once 'modules/ClientOrders/ClientOrders.php';
$javascript = new javascript();
$javascript->setFormName($formname);
$javascript->setSugarBean(new ClientOrders());
$javascript->addField('number', 'true', $prefix);
$javascript->addField('name', 'true', $prefix);
$javascript->addField('unit', 'false', $prefix);
$javascript->addField('limit_price', 'false', $prefix);
$javascript->addRequiredFields($prefix);
$form .= $javascript->getScript();
$mod_strings = $temp_strings;
return $form;
}
示例15: 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();
}