meta HTML

This commit is contained in:
Roland Gruber 2013-01-12 16:33:42 +00:00
parent 050c952334
commit 2a5f023974
2 changed files with 53 additions and 57 deletions

View File

@ -3,7 +3,7 @@
$Id$ $Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2010 Roland Gruber Copyright (C) 2003 - 2013 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -133,50 +133,41 @@ echo $_SESSION['header'];
<br> <br>
<!-- form to change main options --> <!-- form to change main options -->
<form action="mainlogin.php" method="post"> <form action="mainlogin.php" method="post">
<table align="center" border="2" rules="none" bgcolor="white" class="ui-corner-all"> <table align="center" border="2" rules="none" bgcolor="white" class="ui-corner-all" style="padding: 20px;">
<tr> <tr><td>
<td style="border-style:none" rowspan="3" width="20"></td> <?php
<td style="border-style:none" height="20"></td> $spacer = new htmlSpacer('20px', '20px');
<td style="border-style:none" rowspan="3" width="20"></td> $table = new htmlTable();
</tr> $caption = new htmlOutputText(_("Please enter the master password to change the general preferences:"));
<tr> $table->addElement($caption, true);
<td style="border-style:none" align="center"><b> <?php echo _("Please enter the master password to change the general preferences:"); ?> </b></td> $table->addElement($spacer, true);
</tr> // print message if login was incorrect or no config profiles are present
<tr><td style="border-style:none" >&nbsp;</td></tr> if (isset($message)) { // $message is set by confmain.php (requires conflogin.php then)
<?php $messageField = new htmlStatusMessage('ERROR', $message);
// print message if login was incorrect or no config profiles are present $table->addElement($messageField, true);
if (isset($message)) { // $message is set by confmain.php (requires conflogin.php then) $table->addElement($spacer, true);
echo "<tr>\n"; }
echo "<td style=\"border-style:none\" rowspan=\"2\"></td>\n"; // password field
echo "<td style=\"border-style:none\" align=\"center\"><b><font color=red>" . $message . "</font></b></td>\n"; $gap = new htmlSpacer('1px', null);
echo "<td style=\"border-style:none\" rowspan=\"2\"></td>\n"; $passwordGroup = new htmlGroup();
echo "</tr>\n"; $passwordGroup->alignment = htmlElement::ALIGN_CENTER;
echo "<tr>\n"; $passwordGroup->addElement(new htmlOutputText(_('Master password')));
echo "<td style=\"border-style:none\" >&nbsp;</td>\n"; $passwordGroup->addElement($gap);
echo "</tr>\n"; $passwordField = new htmlInputField('passwd');
} $passwordField->setFieldSize(15);
?> $passwordField->setIsPassword(true);
<tr> $passwordGroup->addElement($passwordField);
<td style="border-style:none" rowspan="3" width="20"></td> $passwordGroup->addElement($gap);
<td style="border-style:none" align="center"> $passwordGroup->addElement(new htmlButton('submit', _("Ok")));
<input type="password" name="passwd"> $passwordGroup->addElement($gap);
<button id="submitButton" class="smallPadding" name="submit"><?php echo _("Ok"); ?></button> $passwordGroup->addElement(new htmlHelpLink('236'));
&nbsp; $table->addElement($passwordGroup, true);
<?php printHelpLink(getHelp('', '236'), '236'); ?>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() { $tabindex = 1;
jQuery('#submitButton').button(); parseHtml(null, $table, array(), false, $tabindex, 'user');
}); ?>
</script> </td></tr>
</td>
<td style="border-style:none" rowspan="3" width="20"></td>
</tr>
<tr>
<td style="border-style:none">&nbsp;</td>
</tr>
<tr>
<td style="border-style:none" height="20"></td>
</tr>
</table> </table>
</form> </form>

View File

@ -3,7 +3,7 @@
$Id$ $Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2012 Roland Gruber Copyright (C) 2003 - 2013 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -227,15 +227,6 @@ if (!isset($cfg->default)) {
<br> <br>
<!-- form for adding/renaming/deleting profiles --> <!-- form for adding/renaming/deleting profiles -->
<form id="profileForm" name="profileForm" action="profmanage.php" method="post"> <form id="profileForm" name="profileForm" action="profmanage.php" method="post">
<input type="hidden" name="action" id="action" value="none">
<div id="passwordDialogDiv" class="hidden">
<?PHP echo _("Master password"); ?>
<input type="password" name="passwd">
<?PHP
printHelpLink(getHelp('', '236'), '236');
?>
</div>
<div class="filled ui-corner-all">
<?php <?php
$topicSpacer = new htmlSpacer(null, '20px'); $topicSpacer = new htmlSpacer(null, '20px');
@ -312,10 +303,24 @@ $defaultProfileButton->setOnClick("jQuery('#action').val('setdefault');showConfi
$container->addElement($defaultProfileButton, true); $container->addElement($defaultProfileButton, true);
$container->addElement($topicSpacer, true); $container->addElement($topicSpacer, true);
parseHtml('', $container, array(), false, $tabindex, 'user'); $container->addElement(new htmlHiddenInput('action', 'none'), true);
$dialogDivContent = new htmlTable();
$dialogDivContent->addElement(new htmlOutputText(_("Master password")));
$masterPassword = new htmlInputField('passwd');
$masterPassword->setIsPassword(true);
$dialogDivContent->addElement($masterPassword);
$dialogDivContent->addElement(new htmlHelpLink('236'));
$dialogDiv = new htmlDiv('passwordDialogDiv', $dialogDivContent);
$dialogDiv->setCSSClasses(array('hidden'));
$container->addElement($dialogDiv, true);
$mainDiv = new htmlDiv('mainDiv', $container);
$mainDiv->setCSSClasses(array('filled', 'ui-corner-all'));
parseHtml('', $mainDiv, array(), false, $tabindex, 'user');
?> ?>
</div>
</form> </form>
<p><br></p> <p><br></p>