From c2f2b28297b0355051ca2508fc7778438f5c6a3d Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Mon, 3 Aug 2009 21:21:41 +0000 Subject: [PATCH] Clone record support and fixed defult focus on some controls. --- includes/ui/ui_input.inc | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 558460e5..483a8851 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -47,11 +47,12 @@ function simple_page_mode($numeric_id = true) $default = $numeric_id ? -1 : ''; $selected_id = get_post('selected_id', $default); - foreach (array('ADD_ITEM', 'UPDATE_ITEM', 'RESET') as $m) { + foreach (array('ADD_ITEM', 'UPDATE_ITEM', 'RESET', 'CLONE') as $m) { if (isset($_POST[$m])) { $Ajax->activate('_page_body'); - if ($m == 'RESET') + if ($m == 'RESET' || $m == 'CLONE') $selected_id = $default; + unset($_POST['_focus']); $Mode = $m; return; } } @@ -135,7 +136,6 @@ function submit($name, $value, $echo=true, $title=false, $atype=false, $icon=fal " aspect='fallback'" : " style='display:none;'"; break; } - default_focus($name); $submit_str = "