From ccf0f96c76bd9c1b7ac829391dde0e33f2ac5902 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jun 2011 20:21:25 +0000 Subject: [PATCH] Preselect model if there is only one. This save 2 clicks. --- ChangeLog | 3 ++- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f2b4faa7b9..c871d62e7bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,7 +20,8 @@ For users: - When creating a contract, sales representative are preset to user. This save 4 clicks. - Can edit several fields in bank transaction line page into one update. - - Creation of contacts from third party page go back to third party. + - Creation of contacts from third party page go back to third party. + - Preselect model if there is only one. This save 2 clicks. - New: Enhance donation module. Add a status "canceled". - New: Add filters on statistics page reports. - New: Usage of Jquery Notify to show result or error messages on action. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c1f1c17335e..d30f3a70daf 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3141,7 +3141,7 @@ class Form if (is_array($array)) { - while (list($key, $value) = each ($array)) + foreach($array as $key => $value) { $out.='