diff --git a/lam/templates/pdfedit/pdfmain.php b/lam/templates/pdfedit/pdfmain.php index f796a594..fd97abc0 100644 --- a/lam/templates/pdfedit/pdfmain.php +++ b/lam/templates/pdfedit/pdfmain.php @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Michael Duergner - 2005 - 2010 Roland Gruber + 2005 - 2011 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,6 +75,23 @@ for ($i = 0; $i < sizeof($scopes); $i++) { } natcasesort($sortedScopes); +$container = new htmlTable(); +$container->addElement(new htmlTitle(_('PDF editor')), true); + +if (isset($_POST['deleteProfile']) && ($_POST['deleteProfile'] == 'true')) { + // delete structure + if (deletePDFStructureDefinition($_POST['profileDeleteType'], $_POST['profileDeleteName'])) { + $message = new htmlStatusMessage('INFO', _('Deleted PDF structure.'), getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName'])); + $message->colspan = 10; + $container->addElement($message, true); + } + else { + $message = new htmlStatusMessage('ERROR', _('Unable to delete PDF structure!'), getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName'])); + $message->colspan = 10; + $container->addElement($message, true); + } +} + // get list of account types $availableScopes = ''; $templateClasses = array(); @@ -97,38 +114,17 @@ for ($i = 0; $i < sizeof($templateClasses); $i++) { exit; } } -// check if a profile should be deleted -for ($i = 0; $i < sizeof($templateClasses); $i++) { - if (isset($_POST['deleteTemplate_' . $templateClasses[$i]['scope']]) || isset($_POST['deleteTemplate_' . $templateClasses[$i]['scope'] . '_x'])) { - metaRefresh('pdfdelete.php?type=' . $templateClasses[$i]['scope'] . '&delete=' . $_POST['template_' . $templateClasses[$i]['scope']]); - exit; - } -} - -$container = new htmlTable(); include '../main_header.php'; ?>