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


PHP javascript::getScript方法代码示例

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


在下文中一共展示了javascript::getScript方法的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;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:39,代码来源:Forms.php

示例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;
    }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:49,代码来源:NoteFormBase.php

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

示例4: 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;
    }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:41,代码来源:EmailTemplateFormBase.php

示例5: get_new_record_form

function get_new_record_form()
{
    if (!ACLController::checkAccess('ProjectTask', 'edit', true)) {
        return '';
    }
    global $app_strings;
    global $mod_strings;
    global $currentModule;
    global $current_user;
    global $sugar_version, $sugar_config;
    $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
    $form = new XTemplate('modules/ProjectTask/Forms.html');
    $module_select = empty($_REQUEST['module_select']) ? '' : $_REQUEST['module_select'];
    $form->assign('mod', $mod_strings);
    $form->assign('app', $app_strings);
    $form->assign('module', $currentModule);
    $options = get_select_options_with_id(get_user_array(), $current_user->id);
    $form->assign('ASSIGNED_USER_OPTIONS', $options);
    ///////////////////////////////////////
    ///
    /// SETUP ACCOUNT POPUP
    $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => "quick_save", 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'project_name'));
    $json = getJSONobj();
    $encoded_popup_request_data = $json->encode($popup_request_data);
    //
    ///////////////////////////////////////
    $form->assign('encoded_popup_request_data', $encoded_popup_request_data);
    $form->parse('main');
    $the_form .= $form->text('main');
    require_once 'modules/ProjectTask/ProjectTask.php';
    $focus = new ProjectTask();
    require_once 'include/javascript/javascript.php';
    $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:BackupTheBerlios,项目名称:livealphaprint,代码行数:40,代码来源:Forms.php

示例6: array

    $cfg->config['aod'] = array('enable_aod' => '');
}
if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'save') {
    $cfg->config['aod']['enable_aod'] = !empty($_REQUEST['enable_aod']);
    $cfg->saveConfig();
    header('Location: index.php?module=Administration&action=index');
    exit;
}
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('APP_LIST', $app_list_strings);
$sugar_smarty->assign('LANGUAGES', get_languages());
$sugar_smarty->assign("JAVASCRIPT", get_set_focus_js());
$sugar_smarty->assign('config', $cfg->config['aod']);
$sugar_smarty->assign('error', $errors);
$buttons = <<<EOQ
    <input title="{$app_strings['LBL_SAVE_BUTTON_TITLE']}"
                       accessKey="{$app_strings['LBL_SAVE_BUTTON_KEY']}"
                       class="button primary"
                       type="submit"
                       name="save"
                       onclick="return check_form('ConfigureSettings');"
                       value="  {$app_strings['LBL_SAVE_BUTTON_LABEL']}  " >
                &nbsp;<input title="{$mod_strings['LBL_CANCEL_BUTTON_TITLE']}"  onclick="document.location.href='index.php?module=Administration&action=index'" class="button"  type="button" name="cancel" value="  {$app_strings['LBL_CANCEL_BUTTON_LABEL']}  " >
EOQ;
$sugar_smarty->assign("BUTTONS", $buttons);
$sugar_smarty->display('custom/modules/Administration/AODAdmin.tpl');
$javascript = new javascript();
$javascript->setFormName('ConfigureSettings');
echo $javascript->getScript();
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:30,代码来源:AODAdmin.php

示例7:

if (preg_match('/\\d([^\\d])\\d/', $time_format, $match)) {
    $xtpl->assign('TIME_SEPARATOR', $match[1]);
} 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);
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:31,代码来源:EditView.php

示例8: 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;
    }
开发者ID:omusico,项目名称:sugar_work,代码行数:44,代码来源:LeadFormBase.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();
     $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

示例10: javascript

    $xtpl->assign('FORM_NAME', $form_name);
    $xtpl->parse("main");
    $xtpl->out("main");
    //rsmith
    $temp_module = BeanFactory::getBean($exp_object->lhs_module);
    $field = $exp_object->lhs_field;
    //now build toggle js
    global $mod_strings, $current_language;
    $mod_strings = return_module_language($current_language, $temp_module->module_dir);
    $javascript = new javascript();
    $javascript->setFormName('FieldViewNonSelector');
    $javascript->setSugarBean($temp_module);
    $type = $temp_module->field_name_map[$field]['type'];
    $js = "";
    if (isset($temp_module->field_name_map[$field]['required'])) {
        if ($type == 'date' || $type == 'time') {
            $js = "<script type=\"text/javascript\">";
            $js .= "addToValidate('EditView', '" . $exp_object->parent_type . "__field_value', 'assigned_user_name', 1,'" . $javascript->stripEndColon(translate($temp_module->field_name_map[$field]['vname'])) . "' )";
            $js .= "</script>";
        } else {
            if (in_array($type, ProcessView::get_js_exception_fields()) == 1) {
                $js = '';
            } else {
                $javascript->addField($field, true, '', $exp_object->parent_type . "__field_value");
                $js = $javascript->getScript();
            }
        }
    }
    echo $js;
    //rsmith
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:Filter_Selector.php

示例11: getFormBody

    function getFormBody($prefix, $mod = '', $formname = '', $size = '30', $script = true)
    {
        if (!ACLController::checkAccess('ProspectLists', '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;
        global $app_list_strings;
        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
        $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;
        $list_options = get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default');
        $lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME'];
        $lbl_list_type = $mod_strings['LBL_LIST_TYPE'];
        $form = <<<EOQ
\t\t\t<p><input type="hidden" name="record" value="">
\t\t\t{$lbl_prospect_list_name}&nbsp;<span class="required">{$lbl_required_symbol}</span><br>
\t\t\t<input name='name' type="text" value=""><br>
\t\t\t{$lbl_list_type}&nbsp;<span class="required">{$lbl_required_symbol}</span><br>
\t\t\t<select name="list_type">{$list_options}</select></p>
EOQ;
        $javascript = new javascript();
        $javascript->setFormName($formname);
        $javascript->setSugarBean(new ProspectList());
        $javascript->addRequiredFields($prefix);
        $form .= $javascript->getScript();
        $mod_strings = $temp_strings;
        return $form;
    }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:37,代码来源:ProspectListFormBase.php

示例12: getWideFormBody

    function getWideFormBody($prefix, $mod = '', $formname = '', $contact = '')
    {
        if (!ACLController::checkAccess('Suppliers', 'edit', true)) {
            return '';
        }
        require_once 'modules/Contacts/Contact.php';
        if (empty($contact)) {
            $contact = new Contact();
        }
        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;
        $supplier = new Supplier();
        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
        $lbl_supplier_name = $mod_strings['LBL_SUPPLIER_NAME'];
        $lbl_phone = $mod_strings['LBL_PHONE'];
        $lbl_website = $mod_strings['LBL_WEBSITE'];
        if (isset($contact->assigned_user_id)) {
            $user_id = $contact->assigned_user_id;
        } else {
            $user_id = $current_user->id;
        }
        $form = "";
        $form .= <<<EOQ
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}phone_fax" value="{$contact->phone_fax}">
\t\t<input type="hidden" name="{$prefix}phone_other" value="{$contact->phone_other}">
\t\t<input type="hidden" name="{$prefix}email1" value="{$contact->email1}">
\t\t<input type="hidden" name="{$prefix}email2" value="{$contact->email2}">
\t\t<input type='hidden' name='{$prefix}billing_address_street' value='{$contact->primary_address_street}'><input type='hidden' name='{$prefix}billing_address_city' value='{$contact->primary_address_city}'><input type='hidden' name='{$prefix}billing_address_state'   value='{$contact->primary_address_state}'><input type='hidden' name='{$prefix}billing_address_postalcode'   value='{$contact->primary_address_postalcode}'><input type='hidden' name='{$prefix}billing_address_country'  value='{$contact->primary_address_country}'>
\t\t<input type='hidden' name='{$prefix}shipping_address_street' value='{$contact->primary_address_street}'><input type='hidden' name='{$prefix}shipping_address_city' value='{$contact->primary_address_city}'><input type='hidden' name='{$prefix}shipping_address_state'   value='{$contact->primary_address_state}'><input type='hidden' name='{$prefix}shipping_address_postalcode'   value='{$contact->primary_address_postalcode}'><input type='hidden' name='{$prefix}shipping_address_country'  value='{$contact->primary_address_country}'>
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t<table width='100%' border="0" cellpadding="0" cellspacing="0">
\t\t<tr>
\t\t<td width="20%" nowrap class="dataLabel">{$lbl_supplier_name}&nbsp;<span class="required">{$lbl_required_symbol}</span></td>
\t\t<TD width="80%" nowrap class="dataLabel">{$mod_strings['LBL_DESCRIPTION']}</TD>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap class="dataField"><input name='{$prefix}name' type="text" value="{$contact->supplier_name}"></td>
\t\t<TD rowspan="5" class="dataField"><textarea name='{$prefix}description' rows='6' cols='50'></textarea></TD>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap class="dataLabel">{$lbl_phone}</td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap class="dataField"><input name='{$prefix}phone_office' type="text" value="{$contact->phone_work}"></td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap class="dataLabel">{$lbl_website}</td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap class="dataField"><input name='{$prefix}website' type="text" value="http://"></td>
\t\t</tr>
EOQ;
        //carry forward custom lead fields common to suppliers during Lead Conversion
        $tempSupplier = new Supplier();
        if (method_exists($contact, 'convertCustomFieldsForm')) {
            $contact->convertCustomFieldsForm($form, $tempSupplier, $prefix);
        }
        unset($tempSupplier);
        $form .= <<<EOQ
\t\t</TABLE>
EOQ;
        require_once 'include/javascript/javascript.php';
        require_once 'modules/Suppliers/Supplier.php';
        $javascript = new javascript();
        $javascript->setFormName($formname);
        $javascript->setSugarBean(new Supplier());
        $javascript->addRequiredFields($prefix);
        $form .= $javascript->getScript();
        $mod_strings = $temp_strings;
        return $form;
    }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:78,代码来源:SupplierFormBase.php

示例13: getFormBody

    function getFormBody($prefix, $mod = '', $formname = '')
    {
        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_url = $mod_strings['LBL_RSS_URL'] . ":";
        $user_id = $current_user->id;
        $form = <<<EOQ
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t{$lbl_url} <input name="{$prefix}url" type="text" value="" size=28>&nbsp;<span class="required">{$lbl_required_symbol}</span><br><br>

EOQ;
        require_once 'include/javascript/javascript.php';
        require_once 'modules/Feeds/Feed.php';
        $javascript = new javascript();
        $javascript->setFormName($formname);
        $javascript->setSugarBean(new Feed());
        //$javascript->addField('email1','false',$prefix);
        $javascript->addRequiredFields($prefix);
        $form .= $javascript->getScript();
        $mod_strings = $temp_strings;
        return $form;
    }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:30,代码来源:FeedFormBase.php

示例14: get_new_record_form_old

/**
 * 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_old()
{
    require_once 'include/time.php';
    global $mod_strings;
    global $app_strings;
    global $app_list_strings;
    global $current_user;
    global $theme;
    // 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_subject = $mod_strings['LBL_SUBJECT'];
    $lbl_date = $mod_strings['LBL_DATE'];
    $lbl_time = $mod_strings['LBL_TIME'];
    $ntc_date_format = $app_strings['NTC_DATE_FORMAT'];
    $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'];
    $default_parent_type = $app_list_strings['record_type_default_key'];
    $default_date_start = date('Y-m-d');
    $default_time_start = to_display_time(date('H:i'));
    $ntc_time_format = '(' . getDisplayTimeFormat() . ')';
    $ampm = AMPMMenu('', date('H:i'));
    $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";
    $cal_dateformat = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
    $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
    $the_form .= <<<EOQ

\t\t<form name="EmailSave" onSubmit="return check_form('EmailSave')" method="POST" action="index.php">
\t\t\t<input type="hidden" name="module" value="Emails">
\t\t\t<input type="hidden" name="record" value="">
\t\t\t<input type="hidden" name="action" value="Save">
\t\t\t<input type="hidden" name="parent_type" value="{$default_parent_type}">
\t\t\t<input type="hidden" name="assigned_user_id" value='{$user_id}'>
<p>\t\t{$lbl_subject} <span class="required">{$lbl_required_symbol}</span><br>
\t\t<input name='name' type="text"><br>
\t\t{$lbl_date} <span class="required">{$lbl_required_symbol}</span>&nbsp;<span class="dateFormat">{$ntc_date_format}</span><br>
\t\t<input name='date_start' onblur="parseDate(this, {$cal_dateformat});" id='jscal_field' type="text" maxlength="10" value="{$default_date_start}"> <img src="themes/{$theme}/images/jscalendar.gif" alt="{$app_strings['LBL_ENTER_DATE']}"  id="jscal_trigger" align="absmiddle"><br>
\t\t{$lbl_time} <span class="required">{$lbl_required_symbol}</span>&nbsp;<span class="dateFormat">{$ntc_time_format}</span><br>
\t\t<input name='time_start' maxlength='5' type="text" value="{$default_time_start}">{$ampm}</p>
<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</form>
\t\t<script type="text/javascript">
\t\tCalendar.setup ({
\t\t\tinputField : "jscal_field", ifFormat : "{$cal_dateformat}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1
\t\t});
\t\t</script>

EOQ;
    $the_form .= get_left_form_footer();
    require_once 'include/javascript/javascript.php';
    require_once 'modules/Emails/Email.php';
    $javascript = new javascript();
    $javascript->setFormName('EmailSave');
    $javascript->setSugarBean(new Email());
    $javascript->addRequiredFields('');
    $the_form .= $javascript->getScript();
    return $the_form;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:70,代码来源:Forms.php

示例15: processJsForSelectorField

function processJsForSelectorField(&$javascript, $field, $type, $tempModule, $fieldNumber, $ifAdvanced = 'field')
{
    $jsString = '';
    $javascript = new javascript();
    // Validate everything.
    $workFlowActionsExceptionFields = array();
    if (in_array($type, $workFlowActionsExceptionFields) != 1) {
        $jsString .= "removeFromValidate('EditView', 'field_{$fieldNumber}__{$ifAdvanced}_value');";
    }
    if (in_array($type, array('date', 'time', 'datetimecombo'))) {
        $jsString .= "addToValidate('EditView', 'field_{$fieldNumber}__{$ifAdvanced}_value', 'assigned_user_name', 1,'{$javascript->stripEndColon(translate($tempModule->field_name_map[$field]['vname']))}' )";
    } else {
        if (!(in_array($type, $workFlowActionsExceptionFields) == 1)) {
            $javascript->setFormName('EditView');
            $javascript->setSugarBean($tempModule);
            $javascript->addField($field, '', '', "field_{$_REQUEST['field_num']}__{$ifAdvanced}_value");
            $jsString .= $javascript->getScript(false);
        }
    }
    return $jsString;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:21,代码来源:Selector.php


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