summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroweissbarth2014-03-11 01:41:59 +0100
committeroweissbarth2014-03-11 01:42:11 +0100
commit1ffaaf2be9fb2e287ff0ec1c058bfde0e55c99e7 (patch)
tree79550e75e56a1a014d700a6943f330308d7236ca
parentae883d064bed43817b833f3af0ad464b1c5b759e (diff)
downloadfiles.iamfabulous.de-1ffaaf2be9fb2e287ff0ec1c058bfde0e55c99e7.tar.gz
Added login error handeling
-rw-r--r--www/login.php9
-rw-r--r--www/static/login.css11
2 files changed, 19 insertions, 1 deletions
diff --git a/www/login.php b/www/login.php
index fbb6356..91ef46e 100644
--- a/www/login.php
+++ b/www/login.php
@@ -18,8 +18,15 @@
<div class="login-area">
<h1 class="login-area"> Log in </h1>
+ <?php if(isset($_GET['username'])){
+ echo '<h1 id="login-error"> Invalid username or password </h1>';
+ }?>
<form id="login-form" method='post' action='/login'>
- <input type="text" placeholder="username" name="username" id="username-input" class="login-input">
+ <?php if(isset($_GET['username'])){
+ echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'">';
+ }else{
+ echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input">';
+ }?>
<input type="password" placeholder="password" name="password" id="password-input" class="login-input">
<input type="submit" name="login" id="button-input" class="login-input" value="login">
diff --git a/www/static/login.css b/www/static/login.css
index 6bd8a5e..2a81a0d 100644
--- a/www/static/login.css
+++ b/www/static/login.css
@@ -19,7 +19,9 @@ div.login-area{
}
h1.login-area{
+ font-size: 32px;
font-weight: 200;
+ display:inline;
}
form.login-form{
@@ -54,3 +56,12 @@ input.login-input:focus{
#recover-password-link{
}
+
+#login-error{
+ font-size: 13pt;
+ background: red;
+ text-align:right;
+ float:right;
+ line-height: 32px;
+ outline: 3px solid #1F3D4C;
+}