projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
company_path() helper used.
[fa-stable.git]
/
includes
/
ui
/
ui_lists.inc
diff --git
a/includes/ui/ui_lists.inc
b/includes/ui/ui_lists.inc
index ca241361091c984b52ba9aab86e01998a43e4fea..72d2dd9c261f422a0be830b88780a9c4150ca64e 100644
(file)
--- a/
includes/ui/ui_lists.inc
+++ b/
includes/ui/ui_lists.inc
@@
-181,7
+181,8
@@
$opts = array( // default options
if (get_post($search_button) && ($txt == $value)) {
$selected_id[] = $value;
}
if (get_post($search_button) && ($txt == $value)) {
$selected_id[] = $value;
}
- if (in_array($value, $selected_id)) {
+
+ if (in_array((string)$value, $selected_id, true)) {
$sel = 'selected';
$found = $value;
$edit = $opts['editable'] && $contact_row['editable']
$sel = 'selected';
$found = $value;
$edit = $opts['editable'] && $contact_row['editable']
@@
-343,7
+344,7
@@
$opts = array( // default options
//if($name=='SelectStockFromList') display_error($sql);
foreach($items as $value=>$descr) {
$sel = '';
//if($name=='SelectStockFromList') display_error($sql);
foreach($items as $value=>$descr) {
$sel = '';
- if (in_array((string)$value, $selected_id)) {
+ if (in_array((string)$value, $selected_id
, true
)) {
$sel = "selected='selected'";
$found = $value;
}
$sel = "selected='selected'";
$found = $value;
}
@@
-1538,7
+1539,7
@@
function gl_account_types_list($name, $selected_id=null, $all_option=false, $all
return combo_input($name, $selected_id, $sql, 'id', 'name',
array(
return combo_input($name, $selected_id, $sql, 'id', 'name',
array(
- 'order' =>
'class_id', 'id'
,
+ 'order' =>
array('class_id', 'id', 'parent')
,
'spec_option' =>$all_option,
'spec_id' => $all_items
) );
'spec_option' =>$all_option,
'spec_id' => $all_items
) );
@@
-1652,30
+1653,31
@@
function yesno_list_row($label, $name, $selected_id=null, $name_yes="", $name_no
//------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------
-function languages_list($name, $selected_id=null)
+function languages_list($name, $selected_id=null
, $all_option=false
)
{
global $installed_languages;
$items = array();
{
global $installed_languages;
$items = array();
+ if ($all_option)
+ $items[''] = $all_option;
foreach ($installed_languages as $lang)
$items[$lang['code']] = $lang['name'];
foreach ($installed_languages as $lang)
$items[$lang['code']] = $lang['name'];
-
return array_selector($name, $selected_id, $items);
}
return array_selector($name, $selected_id, $items);
}
-function languages_list_cells($label, $name, $selected_id=null)
+function languages_list_cells($label, $name, $selected_id=null
, $all_option=false
)
{
if ($label != null)
echo "<td>$label</td>\n";
echo "<td>";
{
if ($label != null)
echo "<td>$label</td>\n";
echo "<td>";
- echo languages_list($name, $selected_id);
+ echo languages_list($name, $selected_id
, $all_option
);
echo "</td>\n";
}
echo "</td>\n";
}
-function languages_list_row($label, $name, $selected_id=null)
+function languages_list_row($label, $name, $selected_id=null
, $all_option=false
)
{
echo "<tr><td class='label'>$label</td>";
{
echo "<tr><td class='label'>$label</td>";
- languages_list_cells(null, $name, $selected_id);
+ languages_list_cells(null, $name, $selected_id
, $all_option
);
echo "</tr>\n";
}
echo "</tr>\n";
}