diff --git a/lam/templates/profedit/profiledelete.php b/lam/templates/profedit/profiledelete.php
index 2ddcf4be..b19c339d 100644
--- a/lam/templates/profedit/profiledelete.php
+++ b/lam/templates/profedit/profiledelete.php
@@ -52,7 +52,7 @@ if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
}
// check if admin has submited delete operation
-if ($_POST['submit']) {
+if (isset($_POST['submit'])) {
// delete profile
if (!delAccountProfile($_POST['del'], $_POST['type'])) {
metaRefresh('profilemain.php?deleteScope=' . $_POST['type'] . '&deleteFailed=' . $_POST['del']);
@@ -65,23 +65,38 @@ if ($_POST['submit']) {
}
// check if admin has aborted delete operation
-if ($_POST['abort']) {
+if (isset($_POST['abort'])) {
metaRefresh('profilemain.php');
exit;
}
// print standard header
include '../main_header.php';
-echo ("
\n";
+echo "
\n");
+
+$container = new htmlTable();
+$container->addElement(new htmlOutputText(_("Do you really want to delete this profile?")), true);
+$container->addElement(new htmlSpacer(null, '10px'), true);
+
+$subContainer = new htmlTable();
+$subContainer->addElement(new htmlOutputText(_("Profile name") . ': '));
+$subContainer->addElement(new htmlOutputText($_GET['del']), true);
+$container->addElement($subContainer, true);
+$container->addElement(new htmlSpacer(null, '10px'), true);
+
+$buttonContainer = new htmlTable();
+$buttonContainer->addElement(new htmlButton('submit', _("Ok")));
+$buttonContainer->addElement(new htmlButton('abort', _("Cancel")));
+$buttonContainer->addElement(new htmlHiddenInput('type', $type));
+$buttonContainer->addElement(new htmlHiddenInput('del', $_GET['del']));
+$container->addElement($buttonContainer);
+
+$tabindex = 1;
+parseHtml(null, $container, array(), false, $tabindex, 'user');
+
+echo "\n";
+echo "
";
include '../main_footer.php';
diff --git a/lam/templates/profedit/profilemain.php b/lam/templates/profedit/profilemain.php
index 85704ca8..eeece532 100644
--- a/lam/templates/profedit/profilemain.php
+++ b/lam/templates/profedit/profilemain.php
@@ -93,89 +93,75 @@ for ($i = 0; $i < sizeof($profileClasses); $i++) {
for ($i = 0; $i < sizeof($profileClasses); $i++) {
$profileList = getAccountProfiles($profileClasses[$i]['scope']);
natcasesort($profileList);
- $profiles = "";
- foreach ($profileList as $p) {
- $profiles = $profiles . "