new button style

This commit is contained in:
Roland Gruber 2010-10-11 17:52:30 +00:00
parent e114f67af3
commit 449755586a
4 changed files with 39 additions and 20 deletions

View File

@ -88,15 +88,18 @@ echo $_SESSION['header'];
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n"; echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
} }
// set focus on password field // set focus on password field
echo "<script type=\"text/javascript\" language=\"javascript\">\n";
echo "<!--\n";
echo "window.onload = function() {\n";
echo "loginField = document.getElementsByName('passwd')[0];\n";
echo "loginField.focus();\n";
echo "}\n";
echo "//-->\n";
echo "</script>\n";
?> ?>
<script type="text/javascript" language="javascript">
<!--
window.onload = function() {
loginField = document.getElementsByName('passwd')[0];
loginField.focus();
}
jQuery(document).ready(function() {
jQuery('#submitButton').button();
});
//-->
</script>
<table border=0 width="100%" class="lamHeader ui-corner-all"> <table border=0 width="100%" class="lamHeader ui-corner-all">
<tr> <tr>
<td align="left" height="30"> <td align="left" height="30">
@ -152,8 +155,8 @@ echo $_SESSION['header'];
else echo "<select disabled size=1 name=\"filename\">\n<option></option>\n</select>\n"; else echo "<select disabled size=1 name=\"filename\">\n<option></option>\n</select>\n";
if (sizeof($files) > 0) echo "<input type=\"password\" name=\"passwd\">\n"; if (sizeof($files) > 0) echo "<input type=\"password\" name=\"passwd\">\n";
else echo "<input disabled type=\"password\" name=\"passwd\">\n"; else echo "<input disabled type=\"password\" name=\"passwd\">\n";
if (sizeof($files) > 0) echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Ok") . "\">\n"; if (sizeof($files) > 0) echo "<button id=\"submitButton\" class=\"smallPadding\" name=\"submit\">" . _("Ok") . "</button>\n";
else echo "<input disabled type=\"submit\" name=\"submit\" value=\"" . _("Ok") . "\">&nbsp;\n"; else echo "<button id=\"submitButton\" class=\"smallPadding\" name=\"submit\" disabled>" . _("Ok") . "</button>&nbsp;\n";
// help link // help link
printHelpLink(getHelp('', '200'), '200'); printHelpLink(getHelp('', '200'), '200');
?> ?>

View File

@ -152,9 +152,14 @@ echo $_SESSION['header'];
<td style="border-style:none" rowspan="3" width="20"></td> <td style="border-style:none" rowspan="3" width="20"></td>
<td style="border-style:none" align="center"> <td style="border-style:none" align="center">
<input type="password" name="passwd"> <input type="password" name="passwd">
<input type="submit" name="submit" value="<?php echo _("Ok"); ?>"> <button id="submitButton" class="smallPadding" name="submit"><?php echo _("Ok"); ?></button>
&nbsp; &nbsp;
<?php printHelpLink(getHelp('', '236'), '236'); ?> <?php printHelpLink(getHelp('', '236'), '236'); ?>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery('#submitButton').button();
});
</script>
</td> </td>
<td style="border-style:none" rowspan="3" width="20"></td> <td style="border-style:none" rowspan="3" width="20"></td>
</tr> </tr>

View File

@ -189,7 +189,7 @@ if (!$cfg->isWritable()) {
<table border="0" align="center"> <table border="0" align="center">
<tr><td> <tr><td>
<fieldset> <fieldset>
<legend><b> <?php echo _("Security settings"); ?> </b></legend> <legend> <?php echo _("Security settings"); ?> </legend>
<br> <br>
<table cellspacing="0" border="0"> <table cellspacing="0" border="0">
<!-- session timeout --> <!-- session timeout -->
@ -236,7 +236,7 @@ if (!$cfg->isWritable()) {
</fieldset> </fieldset>
<BR> <BR>
<fieldset> <fieldset>
<legend><b> <?php echo _("Password policy"); ?> </b></legend> <legend> <?php echo _("Password policy"); ?> </legend>
<br> <br>
<table cellspacing="0" border="0"> <table cellspacing="0" border="0">
<?php <?php
@ -275,7 +275,7 @@ if (!$cfg->isWritable()) {
</fieldset> </fieldset>
<BR> <BR>
<fieldset> <fieldset>
<legend><b> <?php echo _("Logging"); ?> </b></legend> <legend> <?php echo _("Logging"); ?> </legend>
<br> <br>
<table cellspacing="0" border="0"> <table cellspacing="0" border="0">
<!-- log level --> <!-- log level -->
@ -359,7 +359,7 @@ if (!$cfg->isWritable()) {
</fieldset> </fieldset>
<BR> <BR>
<fieldset> <fieldset>
<legend><b> <?php echo _("Change master password"); ?> </b></legend> <legend> <?php echo _("Change master password"); ?> </legend>
<br> <br>
<table cellspacing="0" border="0"> <table cellspacing="0" border="0">
<!-- set master password --> <!-- set master password -->
@ -393,9 +393,15 @@ if (!$cfg->isWritable()) {
<TD> <TD>
<BR> <BR>
<?php if ($cfg->isWritable()) { ?> <?php if ($cfg->isWritable()) { ?>
<input type="submit" name="submit" value=" <?php echo _("Ok"); ?> "> <button id="submitButton" name="submit" class="smallPadding"><?php echo _("Ok"); ?></button>
<?php } ?> <?php } ?>
<input type="submit" name="cancel" value=" <?php echo _("Cancel"); ?> "> <button id="cancelButton" name="cancel" class="smallPadding"><?php echo _("Cancel"); ?></button>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery('#submitButton').button();
jQuery('#cancelButton').button();
});
</script>
</TD> </TD>
</TR> </TR>
</table> </table>

View File

@ -92,7 +92,7 @@ foreach ($jsFiles as $jsEntry) {
$cfg = new LAMCfgMain(); $cfg = new LAMCfgMain();
// check if submit button was pressed // check if submit button was pressed
if ($_POST['submit']) { if (isset($_POST['submit'])) {
// check master password // check master password
if (!$cfg->checkPassword($_POST['passwd'])) { if (!$cfg->checkPassword($_POST['passwd'])) {
$error = _("Master password is wrong!"); $error = _("Master password is wrong!");
@ -379,11 +379,16 @@ if (!isset($cfg->default)) {
&nbsp; &nbsp;
<input type="password" name="passwd"> <input type="password" name="passwd">
&nbsp; &nbsp;
<input type="submit" name="submit" value=" <?php echo _("Ok"); ?> "> <button id="submitButton" name="submit" class="smallPadding"><?php echo _("Ok"); ?></button>
&nbsp; &nbsp;
<?PHP <?PHP
printHelpLink(getHelp('', '236'), '236'); printHelpLink(getHelp('', '236'), '236');
?> ?>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery('#submitButton').button();
});
</script>
</form> </form>
<p><br></p> <p><br></p>