コード例 #1
0
ファイル: CallHelper.php プロジェクト: aldridged/gtg-sugar
function getReminderTime($focus, $field, $value, $view)
{
    global $current_user, $app_list_strings;
    $reminder_t = -1;
    if (!empty($_REQUEST['full_form']) && !empty($_REQUEST['reminder_time'])) {
        $reminder_t = $_REQUEST['reminder_time'];
    } else {
        if (isset($focus->reminder_time)) {
            $reminder_t = $focus->reminder_time;
        } else {
            if (isset($value)) {
                $reminder_t = $value;
            }
        }
    }
    if ($view == 'EditView' || $view == 'MassUpdate' || $view == "SubpanelCreates" || $view == "QuickCreate") {
        global $app_list_strings;
        $html = '<select id="reminder_time" name="reminder_time">';
        $html .= get_select_options_with_id($app_list_strings['reminder_time_options'], $reminder_t);
        $html .= '</select>';
        return $html;
    }
    if ($reminder_t == -1) {
        return "";
    }
    return translate('reminder_time_options', '', $reminder_t);
}
コード例 #2
0
/**
 * THIS FUNCTION IS DEPRECATED AND SHOULD NOT BE USED; USE get_select_options_with_id()
 * Create HTML to display select options in a dropdown list.  To be used inside
 * of a select statement in a form.
 * param $option_list - the array of strings to that contains the option list
 * param $selected - the string which contains the default value
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 */
function get_select_options(&$option_list, $selected, $advsearch = 'false')
{
    global $log;
    $log->debug("Entering get_select_options (" . $option_list . "," . $selected . "," . $advsearch . ") method ...");
    $log->debug("Exiting get_select_options  method ...");
    return get_select_options_with_id($option_list, $selected, $advsearch);
}
コード例 #3
0
 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'ProjectTask');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"projectTaskQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"projecttask\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_projecttask\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('projectTaskQuickCreate');
     $focus = new ProjectTask();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_task_status_options'], $focus->status));
     $json = getJSONobj();
     ///////////////////////////////////////
     ///
     /// SETUP PARENT POPUP
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTypeQuickCreate', 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'parent_name'));
     $encoded_parent_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_parent_popup_request_data', $encoded_parent_popup_request_data);
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTaskQuickCreate', 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
 }
コード例 #4
0
ファイル: Forms.php プロジェクト: jglaine/sugar761-ent
/**
 * 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;
}
コード例 #5
0
function getReminderTime($focus, $field, $value, $view)
{
    global $current_user, $app_list_strings;
    $reminder_t = -1;
    if (!empty($_REQUEST['reminder_interval'])) {
        $reminder_t = $_REQUEST['reminder_interval'];
    } else {
        if (isset($focus->reminder_interval)) {
            $reminder_t = $focus->reminder_interval;
        } else {
            if (isset($value)) {
                $reminder_t = $value;
            }
        }
    }
    if ($view == 'EditView' || $view == 'MassUpdate') {
        global $app_list_strings;
        $html = '<select id="reminder_interval" name="reminder_interval">';
        $html .= get_select_options_with_id($app_list_strings['oqc_reminder_interval_options'], $reminder_t);
        $html .= '</select>';
        return $html;
    }
    if ($reminder_t == -1) {
        return "";
    }
    //  $GLOBALS['log']->error("Reminder value is ". var_export($reminder_t,true));
    return translate('oqc_reminder_interval_options', '', $reminder_t);
}
コード例 #6
0
 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Contracts');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"contractsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"contracts\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_contracts\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('contractsQuickCreate');
     $focus = BeanFactory::getBean('Contracts');
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $status_options = isset($focus->status) ? get_select_options_with_id($app_list_strings['contract_status_dom'], $focus->status) : get_select_options_with_id($app_list_strings['contract_status_dom'], '');
     $this->ss->assign('STATUS_OPTIONS', $status_options);
     $json = getJSONobj();
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'contractsQuickCreate', 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'contractsQuickCreate', 'field_to_name_array' => array('id' => 'team_id', 'name' => 'team_name'));
     $this->ss->assign('encoded_team_popup_request_data', $json->encode($popup_request_data));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
コード例 #7
0
 function get_xtemplate_data()
 {
     $return_array = array();
     global $current_user;
     foreach ($this->column_fields as $field) {
         $return_array[strtoupper($field)] = $this->{$field};
     }
     if (is_admin($current_user)) {
         $select = translate('DROPDOWN_PLACEMENT', 'iFrames');
         $return_array['PLACEMENT_SELECT'] = get_select_options_with_id($select, $return_array['PLACEMENT']);
     } else {
         $select = translate('DROPDOWN_PLACEMENT', 'iFrames');
         $shortcut = array('shortcut' => $select['shortcut']);
         $return_array['PLACEMENT_SELECT'] = get_select_options_with_id($shortcut, '');
     }
     if (is_admin($current_user)) {
         $select = translate('DROPDOWN_TYPE', 'iFrames');
         $return_array['TYPE_SELECT'] = get_select_options_with_id($select, $return_array['TYPE']);
     } else {
         $select = translate('DROPDOWN_TYPE', 'iFrames');
         $personal = array('personal' => $select['personal']);
         $return_array['TYPE_SELECT'] = get_select_options_with_id($personal, '');
     }
     if (!empty($select[$return_array['PLACEMENT']])) {
         $return_array['PLACEMENT'] = $select[$return_array['PLACEMENT']];
     }
     return $return_array;
 }
コード例 #8
0
ファイル: RoomBookings.php プロジェクト: sysraj86/carnivalcrm
 function get_bookingroom_editview()
 {
     global $app_list_strings;
     $sql = "select * from roombookingsline where roombooking_id ='" . $this->id . "' AND deleted =0";
     $result = $this->db->query($sql);
     $html = '';
     while ($row = $this->db->fetchByAssoc($result)) {
         if (!empty($row['currency'])) {
             $currency = get_select_options_with_id($app_list_strings['currency_dom'], $row['currency']);
         } else {
             $currency = get_select_options_with_id($app_list_strings['currency_dom'], '');
         }
         $html .= '<tr>';
         $html .= '<td class="dataField" align="center"><input type="text" name="type[]" id="type" value="' . $row['type'] . '"/></td>';
         $html .= '<td class="dataField" align="center"><input type="text" name="quantity[]" id="quantity" value="' . $row['quantity'] . '"/>
                     <input type="hidden" name="deleted[]" id="deleted" class="deleted" value="0"><input type="hidden" name="roombooking_line_id[]" id="roombooking_line_id" value="' . $row['id'] . '"></td>';
         $html .= '<td class="dataField" align="center"><input type="text" name="price[]" id="price" value="' . $row['price'] . '"/>
                     <select id="currency" name="currency[]">' . $currency . '</select></td>';
         $html .= '<td class="dataField" align="center"><input type="text" id=\'check_in\' name=\'check_in[]\' class="datePicker" value="' . date('d/m/Y', strtotime($row['check_in'])) . '"/></td>';
         $html .= '<td class="dataField" align="center"><input type="text" id=\'check_out\' name=\'check_out[]\' class="datePicker" value="' . date('d/m/Y', strtotime($row['check_out'])) . '"/></td>';
         $html .= '<td class="dataField" align="center">';
         $html .= '<input type="button" class="btnAddRow"  value="Add Row"/>';
         $html .= '<input type="button" class="btnDelRow" value="Delete Row"/>';
         $html .= '</td>';
         $html .= '</tr>';
     }
     return $html;
 }
コード例 #9
0
ファイル: view.showcode.php プロジェクト: omusico/sugar_work
 public function display()
 {
     global $app_list_strings;
     $modules = Reports_Utils::available_modules();
     foreach ($modules as $key => &$val) {
         if (isset($app_list_strings['moduleList'][$key])) {
             $val = $app_list_strings['moduleList'][$key];
         }
     }
     asort($modules);
     if (isset($_REQUEST['report_module']) and !empty($_REQUEST['report_module'])) {
         $cur_module = $_REQUEST['report_module'];
     } else {
         $ind = array_keys($modules);
         $cur_module = $ind[0];
     }
     $this->ss->assign('AVAILABLE_MODULES', get_select_options_with_id($modules, $cur_module));
     $related_modules = Reports_Utils::getRelatedModules($cur_module);
     $related_modules[''] = '';
     asort($related_modules);
     $this->ss->assign('RELATED_MODULES', get_select_options_with_id($related_modules, ''));
     $module_fields = Reports_Utils::getModuleFields($cur_module);
     asort($module_fields);
     $this->ss->assign('MODULE_FIELDS', get_select_options_with_id($module_fields, ''));
     $module_fields = Reports_Utils::getModuleFields($cur_module);
     asort($module_fields);
     $this->ss->assign('MODULE_FIELDS', get_select_options_with_id($module_fields, ''));
     $custom_fields = Reports_Utils::getReportCustomFields($cur_module);
     $this->ss->assign('CUSTOM_FIELDS', get_select_options_with_id($custom_fields, ''));
     $this->ev->process();
     echo $this->ev->display($this->showTitle);
 }
コード例 #10
0
 public function displayOptions()
 {
     ob_start();
     global $current_language, $app_list_strings;
     $mod_strings = return_module_language($current_language, 'AOR_Reports');
     $optionsSmarty = new Sugar_Smarty();
     $optionsSmarty->assign('MOD', $mod_strings);
     $optionsSmarty->assign('id', $this->id);
     $optionsSmarty->assign('dashletTitle', $this->title);
     $optionsSmarty->assign('aor_report_id', $this->report->id);
     $optionsSmarty->assign('aor_report_name', $this->report->name);
     $optionsSmarty->assign('onlyCharts', $this->onlyCharts);
     $charts = array();
     if (!empty($this->report->id)) {
         foreach ($this->report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
             $charts[$chart->id] = $chart->name;
         }
     }
     $conditions = getConditionsAsParameters($this->report, $this->params);
     $optionsSmarty->assign('parameters', $conditions);
     $chartOptions = get_select_options_with_id($charts, $this->charts);
     $optionsSmarty->assign('chartOptions', $chartOptions);
     $optionsTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashletConfigure.tpl');
     ob_clean();
     return $optionsSmarty->fetch($optionsTemplate);
 }
コード例 #11
0
ファイル: view.edit.php プロジェクト: switcode/SuiteCRM
 public function preDisplay()
 {
     global $app_list_strings;
     echo "<style type='text/css'>";
     //readfile('modules/AOR_Reports/css/edit.css');
     readfile('modules/AOR_Reports/js/jqtree/jqtree.css');
     echo "</style>";
     if (!is_file('cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('AOR_Fields', $GLOBALS['current_language']);
     }
     echo '<script src="cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js"></script>';
     if (!is_file('cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('AOR_Conditions', $GLOBALS['current_language']);
     }
     echo '<script src="cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js"></script>';
     echo '<script src="include/javascript/yui3/build/yui/yui-min.js"></script>';
     echo "<script>";
     echo "sort_by_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_sort_operator'], ''))) . "\";";
     echo "total_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_total_options'], ''))) . "\";";
     echo "format_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_format_options'], ''))) . "\";";
     echo "</script>";
     $fields = $this->getFieldLines();
     echo "<script>var fieldLines = " . json_encode($fields) . "</script>";
     $conditions = $this->getConditionLines();
     echo "<script>var conditionLines = " . json_encode($conditions) . "</script>";
     $charts = $this->getChartLines();
     echo "<script>var chartLines = " . json_encode($charts) . ";</script>";
     parent::preDisplay();
 }
コード例 #12
0
 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Opportunities');
     $json = getJSONobj();
     parent::process();
     list($num_grp_sep, $dec_sep) = get_number_seperators();
     $this->ss->assign('NUM_GRP_SEP', $num_grp_sep);
     $this->ss->assign('DEC_SEP', $dec_sep);
     $this->ss->assign('CURRENCY_ID', $current_user->getPreference('currency'));
     $this->ss->assign("SALES_STAGE_OPTIONS", get_select_options_with_id($app_list_strings['sales_stage_dom'], ''));
     $this->ss->assign("LEAD_SOURCE_OPTIONS", get_select_options_with_id($app_list_strings['lead_source_dom'], ''));
     $this->ss->assign('prob_array', $json->encode($app_list_strings['sales_probability_dom']));
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"opportunitiesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"opportunities\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_opportunities\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('opportunitiesQuickCreate');
     $focus = new Opportunity();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
コード例 #13
0
/**
 * 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()
{
    if (!ACLController::checkAccess('Bugs', 'edit', true)) {
        return '';
    }
    global $mod_strings;
    global $app_strings;
    global $app_list_strings;
    global $mod_strings;
    global $theme;
    global $current_user;
    $seedRelease = new Release();
    $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
    $lbl_default_status = $app_list_strings['bug_status_default_key'];
    $lbl_subject = $mod_strings['LBL_SUBJECT'];
    $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
    $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
    $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
    $user_id = $current_user->id;
    $priority_options = get_select_options_with_id($app_list_strings['bug_priority_dom'], $app_list_strings['bug_priority_default_key']);
    $release_options = get_select_options_with_id($seedRelease->get_releases(TRUE, "Active"), "");
    $type_options = get_select_options_with_id($app_list_strings['bug_type_dom'], $app_list_strings['bug_type_default_key']);
    $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
    $the_form .= <<<EOQ

\t\t<form name="BugSave" onSubmit="return check_form('BugSave')" method="POST" action="index.php">
\t\t\t<input type="hidden" name="module" value="Bugs">
\t\t\t<input type="hidden" name="record" value="">

\t\t\t<input type="hidden" name="status" value="{$lbl_default_status}">
\t\t\t<input type="hidden" name="assigned_user_id" value='{$user_id}'>
\t\t\t<input type="hidden" name="action" value="Save">




\t\t{$lbl_subject}&nbsp;<span class="required">{$lbl_required_symbol}</span><br>
\t\t<p><input name='name' type="text" size='20' maxlength="255"value=""><br>
 \t\t{$mod_strings['LBL_TYPE']}&nbsp;<br>
\t\t<select name='type' >{$type_options}</select><br>
\t\t{$mod_strings['LBL_RELEASE']}&nbsp;<br>
\t\t<select name='found_in_release' >{$release_options}</select><br>
\t\t{$mod_strings['LBL_PRIORITY']}&nbsp;<br>
\t\t<select name='priority' >{$priority_options}</select>
</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>
EOQ;
    require_once 'include/javascript/javascript.php';
    require_once 'modules/Bugs/Bug.php';
    $javascript = new javascript();
    $javascript->setFormName('BugSave');
    $javascript->setSugarBean(new Bug());
    $javascript->addRequiredFields('');
    $the_form .= $javascript->getScript();
    $the_form .= get_left_form_footer();
    return $the_form;
}
コード例 #14
0
 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'ProductComponents');
     $format = new Format();
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"productComponentsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"productcomponents\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_productcomponents\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('productComponentsQuickCreate');
     $focus = new ProductComponents();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $app_list_strings['products_format_options'] = $format->Get_Dropdown_Data();
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
     $this->ss->assign('run_style_options', get_select_options_with_id($app_list_strings['layout_type_options'], ''));
     $this->ss->assign('type_options', get_select_options_with_id($app_list_strings['type_options'], $focus->type));
     $this->ss->assign('color_side_a', get_select_options_with_id($app_list_strings['color_side_a'], $focus->color_side_a));
     $this->ss->assign('color_side_b', get_select_options_with_id($app_list_strings['color_side_b'], $focus->color_side_b));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_task_status_options'], $focus->status));
     $this->ss->assign("FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
     $this->ss->assign("RUN_FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
     $this->ss->assign("BLEED_FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
     $ppref = 'PRD';
     $pnumber = $focus->get_pnum();
     $number_suf = $focus->generate_number();
     $this->ss->assign('number_pref', $ppref);
     $this->ss->assign('pnum', $pnumber);
     $this->ss->assign('number_suf', $number_suf);
     $this->ss->assign("LAYOUTROWS", $focus->getLayoutRow(new Layoutline(), 0, true, true));
     //$this->ss->parse("main.row1");
     $json = getJSONobj();
     ///////////////////////////////////////
     ///
     /// SETUP PARENT POPUP
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTypeQuickCreate', 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'parent_name'));
     $encoded_parent_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_parent_popup_request_data', $encoded_parent_popup_request_data);
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'productComponentsQuickCreate', 'field_to_name_array' => array('id' => 'paperid', 'pname' => 'paper'));
     $this->ss->assign('encoded_paper_popup_request_data', $json->encode($popup_request_data));
     //machines popup
     /*	$popup_request_data = array(
     			'call_back_function' => 'set_return',
     			'form_name' => 'productComponentsQuickCreate',
     			'field_to_name_array' => array(
     				'id' => 'machine_id',
     				'name' => 'machine',
     			),
     		);
     	
     		$encoded_popup_request_data = $json->encode($popup_request_data);
     		$this->ss->assign('encoded_machine_popup_request_data', $encoded_popup_request_data);        
     		*/
 }
コード例 #15
0
 function displayOptions()
 {
     $this->processDisplayOptions();
     require_once 'modules/Documents/Document.php';
     $types = getDocumentsExternalApiDropDown();
     $this->currentSearchFields['doc_type']['input'] = '<select size="3" multiple="true" name="doc_type[]">' . get_select_options_with_id($types, empty($this->filters['doc_type']) ? '' : $this->filters['doc_type']) . '</select>';
     $this->configureSS->assign('searchFields', $this->currentSearchFields);
     return $this->configureSS->fetch($this->configureTpl);
 }
コード例 #16
0
ファイル: MyBugsDashlet.php プロジェクト: klr2003/sourceread
 function displayOptions()
 {
     $this->processDisplayOptions();
     $seedRelease = new Release();
     $this->currentSearchFields['fixed_in_release']['input'] = '<select multiple="true" size="3" name="fixed_in_release[]">' . get_select_options_with_id($seedRelease->get_releases(false, "Active"), empty($this->filters['fixed_in_release']) ? '' : $this->filters['fixed_in_release']) . '</select>';
     $this->currentSearchFields['found_in_release']['input'] = '<select multiple="true" size="3" name="found_in_release[]">' . get_select_options_with_id($seedRelease->get_releases(false, "Active"), empty($this->filters['found_in_release']) ? '' : $this->filters['found_in_release']) . '</select>';
     $this->configureSS->assign('searchFields', $this->currentSearchFields);
     return $this->configureSS->fetch($this->configureTpl);
 }
コード例 #17
0
 function edit_display($line, SugarBean $bean = null, $params = array())
 {
     global $app_list_strings;
     $modules = $app_list_strings['aow_moduleList'];
     $checked = 'CHECKED';
     if (isset($params['relate_to_workflow']) && !$params['relate_to_workflow']) {
         $checked = '';
     }
     $html = "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
     $html .= "<tr>";
     $html .= '<td id="name_label" scope="row" valign="top">' . translate("LBL_RECORD_TYPE", "AOW_Actions") . ':<span class="required">*</span>&nbsp;&nbsp;';
     $html .= "<select name='aow_actions_param[" . $line . "][record_type]' id='aow_actions_param_record_type" . $line . "'  onchange='show_crModuleFields({$line});'>" . get_select_options_with_id($modules, $params['record_type']) . "</select></td>";
     $html .= '<td id="relate_label" scope="row" valign="top">' . translate("LBL_RELATE_WORKFLOW", "AOW_Actions") . ':&nbsp;&nbsp;';
     $html .= "<input type='hidden' name='aow_actions_param[" . $line . "][relate_to_workflow]' value='0' >";
     $html .= "<input type='checkbox' id='aow_actions_param[" . $line . "][relate_to_workflow]' name='aow_actions_param[" . $line . "][relate_to_workflow]' value='1' {$checked}></td>";
     $html .= "</tr>";
     $html .= "<tr>";
     $html .= '<td colspan="4" scope="row"><table id="crLine' . $line . '_table" width="100%"></table></td>';
     $html .= "</tr>";
     $html .= "<tr>";
     $html .= '<td colspan="4" scope="row"><input type="button" tabindex="116" style="display:none" class="button" value="' . translate("LBL_ADD_FIELD", "AOW_Actions") . '" id="addcrline' . $line . '" onclick="add_crLine(' . $line . ')" /></td>';
     $html .= "</tr>";
     $html .= "<tr>";
     $html .= '<td colspan="4" scope="row"><table id="crRelLine' . $line . '_table" width="100%"></table></td>';
     $html .= "</tr>";
     $html .= "<tr>";
     $html .= '<td colspan="4" scope="row"><input type="button" tabindex="116" style="display:none" class="button" value="' . translate("LBL_ADD_RELATIONSHIP", "AOW_Actions") . '" id="addcrrelline' . $line . '" onclick="add_crRelLine(' . $line . ')" /></td>';
     $html .= "</tr>";
     if (isset($params['record_type']) && $params['record_type'] != '') {
         require_once "modules/AOW_WorkFlow/aow_utils.php";
         $html .= "<script id ='aow_script" . $line . "'>";
         $html .= "cr_fields[" . $line . "] = \"" . trim(preg_replace('/\\s+/', ' ', getModuleFields($params['record_type']))) . "\";";
         $html .= "cr_relationships[" . $line . "] = \"" . trim(preg_replace('/\\s+/', ' ', getModuleRelationships($params['record_type']))) . "\";";
         $html .= "cr_module[" . $line . "] = \"" . $params['record_type'] . "\";";
         if (isset($params['field'])) {
             foreach ($params['field'] as $key => $field) {
                 if (is_array($params['value'][$key])) {
                     $params['value'][$key] = json_encode($params['value'][$key]);
                 }
                 $html .= "load_crline('" . $line . "','" . $field . "','" . str_replace(array("\r\n", "\r", "\n"), " ", $params['value'][$key]) . "','" . $params['value_type'][$key] . "');";
             }
         }
         if (isset($params['rel'])) {
             foreach ($params['rel'] as $key => $field) {
                 if (is_array($params['rel_value'][$key])) {
                     $params['rel_value'][$key] = json_encode($params['rel_value'][$key]);
                 }
                 $html .= "load_crrelline('" . $line . "','" . $field . "','" . $params['rel_value'][$key] . "','" . $params['rel_value_type'][$key] . "');";
             }
         }
         $html .= "</script>";
     }
     return $html;
 }
コード例 #18
0
ファイル: fieldLines.php プロジェクト: omusico/windcrm
/**
 * Advanced OpenReports, SugarCRM Reporting.
 * @package Advanced OpenReports for SugarCRM
 * @copyright SalesAgility Ltd http://www.salesagility.com
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
 * along with this program; if not, see http://www.gnu.org/licenses
 * or write to the Free Software Foundation,Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301  USA
 *
 * @author SalesAgility <*****@*****.**>
 */
function display_field_lines($focus, $field, $value, $view)
{
    global $mod_strings, $app_list_strings;
    $html = '';
    if (!is_file('cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js')) {
        require_once 'include/language/jsLanguage.php';
        jsLanguage::createModuleStringsCache('AOR_Fields', $GLOBALS['current_language']);
    }
    $html .= '<script src="include/javascript/yui3/build/yui/yui-min.js"></script>';
    $html .= '<script src="cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js"></script>';
    if ($view == 'EditView') {
        $html .= '<script src="modules/AOR_Fields/fieldLines.js"></script>';
        $html .= '<script></script>';
        $html .= "<table border='0' cellspacing='4' width='100%' id='fieldLines'></table>";
        $html .= "<div style='padding-top: 10px; padding-bottom:10px;'>";
        $html .= "<input type=\"button\" tabindex=\"116\" class=\"button\" value=\"" . $mod_strings['LBL_ADD_FIELD'] . "\" id=\"btn_FieldLine\" onclick=\"insertFieldLine()\" disabled/>";
        $html .= "</div>";
        $html .= "<script>";
        $html .= "sort_by_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_sort_operator'], ''))) . "\";";
        $html .= "</script>";
        if (isset($focus->report_module) && $focus->report_module != '') {
            require_once "modules/AOW_WorkFlow/aow_utils.php";
            $html .= "<script>";
            $html .= "report_rel_modules = \"" . trim(preg_replace('/\\s+/', ' ', getModuleRelationships($focus->report_module))) . "\";";
            $html .= "report_module = \"" . $focus->report_module . "\";";
            $html .= "document.getElementById('btn_FieldLine').disabled = '';";
            if ($focus->id != '') {
                $sql = "SELECT id FROM aor_fields WHERE aor_report_id = '" . $focus->id . "' AND deleted = 0 ORDER BY field_order ASC";
                $result = $focus->db->query($sql);
                while ($row = $focus->db->fetchByAssoc($result)) {
                    $field_name = new AOR_Field();
                    $field_name->retrieve($row['id']);
                    $field_name->module_path = unserialize(base64_decode($field_name->module_path));
                    $html .= "report_fields = \"" . trim(preg_replace('/\\s+/', ' ', getModuleFields(getRelatedModule($focus->report_module, $field_name->module_path[0])))) . "\";";
                    $field_item = json_encode($field_name->toArray());
                    $html .= "loadFieldLine(" . $field_item . ");";
                }
            }
            $html .= "report_fields = \"" . trim(preg_replace('/\\s+/', ' ', getModuleFields($focus->report_module))) . "\";";
            $html .= "</script>";
        }
    } else {
        if ($view == 'DetailView') {
            /*$html .= '<script src="include/SugarCharts/Jit/js/sugarCharts.js"></script>';
            
                    $html .= '<script language="javascript" type="text/javascript" src="include/MySugar/javascript/MySugar.js"></script>';
                    $html .= '<script language="javascript" type="text/javascript" src="include/SugarCharts/Jit/js/Jit/jit.js"></script>';
                    $html .= '<script language="javascript" type="text/javascript" src="include/SugarCharts/Jit/js/sugarCharts.js"></script>';
                    $html .= '<script language="javascript" type="text/javascript" src="include/SugarCharts/Jit/js/mySugarCharts.js"></script>';*/
            $html .= $focus->build_group_report(0) . '<br />';
        }
    }
    return $html;
}
コード例 #19
0
function getMessengerTypeOptions($focus, $name = 'messenger_type', $value, $view = 'DetailView')
{
    global $current_user, $app_list_strings;
    if ($view == 'EditView' || $view == 'MassUpdate') {
        $messenger_type = "<select name=\"{$name}\">";
        $messenger_type .= get_select_options_with_id($app_list_strings['messenger_type_dom'], $focus->messenger_type);
        $messenger_type .= '</select>';
        return $messenger_type;
    }
    return $app_list_strings['messenger_type_dom'][$focus->messenger_type];
}
コード例 #20
0
 function get_xtpl_search()
 {
     $searchFor = '';
     if (!empty($_REQUEST[$this->name])) {
         $searchFor = $_REQUEST[$this->name];
     }
     global $app_list_strings;
     $returnXTPL = array();
     $returnXTPL[strtoupper($this->name)] = $searchFor;
     $returnXTPL[strtoupper('options_' . $this->name)] = get_select_options_with_id(add_blank_option($app_list_strings[$this->ext1]), $searchFor);
     return $returnXTPL;
 }
コード例 #21
0
 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $current_user, $mod_strings, $app_list_strings, $sugar_config, $locale, $sugar_version;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $themeObject = SugarThemeRegistry::current();
     $configurator = new Configurator();
     $sugarConfig = SugarConfig::getInstance();
     $focus = Administration::getSettings();
     $ut = $GLOBALS['current_user']->getPreference('ut');
     if (empty($ut)) {
         $this->ss->assign('SKIP_URL', 'index.php?module=Users&action=Wizard&skipwelcome=1');
     } else {
         $this->ss->assign('SKIP_URL', 'index.php?module=Home&action=index');
     }
     // Always mark that we have got past this point
     $focus->saveSetting('system', 'adminwizard', 1);
     $css = $themeObject->getCSS();
     $favicon = $themeObject->getImageURL('sugar_icon.ico', false);
     $this->ss->assign('FAVICON_URL', getJSPath($favicon));
     $this->ss->assign('SUGAR_CSS', $css);
     $this->ss->assign('MOD_USERS', return_module_language($GLOBALS['current_language'], 'Users'));
     $this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="' . SugarThemeRegistry::current()->getCSSURL('wizard.css') . '" />');
     $this->ss->assign('LANGUAGES', get_languages());
     $this->ss->assign('config', $sugar_config);
     $this->ss->assign('SUGAR_VERSION', $sugar_version);
     $this->ss->assign('settings', $focus->settings);
     $this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));
     $this->ss->assign('getNameJs', $locale->getNameJs());
     $this->ss->assign('NAMEFORMATS', $locale->getUsableLocaleNameOptions($sugar_config['name_formats']));
     $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('mail_smtptype', $focus->settings['mail_smtptype']);
     $this->ss->assign('mail_smtpserver', $focus->settings['mail_smtpserver']);
     $this->ss->assign('mail_smtpport', $focus->settings['mail_smtpport']);
     $this->ss->assign('mail_smtpuser', $focus->settings['mail_smtpuser']);
     $this->ss->assign('mail_smtppass', $focus->settings['mail_smtppass']);
     $this->ss->assign('mail_smtpauth_req', $focus->settings['mail_smtpauth_req'] ? "checked='checked'" : '');
     $this->ss->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl']));
     $this->ss->assign('notify_allow_default_outbound_on', !empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] == 2 ? 'CHECKED' : '');
     $this->ss->assign('THEME', SugarThemeRegistry::current()->__toString());
     // get javascript
     ob_start();
     $this->options['show_javascript'] = true;
     $this->renderJavascript();
     $this->options['show_javascript'] = false;
     $this->ss->assign("SUGAR_JS", ob_get_contents() . $themeObject->getJS());
     ob_end_clean();
     $this->ss->assign('langHeader', get_language_header());
     $this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
     $this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
 }
コード例 #22
0
ファイル: LeadFormBase.php プロジェクト: omusico/sugar_work
    function getWideFormBody($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;
        global $app_list_strings;
        $primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], '');
        $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_OFFICE_PHONE'];
        $lbl_address = $mod_strings['LBL_PRIMARY_ADDRESS'];
        $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}status" value="New">
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t<table class='evenListRow' border='0' width='100%'><tr><td nowrap cospan='1'>{$lbl_first_name}<br><input name="{$prefix}first_name" type="text" value=""></td><td colspan='1'><FONT class="required">{$lbl_required_symbol}</FONT>&nbsp;{$lbl_last_name}<br><input name='{$prefix}last_name' type="text" value=""></td></tr>
\t\t<tr><td colspan='4'><hr></td></tr>
\t\t<tr><td nowrap colspan='1'>{$mod_strings['LBL_TITLE']}<br><input name='{$prefix}title' type="text" value=""></td><td nowrap colspan='1'>{$mod_strings['LBL_DEPARTMENT']}<br><input name='{$prefix}department' type="text" value=""></td></tr>
\t\t<tr><td colspan='4'><hr></td></tr>
\t\t<tr><td nowrap colspan='4'>{$lbl_address}<br><input type='text' name='{$prefix}primary_address_street' size='80'></td></tr>
\t\t<tr><td> {$mod_strings['LBL_CITY']}<BR><input name='{$prefix}primary_address_city'  maxlength='100' value=''></td><td>{$mod_strings['LBL_STATE']}<BR><input name='{$prefix}primary_address_state'  maxlength='100' value=''></td><td>{$mod_strings['LBL_POSTAL_CODE']}<BR><input name='{$prefix}primary_address_postalcode'  maxlength='100' value=''></td><td>{$mod_strings['LBL_COUNTRY']}<BR><select name='{$prefix}primary_address_country' size='1'>{$primary_address_country_options}</select></td></tr>
\t\t<tr><td colspan='4'><hr></td></tr>
\t\t<tr><td nowrap >{$lbl_phone}<br><input name='{$prefix}phone_work' type="text" value=""></td><td nowrap >{$mod_strings['LBL_MOBILE_PHONE']}<br><input name='{$prefix}phone_mobile' type="text" value=""></td><td nowrap >{$mod_strings['LBL_FAX_PHONE']}<br><input name='{$prefix}phone_fax' type="text" value=""></td><td nowrap >{$mod_strings['LBL_HOME_PHONE']}<br><input name='{$prefix}phone_home' type="text" value=""></td></tr>
\t\t<tr><td colspan='4'><hr></td></tr>
\t\t<tr><td nowrap colspan='1'>{$lbl_email_address}<br><input name='{$prefix}email1' type="text" value=""></td><td nowrap colspan='1'>{$mod_strings['LBL_OTHER_EMAIL_ADDRESS']}<br><input name='{$prefix}email2' type="text" value=""></td></tr>
\t\t<tr><td nowrap colspan='4'>{$mod_strings['LBL_DESCRIPTION']}<br><textarea cols='80' rows='4' name='{$prefix}description' ></textarea></td></tr></table>

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;
    }
コード例 #23
0
function gv_getGVVarNames()
{
    global $current_user, $adb;
    require_once 'modules/PickList/PickListUtils.php';
    $roleid = $current_user->roleid;
    $picklistValues = getAssignedPicklistValues('gvname', $roleid, $adb);
    if (!empty($picklistValues)) {
        foreach ($picklistValues as $order => $pickListValue) {
            $options[$pickListValue] = getTranslatedString($pickListValue, 'GlobalVariable');
        }
    }
    asort($options);
    $options = get_select_options_with_id($options, '--none--');
    return $options;
}
コード例 #24
0
 function display()
 {
     global $mod_strings, $timedate, $app_strings;
     include_once 'modules/Reports/schedule/save_schedule.php';
     $smarty = new Sugar_Smarty();
     $smarty->assign('MOD', $mod_strings);
     $smarty->assign('APP', $app_strings);
     $smarty->assign('PAGE_TITLE', getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_SCHEDULE_EMAIL']), false));
     $smarty->assign('STYLESHEET', SugarThemeRegistry::current()->getCSS());
     $smarty->assign("CALENDAR_LANG", substr($GLOBALS['current_language'], 0, 2));
     $smarty->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
     $smarty->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
     $smarty->assign("RECORD", $_REQUEST['id']);
     $cache_dir = !empty($GLOBALS['sugar_config']['cache_dir']) ? rtrim($GLOBALS['sugar_config']['cache_dir'], '/\\') : 'cache';
     $smarty->assign('CACHE_DIR', $cache_dir);
     $refreshPage = isset($_REQUEST['refreshPage']) ? $_REQUEST['refreshPage'] : "true";
     $smarty->assign("REFRESH_PAGE", $refreshPage);
     $time_interval_select = translate('DROPDOWN_SCHEDULE_INTERVALS', 'Reports');
     $time_format = $timedate->get_user_time_format();
     $smarty->assign("TIME_FORMAT", $time_format);
     $smarty->assign("TIMEDATE_JS", self::getJavascriptValidation());
     require_once 'modules/Reports/schedule/ReportSchedule.php';
     $rs = new ReportSchedule();
     $schedule = $rs->get_report_schedule_for_user($_REQUEST['id']);
     if ($schedule) {
         $smarty->assign('SCHEDULE_ID', $schedule['id']);
         $smarty->assign('DATE_START', $timedate->to_display_date_time($schedule['date_start'], true));
         if ($schedule['active']) {
             $smarty->assign('SCHEDULE_ACTIVE_CHECKED', 'checked');
         }
         $smarty->assign('NEXT_RUN', $timedate->to_display_date_time($schedule['next_run']));
         $smarty->assign('TIME_INTERVAL_SELECT', get_select_options_with_id($time_interval_select, $schedule['time_interval']));
         $smarty->assign('SCHEDULE_TYPE', $schedule['schedule_type']);
     } else {
         $smarty->assign('NEXT_RUN', $mod_strings['LBL_NONE']);
         $smarty->assign('TIME_INTERVAL_SELECT', get_select_options_with_id($time_interval_select, ''));
         if (isset($_REQUEST['schedule_type']) && $_REQUEST['schedule_type'] != "") {
             $smarty->assign('SCHEDULE_TYPE', $_REQUEST['schedule_type']);
         }
     }
     $smarty->assign('CURRENT_LANGUAGE', $GLOBALS['current_language']);
     $smarty->assign('JS_VERSION', $GLOBALS['js_version_key']);
     $smarty->assign('JS_CUSTOM_VERSION', $GLOBALS['sugar_config']['js_custom_version']);
     $smarty->assign('JS_LANGUAGE_VERSION', $GLOBALS['sugar_config']['js_lang_version']);
     //$this->_displayJavascript();
     $html = $smarty->fetch('modules/Reports/tpls/AddSchedule.tpl');
     echo $html;
 }
コード例 #25
0
 function displayOptions()
 {
     global $app_strings;
     $ss = new Sugar_Smarty();
     $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']);
     $ss->assign('countLbl', $this->dashletStrings['LBL_CONFIGURE_COUNT']);
     $ss->assign('containerLbl', $this->dashletStrings['LBL_CONFIGURE_CONTAINER']);
     $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']);
     $ss->assign('title', $this->title);
     $container = ReportContainer::get_category_select_options();
     asort($container);
     $ss->assign('containerSelect', get_select_options_with_id($container, $this->container_id));
     $ss->assign('count', $this->count);
     $ss->assign('id', $this->id);
     return parent::displayOptions() . $ss->fetch('modules/ZuckerReports/Dashlets/ZuckerReportContainerDashlet/ZuckerReportContainerDashletOptions.tpl');
 }
コード例 #26
0
 function displayOptions()
 {
     global $app_strings;
     $seed = new RunnableReport();
     $list = $seed->get_full_list("name", "report_result_type='INLINE'");
     $select = array();
     if (!empty($list)) {
         foreach ($list as $bean) {
             $select[$bean->id] = $bean->get_summary_text();
         }
     }
     asort($select);
     $ss = new Sugar_Smarty();
     $ss->assign('runnableLbl', $this->dashletStrings['LBL_CONFIGURE_RUNNABLE']);
     $ss->assign('runnableSelect', get_select_options_with_id($select, $this->runnable_id));
     $ss->assign('id', $this->id);
     return parent::displayOptions() . $ss->fetch('modules/ZuckerReports/Dashlets/ZuckerReportDisplayDashlet/ZuckerReportDisplayDashletOptions.tpl');
 }
コード例 #27
0
ファイル: TasksQuickCreate.php プロジェクト: MexinaD/SuiteCRM
 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Tasks');
     parent::process();
     $this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['task_priority_dom'], $app_list_strings['task_priority_default']));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['task_status_dom'], $app_list_strings['task_status_default']));
     $this->ss->assign("TIME_FORMAT", '(' . $timedate->get_user_time_format() . ')');
     $focus = new Task();
     $time_start_hour = intval(substr($focus->time_start, 0, 2));
     $time_start_minutes = substr($focus->time_start, 3, 5);
     if ($time_start_minutes > 45) {
         $time_start_hour += 1;
     }
     $time_pref = $timedate->get_time_format();
     if (strpos($time_pref, 'a')) {
         if (!isset($focus->meridiem_am_values)) {
             $focus->meridiem_am_values = array('am' => 'am', 'pm' => 'pm');
         }
         $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_am_values, $time_start_hour < 12 ? 'am' : 'pm'));
     } else {
         if (strpos($time_pref, 'A')) {
             if (!isset($focus->meridiem_AM_values)) {
                 $focus->meridiem_AM_values = array('AM' => 'AM', 'PM' => 'PM');
             }
             $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_AM_values, $time_start_hour < 12 ? 'AM' : 'PM'));
         }
     }
     //if-else
     $this->ss->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
     $this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"tasksQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('tasksQuickCreate');
     $focus = new Task();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
コード例 #28
0
 function process()
 {
     global $current_user, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Quotes');
     parent::process();
     $this->ss->assign("STAGE_OPTIONS", get_select_options_with_id($app_list_strings['quote_stage_dom'], ''));
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"quotesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"quotes\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_quotes\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('quotesQuickCreate');
     $focus = new Quote();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
コード例 #29
0
ファイル: url.php プロジェクト: NALSS/SuiteCRM
function get_body(&$ss, $vardef)
{
    global $app_list_strings;
    //$edit_mod_strings = return_module_language($current_language, 'EditCustomFields');
    //$edit_mod_strings['COLUMN_TITLE_DEFAULT_VALUE'] = $edit_mod_strings['COLUMN_TITLE_URL'];
    $vars = $ss->get_template_vars();
    $fields = $vars['module']->mbvardefs->vardefs['fields'];
    $fieldOptions = array();
    foreach ($fields as $id => $def) {
        $fieldOptions[$id] = $def['name'];
    }
    $ss->assign('fieldOpts', $fieldOptions);
    $link_target = !empty($vardef['link_target']) ? $vardef['link_target'] : '_self';
    $ss->assign('TARGET_OPTIONS', get_select_options_with_id($app_list_strings['link_target_dom'], $link_target));
    $ss->assign('LINK_TARGET', $link_target);
    $ss->assign('LINK_TARGET_LABEL', $app_list_strings['link_target_dom'][$link_target]);
    //_ppd($ss->fetch('modules/DynamicFields/templates/Fields/Forms/url.tpl'));
    return $ss->fetch('modules/DynamicFields/templates/Fields/Forms/url.tpl');
}
コード例 #30
-1
ファイル: util.php プロジェクト: MexinaD/SuiteCRM
/**
 *
 * @package Advanced OpenPortal
 * @copyright SalesAgility Ltd http://www.salesagility.com
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
 * along with this program; if not, see http://www.gnu.org/licenses
 * or write to the Free Software Foundation,Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301  USA
 *
 * @author Salesagility Ltd <*****@*****.**>
 */
function getAOPAssignField($assignField, $value)
{
    global $app_list_strings;
    $roles = get_bean_select_array(true, 'ACLRole', 'name', '', 'name', true);
    if (!file_exists('modules/SecurityGroups/SecurityGroup.php')) {
        unset($app_list_strings['aow_assign_options']['security_group']);
    } else {
        $securityGroups = get_bean_select_array(true, 'SecurityGroup', 'name', '', 'name', true);
    }
    $field = '';
    $field .= "<select type='text' name='{$assignField}" . '[0]' . "' id='{$assignField}" . '[0]' . "' onchange='assign_field_change(\"{$assignField}\")' title='' tabindex='116'>" . get_select_options_with_id($app_list_strings['aow_assign_options'], $value[0]) . "</select>&nbsp;&nbsp;";
    if (!file_exists('modules/SecurityGroups/SecurityGroup.php')) {
        $field .= "<input type='hidden' name='{$assignField}" . '[1]' . "' id='{$assignField}" . '[1]' . "' value=''  />";
    } else {
        $display = 'none';
        if ($value[0] == 'security_group') {
            $display = '';
        }
        $field .= "<select type='text' style='display:{$display}' name='{$assignField}" . '[1]' . "' id='{$assignField}" . '[1]' . "' title='' tabindex='116'>" . get_select_options_with_id($securityGroups, $value[1]) . "</select>&nbsp;&nbsp;";
    }
    $display = 'none';
    if ($value[0] == 'role' || $value[0] == 'security_group') {
        $display = '';
    }
    $field .= "<select type='text' style='display:{$display}' name='{$assignField}" . '[2]' . "' id='{$assignField}" . '[2]' . "' title='' tabindex='116'>" . get_select_options_with_id($roles, $value[2]) . "</select>&nbsp;&nbsp;";
    return $field;
}