diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index d0b017ac..ae6bf901 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -147,6 +147,10 @@ tr.highlight { padding: 0.1em 0.4em !important; } +.smallPaddingContent { + padding: 0.5em; +} + /** subtitles */ div.subTitle { margin: 20px 0px 15px 0px; diff --git a/lam/templates/delete.php b/lam/templates/delete.php index 47b02b4f..33e410cc 100644 --- a/lam/templates/delete.php +++ b/lam/templates/delete.php @@ -77,11 +77,9 @@ if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) { $_SESSION['account'] = new accountContainer($_GET['type'], 'account'); // Show HTML Page include 'main_header.php'; + echo "
"; echo "
\n"; echo "
\n"; - echo "
"; - echo _('Please confirm:'); - echo "
\n"; echo "\n"; echo "" . _("Do you really want to remove the following accounts?") . ""; echo "

\n"; @@ -109,10 +107,18 @@ if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) { } echo "\n"; echo "
\n"; - echo " \n"; - echo "\n"; - echo "
\n"; + echo " \n"; + echo "\n"; echo "
\n"; + echo "
\n"; + ?> + + \n"; echo "
\n"; echo "\n"; - echo "
"; - echo _('Deleting. Please stand by ...'); - echo "
\n"; - + echo "

\n"; + echo "
\n"; + // Delete dns for ($m=0; $m\n"; foreach ($errors as $error) StatusMessage($error[0], $error[1], $error[2]); echo "
\n"; + flush(); } else { echo sprintf(_('Error while deleting DN: %s'), $_SESSION['delete_dn'][$m]) . "
\n"; @@ -230,9 +235,16 @@ if (isset($_POST['delete'])) { } $_SESSION['cache']->refresh_cache(true); echo "
\n"; - echo "
\n"; - echo "
\n"; + echo "
\n"; + echo "\n"; echo "
\n"; + ?> + + server())); + return $errors; } // delete parent DN $success = @ldap_delete($_SESSION['ldap']->server(), $dn); diff --git a/lam/templates/ou_edit.php b/lam/templates/ou_edit.php index cb2b26b2..3f85a976 100644 --- a/lam/templates/ou_edit.php +++ b/lam/templates/ou_edit.php @@ -49,7 +49,7 @@ $types = $_SESSION['config']->get_ActiveTypes(); // check if deletion was canceled if (isset($_POST['abort'])) { - display_main(); + display_main(null, null); exit; } @@ -102,16 +102,25 @@ if (isset($_POST['createOU']) || isset($_POST['deleteOU'])) { if ($sr && $info['count'] == 0) { // print header include 'main_header.php'; - echo "
\n" . - "

" . _("Do you really want to delete this OU?") . " " . "\n" . - "
\n

" . getAbstractDN($_POST['deleteableOU']) . "

\n" . - "
\n" . - "
\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
"; + echo '
'; + echo "
\n"; + $tabindex = 1; + $container = new htmlTable(); + $label = new htmlOutputText(_("Do you really want to delete this OU?")); + $label->colspan = 5; + $container->addElement($label, true); + $container->addElement(new htmlSpacer(null, '10px'), true); + $dnLabel = new htmlOutputText(getAbstractDN($_POST['deleteableOU'])); + $dnLabel->colspan = 5; + $container->addElement($dnLabel, true); + $container->addElement(new htmlSpacer(null, '10px'), true); + $container->addElement(new htmlButton('sure', _("Delete"))); + $container->addElement(new htmlButton('abort', _("Cancel"))); + $container->addElement(new htmlHiddenInput('deleteOU', 'submit')); + $container->addElement(new htmlHiddenInput('deletename', $_POST['deleteableOU'])); + parseHtml(null, $container, array(), false, $tabindex, 'user'); + echo "
"; + echo '
'; include 'main_footer.php'; exit(); } @@ -132,15 +141,22 @@ display_main($message, $error); function display_main($message, $error) { // display main page include 'main_header.php'; - echo "

" . _("OU editor") . "

"; + echo '
'; + echo ("
\n"); + + $tabindex = 1; + $container = new htmlTable(); + $container->addElement(new htmlSubTitle(_("OU editor")), true); if (isset($error)) { - StatusMessage("ERROR", "", $error); + $msg = new htmlStatusMessage("ERROR", "", $error); + $msg->colspan = 5; + $container->addElement($msg, true); } elseif (isset($message)) { - StatusMessage("INFO", "", $message); + $msg = new htmlStatusMessage("INFO", "", $message); + $msg->colspan = 5; + $container->addElement($msg, true); } - echo ("
\n"); - echo ("\n"); $types = array(); $typeList = $_SESSION['config']->get_ActiveTypes(); @@ -148,53 +164,43 @@ function display_main($message, $error) { $types[$typeList[$i]] = getTypeAlias($typeList[$i]); } natcasesort($types); - $options = ""; + $options = array(); foreach ($types as $name => $title) { - $options .= "\n"; + $elements = array(); $units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_Suffix($name)); for ($u = 0; $u < sizeof($units); $u++) { - $options .= "\n"; + $elements[getAbstractDN($units[$u])] = $units[$u]; } - $options .= "\n"; + $options[$title] = $elements; } - - echo ("
" . _("OU editor") . "
\n"); - echo ("\n"); // new OU - echo ("\n"); - echo ("\n"); - echo ("\n"); - echo ("\n"); - echo ""; - echo "\n"; - echo ("\n"); - echo "\n"; - // delete OU - echo ("\n"); - echo ("\n"); - echo ("\n"); - echo ("\n"); - echo ""; - echo "\n"; - echo ("\n"); - echo ("
" . _("New organizational unit") . " \n"); - echo (""; - echo " "; - echo ""; - printHelpLink(getHelp('', '601'), '601'); - echo "
 
" . _("Delete organizational unit") . " \n"); - echo (" "; - echo " "; - echo ""; - printHelpLink(getHelp('', '602'), '602'); - echo "
\n"); - echo ("
\n"); - echo ("
\n"); + $container->addElement(new htmlOutputText(_("New organizational unit"))); + $parentOUSelect = new htmlSelect('parentOU', $options, array()); + $parentOUSelect->setContainsOptgroups(true); + $parentOUSelect->setHasDescriptiveElements(true); + $parentOUSelect->setRightToLeftTextDirection(true); + $parentOUSelect->setSortElements(false); + $container->addElement($parentOUSelect); + $container->addElement(new htmlInputField('newOU')); + $container->addElement(new htmlButton('createOU', _("Ok"))); + $container->addElement(new htmlHelpLink('601'), true); + $container->addElement(new htmlSpacer(null, '10px'), true); + + // delete OU + $container->addElement(new htmlOutputText(_("Delete organizational unit"))); + $deleteableOUSelect = new htmlSelect('deleteableOU', $options, array()); + $deleteableOUSelect->setContainsOptgroups(true); + $deleteableOUSelect->setHasDescriptiveElements(true); + $deleteableOUSelect->setRightToLeftTextDirection(true); + $deleteableOUSelect->setSortElements(false); + $container->addElement($deleteableOUSelect); + $container->addElement(new htmlOutputText('')); + $container->addElement(new htmlButton('deleteOU', _("Ok"))); + $container->addElement(new htmlHelpLink('602'), true); + + parseHtml(null, $container, array(), false, $tabindex, 'user'); echo ("
\n"); + echo '
'; include 'main_footer.php'; } diff --git a/lam/templates/serverInfo.php b/lam/templates/serverInfo.php index c07ed054..aa42befc 100644 --- a/lam/templates/serverInfo.php +++ b/lam/templates/serverInfo.php @@ -85,46 +85,55 @@ if ($result) { } include 'main_header.php'; +echo '
'; +$tabindex = 1; +$container = new htmlTable(); -echo "

" . _("Server information") . "

\n"; +$container->addElement(new htmlSubTitle(_("Server information")), true); -echo "\n"; +$container->addElement(new htmlOutputText('' . _("Managed suffixes") . '', false)); +$container->addElement(new htmlSpacer('20px', null)); +$container->addElement(new htmlOutputText($namingContexts), true); -echo ""; -echo ""; - -echo ""; -echo ""; +$container->addElement(new htmlOutputText('' . _("LDAP version") . '', false)); +$container->addElement(new htmlSpacer('20px', null)); +$container->addElement(new htmlOutputText($supportedldapversion), true); if ($configcontext != '') { - echo ""; - echo ""; + $container->addElement(new htmlOutputText('' . _("Config suffix") . '', false)); + $container->addElement(new htmlSpacer('20px', null)); + $container->addElement(new htmlOutputText($configcontext), true); } -echo ""; -echo ""; +$container->addElement(new htmlOutputText('' . _("Schema suffix") . '', false)); +$container->addElement(new htmlSpacer('20px', null)); +$container->addElement(new htmlOutputText($subschemasubentry), true); if ($dynamicSubtrees != '') { - echo ""; - echo ""; + $container->addElement(new htmlOutputText('' . _("Dynamic subtrees") . '', false)); + $container->addElement(new htmlSpacer('20px', null)); + $container->addElement(new htmlOutputText($dynamicSubtrees), true); } -echo ""; -echo ""; +$container->addElement(new htmlOutputText('' . _("SASL mechanisms") . '', false)); +$container->addElement(new htmlSpacer('20px', null)); +$container->addElement(new htmlOutputText($supportedsaslmechanisms), true); if ($vendorname != '') { - echo ""; - echo ""; + $container->addElement(new htmlOutputText('' . _("Vendor name") . '', false)); + $container->addElement(new htmlSpacer('20px', null)); + $container->addElement(new htmlOutputText($vendorname), true); } if ($vendorversion != '') { - echo ""; - echo ""; + $container->addElement(new htmlOutputText('' . _("Vendor version") . '', false)); + $container->addElement(new htmlSpacer('20px', null)); + $container->addElement(new htmlOutputText($vendorversion), true); } -echo "
" . _("Managed suffixes") . "  " . $namingContexts . "
" . _("LDAP version") . "  " . $supportedldapversion . "
" . _("Config suffix") . "  " . $configcontext . "
" . _("Schema suffix") . "  " . $subschemasubentry . "
" . _("Dynamic subtrees") . "  " . $dynamicSubtrees . "
" . _("SASL mechanisms") . "  " . $supportedsaslmechanisms . "
" . _("Vendor name") . "  " . $vendorname . "
" . _("Vendor version") . "  " . $vendorversion . "
\n"; - +parseHtml(null, $container, array(), true, $tabindex, 'user'); +echo '
'; include 'main_footer.php'; ?>