diff --git a/lam/templates/config/profmanage.php b/lam/templates/config/profmanage.php index ef59fbd4..c9e4d819 100644 --- a/lam/templates/config/profmanage.php +++ b/lam/templates/config/profmanage.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2011 Roland Gruber + Copyright (C) 2003 - 2012 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 @@ -46,7 +46,7 @@ setlanguage(); $cfg = new LAMCfgMain(); // check if submit button was pressed -if (isset($_POST['submit'])) { +if (isset($_POST['action'])) { // check master password if (!$cfg->checkPassword($_POST['passwd'])) { $error = _("Master password is wrong!"); @@ -197,208 +197,98 @@ if (!isset($cfg->default)) {
-
- - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -   - -
   - - -
   - - -
 
- - - - - - - - - -   - -
 
- - - - - - -   - -
 
- - - - - - - - - -   - -
   - - -  
 
- - - - - - -    - -
-
-
-

 

- - - - : - -   + + + +
+addElement(new htmlTitle(_("Profile management")), true); + +// new profile +$container->addElement(new htmlSubTitle(_("Add profile")), true); +$newProfileInput = new htmlTableExtendedInputField(_("Profile name"), 'addprofile', null, '230'); +$newProfileInput->setFieldSize(15); +$container->addElement($newProfileInput, true); +$profileNewPwd1 = new htmlTableExtendedInputField(_("Profile password"), 'addpassword'); +$profileNewPwd1->setIsPassword(true); +$profileNewPwd1->setFieldSize(15); +$container->addElement($profileNewPwd1, true); +$profileNewPwd2 = new htmlTableExtendedInputField(_("Reenter password"), 'addpassword2'); +$profileNewPwd2->setIsPassword(true); +$profileNewPwd2->setFieldSize(15); +$container->addElement($profileNewPwd2, true); +$newProfileButton = new htmlButton('btnAddProfile', _('Add')); +$newProfileButton->setOnClick("jQuery('#action').val('add');showConfirmationDialog('" . _("Add profile") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm');"); +$container->addElement($newProfileButton, true); +$container->addElement($topicSpacer, true); + +// rename profile +$container->addElement(new htmlSubTitle(_("Rename profile")), true); +$container->addElement(new htmlTableExtendedSelect('oldfilename', $files, array(), _('Profile name'), '231'), true); +$oldProfileInput = new htmlTableExtendedInputField(_('New profile name'), 'renfilename'); +$oldProfileInput->setFieldSize(15); +$container->addElement($oldProfileInput, true); +$renameProfileButton = new htmlButton('btnRenameProfile', _('Rename')); +$renameProfileButton->setOnClick("jQuery('#action').val('rename');showConfirmationDialog('" . _("Rename profile") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm');"); +$container->addElement($renameProfileButton, true); +$container->addElement($topicSpacer, true); + +// delete profile +$container->addElement(new htmlSubTitle(_("Delete profile")), true); +$container->addElement(new htmlTableExtendedSelect('delfilename', $files, array(), _('Profile name'), '232'), true); +$deleteProfileButton = new htmlButton('btnDeleteProfile', _('Delete')); +$deleteProfileButton->setOnClick("jQuery('#action').val('delete');showConfirmationDialog('" . _("Delete profile") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm');"); +$container->addElement($deleteProfileButton, true); +$container->addElement($topicSpacer, true); + +// set password +$container->addElement(new htmlSubTitle(_("Set profile password")), true); +$container->addElement(new htmlTableExtendedSelect('setprofile', $files, array(), _('Profile name'), '233'), true); +$profileSetPwd1 = new htmlTableExtendedInputField(_("Profile password"), 'setpassword'); +$profileSetPwd1->setIsPassword(true); +$profileSetPwd1->setFieldSize(15); +$container->addElement($profileSetPwd1, true); +$profileSetPwd2 = new htmlTableExtendedInputField(_("Reenter password"), 'setpassword2'); +$profileSetPwd2->setIsPassword(true); +$profileSetPwd2->setFieldSize(15); +$container->addElement($profileSetPwd2, true); +$setPasswordProfileButton = new htmlButton('btnSetPasswordProfile', _('Set profile password')); +$setPasswordProfileButton->setOnClick("jQuery('#action').val('setpass');showConfirmationDialog('" . _("Set profile password") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm');"); +$container->addElement($setPasswordProfileButton, true); +$container->addElement($topicSpacer, true); + +// set default profile +$conf = new LAMCfgMain(); +$defaultprofile = $conf->default; +$container->addElement(new htmlSubTitle(_("Change default profile")), true); +$container->addElement(new htmlTableExtendedSelect('defaultfilename', $files, array($defaultprofile), _('Profile name'), '234'), true); +$defaultProfileButton = new htmlButton('btnDefaultProfile', _('Ok')); +$defaultProfileButton->setOnClick("jQuery('#action').val('setdefault');showConfirmationDialog('" . _("Change default profile") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm');"); +$container->addElement($defaultProfileButton, true); +$container->addElement($topicSpacer, true); + +parseHtml('', $container, array(), false, $tabindex, 'user'); + +?> +