Example #1
0
$xtpl->assign("THEME", SugarThemeRegistry::current()->__toString());
//$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("JAVASCRIPT", get_set_focus_js());
$xtpl->assign("ID", $focus->id);
$xtpl->assign('NAME', $focus->name);
$xtpl->assign('URL', $focus->url);
$xtpl->assign('URL_TITLE', $focus->url_title);
$xtpl->assign('NAME', $focus->name);
$xtpl->assign('DESCRIPTION', $focus->description);
$buttons = array('<input id="btn_teamnotices_save" title="' . $app_strings['LBL_SAVE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_SAVE_BUTTON_KEY'] . '" class="button primary" onclick="this.form.action.value=\'Save\'; return check_form(\'EditView\');" type="submit" name="button" value="' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '">', '<input id="btn_teamnotices_cancel" title="' . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_CANCEL_BUTTON_KEY'] . '" onclick="this.form.action.value=\'index\';" class="button" type="submit" name="button" value="' . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . '">');
require_once 'include/SugarSmarty/plugins/function.sugar_action_menu.php';
$action_button = smarty_function_sugar_action_menu(array('id' => 'teamnotices_editview_buttons', 'buttons' => $buttons, 'flat' => true), $xtpl);
$xtpl->assign('ACTION_BUTTON', $action_button);
require_once 'include/SugarFields/Fields/Teamset/SugarFieldTeamset.php';
$teamSetField = new SugarFieldTeamset('Teamset');
$code = $teamSetField->getClassicView($focus->field_defs);
$xtpl->assign("TEAM_SET_FIELD", $code);
if (!isset($focus->date_start)) {
    $xtpl->assign('DATE_START', $timedate->nowDate());
} else {
    $xtpl->assign('DATE_START', $focus->date_start);
}
if (!isset($focus->date_start)) {
    $xtpl->assign('DATE_END', $timedate->asUser($timedate->getNow()->get('+1 week')));
} else {
    $xtpl->assign('DATE_END', $focus->date_end);
}
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$xtpl->assign("STATUS_OPTIONS", get_select_options_with_id($mod_strings['dom_status'], $focus->status));
$xtpl->parse("main.pro");
$xtpl->parse("main");
    ?>
<BR>
<BR>
<?php 
    echo $mod_strings_users['LBL_REASS_TEAM_TO'];
    ?>
<BR>

<?php 
    $teamSetField = new SugarFieldTeamset('Teamset');
    $lead = BeanFactory::getBean('Leads');
    $teamSetField->initClassicView($lead->field_defs, 'EditView');
    $sqs_objects = $teamSetField->getClassicViewQS();
    $json = getJSONobj();
    $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
    echo $teamSetField->getClassicView();
    ?>

<?php 
    ?>
<BR>
<?php 
    echo $mod_strings_users['LBL_REASS_MOD_REASSIGN'];
    ?>
<BR>
<select size="6" name='modules[]' multiple="true" id='modulemultiselect' onchange="updateDivDisplay(this);">
<?php 
    if (!isset($_SESSION['reassignRecords']['assignedModuleListCache'])) {
        $beanListDup = $beanList;
        unset($beanListDup['ForecastManagerWorksheets']);
        foreach ($beanListDup as $m => $p) {
Example #3
0
    }
    $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
    $xtpl->assign("JAVASCRIPT", get_set_focus_js());
    $xtpl->assign("ID", $focus->id);
    $xtpl->assign('NAME', $focus->name);
    $xtpl->assign('DESCRIPTION', $focus->description);
    $xtpl->assign('CUSTOM_QUERY', $focus->custom_query);
    if ($focus->query_locked == 'on' or $focus->query_locked == '1') {
        $xtpl->assign("QUERY_LOCKED", "checked");
        $xtpl->assign("QUERY_DISABLED", "disabled");
    }
    if (empty($focus->id) && !isset($_REQUEST['isDuplicate'])) {
        $xtpl->assign("TEAM_OPTIONS", get_select_options_with_id(get_team_array(), $current_user->default_team));
    } else {
        $xtpl->assign("TEAM_OPTIONS", get_select_options_with_id(get_team_array(), $focus->team_id));
    }
    // adding custom fields:
    require_once 'modules/DynamicFields/templates/Files/EditView.php';
    require_once 'include/SugarFields/Fields/Teamset/SugarFieldTeamset.php';
    $teamSetField = new SugarFieldTeamset('Teamset');
    $teamSetField->initClassicView($focus->field_defs);
    $code = $teamSetField->getClassicView($focus->field_defs, 'EditView');
    $xtpl->assign("TEAM_SET_FIELD", $code);
    $xtpl->parse("main");
    $xtpl->out("main");
    $javascript = new javascript();
    $javascript->setFormName('EditView');
    $javascript->setSugarBean($focus);
    $javascript->addAllFields('');
    echo $javascript->getScript();
}
Example #4
0
    $xtpl->assign("KBARTICLE_AUTHOR_NAME", $user->name);
    $xtpl->assign("KBARTICLE_AUTHOR_ID", $focus->assigned_user_id);
}
//converting email into a document
if (isset($from_email) && !empty($from_email)) {
    $xtpl->assign("KBDOCUMENT_NAME", $from_email->name);
    $xtpl->assign("REVISION", 1);
    $revision = 1;
}
//converting a case into document
if (empty($focus->id) && !empty($from_case)) {
    $xtpl->assign("KBDOCUMENT_NAME", $from_case->name);
    $xtpl->assign("REVISION", 1);
    $revision = 1;
}
$code = $teamSetField->getClassicView();
$xtpl->assign("TEAM_SET_FIELD", $code);
$xtpl->parse("main.pro");
/* comment out the non-pro code
$xtpl->parse("main.open_source");
*/
global $timedate;
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$xtpl->assign("USER_DATE_FORMAT", $timedate->get_user_date_format());
if ($focus->is_template == 1) {
    $xtpl->assign("IS_TEMPLATE_CHECKED", "checked");
} else {
    $xtpl->assign("TEMPLATE_TYPE_DISABLED", "disabled");
}
$xtpl->assign('JSON_CONFIG_JAVASCRIPT', $json_config->get_static_json_server());
echo '<script> var site_url= {"site_url":"' . $sugar_config['site_url'] . '"};</script>';
function create_wiz_step_divs($steps, $ss)
{
    //Assign the Teamset field
    require_once 'include/SugarFields/Fields/Teamset/SugarFieldTeamset.php';
    $teamSetField = new SugarFieldTeamset('Teamset');
    $focus = new Campaign();
    $code = $teamSetField->getClassicView($focus->field_defs, 'wizform');
    $ss->assign("TEAM_SET_FIELD", $code);
    $step_html = '';
    if (isset($steps) && !empty($steps)) {
        $i = 1;
        foreach ($steps as $name => $step) {
            $step_html .= "<p><div id='step{$i}'>";
            $step_html .= $ss->fetch($step);
            $step_html .= "</div></p>";
            $i = $i + 1;
        }
    }
    return $step_html;
}
Example #6
0
                $team_html = $teamSetField->getClassicView();
                $sugar_smarty->assign("TEAM_HTML", $team_html);
                $sugar_smarty->assign("USER_HTML", $assigned_user_html);
                $sugar_smarty->assign("report_offset", $args['reporter']->report_offset);
                $sugar_smarty->assign("chart_description", htmlentities($args['reporter']->chart_description, ENT_QUOTES, 'UTF-8'));
                setSortByInfo($args['reporter'], $sugar_smarty);
                echo $sugar_smarty->fetch('modules/Reports/ReportsWizard.tpl');
            } else {
                $assigned_user_html_def = array('parent_id' => 'assigned_user_id', 'parent_id_value' => $current_user->id, 'parent_name' => 'assigned_user_name', 'parent_name_value' => $current_user->user_name, 'real_parent_name' => 'user_name', 'module' => 'Users');
                $assigned_user_html = get_select_related_html($assigned_user_html_def);
                $sugar_smarty->assign("do_round", 1);
                require_once 'include/SugarFields/Fields/Teamset/SugarFieldTeamset.php';
                $teamSetField = new SugarFieldTeamset('Teamset');
                $field_defs = VardefManager::loadVardef('Reports', 'SavedReport');
                $teamSetField->initClassicView($GLOBALS['dictionary']['SavedReport']['fields'], 'ReportsWizardForm');
                $team_html = $teamSetField->getClassicView();
                $sugar_smarty->assign("TEAM_HTML", $team_html);
                $sugar_smarty->assign("USER_HTML", $assigned_user_html);
                $sugar_smarty->assign("report_offset", $args['reporter']->report_offset);
                $sugar_smarty->assign("chart_description", htmlentities($args['reporter']->chart_description, ENT_QUOTES, 'UTF-8'));
                setSortByInfo($args['reporter'], $sugar_smarty);
                echo $sugar_smarty->fetch('modules/Reports/ReportsWizard.tpl');
            }
        }
    }
}
function setSortByInfo(&$reporter, &$smarty)
{
    $sort_by = '';
    $sort_dir = '';
    $summary_sort_by = '';