actually know what to put in which login field

This commit is contained in:
Jan-Christoph Borchardt 2011-04-19 00:54:36 +02:00
parent 8080a1a5a7
commit ecd68e0c6e
3 changed files with 21 additions and 5 deletions

View File

@ -22,4 +22,20 @@ $(document).ready(function() {
$('label.sqlite').css('background-color', '#ddd');
$('label.mysql').css('background-color', '#fff');
});
// Hide and show input field values for login form
var textuser = "username";
var textpassword = "password";
$("#user").focus(function() {
if($(this).attr("value") == textuser) $(this).attr("value", "");
});
$("#user").blur(function() {
if($(this).attr("value") == "") $(this).attr("value", textuser);
});
$("#password").focus(function() {
if($(this).attr("value") == textpassword) $(this).attr("value", "");
});
$("#password").blur(function() {
if($(this).attr("value") == "") $(this).attr("value", textpassword);
});
});

View File

@ -3,7 +3,7 @@
<form action="#" method="post">
<input type='hidden' name='install' value='true'/>
<fieldset>
<input type="text" name="login" value="your email" />
<input type="text" name="login" value="admin username" />
<input type="password" name="pass" value="password" />
</fieldset>
<fieldset>

View File

@ -1,13 +1,13 @@
<div id="login">
<img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
<img src="<?php echo image_path('', 'owncloud-logo-medium-white.png'); ?>" alt="ownCloud" />
<form action="index.php" method="post">
<!-- <h1>Sign in :</h1> -->
<fieldset>
<?php if($_["error"]): ?>
<?php if($_['error']): ?>
Login failed!
<?php endif; ?>
<input type="text" name="user" value="" />
<input type="password" name="password" />
<input type="text" name="user" id="user" value="username" />
<input type="password" name="password" id="password" value="password" />
<input type="submit" value="Log in" />
</fieldset>
</form>