Preselect model if there is only one. This save 2 clicks.
This commit is contained in:
parent
e540dd5aef
commit
ccf0f96c76
@ -21,6 +21,7 @@ For users:
|
|||||||
4 clicks.
|
4 clicks.
|
||||||
- Can edit several fields in bank transaction line page into one update.
|
- 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: Enhance donation module. Add a status "canceled".
|
||||||
- New: Add filters on statistics page reports.
|
- New: Add filters on statistics page reports.
|
||||||
- New: Usage of Jquery Notify to show result or error messages on action.
|
- New: Usage of Jquery Notify to show result or error messages on action.
|
||||||
|
|||||||
@ -3141,7 +3141,7 @@ class Form
|
|||||||
|
|
||||||
if (is_array($array))
|
if (is_array($array))
|
||||||
{
|
{
|
||||||
while (list($key, $value) = each ($array))
|
foreach($array as $key => $value)
|
||||||
{
|
{
|
||||||
$out.='<option value="'.($value_as_key?$value:$key).'"';
|
$out.='<option value="'.($value_as_key?$value:$key).'"';
|
||||||
// Si il faut pre-selectionner une valeur
|
// Si il faut pre-selectionner une valeur
|
||||||
|
|||||||
@ -363,6 +363,11 @@ class FormFile
|
|||||||
{
|
{
|
||||||
print '<td align="center" class="formdoc">';
|
print '<td align="center" class="formdoc">';
|
||||||
print $langs->trans('Model').' ';
|
print $langs->trans('Model').' ';
|
||||||
|
if (is_array($modellist) && sizeof($modellist) == 1) // If there is only one element
|
||||||
|
{
|
||||||
|
$arraykeys=array_keys($modellist);
|
||||||
|
$modelselected=$arraykeys[0];
|
||||||
|
}
|
||||||
print $html->selectarray('model',$modellist,$modelselected,$showempty,0,0);
|
print $html->selectarray('model',$modellist,$modelselected,$showempty,0,0);
|
||||||
if (sizeof($cgvlist) > 0)
|
if (sizeof($cgvlist) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user