X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=d6e77f17bd31e7a1f8f7579ef175a70454af868b;hb=9e60b200d22656e6d9d795c36d78f8ac9de7c47b;hp=1c08e25cf399a2b80933eb88fcc2f1c335d58105;hpb=72af4496f87c438dc85a0a7573d36b7bd9e49624;p=fa-stable.git diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index 1c08e25c..d6e77f17 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -1,2225 +1,2318 @@ . +***********************************************************************/ include_once($path_to_root . "/includes/banking.inc"); -include_once($path_to_root . "/includes/reserved.inc"); include_once($path_to_root . "/includes/types.inc"); +include_once($path_to_root . "/includes/current_user.inc"); + +$_search_button = " "; + +$_select_button = " "; + +$all_items = ALL_TEXT; + +//---------------------------------------------------------------------------- +// Universal sql combo generator +// $sql must return selector values and selector texts in columns 0 & 1 +// Options are merged with defaults. + +function combo_input($name, $selected_id, $sql, $valfield, $namefield, + $options=null) +{ +global $Ajax; + +$opts = array( // default options + 'where'=> array(), // additional constraints + 'order' => $namefield, // list sort order + // special option parameters + 'spec_option'=>false, // option text or false + 'spec_id' => 0, // option id + // submit on select parameters + 'default' => '', // default value when $_POST is not set + 'multi' => false, // multiple select + 'select_submit' => false, //submit on select: true/false + 'async' => true, // select update via ajax (true) vs _page_body reload + // search box parameters + 'sel_hint' => null, + 'search_box' => false, // name or true/false + 'type' => 0, // type of extended selector: + // 0 - with (optional) visible search box, search by id + // 1 - with hidden search box, search by option text + // 2 - TODO reverse: box with hidden selector available via enter; this + // would be convenient for optional ad hoc adding of new item + 'search_submit' => true, //search submit button: true/false + 'size' => 8, // size and max of box tag + 'max' => 50, + 'height' => false, // number of lines in select box + 'cells' => false, // combo displayed as 2
'.print_r($_POST, true).'