Skip to content

Commit

Permalink
Fix preselected email not done
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 23, 2017
1 parent c89e2eb commit 3a400c4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions htdocs/core/class/html.formmail.class.php
Expand Up @@ -528,7 +528,12 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
{
$tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true);
}
$out.= $form->multiselectarray("receiver", $tmparray, GETPOST("receiver"), null, null, 'inline-block minwidth500', null, "");
$withtoselected=GETPOST("receiver"); // Array of selected value
if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action') == 'presend')
{
$withtoselected = array_keys($tmparray);
}
$out.= $form->multiselectarray("receiver", $tmparray, $withtoselected, null, null, 'inline-block minwidth500', null, "");
}
}
$out.= "</td></tr>\n";
Expand Down Expand Up @@ -556,7 +561,8 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
{
$tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true);
}
$out.= $form->multiselectarray("receivercc", $tmparray, GETPOST("receivercc"), null, null, 'inline-block minwidth500',null, "");
$withtoccselected=GETPOST("receivercc"); // Array of selected value
$out.= $form->multiselectarray("receivercc", $tmparray, $withtoccselected, null, null, 'inline-block minwidth500',null, "");
}
}
$out.= "</td></tr>\n";
Expand Down Expand Up @@ -584,8 +590,8 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
{
$tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true);
}
//$out.= $form->selectarray("receiverccc", $this->withtoccc, GETPOST("receiverccc"), 1);
$out.= $form->multiselectarray("receiverccc", $tmparray, GETPOST("receiverccc"), null, null, null,null, "90%");
$withtocccselected=GETPOST("receiverccc"); // Array of selected value
$out.= $form->multiselectarray("receiverccc", $tmparray, $withtocccselected, null, null, null,null, "90%");
}
}

Expand Down

0 comments on commit 3a400c4

Please sign in to comment.