|
|
|
@ -713,8 +713,16 @@ function toggle_type()
|
|
|
|
|
function output_user_dropdown($catId, $selectId, $userArray) {
|
|
|
|
|
global $hesklang;
|
|
|
|
|
|
|
|
|
|
if (!hesk_checkPermission('can_set_manager', 0)) {
|
|
|
|
|
foreach ($userArray as $user) {
|
|
|
|
|
if ($user['id'] == $selectId) {
|
|
|
|
|
return '<p>'.$user['name'].'</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return '<p>'.$hesklang['no_manager'].'</p>';
|
|
|
|
|
} else {
|
|
|
|
|
$dropdownMarkup = '<select class="form-control input-sm" name="managerid">
|
|
|
|
|
<option value="0">'.$hesklang['select'].'</option>';
|
|
|
|
|
<option value="0">'.$hesklang['no_manager'].'</option>';
|
|
|
|
|
foreach ($userArray as $user) {
|
|
|
|
|
$select = $selectId == $user['id'] ? 'selected' : '';
|
|
|
|
|
$dropdownMarkup .= '<option value="'.$user['id'].'" '.$select.'>'.$user['name'].'</option>';
|
|
|
|
@ -728,6 +736,7 @@ function output_user_dropdown($catId, $selectId, $userArray) {
|
|
|
|
|
'.$dropdownMarkup.'
|
|
|
|
|
</form>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function change_manager() {
|
|
|
|
|
global $hesklang, $hesk_settings;
|
|
|
|
|