/**
  * Print the config form for restrictions
  *
  * @return Nothing (display)
  **/
 function showFormAuthentication()
 {
     global $DB, $CFG_GLPI;
     if (!Config::canUpdate()) {
         return false;
     }
     echo "<form name='form' action=\"" . Toolbox::getItemTypeFormURL(__CLASS__) . "\" method='post'>";
     echo "<div class='center' id='tabsbody'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>" . __('Authentication') . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td width='30%'>" . __('Automatically add users from an external authentication source') . "</td><td width='20%'>";
     Dropdown::showYesNo("is_users_auto_add", $CFG_GLPI["is_users_auto_add"]);
     echo "</td><td width='30%'>" . __('Add a user without accreditation from a LDAP directory') . "</td><td width='20%'>";
     Dropdown::showYesNo("use_noright_users_add", $CFG_GLPI["use_noright_users_add"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . __('Action when a user is deleted from the LDAP directory') . "</td><td>";
     AuthLDap::dropdownUserDeletedActions($CFG_GLPI["user_deleted_ldap"]);
     echo "</td><td> " . __('GLPI server time zone') . "</td><td>";
     Dropdown::showGMT("time_offset", $CFG_GLPI["time_offset"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td colspan='4' class='center'>";
     echo "<input type='submit' name='update_auth' class='submit' value=\"" . _sx('button', 'Save') . "\">";
     echo "</td></tr>";
     echo "</table></div>";
     Html::closeForm();
 }
Example #2
0
 /**
  * Print the config form for restrictions
  *
  * @return Nothing (display)
  **/
 function showFormAuthentication()
 {
     global $DB, $LANG, $CFG_GLPI;
     if (!haveRight("config", "w")) {
         return false;
     }
     echo "<form name='form' action=\"" . getItemTypeFormURL(__CLASS__) . "\" method='post'>";
     echo "<div class='center' id='tabsbody'>";
     echo "<input type='hidden' name='id' value='" . $CFG_GLPI["id"] . "'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>" . $LANG['login'][10] . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . $LANG['setup'][124] . "&nbsp;:</td><td>";
     Dropdown::showYesNo("is_users_auto_add", $CFG_GLPI["is_users_auto_add"]);
     echo "</td><td> " . $LANG['setup'][613] . "&nbsp;:</td><td>";
     Dropdown::showYesNo("use_noright_users_add", $CFG_GLPI["use_noright_users_add"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . $LANG['ldap'][45] . "&nbsp;:</td><td>";
     AuthLDap::dropdownUserDeletedActions($CFG_GLPI["user_deleted_ldap"]);
     echo "</td><td> " . $LANG['setup'][186] . "&nbsp;:</td><td>";
     Dropdown::showGMT("time_offset", $CFG_GLPI["time_offset"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td colspan='4' class='center'>";
     echo "<input type='submit' name='update_auth' class='submit' value=\"" . $LANG['buttons'][2] . "\">";
     echo "</td></tr>";
     echo "</table></div>";
     echo "</form>";
 }