Merge pull request #77 from jallakim/default-settings

Settings: Default domain table size + LDAP first/selected if both LDAP+Basic
This commit is contained in:
Khanh Ngo
2016-07-06 09:30:56 +07:00
committed by GitHub
4 changed files with 33 additions and 6 deletions

View File

@ -214,14 +214,23 @@
"ordering" : false,
"info" : false,
"autoWidth" : false
});
});
// set up domain list
$("#tbl_domain_list").DataTable({
"paging" : true,
"lengthChange" : true,
"searching" : true,
"ordering" : true,
"info" : false,
"autoWidth" : false
"autoWidth" : false,
{% if default_domain_table_size_setting in ['10','25','50','100'] %}
"lengthMenu": [ [10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]],
{% else %}
"lengthMenu": [ [10, 25, 50, 100, {{ default_domain_table_size_setting }}, -1],
[10, 25, 50, 100, {{ default_domain_table_size_setting }}, "All"]],
{% endif %}
"pageLength": {{ default_domain_table_size_setting }}
});
$(document.body).on('click', '.history-info-button', function() {
var modal = $("#modal_history_info");

View File

@ -63,8 +63,12 @@
<div class="form-group">
<select class="form-control" name="auth_method">
<option value="LOCAL">LOCAL Authentication</option>
<option value="LDAP">LDAP Authentication</option>
</select>
{% if login_ldap_first_setting %}
<option value="LDAP" selected="selected">LDAP Authentication</option>
{% else %}
<option value="LDAP">LDAP Authentication</option>
{% endif %}
</select>
</div>
{% elif ldap_enabled and not basic_enabled %}
<div class="form-group">