Merge pull request #2119 from owncloud/fix_ldap_settings
LDAP: fix settings output thus make settings work again
This commit is contained in:
commit
d9a0d1d23b
|
@ -42,17 +42,7 @@ OCP\Util::addstyle('user_ldap', 'settings');
|
|||
$tmpl = new OCP\Template('user_ldap', 'settings');
|
||||
|
||||
$prefixes = \OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes();
|
||||
$scoHtml = '';
|
||||
$i = 1;
|
||||
$sel = ' selected';
|
||||
foreach($prefixes as $prefix) {
|
||||
$scoHtml .= '<option value="'.$prefix.'"'.$sel.'>'.$i++.'. Server</option>';
|
||||
$sel = '';
|
||||
}
|
||||
if(count($prefixes) == 0) {
|
||||
$scoHtml .= '<option value="" selected>1. Server</option>';
|
||||
}
|
||||
$tmpl->assign('serverConfigurationOptions', $scoHtml);
|
||||
$tmpl->assign('serverConfigurationPrefixes', $prefixes);
|
||||
|
||||
// assign default values
|
||||
if(!isset($ldap)) {
|
||||
|
|
|
@ -14,7 +14,20 @@
|
|||
<fieldset id="ldapSettings-1">
|
||||
<p><label for="ldap_serverconfig_chooser"><?php p($l->t('Server configuration'));?></label>
|
||||
<select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
|
||||
<?php p($_['serverConfigurationOptions']); ?>
|
||||
<?php if(count($_['serverConfigurationPrefixes']) == 0 ) {
|
||||
?>
|
||||
<option value="" selected>1. Server</option>');
|
||||
<?php
|
||||
} else {
|
||||
$i = 1;
|
||||
$sel = ' selected';
|
||||
foreach($_['serverConfigurationPrefixes'] as $prefix) {
|
||||
?>
|
||||
<option value="<?php p($prefix); ?>"<?php p($sel); ?>><?php p($i++); ?>. Server</option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="NEW"><?php p($l->t('Add Server Configuration'));?></option>
|
||||
</select>
|
||||
<button id="ldap_action_delete_configuration"
|
||||
|
|
Loading…
Reference in New Issue