]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added autofocusing of the username field on the login page.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 30 Sep 2009 21:35:55 +0000 (21:35 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 30 Sep 2009 21:35:55 +0000 (21:35 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3502 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/account/forms/login.php

index 52e8b8ee1ebb49b0ad711f8378719b8cf2d1de78..030375a19bb3358d567759af2094acec77567a3f 100644 (file)
@@ -20,9 +20,7 @@
        $form_body .= "<p class=\"loginbox\">";
        $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
        $form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";  
-       
-       //<input name=\"username\" type=\"text\" class="general-textarea" /></label>
-       
+               
        $login_url = $vars['url'];
        if ((isset($CONFIG->https_login)) && ($CONFIG->https_login))
                $login_url = str_replace("http", "https", $vars['url']);
@@ -32,6 +30,8 @@
        <h2><?php echo elgg_echo('login'); ?></h2>
                <?php 
                        echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
-               ?>
-               
-       </div>
\ No newline at end of file
+               ?>      
+       </div>
+       <script type="text/javascript">
+               $(document).ready(function() { $('input[name=username]').focus(); });
+       </script>
\ No newline at end of file