X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_input.inc;h=bdb7e94545bba833171ea38d60b22a969facea16;hb=5ac9ea61baac0cf298b07317051da51e781645b7;hp=0d4d0bfebfdebca788e2111a6086e6b7e7eed94a;hpb=d1babda7c01b314d35fb89f2d195553b55936532;p=fa-stable.git diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 0d4d0bfe..bdb7e945 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -202,6 +202,7 @@ function submit_center_last($name, $value, $title=false, $async=false, $icon=fal /* For following controls: 'both' - use both Ctrl-Enter and Escape hotkeys + 'upgrade' - use Ctrl-Enter with progress ajax indicator and Escape hotkeys. Nonajax request for OK option is performed. 'cancel' - apply to 'RESET' button */ function submit_add_or_update($add=true, $title=false, $async=false, $clone=false) @@ -210,7 +211,10 @@ function submit_add_or_update($add=true, $title=false, $async=false, $clone=fals if ($async === 'both') { $async = 'default'; $cancel = 'cancel'; - } + } + elseif ($async === 'upgrade') { + $async = 'default nonajax process'; $cancel = 'cancel'; + } else if ($async === 'default') $cancel = true; else if ($async === 'cancel') @@ -500,6 +504,16 @@ function label_row($label, $value, $params="", $params2="", $leftfill=0, $id=nul echo "\n"; } +function text_input($name, $value=null, $size='', $max='', $title='', $params='') +{ + if ($value === null) + $value = get_post($name); + + return ""; +} + //----------------------------------------------------------------------------------- function text_cells($label, $name, $value=null, $size="", $max="", $title=false, @@ -512,11 +526,7 @@ function text_cells($label, $name, $value=null, $size="", $max="", $title=false, label_cell($label, $labparams); echo ""; - if ($value === null) - $value = get_post($name); - echo ""; + echo text_input($name, $value, $size, $max, $title, $inparams); if ($post_label != "") echo " " . $post_label;