Merge branch 'sprint/master_lanzongjun_fixbug' into 'master'
* recover user See merge request easycorp/zentaopms!3872
This commit is contained in:
@@ -1187,21 +1187,18 @@ class user extends control
|
||||
* @param int $contactListID
|
||||
* @param string $dropdownName mailto|whitelist
|
||||
* @param string $oldUsers
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetContactUsers($contactListID, $dropdownName = 'mailto', $oldUsers = '', $extra = '')
|
||||
public function ajaxGetContactUsers($contactListID, $dropdownName = 'mailto', $oldUsers = '')
|
||||
{
|
||||
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
|
||||
$attr = $dropdownName == 'mailto' ? "data-placeholder='{$this->lang->chooseUsersToMail}'" : '';
|
||||
|
||||
$users = $this->user->getPairs('devfirst|nodeleted|noclosed', $list ? $list->userList : '', $this->config->maxCount);
|
||||
if(!empty($extra) && $extra == 'flow') $users = array_merge(array('deptManager' => $this->lang->workflowdatasource->options['deptManager']), $users);
|
||||
if(isset($this->config->user->moreLink)) $this->config->moreLinks[$dropdownName . "[]"] = $this->config->user->moreLink;
|
||||
|
||||
$defaultUsers = empty($contactListID) ? '' : $list->userList . ',' . trim($oldUsers);
|
||||
if($extra == 'flow' && empty($defaultUsers)) $defaultUsers = trim($oldUsers);
|
||||
return print(html::select($dropdownName . "[]", $users, $defaultUsers, "class='form-control chosen' multiple $attr"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user