Example #1
0
 /**
  *
  */
 function process_page()
 {
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $sugar_version, $sugar_config;
     $output_html = '';
     $where = '';
     $where = $this->_get_where_clause();
     $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
     $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
     $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
     $button = "<form action='index.php' method='post' name='form' id='form'>\n";
     if (!$hide_clear_button) {
         $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' value='  " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . "  ' />\n";
     }
     $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "'  value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  ' />\n";
     $button .= "</form>\n";
     $form = new XTemplate('modules/ACLRoles/Popup_picker.html');
     $form->assign('MOD', $mod_strings);
     $form->assign('APP', $app_strings);
     $form->assign('MODULE_NAME', $currentModule);
     $form->assign('NAME', $name);
     $form->assign('request_data', $request_data);
     ob_start();
     insert_popup_header();
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
     $form->parse('main.SearchHeader');
     $output_html .= $form->text('main.SearchHeader');
     // Reset the sections that are already in the page so that they do not print again later.
     $form->reset('main.SearchHeader');
     // create the listview
     $seed_bean = BeanFactory::getBean('ACLRoles');
     $ListView = new ListView();
     $ListView->show_export_button = false;
     $ListView->process_for_popups = true;
     $ListView->setXTemplate($form);
     $ListView->setHeaderTitle($mod_strings['LBL_ROLE']);
     $ListView->setHeaderText($button);
     $ListView->setQuery($where, '', 'name', 'ROLE');
     $ListView->setModStrings($mod_strings);
     ob_start();
     $ListView->processListView($seed_bean, 'main', 'ROLE');
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= insert_popup_footer();
     return $output_html;
 }
 function ProcessSubPanelListView($xTemplatePath, &$mod_strings, $action, $curModule = "")
 {
     global $currentModule, $app_strings;
     if (empty($curModule)) {
         $curModule = $currentModule;
     }
     $ListView = new ListView();
     $ListView->initNewXTemplate($xTemplatePath, $mod_strings);
     $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $curModule . "&return_action=DetailView&return_id=" . $this->focus->id);
     $ListView->xTemplateAssign("RECORD_ID", $this->focus->id);
     $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline.png', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
     $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline.png', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
     $ListView->setHeaderTitle($mod_strings['LBL_TEAM_MEMBERS']);
     $ListView->setHeaderText($this->getHeaderText($action, $curModule));
     $ListView->processListView($this->users_list, "users", "USER");
 }
Example #3
0
 function ProcessSubPanelListView($xTemplatePath, &$mod_strings, $action, $curModule = '')
 {
     global $currentModule, $app_strings;
     if (empty($curModule)) {
         $curModule = $currentModule;
     }
     $ListView = new ListView();
     global $current_user;
     $header_text = '';
     if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
         $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Notes&record=" . $this->focus->id . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>";
     }
     $ListView->initNewXTemplate($xTemplatePath, $mod_strings);
     $ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $curModule . "&return_action=DetailView&return_id=" . $this->focus->id);
     $ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_DELETE']));
     $ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle"  border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
     $ListView->xTemplateAssign("RECORD_ID", $this->focus->id);
     $ListView->setHeaderTitle($mod_strings['LBL_MODULE_NAME'] . $header_text);
     $ListView->setHeaderText($this->getHeaderText($action, $curModule));
     $ListView->processListView($this->notes_list, "notes", "NOTE");
 }
Example #4
0
$button .= "<input type='hidden' name='module' value='WorkFlowAlertShells'>\n";
$button .= "<input type='hidden' name='module_tab' value='WorkFlow'>\n";
$button .= "<input type='hidden' name='workflow_id' value='{$focus->id}'>\n<input type='hidden' name='alert_name' value='{$focus->name}'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action' value='EditView';>\n";
require_once 'include/SugarSmarty/plugins/function.sugar_action_menu.php';
$button .= smarty_function_sugar_action_menu(array('id' => 'ACLRoles_EditView_action_menu', 'buttons' => $buttons), $xtpl);
//$button .= "<input title='".$current_module_strings['LBL_NEW_BUTTON_TITLE_ACTION']."' class='button' type='button' name='New' value='  ".$current_module_strings['LBL_NEW_BUTTON_LABEL_ACTION']."'";
//$button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowActionShells&action=CreateStep1&html=CreateStep1&form=ComponentView&form_submit=false&query=true&sugar_body_only=true&workflow_id=$focus->id\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'";
//$button .= ">\n";
$button .= "</form>";
$admin = Administration::getSettings();
$mail_server = trim($admin->settings['mail_smtpserver']);
if (empty($mail_server) && !empty($focus_alerts_list)) {
    echo "<BR><font color='red'><b>" . $mod_strings['LBL_LACK_OF_NOTIFICATIONS_ON'] . "</b></font><BR>";
}
//ALERT SUBPANEL
//$focus_alerts_list2 = array_merge($focus_alerts_list, $focus_actions_list);
$ListView = new ListView();
$header_text = '';
$ListView->initNewXTemplate('modules/WorkFlowAlertShells/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("WORKFLOW_ID", $focus->id);
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}");
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
$ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME_COMBO'] . $header_text);
$ListView->setHeaderText($button);
$ListView->processListView($focus_alerts_list, "main", "ALERT");
Example #5
0
$form->assign('DOCUMENT_REVISION_ID', $document_revision_id);
//$form->assign('request_data', $request_data);
$form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_category_dom'], $category_id));
$form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_subcategory_dom'], $subcategory_id));
$form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template));
$form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $template_type));
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($current_mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
// Reset the sections that are already in the page so that they do not print again later.
$form->reset('main.SearchHeader');
// create the listview
$seed_bean = BeanFactory::getBean('Documents');
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($current_mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'document_name', 'DOCUMENT');
$ListView->setModStrings($current_mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'DOCUMENT');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= insert_popup_footer();
echo $output_html;
global $action;
///////////////////////////////////////
///
/// SETUP PARENT POPUP
$popup_request_data = array('call_back_function' => 'set_return_and_save', 'form_name' => 'DetailView', 'field_to_name_array' => array('id' => 'opportunity_id'));
$json = getJSONobj();
$encoded_popup_request_data = $json->encode($popup_request_data);
//
///////////////////////////////////////
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='Opportunities'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value='  " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "  ' name='button' onclick='open_popup(\"Opportunities\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
$button .= "</form>\n";
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Opportunities&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
}
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Opportunities/SubPanelViewProjects.html', $current_module_strings);
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}");
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
$ListView->setHeaderTitle($project_module_strings['LBL_OPPORTUNITY_SUBPANEL_TITLE'] . $header_text);
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "OPPORTUNITY");
Example #7
0
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' type='submit' name='New' value='  " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "  '>\n";
$button .= "</form>\n";
$ListView = new ListView();
if ((is_admin($current_user) || is_admin_for_module($GLOBALS['current_user'], 'Bugs')) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
}
$ListView->initNewXTemplate('modules/Releases/ListView.html', $mod_strings);
$ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"'));
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE'] . $header_text);
$ListView->setHeaderText($button);
$ListView->show_export_button = false;
$ListView->show_mass_update = false;
$ListView->show_delete_button = false;
$ListView->show_select_menu = false;
$ListView->setQuery("", "", "list_order", "RELEASE");
$ListView->processListView($focus, "main", "RELEASE");
if ($is_edit) {
    $edit_button = "<form name='EditView' method='POST' action='index.php'>\n";
    $edit_button .= "<input type='hidden' name='module' value='Releases'>\n";
    $edit_button .= "<input type='hidden' name='record' value='{$focus->id}'>\n";
    $edit_button .= "<input type='hidden' name='action'>\n";
    $edit_button .= "<input type='hidden' name='edit'>\n";
    $edit_button .= "<input type='hidden' name='isDuplicate'>\n";
    $edit_button .= "<input type='hidden' name='return_module' value='Releases'>\n";
    $edit_button .= "<input type='hidden' name='return_action' value='index'>\n";
    $edit_button .= "<input type='hidden' name='return_id' value=''>\n";
    $edit_button .= '<input title="' . $app_strings['LBL_SAVE_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_SAVE_BUTTON_KEY'] . '" class="button" onclick="this.form.action.value=\'Save\'; return check_form(\'EditView\');" type="submit" name="button" value="  ' . $app_strings['LBL_SAVE_BUTTON_LABEL'] . '  " >';
    $edit_button .= ' <input title="' . $app_strings['LBL_SAVE_NEW_BUTTON_TITLE'] . '" accessKey="' . $app_strings['LBL_SAVE_NEW_BUTTON_KEY'] . '" class="button" onclick="this.form.action.value=\'Save\'; this.form.isDuplicate.value=\'true\'; this.form.edit.value=\'true\'; this.form.return_action.value=\'EditView\'; return check_form(\'EditView\')" type="submit" name="button" value="  ' . $app_strings['LBL_SAVE_NEW_BUTTON_LABEL'] . '  " >';
    if ((is_admin($current_user) || is_admin_for_module($GLOBALS['current_user'], 'Bugs')) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
        $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&edit=true&from_action=EditView&from_module=" . $_REQUEST['module'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
    }
Example #8
0
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
global $app_strings;
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
global $current_language;
$current_module_strings = return_module_language($current_language, 'EmailMarketing');
global $currentModule;
global $theme;
global $focus;
global $action;
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='MKForm' id='MKForm'>\n";
$button .= "<input type='hidden' name='module' value='EmailMarketing'>\n";
$button .= "<input type='hidden' name='campaign_id' value='{$focus->id}'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='DetailView'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value='  " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "  '>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/EmailMarketing/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME']);
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "EMAILMARKETING");
Example #9
0
if (empty($focus_triggers_list)) {
    //echo "<BR><font color='red'><b>".$mod_strings['LBL_LACK_OF_TRIGGER_ALERT']."</b></font><BR>";
    $frame_type = "Primary";
}
/*
if(empty($focus_triggers_list)){

	$button .= "<input title='".$current_module_strings['LBL_NEW_TRIGGER_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_NEW_TRIGGER_BUTTON_KEY']."' class='button' type='button' name='New' value='  ".$current_module_strings['LBL_NEW_TRIGGER_BUTTON_LABEL']."'";
	$button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowTriggerShells&action=CreateStep1&sugar_body_only=true&form=ComponentView&workflow_id=$focus->id\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'>";
	echo "<BR><font color='red'><b>".$mod_strings['LBL_LACK_OF_TRIGGER_ALERT']."</b></font><BR>";
}

	$button .= "&nbsp;&nbsp;<input title='".$current_module_strings['LBL_NEW_FILTER_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_NEW_FILTER_BUTTON_KEY']."' class='button' type='button' name='New' value='  ".$current_module_strings['LBL_NEW_FILTER_BUTTON_LABEL']."'";
	$button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowTriggerShells&action=CreateStep1&sugar_body_only=true&form=ComponentView&workflow_id=$focus->id&frame_type=Secondary\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'>";
*/
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' class='button' type='button' name='NewWorkFlowTriggerShells' id='NewWorkFlowTriggerShells' value='" . $app_strings['LBL_NEW_BUTTON_LABEL'] . "'";
$button .= "LANGUAGE=javascript onclick='window.open(\"index.php?module=WorkFlowTriggerShells&action=CreateStep1&sugar_body_only=true&form=ComponentView&workflow_id={$focus->id}&frame_type={$frame_type}\",\"new\",\"width=400,height=500,resizable=1,scrollbars=1\");'>";
$button .= "</form>\n";
require_once 'include/SugarSmarty/plugins/function.sugar_action_menu.php';
$action_buttons = smarty_function_sugar_action_menu(array('id' => 'ACLRoles_EditView_action_menu', 'buttons' => array($button)), $xtpl);
$ListView = new ListView();
$header_text = '';
$ListView->initNewXTemplate('modules/WorkFlowTriggerShells/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("WORKFLOW_ID", $focus->id);
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id={$_REQUEST['record']}");
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
$ListView->xTemplateAssign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text);
$ListView->setHeaderText($action_buttons);
$ListView->processListView($focus_all_triggers_list, "main", "TRIGGER");
Example #10
0
<?php

require_once 'XTemplate/xtpl.php';
require_once 'modules/ZuckerReports/ZuckerReport.php';
global $mod_strings;
global $app_strings;
global $current_user;
global $current_language;
$current_module_strings = return_module_language($current_language, 'ZuckerReports');
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$seed = new ZuckerReport();
require_once 'include/ListView/ListView.php';
$lv = new ListView();
$lv->initNewXTemplate('modules/ZuckerReports/ReportHomeView.html', $current_module_strings);
$lv->setHeaderTitle($current_module_strings['LBL_HOME_REPORTS']);
$lv->show_export_button = false;
$lv->setQuery("published=1", "20", "date_modified desc", "REPORT");
$lv->processListView($seed, "main", "REPORT");
Example #11
0
$ListView->keep_mass_update_form_open = true;
$bean_list_template_path = 'modules/' . $focus->merge_bean->module_dir . '/ListView.html';
$bean_list_template_var = strtoupper($app_list_strings['moduleListSingular'][$focus->merge_module]);
// Bug 7706: bean_list_template_var is being mapped to BUG TRACKER from the app_list_strings
// and it should be BUG to accommodate for the ListView
if ($bean_list_template_var == 'BUG TRACKER') {
    $bean_list_template_var = 'BUG';
}
$ListView->initNewXTemplate($bean_list_template_path, $focus->merge_bean_strings);
$ListView->setHeaderTitle($focus->merge_bean->name);
//leaving in dependency that there is a name column, needs to be changed
$ListView->setQuery($where, "", "", $bean_list_template_var);
$ListView->setAdditionalDetails(true);
$return_id = $focus->merge_bean->id;
$merge_module = $focus->merge_module;
$ListView->processListView($focus->merge_bean, "main", $bean_list_template_var);
$button_title = $current_module_strings['LBL_PERFORM_MERGE_BUTTON_TITLE'];
$button_key = $current_module_strings['LBL_PERFORM_MERGE_BUTTON_KEY'];
$button_label = $current_module_strings['LBL_PERFORM_MERGE_BUTTON_LABEL'];
$cancel_title = $app_strings['LBL_CANCEL_BUTTON_TITLE'];
$cancel_key = $app_strings['LBL_CANCEL_BUTTON_KEY'];
$cancel_label = $app_strings['LBL_CANCEL_BUTTON_LABEL'];
$error_select = $current_module_strings['LBL_SELECT_ERROR'];
$form_top = <<<EOQ

            <input type="hidden" id="selectCount" name="selectCount[]" value=0>
\t\t\t<input type="hidden" name="merge_module" value="{$merge_module}">
\t\t\t<input type="hidden" name="record" value="{$return_id}">
\t\t\t<input type="hidden" name="return_module" value="{$focus->merge_module}">
\t\t\t<input type="hidden" name="return_id" value="{$return_id}">
\t\t\t<input type="hidden" name="return_action" value="DetailView">
Example #12
0
    /**
     *
     */
    function process_page()
    {
        global $theme;
        global $mod_strings;
        global $app_strings;
        global $currentModule;
        global $app_list_strings, $sugar_version, $sugar_config;
        $output_html = "<script type=\"text/javascript\" src=\"" . getJSPath('include/javascript/sugar_3.js') . "\"></script>";
        $where = '';
        if (empty($_REQUEST[$currentModule . '_' . strtoupper($this->_popupMeta['moduleMain']) . '_offset'])) {
            $_POST[$currentModule . '_' . strtoupper($this->_popupMeta['moduleMain']) . '_offset'] = '';
        }
        if (empty($_REQUEST['saved_associated_data'])) {
            $_POST['saved_associated_data'] = '';
        }
        $where = $this->_get_where_clause();
        // CREATE STUFF
        if ($this->_create) {
            $formBase = new $this->_popupMeta['create']['formBaseClass']();
            if (isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save') {
                $formBase->handleSave('', false, true);
            }
            $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'];
            // TODO: cleanup the construction of $addform
            $prefix = empty($this->_popupMeta['create']['getFormBodyParams'][0]) ? '' : $this->_popupMeta['create']['getFormBodyParams'][0];
            $mod = empty($this->_popupMeta['create']['getFormBodyParams'][1]) ? '' : $this->_popupMeta['create']['getFormBodyParams'][1];
            $formBody = empty($this->_popupMeta['create']['getFormBodyParams'][2]) ? '' : $this->_popupMeta['create']['getFormBodyParams'][2];
            $getFormMethod = empty($this->_popupMeta['create']['getFormMethod']) ? 'getFormBody' : $this->_popupMeta['create']['getFormMethod'];
            $formbody = $formBase->{$getFormMethod}($prefix, $mod, $formBody);
            $addform = '<table><tr><td nowrap="nowrap" valign="top">' . str_replace('<br>', '</td><td nowrap="nowrap" valign="top">&nbsp;', $formbody) . '</td></tr></table>' . '<input type="hidden" name="action" value="Popup" />';
            $formSave = <<<EOQ
\t\t\t<input type="hidden" name="create" value="true">
\t\t\t<input type="hidden" name="popup" value="true">
\t\t\t<input type="hidden" name="to_pdf" value="true">
\t\t\t<input type="hidden" name="return_module" value="{$currentModule}">
\t\t\t<input type="hidden" name="return_action" value="Popup">
\t\t\t<input type="submit" name="button" class="button" title="{$lbl_save_button_title}" value="  {$lbl_save_button_label}  " />
\t\t\t<input type="button" name="button" class="button" title="{$app_strings['LBL_CANCEL_BUTTON_TITLE']}" accesskey="{$app_strings['LBL_CANCEL_BUTTON_KEY']}" value="{$app_strings['LBL_CANCEL_BUTTON_LABEL']}" onclick="toggleDisplay('addform');" />
EOQ;
            // if metadata contains custom inputs for the quickcreate
            if (!empty($this->_popupMeta['customInput']) && is_array($this->_popupMeta['customInput'])) {
                foreach ($this->_popupMeta['customInput'] as $key => $value) {
                    $formSave .= '<input type="hidden" name="' . $key . '" value="' . $value . '">\\n';
                }
            }
            $createButtonTranslation = translate($this->_popupMeta['create']['createButton']);
            $createButton = <<<EOQ
\t\t\t<input type="button" id="showAdd" name="showAdd" class="button" value="{$createButtonTranslation}" onclick="toggleDisplay('addform');" />
EOQ;
            $addformheader = get_form_header($createButtonTranslation, $formSave, false);
        }
        // END CREATE STUFF
        // search request inputs
        $searchInputs = array();
        foreach ($this->_popupMeta['searchInputs'] as $input) {
            $searchInputs[$input] = empty($_REQUEST[$input]) ? '' : $_REQUEST[$input];
        }
        $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
        $hide_clear_button = empty($_REQUEST['hide_clear_button']) && empty($this->_hide_clear_button) ? false : true;
        $button = '<script>eval("var request_data = " + window.document.forms[\'popup_query_form\'].request_data.value);</script>';
        if (isset($_REQUEST['mass'])) {
            foreach (array_unique($_REQUEST['mass']) as $record) {
                $button .= "<input style='display: none' checked type='checkbox' name='mass[]' value='{$record}'>\n";
            }
        }
        //START:FOR MULTI-SELECT
        $multi_select = false;
        if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
            $multi_select = true;
            $button .= "<input type='hidden' name='mode' value='MultiSelect'>";
            $button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('{$currentModule}',document.MassUpdate,'mass[]','" . $app_strings['ERR_NOTHING_SELECTED'] . "', request_data.field_to_name_array);\" title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' value='  " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "  ' />\n";
        }
        //END:FOR MULTI-SELECT
        if (!$hide_clear_button) {
            $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' value='  " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . "  ' />\n";
        }
        $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  ' />\n";
        if (isset($this->_popupMeta['templateForm'])) {
            $form = new XTemplate($this->_popupMeta['templateForm']);
        } else {
            $form = new XTemplate('modules/' . $currentModule . '/Popup_picker.html');
        }
        $form->assign('MOD', $mod_strings);
        $form->assign('APP', $app_strings);
        $form->assign('THEME', $theme);
        $form->assign('MODULE_NAME', $currentModule);
        $form->assign('request_data', $request_data);
        // CREATE STUFF
        if ($this->_create) {
            $form->assign('CREATEBUTTON', $createButton);
            $form->assign('ADDFORMHEADER', $addformheader);
            $form->assign('ADDFORM', $addform);
        }
        // CREATE STUFF
        if (isset($this->_popupMeta['className'])) {
            $seed_bean = new $this->_popupMeta['className']();
        } else {
            $seed_bean = new $this->_popupMeta['moduleMain']();
        }
        // assign search inputs to xtemplates
        foreach (array_keys($searchInputs) as $key) {
            if (!empty($_REQUEST[$key]) && (isset($seed_bean->field_name_map[$key]['type']) && $seed_bean->field_name_map[$key]['type'] == 'bool')) {
                $form->assign(strtoupper($key), ' checked ');
            } else {
                $form->assign(strtoupper($key), $searchInputs[$key]);
            }
        }
        if ($this->_create) {
            $form->assign('CREATE', 'true');
        } else {
            $form->assign('CREATE', 'false');
        }
        // fill any doms
        if (isset($this->_popupMeta['selectDoms'])) {
            foreach ($this->_popupMeta['selectDoms'] as $key => $value) {
                $form->assign($key, get_select_options_with_id($app_list_strings[$value['dom']], $value['searchInput']));
            }
        }
        $form->assign('MULTI_SELECT', !empty($_REQUEST['mode']) ? strtoupper($_REQUEST['mode']) : '');
        ob_start();
        insert_popup_header($theme);
        $output_html .= ob_get_contents();
        ob_end_clean();
        $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
        $form->parse('main.SearchHeader');
        $output_html .= $form->text('main.SearchHeader');
        // Reset the sections that are already in the page so that they do not print again later.
        $form->reset('main.SearchHeader');
        $ListView = new ListView();
        $ListView->show_select_menu = false;
        $ListView->show_delete_button = false;
        $ListView->show_export_button = false;
        $ListView->process_for_popups = true;
        $ListView->setXTemplate($form);
        $ListView->multi_select_popup = $multi_select;
        $ListView->xTemplate->assign('TAG_TYPE', 'A');
        if (isset($this->_popupMeta['listTitle'])) {
            $ListView->setHeaderTitle($this->_popupMeta['listTitle']);
        } else {
            $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
        }
        $ListView->setHeaderText($button);
        $ListView->setQuery($where, '', $this->_popupMeta['orderBy'], $this->_popupMeta['varName']);
        $ListView->setModStrings($mod_strings);
        ob_start();
        $ListView->processListView($seed_bean, 'main', $this->_popupMeta['varName']);
        $output_html .= ob_get_contents();
        ob_end_clean();
        $json = getJSONobj();
        // decode then encode to escape "'s
        $output_html .= "</form>\n\t\t<script type=\"text/javascript\">\n\t\tfunction save_checks(offset) {\n\t\t\tchecked_ids = Array();\n\t\t\tfor (i = 0; i < document.MassUpdate.elements.length; i++){\n\t\t\t\tif(document.MassUpdate.elements[i].name == 'mass[]' && document.MassUpdate.elements[i].checked) {\n\t\t\t\t\ttemp_string = '';\n\t\t\t\t\ttemp_string += '\"' + document.MassUpdate.elements[i].value + '\": {';\n\t\t\t\t\tfor(the_key in associated_javascript_data[document.MassUpdate.elements[i].value]) {\n\t\t\t\t\t\ttemp_string += '\"' + the_key + '\":\"' + associated_javascript_data[document.MassUpdate.elements[i].value][the_key] + '\",'; \n\t\t\t\t\t}\n\t\t\t\t\ttemp_string = temp_string.substring(0,temp_string.length - 1);\n\t\t\t\t\ttemp_string += '}';\n\t\t\t\t\tchecked_ids.push(temp_string);\n\t\t\t\t}\t\t\t\t \n\t\t\t}\n\t\t\tdocument.MassUpdate.saved_associated_data.value = escape('{' + checked_ids.join(',') + '}');\n\n\t\t\tdocument.MassUpdate.action.value = \"Popup\";\n\t\t\tdocument.MassUpdate.{$currentModule}" . '_' . strtoupper($this->_popupMeta['moduleMain']) . '_offset.value = offset;
			document.MassUpdate.submit();
		}
		// reassigned the saved data from the saved checks
		if(typeof(document.MassUpdate) != \'undefined\' && document.MassUpdate.saved_associated_data.value != \'\') {
			temp_array = ' . (!empty($_REQUEST['saved_associated_data']) ? $json->encode($json->decode(urldecode($_REQUEST['saved_associated_data']))) : '\'\'') . ';
			for(the_key in temp_array) {
				associated_javascript_data[the_key] = temp_array[the_key];
			}
		}

		// save checks across pages for multiselects 
		if(typeof(document.MassUpdate) != "undefined") {		
			checked_items = Array();
			inputs_array = document.MassUpdate.elements;
	
			for(wp = 0 ; wp < inputs_array.length; wp++) {
				if(inputs_array[wp].name == "mass[]" && inputs_array[wp].style.display == "none") {
					checked_items.push(inputs_array[wp].value);
				} 
			}
			for(i in checked_items) {
				for(wp = 0 ; wp < inputs_array.length; wp++) {
					if(inputs_array[wp].name == "mass[]" && inputs_array[wp].value == checked_items[i]) {
						inputs_array[wp].checked = true;
					}
				}
			}
		}
		</script>';
        $output_html .= insert_popup_footer();
        return $output_html;
    }
require_once 'XTemplate/xtpl.php';
require_once 'include/ListView/ListView.php';
require_once 'modules/Schedulers/Scheduler.php';
$header_text = '';
global $mod_strings;
global $app_list_strings;
global $app_strings;
global $current_user;
global $current_language;
$current_module_strings = return_module_language($current_language, 'Schedulers');
$focus = new Scheduler();
$focus->checkCurl();
$where = '';
$limit = '0';
$varName = $focus->object_name;
//'Scheduler'
if (!empty($_REQUEST['Schedulers_SCHEDULER_ORDER_BY'])) {
    $orderBy = $_REQUEST['Schedulers_SCHEDULER_ORDER_BY'];
} else {
    $orderBy = $focus->order_by;
}
$allowByOverride = true;
$listView = new ListView();
$listView->show_mass_update = false;
// don't want to mass delete all Schedules
$listView->initNewXTemplate('modules/Schedulers/ListView.html', $current_module_strings);
$listView->setHeaderTitle($current_module_strings['LBL_LIST_TITLE']);
$listView->setQuery($where, $limit, $orderBy, $varName, $allowByOverride);
$listView->xTemplateAssign("REMOVE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
$listView->processListView($focus, "main", "SCHEDULER");
$focus->displayCronInstructions();
Example #14
0
require_once 'include/ListView/ListView.php';
global $app_strings;
global $app_list_strings;
global $current_user;
global $current_language;
$mod_strings = return_module_language($current_language, "ZuckerWordTemplate");
$seed = new WordTemplate();
$wordlist = $seed->get_by_query($focus->id);
if (!is_array($wordlist)) {
    $wordlist = array();
}
echo "\n<p>\n";
$button = "";
if (is_admin($current_user)) {
    $button .= "<form action='index.php' method='post'>\n";
    $button .= "<input type='hidden' name='module' value='ZuckerWordTemplate'>\n";
    $button .= "<input type='hidden' name='action' value='EditView'>\n";
    $button .= "<input type='hidden' name='return_module' value='" . $focus->module_dir . "'>\n";
    $button .= "<input type='hidden' name='return_action' value='DetailView'>\n";
    $button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
    $button .= "<input type='hidden' name='querytemplate_id' value='" . $focus->id . "'>\n";
    $button .= "<input class='button' type='submit' value=' " . $mod_strings['LBL_WORD_CREATE_WORD_TEMPLATE'] . "  '>\n";
    $button .= "</form>\n";
}
$lv = new ListView();
$lv->initNewXTemplate("modules/ZuckerWordTemplate/SubPanelView.html", $mod_strings);
$lv->setHeaderTitle($mod_strings['LBL_WORD_WORD_TEMPLATES']);
$lv->setHeaderText($button);
$lv->show_export_button = false;
$lv->processListView($wordlist, "wordtemplates", "WORD");
Example #15
0
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
require_once 'modules/Schedulers/Job.php';
$header_text = '';
global $mod_strings;
global $app_list_strings;
global $app_strings;
global $current_user;
$focus = new Job();
$focus->retrieve();
$focus->get_list_view_data();
//_pp($_REQUEST);
$where = '';
$limit = 20;
$varName = $focus->object_name;
$allowByOverride = true;
if (!empty($_REQUEST['Schedulers_' . $varName . '_ORDER_BY'])) {
    $orderBy = $_REQUEST['Schedulers_' . $varName . '_ORDER_BY'];
} else {
    $orderBy = $focus->order_by;
}
$listView = new ListView();
$listView->initNewXTemplate('modules/Schedulers/Scheduled.html', $mod_strings);
$listView->setHeaderTitle($mod_strings['LBL_LIST_TITLE']);
$listView->setQuery($where, $limit, $orderBy, $varName, $allowByOverride);
$listView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
$listView->processListView($focus, "main", "JOB");
Example #16
0
global $theme;
global $focus;
global $action;
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='UsersForm' id='UsersForm'>\n";
$button .= "<input type='hidden' name='module' value='Users'>\n";
if ($currentModule == 'Roles') {
    $button .= "<input type='hidden' name='record' value='{$focus->id}'>\n";
}
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input type='hidden' name='report_module'>\n";
$button .= "<input type='hidden' name='id'>\n";
if ($currentModule == 'Roles') {
    $button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . " ' accessKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value='  " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "  ' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=PopupUsers&html=Popup_Users_picker&form=UsersForm&record=" . $focus->id . "&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
}
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Roles/SubPanelViewUsers.html', $current_module_strings);
$ListView->xTemplateAssign("ROLE_RECORD", $focus->id);
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME']);
$ListView->setQuery("", "", "user_name", "USER");
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "USER");
Example #17
0
 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $mod_strings;
     global $app_strings;
     global $currentModule;
     global $sugar_version, $sugar_config;
     global $app_list_strings;
     global $sugar_config;
     $b_from_documents = false;
     if (isset($_REQUEST['caller']) && $_REQUEST['caller'] == 'Documents') {
         $b_from_documents = true;
     }
     //initalize template
     $form = new XTemplate('modules/Documents/Popup_picker.html');
     $form->assign('MOD', $mod_strings);
     $form->assign('APP', $app_strings);
     $form->assign('THEME', $theme);
     $form->assign('MODULE_NAME', $currentModule);
     //tree header.
     $doctree = new Tree('doctree');
     $doctree->set_param('module', 'Documents');
     if ($b_from_documents) {
         $doctree->set_param('caller', 'Documents');
         $href_string = "javascript:populate_parent_search('doctree')";
     } else {
         $href_string = "javascript:populate_search('doctree')";
     }
     $nodes = get_category_nodes($href_string);
     foreach ($nodes as $node) {
         $doctree->add_node($node);
     }
     $form->assign("TREEHEADER", $doctree->generate_header());
     $form->assign("TREEINSTANCE", $doctree->generate_nodes_array());
     $site_data = "<script> var site_url= {\"site_url\":\"" . getJavascriptSiteURL() . "\"};</script>\n";
     $form->assign("SITEURL", $site_data);
     $form->parse('main.SearchHeader.TreeView');
     $treehtml = $form->text('main.SearchHeader.TreeView');
     $form->reset('main.SearchHeader.TreeView');
     //end tree
     if (isset($_REQUEST['caller']) && $_REQUEST['caller'] == 'Documents') {
         ///process treeview and return.
         return insert_popup_header($theme) . $treehtml . insert_popup_footer();
     }
     ////////////////////////process full search form and list view.//////////////////////////////
     $output_html = '';
     $where = '';
     $where = $this->_get_where_clause();
     $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
     $document_name = empty($_REQUEST['document_name']) ? '' : $_REQUEST['document_name'];
     $category_id = empty($_REQUEST['category_id']) ? '' : $_REQUEST['category_id'];
     $subcategory_id = empty($_REQUEST['subcategory_id']) ? '' : $_REQUEST['subcategory_id'];
     $template_type = empty($_REQUEST['template_type']) ? '' : $_REQUEST['template_type'];
     $is_template = empty($_REQUEST['is_template']) ? '' : $_REQUEST['is_template'];
     $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
     $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
     $button = "<form action='index.php' method='post' name='form' id='form'>\n";
     if (!$hide_clear_button) {
         $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "'  value='  " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . "  ' />\n";
     }
     $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  ' />\n";
     $button .= "</form>\n";
     $form->assign('NAME', $name);
     $form->assign('DOCUMENT_NAME', $document_name);
     $form->assign('request_data', $request_data);
     $form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_category_dom'], $category_id));
     $form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['document_subcategory_dom'], $subcategory_id));
     $form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template));
     $form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $template_type));
     ob_start();
     insert_popup_header($theme);
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
     $form->parse('main.SearchHeader');
     $output_html .= $form->text('main.SearchHeader');
     // Reset the sections that are already in the page so that they do not print again later.
     $form->reset('main.SearchHeader');
     //add tree view to output_html.
     $output_html .= $treehtml;
     // create the listview
     $seed_bean = new Document();
     $ListView = new ListView();
     $ListView->show_select_menu = false;
     $ListView->show_delete_button = false;
     $ListView->show_export_button = false;
     $ListView->process_for_popups = true;
     $ListView->setXTemplate($form);
     $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
     $ListView->setHeaderText($button);
     $ListView->setQuery($where, '', 'document_name', 'DOCUMENT');
     $ListView->setModStrings($mod_strings);
     ob_start();
     $ListView->processListView($seed_bean, 'main', 'DOCUMENT');
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= insert_popup_footer();
     return $output_html;
 }
Example #18
0
global $current_language;
global $current_user;
global $urlPrefix;
global $currentModule;
$current_module_strings = return_module_language($current_language, 'ZuckerReports');
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_TITLE'], false);
echo "\n</p>\n";
global $theme;
$button = "";
if (is_admin($current_user)) {
    $button .= "<form action='index.php' method='post'>\n";
    $button .= "<input type='hidden' name='module' value='ZuckerReportParameter'>\n";
    $button .= "<input type='hidden' name='action'>\n";
    $button .= "<input type='hidden' name='return_module' value='ZuckerReportParameter'>\n";
    $button .= "<input type='hidden' name='return_action' value='ListView'>\n";
    $button .= "<input class='button' onclick='this.form.action.value=\"EditView\"' type='submit' value=' " . $mod_strings['LBL_PARAM_NEW'] . "  '>\n";
    $button .= "</form>\n";
}
$seed = new ReportParameter();
$lv = new ListView();
$lv->initNewXTemplate('modules/ZuckerReportParameter/ListView.html', $current_module_strings);
$lv->setHeaderTitle($current_module_strings['LNK_PARAMETER_LIST']);
$lv->setHeaderText($button);
$lv->show_export_button = false;
$lv->show_mass_update = false;
$lv->show_delete_button = false;
$lv->show_select_menu = false;
$lv->setQuery("", "", "default_name", "PARAM");
$lv->processListView($seed, "main", "PARAM");
Example #19
0
        $last_search['NAME'] = $_REQUEST['name'];
    }
    if (isset($_REQUEST['category'])) {
        $last_search['CATEGORY'] = $_REQUEST['category'];
    }
    if (isset($last_search)) {
        $form->assign("LAST_SEARCH", $last_search);
    }
    $form->parse("main.SearchHeader");
    $form->out("main.SearchHeader");
    echo get_form_footer();
    $form->parse("main.SearchHeaderEnd");
    $form->out("main.SearchHeaderEnd");
    // Reset the sections that are already in the page so that they do not print again later.
    $form->reset("main.SearchHeader");
    $form->reset("main.SearchHeaderEnd");
    // Stick the form header out there.
    $ListView = new ListView();
    $ListView->setXTemplate($form);
    $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
    $ListView->setHeaderText($button);
    $ListView->setQuery($where, "", "num, name", "MATERIAL");
    $ListView->setModStrings($mod_strings);
    $ListView->process_for_popups = true;
    $ListView->processListView($seed_object, "main", "MATERIAL");
    insert_popup_footer();
} else {
    require_once 'include/Popups/Popup_picker.php';
    $popup = new Popup_Picker();
    echo $popup->process_page();
}
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='Paperformat'>\n";
$button .= "<input type='hidden' name='relation_id' value='{$focus->id}'>\n";
$button .= "<input type='hidden' name='relation_type' value='{$currentModule}'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') {
    $button .= "<input type='hidden' name='account_id' value='{$focus->account_id}'>\n";
    $button .= "<input type='hidden' name='opportunity_name' value='{$focus->name}'>\n";
}
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value='  " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "  '>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Paperformat/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
$ListView->setHeaderTitle($current_module_strings['LBL_PAPERFORMAT_SUBPANEL_TITLE']);
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_PAPERFORMAT_SUBPANEL_TITLE'] . $header_text);
$ListView->processListView($focus_list, "main", "PAPERFORMAT");
Example #21
0
    $button .= "<input type='hidden' name='campaign_name' value=\"{$focus->name}\">\n";
}
$button .= "<input type='hidden' name='prospect_list_id' value=''>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='SaveCampaignProspectListRelationshipNew'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value='  " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "  '>\n";
if ($currentModule == 'Campaigns') {
    ///////////////////////////////////////
    ///
    /// SETUP PARENT POPUP
    $popup_request_data = array('call_back_function' => 'set_return_prospect_list_and_save', 'form_name' => 'ProspectListForm', 'field_to_name_array' => array('id' => 'prospect_list_id'));
    $json = getJSONobj();
    $encoded_popup_request_data = $json->encode($popup_request_data);
    //
    ///////////////////////////////////////
    $button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . " 'accessyKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value='  " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "  ' name='button' onclick='open_popup(\"ProspectLists\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
    //		."  ' name='button' onclick='window.open(\"index.php?module=ProspectLists&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
}
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/ProspectLists/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("CAMPAIGN_RECORD", $focus->id);
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE']));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME']);
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "PROSPECT_LIST");
Example #22
0
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
global $timedate;
global $app_strings;
global $app_list_strings;
global $current_language, $current_user;
$current_module_strings = return_module_language($current_language, 'ProjectTask');
$today = $timedate->nowDbDate();
$today = $timedate->handle_offset($today, $timedate->dbDayFormat, false);
$ListView = new ListView();
$seedProjectTask = new ProjectTask();
$where = "project_task.assigned_user_id='{$current_user->id}'" . " AND (project_task.status IS NULL OR (project_task.status!='Completed' AND project_task.status!='Deferred'))" . " AND (project_task.date_start IS NULL OR project_task.date_start <= '{$today}')";
$ListView->initNewXTemplate('modules/ProjectTask/MyProjectTasks.html', $current_module_strings);
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=MyTasks&from_module=Tasks'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . '</a>';
}
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_MY_PROJECT_TASKS'] . $header_text);
$ListView->setQuery($where, "", "date_due,priority desc", "PROJECT_TASK");
$ListView->processListView($seedProjectTask, "main", "PROJECT_TASK");
Example #23
0
 * "Powered by SugarCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  TODO: To be written.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
global $theme;
global $sugar_config;
global $current_language;
$currentMax = $sugar_config['list_max_entries_per_page'];
$sugar_config['list_max_entries_per_page'] = 10;
$current_mod_strings = return_module_language($current_language, 'Emails');
$focus = new Email();
$ListView = new ListView();
$display_title = $current_mod_strings['LBL_LIST_TITLE_MY_INBOX'] . ': ' . $current_mod_strings['LBL_UNREAD_HOME'];
$where = 'emails.deleted = 0 AND emails.assigned_user_id = \'' . $current_user->id . '\' AND emails.type = \'inbound\' AND emails.status = \'unread\'';
$limit = 10;
///////////////////////////////////////////////////////////////////////////////
////	OUTPUT
///////////////////////////////////////////////////////////////////////////////
echo $focus->rolloverStyle;
$ListView->initNewXTemplate('modules/Emails/ListViewHome.html', $current_mod_strings);
$ListView->xTemplateAssign('ATTACHMENT_HEADER', SugarThemeRegistry::current()->getImage('attachment', "", "", "", '.gif', $mod_strings['LBL_ATTACHMENT']));
$ListView->setHeaderTitle($display_title);
$ListView->setQuery($where, '', 'date_sent, date_entered DESC', "EMAIL");
$ListView->setAdditionalDetails();
$ListView->processListView($focus, 'main', 'EMAIL');
//echo $focus->quickCreateJS();
$sugar_config['list_max_entries_per_page'] = $currentMax;
Example #24
0
        $query .= " and prospect_lists.deleted=0 ";
        $query .= " and prospect_lists.list_type='test' ";
        $query .= " and plc.deleted=0 ";
        $query .= " and plc.campaign_id='{$campaign_id}'";
        $query .= " and email_marketing.campaign_id='{$campaign_id}'";
        $query .= " and email_marketing.deleted=0 ";
        $query .= " and email_marketing.all_prospect_lists=0 ";
        $seed = array();
        $result = $focus->db->query($query);
        while (($row = $focus->db->fetchByAssoc($result)) != null) {
            $bean = new EmailMarketing();
            $bean->retrieve($row['email_marketing_id']);
            $bean->mode = 'test';
            $seed[] = $bean;
        }
        $query = " select email_marketing.id email_marketing_id from email_marketing ";
        $query .= " WHERE email_marketing.campaign_id='{$campaign_id}'";
        $query .= " and email_marketing.deleted=0 ";
        $query .= " and email_marketing.all_prospect_lists=1 ";
        $result = $focus->db->query($query);
        while (($row = $focus->db->fetchByAssoc($result)) != null) {
            $bean = new EmailMarketing();
            $bean->retrieve($row['email_marketing_id']);
            $bean->mode = 'test';
            $seed[] = $bean;
        }
        $ListView->processListView($seed, "main", "EMAILMARKETING");
    } else {
        $ListView->processListView($focus, "main", "EMAILMARKETING");
    }
}
Example #25
0
 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $mod_strings;
     global $app_strings;
     global $app_list_strings;
     global $currentModule;
     global $sugar_version, $sugar_config;
     $output_html = '';
     $where = '';
     $where = $this->_get_where_clause();
     $name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
     $status = empty($_REQUEST['status']) ? '' : $_REQUEST['status'];
     $campaign_type = empty($_REQUEST['campaign_type']) ? '' : $_REQUEST['campaign_type'];
     $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
     $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
     $button = "<form action='index.php' method='post' name='form' id='form'>\n";
     //START:FOR MULTI-SELECT
     $multi_select = false;
     if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') {
         $multi_select = true;
         $button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Prospects',document.MassUpdate,'mass[]','" . $app_strings['ERR_NOTHING_SELECTED'] . "');\" title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' value='  " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "  ' />\n";
     }
     //END:FOR MULTI-SELECT
     if (!$hide_clear_button) {
         $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CLEAR_BUTTON_KEY'] . "' value='  " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . "  ' />\n";
     }
     $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accesskey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  ' />\n";
     $button .= "</form>\n";
     $form = new XTemplate('modules/Campaigns/Popup_picker.html');
     $form->assign('MOD', $mod_strings);
     $form->assign('APP', $app_strings);
     $form->assign('THEME', $theme);
     $form->assign('MODULE_NAME', $currentModule);
     $form->assign('request_data', $request_data);
     $form->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['campaign_type_dom'], ""));
     ob_start();
     insert_popup_header($theme);
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
     $form->parse('main.SearchHeader');
     $output_html .= $form->text('main.SearchHeader');
     // Reset the sections that are already in the page so that they do not print again later.
     $form->reset('main.SearchHeader');
     // create the listview
     $seed_bean = new Campaign();
     $ListView = new ListView();
     $ListView->show_export_button = false;
     $ListView->process_for_popups = true;
     $ListView->setXTemplate($form);
     $ListView->multi_select_popup = $multi_select;
     //FOR MULTI-SELECT
     $ListView->xTemplate->assign("TAG_TYPE", "A");
     //FOR MULTI-SELECT
     $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
     //FOR MULTI-SELECT
     $ListView->setHeaderText($button);
     //FOR MULTI-SELECT
     $ListView->setQuery($where, '', 'name', 'CAMPAIGN');
     $ListView->setModStrings($mod_strings);
     ob_start();
     //$output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false); //FOR MULTI-SELECT
     $ListView->processListView($seed_bean, 'main', 'CAMPAIGN');
     $output_html .= ob_get_contents();
     ob_end_clean();
     $output_html .= insert_popup_footer();
     return $output_html;
 }
        $search_form->assign("FNAME", to_html($fname));
    }
    if (isset($pnum)) {
        $search_form->assign("PNAME", to_html($pname));
    }
    //if (isset($type)) $search_form->assign("TYPE", to_html($type));
    //if (isset($spec)) $search_form->assign("SPEC", to_html($spec));
    if (isset($current_user_only)) {
        $search_form->assign("CURRENT_USER_ONLY", "checked");
    }
    //if(isset($subordinate_only)) $search_form->assign("SUBORDINATE_ONLY", "checked");
    $header_text = '';
    if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
        $header_text = "<a href='index.php?action=index&module=DynamicLayout&from_action=SearchForm&from_module=" . $_REQUEST['module'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
    }
    echo get_form_header($current_module_strings['LBL_SEARCH_FORM_TITLE'], $header_text, false);
    $search_form->parse("main");
    $search_form->out("main");
    echo get_form_footer();
    echo "\n<BR>\n";
}
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Paper/ListView.html', $current_module_strings);
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE']);
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $ListView->setHeaderText("<a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=" . $_REQUEST['module'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>");
}
$ListView->setQuery($where, "", "date_modified desc", "PAPER");
$ListView->processListView($seedPaper, "main", "PAPER");
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='Project'>\n";
$button .= "<input type='hidden' name='relation_id' value='{$focus->id}'>\n";
$button .= "<input type='hidden' name='relation_type' value='{$currentModule}'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') {
    $button .= "<input type='hidden' name='account_id' value='{$focus->account_id}'>\n";
    $button .= "<input type='hidden' name='opportunity_name' value='{$focus->name}'>\n";
}
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value='  " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "  '>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/ProductLogs/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
$ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE']);
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_PROJECT_SUBPANEL_TITLE'] . $header_text);
$ListView->processListView($focus_list, "main", "PROJECT");
///
/// SETUP PARENT POPUP
$popup_request_data = array('call_back_function' => 'set_return_and_save', 'form_name' => 'DetailView', 'field_to_name_array' => array('id' => 'account_id'));
$json = getJSONobj();
$encoded_popup_request_data = $json->encode($popup_request_data);
//
///////////////////////////////////////
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='Accounts'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='project_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "' type='button' class='button' value='  " . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "  ' name='button' onclick='open_popup(\"Accounts\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Accounts/SubPanelViewProjects.html', $current_module_strings);
$ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline', 'align="absmiddle" alt="' . $app_strings['LNK_REMOVE'] . '" border="0"'));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
global $current_user;
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelViewProjects&from_module=Accounts'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
}
$ListView->setHeaderTitle($project_module_strings['LBL_ACCOUNT_SUBPANEL_TITLE'] . $header_text);
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "ACCOUNT");
Example #29
0
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  TODO: To be written.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
global $app_strings;
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
global $current_language;
$current_module_strings = return_module_language($current_language, 'Leads');
global $currentModule;
global $theme;
global $focus;
global $action;
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
global $current_user;
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Leads&record=" . $_REQUEST['record'] . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']) . "</a>";
}
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Leads/SubPanelView.html', $current_module_strings);
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text);
//$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "LEAD");
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
// focus_list is the means of passing data to a SubPanelView.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='Paperwaste'>\n";
$button .= "<input type='hidden' name='relation_id' value='{$focus->id}'>\n";
$button .= "<input type='hidden' name='relation_type' value='{$currentModule}'>\n";
$button .= "<input type='hidden' name='return_module' value='" . $currentModule . "'>\n";
$button .= "<input type='hidden' name='return_action' value='" . $action . "'>\n";
$button .= "<input type='hidden' name='return_id' value='" . $focus->id . "'>\n";
$button .= "<input type='hidden' name='action'>\n";
if (!empty($focus->object_name) && $focus->object_name == 'Opportunity') {
    $button .= "<input type='hidden' name='account_id' value='{$focus->account_id}'>\n";
    $button .= "<input type='hidden' name='opportunity_name' value='{$focus->name}'>\n";
}
$button .= "<input title='" . $app_strings['LBL_NEW_BUTTON_TITLE'] . "' accessyKey='" . $app_strings['LBL_NEW_BUTTON_KEY'] . "' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value='  " . $app_strings['LBL_NEW_BUTTON_LABEL'] . "  '>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate('modules/Paperwaste/SubPanelView.html', $current_module_strings);
$ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
$ListView->xTemplateAssign("RETURN_URL", "&return_module=" . $currentModule . "&return_action=DetailView&return_id=" . $focus->id);
$ListView->setHeaderTitle($current_module_strings['LBL_PAPERWASTE_SUBPANEL_TITLE']);
$header_text = '';
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_PAPERWASTE_SUBPANEL_TITLE'] . $header_text);
$ListView->processListView($focus_list, "main", "PAPERWASTE");