{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2025 Teclib' and contributors. # @licence https://www.gnu.org/licenses/gpl-3.0.html # # --------------------------------------------------------------------- # # LICENSE # # This file is part of GLPI. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # --------------------------------------------------------------------- #} {% extends 'generic_show_form.html.twig' %} {% import 'components/form/fields_macros.html.twig' as fields %} {% block form_fields %} {% if item.isNewItem() %} {% set preconfig_field %} {% set form_url = 'AuthLDAP'|itemtype_form_path ~ '?preconfig=' %} {{ __('Active Directory') }} / {{ __('OpenLDAP') }} / {{ __('Default values') }} {% endset %} {{ fields.htmlField('', preconfig_field, __('Preconfiguration')) }} {{ fields.nullField() }} {% endif %} {{ fields.textField('name', item.fields['name'], __('Name')) }} {{ fields.nullField() }} {{ fields.dropdownYesNo('is_default', item.fields['is_default'], __('Default server')) }} {{ fields.dropdownYesNo('is_active', item.fields['is_active'], __('Active')) }} {{ fields.textField('host', item.fields['host'], __('Server')) }} {{ fields.numberField('port', item.fields['port'], __('Port (default=389)'), {'max': 65535}) }} {{ fields.textareaField('comment', item.fields['comment'], __('Comments')) }} {{ fields.nullField() }} {{ fields.textareaField('condition', item.fields['condition'], __('Connection filter'), { full_width: true, label_class: 'col-xxl-2', input_class: 'col-xxl-10', }) }} {{ fields.textField('basedn', item.fields['basedn'], __('BaseDN'), { full_width: true, label_class: 'col-xxl-2', input_class: 'col-xxl-10', }) }} {{ fields.dropdownYesNo('use_bind', item.fields['use_bind'], __('Use bind'), { helper: __("Indicates whether a simple bind operation should be used during connection to LDAP server. Disabling this behaviour can be required when LDAPS bind is used.") }) }} {{ fields.nullField() }} {{ fields.textField('rootdn', item.fields['rootdn'], __('RootDN (for non anonymous binds)'), { full_width: true, label_class: 'col-xxl-2', input_class: 'col-xxl-10', add_field_class: 'bind_field' ~ (item.fields['use_bind'] == '1' ? '' : ' d-none'), }) }} {{ fields.passwordField('rootdn_passwd', '', __('Password (for non-anonymous binds)'), { full_width: true, label_class: 'col-xxl-2', input_class: 'col-xxl-10', add_field_class: 'bind_field' ~ (item.fields['use_bind'] == '1' ? '' : ' d-none'), clearable: true }) }} {{ fields.textField('login_field', item.fields['login_field'], __('Login field')) }} {{ fields.textField('sync_field', item.fields['sync_field'], __('Synchronization field'), { helper: __('Synchronization field cannot be changed once in use.'), disabled: item.isSyncFieldEnabled() and item.isSyncFieldUsed() }) }} {% for f in hidden_fields %} {% endfor %} {% endblock %}