X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_input.inc;h=5c0cacd163818dde63bb504fb98c88d990357d2e;hb=168c5beaa04a25f31face788f8030c5d08f8e998;hp=1e966a1a72758135e2bd5a06d434e2c0a41b660d;hpb=da774ae85617b051675afe581f413da78febfc0f;p=fa-stable.git diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 1e966a1a..5c0cacd1 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -37,6 +37,7 @@ function find_submit($prefix, $numeric=true) } return $numeric ? -1 : null; } + //------------------------------------------------------------------------------ // // Helper function for simple db table editor pages @@ -112,7 +113,7 @@ function hidden($name, $value=null, $echo=true) 'selector' - ditto with closing current popup editor window 'cancel' - cancel form entry on Escape press; dflt ICON_CANCEL 'process' - displays progress bar during call; optional icon - + 'nonajax' - ditto, non-ajax submit $atype can contain also multiply type selectors separated by space, however make sense only combination of 'process' and one of defualt/selector/cancel */ @@ -141,6 +142,9 @@ function submit($name, $value, $echo=true, $title=false, $atype=false, $icon=fal case 'cancel': if ($icon===false) $icon=ICON_ESCAPE; break; + + case 'nonajax': + $atype = false; } } } @@ -379,7 +383,10 @@ function check_row($label, $name, $value=null, $submit_on_change=false, $title=f } //----------------------------------------------------------------------------------- -function radio($label, $name, $value, $selected, $submit_on_change=false) { +function radio($label, $name, $value, $selected=null, $submit_on_change=false) +{ + if (!isset($selected)) + $selected = get_post($name) == $value; if ($submit_on_change === true) $submit_on_change = @@ -617,8 +624,12 @@ function date_cells($label, $name, $title = null, $check=null, $inc_days=0, } } if ($use_date_picker) + { + $calc_image = (file_exists("$path_to_root/themes/".user_theme()."/images/cal.gif")) ? + "$path_to_root/themes/".user_theme()."/images/cal.gif" : "$path_to_root/themes/default/images/cal.gif"; $post_label = "" - . " "._(\n"; + . " "._(\n"; + } else $post_label = ""; @@ -627,15 +638,15 @@ function date_cells($label, $name, $title = null, $check=null, $inc_days=0, echo ""; - $class = $submit_on_change ? 'class="searchbox"' : ''; + $class = $submit_on_change ? 'date active' : 'date'; $aspect = $check ? 'aspect="cdate"' : ''; if ($check && (get_post($name) != Today())) $aspect .= ' style="color:#FF0000"'; default_focus($name); - - echo "3)?11:10; + echo " $post_label"; echo "\n"; @@ -879,7 +890,7 @@ function inactive_control_cell($id, $value, $table, $key) get_post('Update')) && (check_value('Inactive'.$id) != $value)) { update_record_status($id, !$value, $table, $key); } - echo ''. checkbox(null, $name, $value, true, '', "align='center'") + echo ''. checkbox(null, $name, $value, true, '') . hidden("LInact[$id]", $value, false) . ''; } }