moved suffix option from main module to profile page
This commit is contained in:
parent
df8aa61bcd
commit
a7862e4dab
|
@ -283,23 +283,6 @@ class main extends baseModule {
|
|||
return $return;
|
||||
}
|
||||
|
||||
function get_profileOptions() {
|
||||
$return = array();
|
||||
$suffixes = array();
|
||||
// get root suffix
|
||||
$rootsuffix = call_user_func(array($_SESSION['config'], 'get_' . ucfirst($_SESSION[$this->base]->type) . 'Suffix'));
|
||||
// get subsuffixes
|
||||
foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) {
|
||||
$suffixes[] = $suffix;
|
||||
}
|
||||
$return[] = array(
|
||||
0 => array('kind' => 'text', 'text' => _('Suffix') . ': '),
|
||||
1 => array('kind' => 'select', 'name' => 'main_suffix', 'options' => $suffixes, 'option_selected' => array($rootsuffix)),
|
||||
2 => array('kind' => 'help', 'value' => 'TODO')
|
||||
);
|
||||
return $return;
|
||||
}
|
||||
|
||||
function get_pdfFields($account_type="user") {
|
||||
return array( 'dn');
|
||||
}
|
||||
|
|
|
@ -75,6 +75,24 @@ if ($_GET['edit']) {
|
|||
// display formular
|
||||
echo ("<form action=\"profilecreate.php?type=$type\" method=\"post\">\n");
|
||||
|
||||
// suffix box
|
||||
// get root suffix
|
||||
$rootsuffix = call_user_func(array($_SESSION['config'], 'get_' . ucfirst($type) . 'Suffix'));
|
||||
// get subsuffixes
|
||||
$suffixes = array();
|
||||
foreach ($_SESSION['ldap']->search_units($rootsuffix) as $suffix) {
|
||||
$suffixes[] = $suffix;
|
||||
}
|
||||
if (sizeof($suffixes) > 0) {
|
||||
echo "<fieldset>\n<legend><b>" . _("LDAP suffix") . "</b></legend>\n";
|
||||
echo _("LDAP suffix") . ": ";
|
||||
echo "<select>";
|
||||
for ($i = 0; $i < sizeof($suffixes); $i++) echo "<option>" . $suffixes[$i] . "</option>\n";
|
||||
echo "</select>\n";
|
||||
echo " <a href=../help.php?HelpNumber=TODO>" . _('Help') . "</a>\n";
|
||||
echo "</fieldset>\n<br>\n";
|
||||
}
|
||||
|
||||
// display module options
|
||||
$modules = array_keys($options);
|
||||
for ($m = 0; $m < sizeof($modules); $m++) {
|
||||
|
|
Loading…
Reference in New Issue