Sfoglia il codice sorgente

#636 and #861 Set the focus on User Name in iTop Login Form

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3197 a333f486-631f-4898-b8df-5754b55c2be0
romainq 11 anni fa
parent
commit
50085433d6
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      application/loginwebpage.class.inc.php

+ 4 - 0
application/loginwebpage.class.inc.php

@@ -147,6 +147,8 @@ class LoginWebPage extends NiceWebPage
 			}
 			$this->add("</table>\n");
 			$this->add("<input type=\"hidden\" name=\"loginop\" value=\"login\" />\n");
+
+			$this->add_ready_script('$("#user").focus();');
 						
 			// Keep the OTHER parameters posted
 			foreach($_POST as $sPostedKey => $postedValue)
@@ -203,6 +205,8 @@ class LoginWebPage extends NiceWebPage
 		$this->add("<input type=\"hidden\" name=\"loginop\" value=\"forgot_pwd_go\" />\n");
 		$this->add("</form>\n");
 		$this->add("</div>\n");
+
+		$this->add_ready_script('$("#user").focus();');
 	}
 
 	protected function ForgotPwdGo()