👌 Update LDAP selection flip

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
mathieu.brunot 2020-01-08 23:23:40 +01:00
parent b4b5673cf1
commit 66ff3426e0
No known key found for this signature in database
GPG Key ID: 81584BEAF692D7E0

View File

@ -17,9 +17,11 @@
function ldapSelection() { function ldapSelection() {
if (document.getElementById('ldap').checked) { if (document.getElementById('ldap').checked) {
document.getElementById('ldap_openldap_fields').style.display = 'block'; document.getElementById('ldap_openldap_fields').style.display = 'block';
document.getElementById('ldap_openldap_group_filters').style.display = 'block';
document.getElementById('ldap_ad_fields').style.display = 'none'; document.getElementById('ldap_ad_fields').style.display = 'none';
} else { } else {
document.getElementById('ldap_openldap_fields').style.display = 'none'; document.getElementById('ldap_openldap_fields').style.display = 'none';
document.getElementById('ldap_openldap_group_filters').style.display = 'none';
document.getElementById('ldap_ad_fields').style.display = 'block'; document.getElementById('ldap_ad_fields').style.display = 'block';
} }
} }
@ -141,6 +143,7 @@
<input type="text" class="form-control" name="ldap_filter_username" id="ldap_filter_username" placeholder="e.g. uid" data-error="Please input field for username filtering" value="{{ SETTING.get('ldap_filter_username') }}"> <input type="text" class="form-control" name="ldap_filter_username" id="ldap_filter_username" placeholder="e.g. uid" data-error="Please input field for username filtering" value="{{ SETTING.get('ldap_filter_username') }}">
<span class="help-block with-errors"></span> <span class="help-block with-errors"></span>
</div> </div>
<div id="ldap_openldap_fields">
<div class="form-group"> <div class="form-group">
<label for="ldap_filter_group">Group filter</label> <label for="ldap_filter_group">Group filter</label>
<input type="text" class="form-control" name="ldap_filter_group" id="ldap_filter_group" placeholder="e.g. (objectclass=groupOfNames)" data-error="Please input LDAP filter" value="{{ SETTING.get('ldap_filter_group') }}"> <input type="text" class="form-control" name="ldap_filter_group" id="ldap_filter_group" placeholder="e.g. (objectclass=groupOfNames)" data-error="Please input LDAP filter" value="{{ SETTING.get('ldap_filter_group') }}">
@ -151,6 +154,7 @@
<input type="text" class="form-control" name="ldap_filter_groupname" id="ldap_filter_groupname" placeholder="e.g. member" data-error="Please input field for group name filtering" value="{{ SETTING.get('ldap_filter_groupname') }}"> <input type="text" class="form-control" name="ldap_filter_groupname" id="ldap_filter_groupname" placeholder="e.g. member" data-error="Please input field for group name filtering" value="{{ SETTING.get('ldap_filter_groupname') }}">
<span class="help-block with-errors"></span> <span class="help-block with-errors"></span>
</div> </div>
</div>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>GROUP SECURITY</legend> <legend>GROUP SECURITY</legend>