From a7862e4dab148da82b204cffb1828e7130a35124 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 27 Jun 2004 18:07:43 +0000 Subject: [PATCH] moved suffix option from main module to profile page --- lam/lib/modules/main.inc | 17 ----------------- lam/templates/profedit/profilepage.php | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lam/lib/modules/main.inc b/lam/lib/modules/main.inc index 16fab00e..55c3c6f7 100644 --- a/lam/lib/modules/main.inc +++ b/lam/lib/modules/main.inc @@ -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'); } diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index 03e1954b..76ca172e 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -75,6 +75,24 @@ if ($_GET['edit']) { // display formular echo ("
\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 "
\n" . _("LDAP suffix") . "\n"; + echo _("LDAP suffix") . ":  "; + echo "\n"; + echo "  " . _('Help') . "\n"; +echo "
\n
\n"; +} + // display module options $modules = array_keys($options); for ($m = 0; $m < sizeof($modules); $m++) {