/** * @since version 0.84 (before in entitydata.class) * * @param $entity Entity object **/ static function showAdvancedOptions(Entity $entity) { global $DB; $con_spotted = false; $ID = $entity->getField('id'); if (!$entity->can($ID, READ)) { return false; } // Entity right applied (could be User::UPDATEAUTHENT) $canedit = $entity->can($ID, UPDATE); if ($canedit) { echo "<form method='post' name=form action='" . Toolbox::getItemTypeFormURL(__CLASS__) . "'>"; } echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='2'>" . __('Values for the generic rules for assignment to entities') . "</th></tr>"; echo "<tr class='tab_bg_1'><td colspan='2' class='center'>" . __('These parameters are used as actions in generic rules for assignment to entities') . "</td></tr>"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Information in inventory tool (TAG) representing the entity') . "</td>"; echo "<td>"; Html::autocompletionTextField($entity, "tag", array('size' => 100)); echo "</td></tr>"; if (Toolbox::canUseLdap()) { echo "<tr class='tab_bg_1'>"; echo "<td>" . __('LDAP directory information attribute representing the entity') . "</td>"; echo "<td>"; Html::autocompletionTextField($entity, "ldap_dn", array('size' => 100)); echo "</td></tr>"; } echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Mail domain surrogates entity') . "</td>"; echo "<td>"; Html::autocompletionTextField($entity, "mail_domain", array('size' => 100)); echo "</td></tr>"; if (Toolbox::canUseLdap()) { echo "<tr><th colspan='2'>" . __('Values used in the interface to search users from a LDAP directory') . "</th></tr>"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('LDAP directory of an entity') . "</td>"; echo "<td>"; AuthLDAP::dropdown(array('value' => $entity->fields['authldaps_id'], 'emptylabel' => __('Default server'), 'condition' => "`is_active` = '1'")); echo "</td></tr>"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('LDAP filter associated to the entity (if necessary)') . "</td>"; echo "<td>"; Html::autocompletionTextField($entity, 'entity_ldapfilter', array('size' => 100)); echo "</td></tr>"; } if ($canedit) { echo "<tr>"; echo "<td class='tab_bg_2 center' colspan='2'>"; echo "<input type='hidden' name='id' value='" . $entity->fields["id"] . "'>"; echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>"; echo "</td></tr>"; echo "</table>"; Html::closeForm(); } else { echo "</table>"; } }
You should have received a copy of the GNU General Public License along with GLPI. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ /** @file * @brief */ $AJAX_INCLUDE = 1; include '../inc/includes.php'; header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); Session::checkRight('user', User::UPDATEAUTHENT); if ($_POST["authtype"] > 0) { $name = 'massiveaction'; if (isset($_POST['name'])) { $name = $_POST['name']; } switch ($_POST["authtype"]) { case Auth::DB_GLPI: echo "<input type='hidden' name='auths_id' value='0'>"; break; case Auth::LDAP: case Auth::EXTERNAL: AuthLDAP::dropdown(array('name' => "auths_id", 'condition' => "`is_active` = 1")); break; case Auth::MAIL: AuthMail::dropdown(array('name' => "auths_id", 'condition' => "`is_active` = 1")); break; } echo " <input type='submit' name='{$name}' class='submit' value=\"" . _sx('button', 'Post') . "\">"; }