/** * Create HTML to display select options in a dropdown list. To be used inside * of a select statement in a form. This method expects the option list to have keys and values. The keys are the ids. The values is an array of the datas * 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_with_id(&$option_list, $selected_key, $advsearch = 'false') { global $log; $log->debug("Entering get_select_options_with_id () method ..."); $log->debug("Exiting get_select_options_with_id method ..."); return get_select_options_with_id_separate_key($option_list, $option_list, $selected_key, $advsearch); }
/** * Create HTML to display select options in a dropdown list. To be used inside * of a select statement in a form. This method expects the option list to have keys and values. The keys are the ids. The values are the display strings. * 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_with_id($option_list, $selected_key) { return get_select_options_with_id_separate_key($option_list, $option_list, $selected_key); }
/** * Returns <option> markup with the contents of Group users * @param array $groups default empty array * @return string HTML options */ function getGroupsWithSelectOptions($groups = array()) { $r = $this->db->query('SELECT id, user_name FROM users WHERE users.is_group = 1 AND deleted = 0', true); if (is_resource($r)) { while ($a = $this->db->fetchByAssoc($r)) { $groups[$a['id']] = $a['user_name']; } } $selectOptions = get_select_options_with_id_separate_key($groups, $groups, $this->group_id); return $selectOptions; }
function addStatusMulti($displayname, $varname, $options) { global $app_strings, $app_list_strings; if (!isset($options['']) && !isset($options['0'])) { $new_options = array(); $new_options[''] = ''; foreach ($options as $key => $value) { $new_options[$key] = $value; } $options = $new_options; } $options = get_select_options_with_id_separate_key($options, $options, '', true); // cn: added "mass_" to the id tag to diffentieate from the status id in StoreQuery $html = '<td scope="row" width="15%">' . $displayname . '</td> <td><select id="mass_' . $varname . '" name="' . $varname . '[]" size="5" MULTIPLE>' . $options . '</select></td>'; return $html; }
unset($domMailBoxType['pick']); unset($domMailBoxType['createcase']); } else { unset($domMailBoxType['bounce']); } $isDuplicate = isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true'; if ($isDuplicate) { $GLOBALS['log']->debug("isDuplicate found - duplicating record of id: " . $focus->id); $origin_id = $focus->id; $focus->id = ""; } $GLOBALS['log']->info("InboundEmail Edit View"); /* End standard EditView setup logic */ /* Start custom setup logic */ // status drop down $status = get_select_options_with_id_separate_key($app_list_strings['user_status_dom'], $app_list_strings['user_status_dom'], $focus->status); // default MAILBOX value if (empty($focus->mailbox)) { $mailbox = 'INBOX'; } else { $mailbox = $focus->mailbox; } // service options breakdown $tls = ''; $notls = ''; $cert = ''; $novalidate_cert = ''; $ssl = ''; if (!empty($focus->service)) { // will always have 2 values: /tls || /notls and /validate-cert || /novalidate-cert $exServ = explode('::', $focus->service);
//Leon bug 20739 $beanListDupDisp = array(); foreach ($beanListDup as $m => $p) { $beanListDupDisp[$m] = isset($app_list_strings['moduleList'][$m]) ? $app_list_strings['moduleList'][$m] : $p; } asort($beanListDupDisp, SORT_STRING); $_SESSION['reassignRecords']['assignedModuleListCache'] = $beanListDup; $_SESSION['reassignRecords']['assignedModuleListCacheDisp'] = $beanListDupDisp; } $selected = array(); if (!empty($_SESSION['reassignRecords']['modules'])) { foreach ($_SESSION['reassignRecords']['modules'] as $key => $mod) { $selected[] = $key; } } echo get_select_options_with_id_separate_key($_SESSION['reassignRecords']['assignedModuleListCacheDisp'], $_SESSION['reassignRecords']['assignedModuleListCacheDisp'], $selected); ?> </select> <BR> </td> </tr> <tr> <td> <?php foreach ($moduleFilters as $modFilter => $fieldArray) { $display = !empty($fieldArray['display_default']) && $fieldArray['display_default'] == true ? "block" : "none"; //Leon bug 20739 $t_mod_strings = return_module_language($GLOBALS['current_language'], $modFilter); echo "<div id=\"reassign_{$modFilter}\" style=\"display:{$display}\">\n"; echo "<h5 style=\"padding-left:0px; margin-bottom:4px;\">{$app_list_strings['moduleList'][$modFilter]} ", " {$mod_strings_users['LBL_REASS_FILTERS']}</h5>\n"; foreach ($fieldArray['fields'] as $meta) {
/** * Create HTML to display select options in a dropdown list. To be used inside * of a select statement in a form. This method expects the option list to have keys and values. The keys are the ids. The values is an array of the datas * 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. */ function get_select_options_with_id(&$option_list, $selected_key, $advsearch = 'false') { global $log; $log->debug("Entering and Exiting get_select_options_with_id (" . print_r($option_list, true) . "," . $selected_key . "," . $advsearch . ") method ..."); return get_select_options_with_id_separate_key($option_list, $option_list, $selected_key, $advsearch); }