use new meta HTML classes and new buttons
This commit is contained in:
parent
bb333e477b
commit
70f3f03073
|
@ -147,6 +147,10 @@ tr.highlight {
|
||||||
padding: 0.1em 0.4em !important;
|
padding: 0.1em 0.4em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.smallPaddingContent {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
/** subtitles */
|
/** subtitles */
|
||||||
div.subTitle {
|
div.subTitle {
|
||||||
margin: 20px 0px 15px 0px;
|
margin: 20px 0px 15px 0px;
|
||||||
|
|
|
@ -77,11 +77,9 @@ if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) {
|
||||||
$_SESSION['account'] = new accountContainer($_GET['type'], 'account');
|
$_SESSION['account'] = new accountContainer($_GET['type'], 'account');
|
||||||
// Show HTML Page
|
// Show HTML Page
|
||||||
include 'main_header.php';
|
include 'main_header.php';
|
||||||
|
echo "<div class=\"".$_GET['type']."list-bright smallPaddingContent\">";
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
echo "<form action=\"delete.php\" method=\"post\">\n";
|
echo "<form action=\"delete.php\" method=\"post\">\n";
|
||||||
echo "<fieldset class=\"".$_GET['type']."edit\"><legend><b>";
|
|
||||||
echo _('Please confirm:');
|
|
||||||
echo "</b></legend><br>\n";
|
|
||||||
echo "<input name=\"type\" type=\"hidden\" value=\"" . $_GET['type'] . "\">\n";
|
echo "<input name=\"type\" type=\"hidden\" value=\"" . $_GET['type'] . "\">\n";
|
||||||
echo "<b>" . _("Do you really want to remove the following accounts?") . "</b>";
|
echo "<b>" . _("Do you really want to remove the following accounts?") . "</b>";
|
||||||
echo "<br><br>\n";
|
echo "<br><br>\n";
|
||||||
|
@ -109,10 +107,18 @@ if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) {
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
echo "<input name=\"delete\" type=\"submit\" value=\"" . _('Delete') . "\"> \n";
|
echo "<button class=\"smallPadding\" name=\"delete\" id=\"submitButton\">" . _('Delete') . "</button> \n";
|
||||||
echo "<input name=\"cancel\" type=\"submit\" value=\"" . _('Cancel') . "\">\n";
|
echo "<button class=\"smallPadding\" name=\"cancel\" id=\"cancelButton\">" . _('Cancel') . "</button>\n";
|
||||||
echo "</fieldset>\n";
|
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery('#submitButton').button();
|
||||||
|
jQuery('#cancelButton').button();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
include 'main_footer.php';
|
include 'main_footer.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,12 +130,10 @@ if (isset($_POST['cancel'])) {
|
||||||
if (isset($_POST['delete'])) {
|
if (isset($_POST['delete'])) {
|
||||||
// Show HTML Page
|
// Show HTML Page
|
||||||
include 'main_header.php';
|
include 'main_header.php';
|
||||||
echo "<br>\n";
|
|
||||||
echo "<form action=\"delete.php\" method=\"post\">\n";
|
echo "<form action=\"delete.php\" method=\"post\">\n";
|
||||||
echo "<input name=\"type\" type=\"hidden\" value=\"" . $_POST['type'] . "\">\n";
|
echo "<input name=\"type\" type=\"hidden\" value=\"" . $_POST['type'] . "\">\n";
|
||||||
echo "<fieldset class=\"".$_POST['type']."edit\"><legend><b>";
|
echo "<div class=\"".$_POST['type']."list-bright smallPaddingContent\"><br>\n";
|
||||||
echo _('Deleting. Please stand by ...');
|
echo "<br>\n";
|
||||||
echo "</b></legend><br>\n";
|
|
||||||
|
|
||||||
// Delete dns
|
// Delete dns
|
||||||
for ($m=0; $m<count($_SESSION['delete_dn']); $m++) {
|
for ($m=0; $m<count($_SESSION['delete_dn']); $m++) {
|
||||||
|
@ -221,6 +225,7 @@ if (isset($_POST['delete'])) {
|
||||||
echo sprintf(_('Deleted DN: %s'), $_SESSION['delete_dn'][$m]) . "<br>\n";
|
echo sprintf(_('Deleted DN: %s'), $_SESSION['delete_dn'][$m]) . "<br>\n";
|
||||||
foreach ($errors as $error) StatusMessage($error[0], $error[1], $error[2]);
|
foreach ($errors as $error) StatusMessage($error[0], $error[1], $error[2]);
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
|
flush();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo sprintf(_('Error while deleting DN: %s'), $_SESSION['delete_dn'][$m]) . "<br>\n";
|
echo sprintf(_('Error while deleting DN: %s'), $_SESSION['delete_dn'][$m]) . "<br>\n";
|
||||||
|
@ -230,9 +235,16 @@ if (isset($_POST['delete'])) {
|
||||||
}
|
}
|
||||||
$_SESSION['cache']->refresh_cache(true);
|
$_SESSION['cache']->refresh_cache(true);
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
echo "<br><input name=\"cancel\" type=\"submit\" value=\"" . _('Back to list') . "\">\n";
|
echo "<br><button class=\"smallPadding\" name=\"cancel\" id=\"backButton\">" . _('Back to list') . "</button>\n";
|
||||||
echo "</fieldset>\n";
|
echo "</div>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery('#backButton').button();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
include 'main_footer.php';
|
include 'main_footer.php';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -268,6 +280,7 @@ function deleteDN($dn) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errors[] = array ('ERROR', sprintf(_('Was unable to delete DN: %s.'), $dn), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array ('ERROR', sprintf(_('Was unable to delete DN: %s.'), $dn), ldap_error($_SESSION['ldap']->server()));
|
||||||
|
return $errors;
|
||||||
}
|
}
|
||||||
// delete parent DN
|
// delete parent DN
|
||||||
$success = @ldap_delete($_SESSION['ldap']->server(), $dn);
|
$success = @ldap_delete($_SESSION['ldap']->server(), $dn);
|
||||||
|
|
|
@ -49,7 +49,7 @@ $types = $_SESSION['config']->get_ActiveTypes();
|
||||||
|
|
||||||
// check if deletion was canceled
|
// check if deletion was canceled
|
||||||
if (isset($_POST['abort'])) {
|
if (isset($_POST['abort'])) {
|
||||||
display_main();
|
display_main(null, null);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,16 +102,25 @@ if (isset($_POST['createOU']) || isset($_POST['deleteOU'])) {
|
||||||
if ($sr && $info['count'] == 0) {
|
if ($sr && $info['count'] == 0) {
|
||||||
// print header
|
// print header
|
||||||
include 'main_header.php';
|
include 'main_header.php';
|
||||||
echo "<br>\n" .
|
echo '<div class="userlist-bright smallPaddingContent">';
|
||||||
"<p><big><b>" . _("Do you really want to delete this OU?") . " </b></big>" . "\n" .
|
echo "<form action=\"ou_edit.php\" method=\"post\">\n";
|
||||||
"<br>\n<p>" . getAbstractDN($_POST['deleteableOU']) . "</p>\n" .
|
$tabindex = 1;
|
||||||
"<br>\n" .
|
$container = new htmlTable();
|
||||||
"<form action=\"ou_edit.php\" method=\"post\">\n" .
|
$label = new htmlOutputText(_("Do you really want to delete this OU?"));
|
||||||
"<input type=\"hidden\" name=\"deleteOU\" value=\"submit\">\n" .
|
$label->colspan = 5;
|
||||||
"<input type=\"hidden\" name=\"deletename\" value=\"" . $_POST['deleteableOU'] . "\">\n" .
|
$container->addElement($label, true);
|
||||||
"<input type=\"submit\" name=\"sure\" value=\"" . _("Delete") . "\">\n" .
|
$container->addElement(new htmlSpacer(null, '10px'), true);
|
||||||
"<input type=\"submit\" name=\"abort\" value=\"" . _("Cancel") . "\">\n" .
|
$dnLabel = new htmlOutputText(getAbstractDN($_POST['deleteableOU']));
|
||||||
"</form>";
|
$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 "</form>";
|
||||||
|
echo '</div>';
|
||||||
include 'main_footer.php';
|
include 'main_footer.php';
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
@ -132,15 +141,22 @@ display_main($message, $error);
|
||||||
function display_main($message, $error) {
|
function display_main($message, $error) {
|
||||||
// display main page
|
// display main page
|
||||||
include 'main_header.php';
|
include 'main_header.php';
|
||||||
echo "<h1>" . _("OU editor") . "</h1>";
|
echo '<div class="userlist-bright smallPaddingContent">';
|
||||||
|
echo ("<form action=\"ou_edit.php\" method=\"post\">\n");
|
||||||
|
|
||||||
|
$tabindex = 1;
|
||||||
|
$container = new htmlTable();
|
||||||
|
$container->addElement(new htmlSubTitle(_("OU editor")), true);
|
||||||
if (isset($error)) {
|
if (isset($error)) {
|
||||||
StatusMessage("ERROR", "", $error);
|
$msg = new htmlStatusMessage("ERROR", "", $error);
|
||||||
|
$msg->colspan = 5;
|
||||||
|
$container->addElement($msg, true);
|
||||||
}
|
}
|
||||||
elseif (isset($message)) {
|
elseif (isset($message)) {
|
||||||
StatusMessage("INFO", "", $message);
|
$msg = new htmlStatusMessage("INFO", "", $message);
|
||||||
|
$msg->colspan = 5;
|
||||||
|
$container->addElement($msg, true);
|
||||||
}
|
}
|
||||||
echo ("<br>\n");
|
|
||||||
echo ("<form action=\"ou_edit.php\" method=\"post\">\n");
|
|
||||||
|
|
||||||
$types = array();
|
$types = array();
|
||||||
$typeList = $_SESSION['config']->get_ActiveTypes();
|
$typeList = $_SESSION['config']->get_ActiveTypes();
|
||||||
|
@ -148,53 +164,43 @@ function display_main($message, $error) {
|
||||||
$types[$typeList[$i]] = getTypeAlias($typeList[$i]);
|
$types[$typeList[$i]] = getTypeAlias($typeList[$i]);
|
||||||
}
|
}
|
||||||
natcasesort($types);
|
natcasesort($types);
|
||||||
$options = "";
|
$options = array();
|
||||||
foreach ($types as $name => $title) {
|
foreach ($types as $name => $title) {
|
||||||
$options .= "<optgroup label=\"" . $title . "\">\n";
|
$elements = array();
|
||||||
$units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_Suffix($name));
|
$units = $_SESSION['ldap']->search_units($_SESSION["config"]->get_Suffix($name));
|
||||||
for ($u = 0; $u < sizeof($units); $u++) {
|
for ($u = 0; $u < sizeof($units); $u++) {
|
||||||
$options .= "<option value=\"" . $units[$u] . "\">" . getAbstractDN($units[$u]) . "</option>\n";
|
$elements[getAbstractDN($units[$u])] = $units[$u];
|
||||||
}
|
}
|
||||||
$options .= "</optgroup>\n";
|
$options[$title] = $elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ("<fieldset class=\"useredit\"><legend><b>" . _("OU editor") . "</b></legend><br>\n");
|
|
||||||
echo ("<table border=0>\n");
|
|
||||||
// new OU
|
// new OU
|
||||||
echo ("<tr>\n");
|
$container->addElement(new htmlOutputText(_("New organizational unit")));
|
||||||
echo ("<td><b>" . _("New organizational unit") . "</b></td>\n");
|
$parentOUSelect = new htmlSelect('parentOU', $options, array());
|
||||||
echo ("<td> </td>\n");
|
$parentOUSelect->setContainsOptgroups(true);
|
||||||
echo ("<td><select class=\"rightToLeftText\" size=1 name=\"parentOU\">");
|
$parentOUSelect->setHasDescriptiveElements(true);
|
||||||
echo $options;
|
$parentOUSelect->setRightToLeftTextDirection(true);
|
||||||
echo ("</select><td>\n");
|
$parentOUSelect->setSortElements(false);
|
||||||
echo ("<td><input type=text name=\"newOU\"></td>\n");
|
$container->addElement($parentOUSelect);
|
||||||
echo "<td>";
|
$container->addElement(new htmlInputField('newOU'));
|
||||||
echo "<input type=\"submit\" name=\"createOU\" value=\"" . _("Ok") . "\"> ";
|
$container->addElement(new htmlButton('createOU', _("Ok")));
|
||||||
echo "</td>";
|
$container->addElement(new htmlHelpLink('601'), true);
|
||||||
echo "<td>";
|
|
||||||
printHelpLink(getHelp('', '601'), '601');
|
|
||||||
echo "</td>\n";
|
|
||||||
echo ("</tr>\n");
|
|
||||||
echo "<tr><td colspan=5> </td></tr>\n";
|
|
||||||
// delete OU
|
|
||||||
echo ("<tr>\n");
|
|
||||||
echo ("<td><b>" . _("Delete organizational unit") . "</b></td>\n");
|
|
||||||
echo ("<td> </td>\n");
|
|
||||||
echo ("<td><select class=\"rightToLeftText\" size=1 name=\"deleteableOU\">");
|
|
||||||
echo $options;
|
|
||||||
echo ("</select><td>\n");
|
|
||||||
echo ("<td> </td>\n");
|
|
||||||
echo "<td>";
|
|
||||||
echo "<input type=\"submit\" name=\"deleteOU\" value=\"" . _("Ok") . "\"> ";
|
|
||||||
echo "</td>";
|
|
||||||
echo "<td>";
|
|
||||||
printHelpLink(getHelp('', '602'), '602');
|
|
||||||
echo "</td>\n";
|
|
||||||
echo ("</tr>\n");
|
|
||||||
echo ("</table>\n");
|
|
||||||
echo ("</fieldset>\n");
|
|
||||||
echo ("<br>\n");
|
|
||||||
|
|
||||||
|
$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 ("</form>\n");
|
echo ("</form>\n");
|
||||||
|
echo '</div>';
|
||||||
include 'main_footer.php';
|
include 'main_footer.php';
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,46 +85,55 @@ if ($result) {
|
||||||
}
|
}
|
||||||
|
|
||||||
include 'main_header.php';
|
include 'main_header.php';
|
||||||
|
echo '<div class="userlist-bright smallPaddingContent">';
|
||||||
|
$tabindex = 1;
|
||||||
|
$container = new htmlTable();
|
||||||
|
|
||||||
echo "<h1>" . _("Server information") . "</h1>\n";
|
$container->addElement(new htmlSubTitle(_("Server information")), true);
|
||||||
|
|
||||||
echo "<table class=\"userlist\" rules=\"none\">\n";
|
$container->addElement(new htmlOutputText('<b>' . _("Managed suffixes") . '</b>', false));
|
||||||
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($namingContexts), true);
|
||||||
|
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Managed suffixes") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("LDAP version") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $namingContexts . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($supportedldapversion), true);
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("LDAP version") . "</b> </td>";
|
|
||||||
echo "<td style=\"padding:10px;\">" . $supportedldapversion . "</td></tr>";
|
|
||||||
|
|
||||||
if ($configcontext != '') {
|
if ($configcontext != '') {
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Config suffix") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("Config suffix") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $configcontext . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($configcontext), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Schema suffix") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("Schema suffix") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $subschemasubentry . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($subschemasubentry), true);
|
||||||
|
|
||||||
if ($dynamicSubtrees != '') {
|
if ($dynamicSubtrees != '') {
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Dynamic subtrees") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("Dynamic subtrees") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $dynamicSubtrees . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($dynamicSubtrees), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("SASL mechanisms") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("SASL mechanisms") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $supportedsaslmechanisms . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($supportedsaslmechanisms), true);
|
||||||
|
|
||||||
if ($vendorname != '') {
|
if ($vendorname != '') {
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Vendor name") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("Vendor name") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $vendorname . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($vendorname), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($vendorversion != '') {
|
if ($vendorversion != '') {
|
||||||
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Vendor version") . "</b> </td>";
|
$container->addElement(new htmlOutputText('<b>' . _("Vendor version") . '</b>', false));
|
||||||
echo "<td style=\"padding:10px;\">" . $vendorversion . "</td></tr>";
|
$container->addElement(new htmlSpacer('20px', null));
|
||||||
|
$container->addElement(new htmlOutputText($vendorversion), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table>\n";
|
parseHtml(null, $container, array(), true, $tabindex, 'user');
|
||||||
|
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
include 'main_footer.php';
|
include 'main_footer.php';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue