X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=3a34efba66bcd3d8a98af592fb9253775691acd6;hb=6989100b74130784a524b1f941b3ae73f30f663a;hp=72abeecb1879f5b9bf20ab0719edbff241fe3a97;hpb=f01281f8a5806f708aa137f6236c3c3112277a0b;p=fa-stable.git diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index 72abeecb..3a34efba 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -330,7 +330,7 @@ $opts = array( // default options if ($spec_option !== false) { // if special option used - add it $first_id = $spec_id; $first_opt = $spec_option; - $sel = $found!==false ? 'selected' : ''; + $sel = $found===false ? 'selected' : ''; $selector = "\n" . $selector; } @@ -1823,7 +1823,8 @@ function systypes_list_cells($label, $name, $value=null, $submit_on_change=false $str = array_selector($name, $value, $systypes_array, array( 'select_submit'=> $submit_on_change, - 'async' => false + 'async' => false, + 'default' => 0 ) ); echo "\n"; @@ -2139,6 +2140,45 @@ function tab_list_row($label, $name, $selected_id=null) echo "\n"; } +//----------------------------------------------------------------------------------------------- + +function tag_list($name, $height, $type, $multi=false, $all=false) +{ + // Get tags + global $path_to_root; + include_once($path_to_root . "/admin/db/tags_db.inc"); + $results = get_tags($type,$all); + + while ($tag = db_fetch($results)) + $tags[$tag['id']] = $tag['name']; + + if (!isset($tags)) { + $tags[''] = _("No ".($all?"":"active ")."tags defined."); + } + return array_selector($name, null, $tags, + array( + 'multi' => $multi, + 'height' => $height, + ) ); +} + +function tag_list_cells($label, $name, $height, $type, $mult=false, $all=false) +{ + if ($label != null) + echo "$label\n"; + echo "\n"; + tag_list($name, $height, $type, $mult, $all); + echo "\n"; + +} + +function tag_list_row($label, $name, $height, $type, $mult=false, $all=false) +{ + echo "\n"; + tag_list_cells($label, $name, $height, $type, $mult, $all); + echo "\n"; +} + //--------------------------------------------------------------------------------------------- // List of sets of active extensions //