]> source.dussan.org Git - nextcloud-server.git/commitdiff
actually know what to put in which login field
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Mon, 18 Apr 2011 22:54:36 +0000 (00:54 +0200)
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Mon, 18 Apr 2011 22:54:36 +0000 (00:54 +0200)
js/js.js
templates/installation.php
templates/login.php

index 2fb67f0ec064b4d0003db6a20450ca057ad9a4b4..b7d94b5eb6abe33fe7039720293285c499c6aac5 100644 (file)
--- a/js/js.js
+++ b/js/js.js
@@ -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);
+       });
 });
index 73b9a67743f9f77f160e24666df06144d75d662d..725c7f149ef34e3c19e441a37f17ddd0972d01a4 100644 (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>
index 02ba70be52c78084b7e46fd6b76f8a3683445ba5..c0defdc2b0861bbf570f83898eb4413d0fb62343 100644 (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>