From 87003e01b5ffd9a621dc28b3f6de6d7a9b90c492 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 3 May 2011 16:15:38 +0000 Subject: [PATCH] added button to reedit after save --- lam/HISTORY | 1 + lam/lib/modules.inc | 26 ++++++++++++++++++++++---- lam/style/500_layout.css | 12 ++++++++++++ 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/lam/HISTORY b/lam/HISTORY index 66c9296f..55de2e81 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -2,6 +2,7 @@ August 2011 3.5.0 - New module "General information": shows internal data about accounts (e.g. creation time) - inetOrgPerson: New attributes o, employeeNumber, initials - Server information shows data from cn=monitor + - lots of small improvements - LAM Pro: -> Automount: allow to create automount maps -> Password policy: allow to (un)lock accounts diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index fe8f1a1b..72d16783 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -792,6 +792,13 @@ class accountContainer { metaRefresh("edit.php?type=" . $this->type . "&suffix=" . $this->dn); exit(); } + // reedit account + if (isset($_POST['accountContainerBackToEdit'])) { + // open fresh account page + unset($_SESSION[$this->base]); + metaRefresh("edit.php?type=" . $this->type . "&DN=" . $this->finalDN); + exit(); + } // back to account list if (isset($_POST['accountContainerBackToList'])) { // Return to account list @@ -1205,15 +1212,26 @@ class accountContainer { $container = new htmlTable(); $message = new htmlStatusMessage('INFO', _('LDAP operation successful.'), $text); - $message->colspan = 5; + $message->colspan = 10; $container->addElement($message, true); $container->addElement(new htmlSpacer(null, '20px'), true); $type = new $this->type(); - $container->addElement(new htmlButton('accountContainerCreateAgain', $type->LABEL_CREATE_ANOTHER_ACCOUNT)); - $container->addElement(new htmlButton('accountContainerBackToList', $type->LABEL_BACK_TO_ACCOUNT_LIST)); + $createButton = new htmlButton('accountContainerCreateAgain', $type->LABEL_CREATE_ANOTHER_ACCOUNT); + $createButton->setIconClass('createButton'); + $container->addElement($createButton); $container->addElement(new htmlSpacer('10px', null)); - $container->addElement(new htmlButton('accountContainerCreatePDF', _('Create PDF file'))); + $pdfButton = new htmlButton('accountContainerCreatePDF', _('Create PDF file')); + $pdfButton->setIconClass('pdfButton'); + $container->addElement($pdfButton); + $container->addElement(new htmlSpacer('10px', null)); + $backToListButton = new htmlButton('accountContainerBackToList', $type->LABEL_BACK_TO_ACCOUNT_LIST); + $backToListButton->setIconClass('backButton'); + $container->addElement($backToListButton); + $container->addElement(new htmlSpacer('10px', null)); + $backToEditButton = new htmlButton('accountContainerBackToEdit', _('Edit again')); + $backToEditButton->setIconClass('editButton'); + $container->addElement($backToEditButton); $tabindex = 1; parseHtml(null, $container, array(), false, $tabindex, $this->type); diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index 6258f91f..e4be4d6a 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -148,6 +148,10 @@ tr.highlight { background-image: url(../graphics/add.png) !important; } +.editButton { + background-image: url(../graphics/edit.png) !important; +} + .settingsButton { background-image: url(../graphics/tools.png) !important; } @@ -156,6 +160,14 @@ tr.highlight { background-image: url(../graphics/up.gif) !important; } +.backButton { + background-image: url(../graphics/back.gif) !important; +} + +.pdfButton { + background-image: url(../graphics/pdf.png) !important; +} + .smallPadding span { padding: 0.1em 0.4em !important; }