}
if ($opts['sel_hint'] === null)
$opts['sel_hint'] = $by_id || $search_box==false ?
- '' : _('Press Space tab for search pattern entry');
+ '' : _('Press Space tab for search pattern entry');
if ($opts['box_hint'] === null)
$opts['box_hint'] = $search_box ?
$limit = '';
if (isset($_POST[$select_submit])) {
+
+ if ($by_id) $txt = $_POST[$name];
+
if (!$opts['async'])
$Ajax->activate('_page_body');
else
$rel = "rel='$search_box'"; // set relation to list
if ($opts['search_submit']) {
- // if selected from list - set focus on next field
+
if (isset($_POST[$search_submit])) {
$Ajax->activate($name);
}
if ($txt == '') {
if ($spec_option === false)
- $limit = ' LIMIT 1';
+ $limit = ' LIMIT 1';
else
- $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'";
+ $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'";
}
else
if ($txt != '*') {
foreach($opts['search'] as $i=> $s)
$opts['search'][$i] = $s . " LIKE '%{$txt}%'";
- $opts['where'][] = '('. implode($opts['search'], ' OR ') . ')';
+ $opts['where'][] = '('. implode($opts['search'], ' OR ') . ')';
}
}
}
$selector = $first_opt = '';
$first_id = false;
$found = false;
-//if($name=='code_id') display_error($sql);
+//if($name=='SelectStockFromList') display_error($sql);
if($result = db_query($sql)) {
while ($contact_row = db_fetch($result)) {
$value = $contact_row[0];
if ($label != null)
echo "<td>$label</td>\n";
$str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
- array('cells'=>true));
+ array('cells'=>true));
return $str;
}
/*