コード例 #1
0
    $edit = 1;
}
// Droits sur les utilisateurs retournés
$permType = $edit ? PERM_EDIT : PERM_READ;
// Récupération de la liste des utilisateurs
if ($rdv) {
    $listUsers = $object->loadProfessionnelDeSanteByPref($permType, null, $keywords);
} elseif ($praticiens) {
    $listUsers = $object->loadPraticiens($permType, null, $keywords);
} else {
    $listUsers = $object->loadUsers($permType, null, $keywords);
}
if ($compta) {
    $listUsersCompta = CConsultation::loadPraticiensCompta();
    foreach ($listUsers as $_user) {
        if (!isset($listUsersCompta[$_user->_id])) {
            unset($listUsers[$_user->_id]);
        }
    }
}
$template = $object->getTypedTemplate("autocomplete");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign('matches', $listUsers);
$smarty->assign('field', $field);
$smarty->assign('view_field', $view_field);
$smarty->assign('show_view', $show_view);
$smarty->assign('template', $template);
$smarty->assign('nodebug', true);
$smarty->assign("input", "");
$smarty->display("../../system/templates/inc_field_autocomplete.tpl");