summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-26 18:10:32 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-02-26 18:10:32 +0100
commit6c3e4fa5a674063e61fb92f5d9001649476c9cc0 (patch)
tree73b794ea979ac17e1166cb304b97249b1fcaacb0 /index.html
parentaf6f38e8ad6bfcc5410646ee070d05f8ab0783db (diff)
Replace several alerts with friendlier messages
Diffstat (limited to 'index.html')
-rw-r--r--index.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/index.html b/index.html
index 3585499..9675f40 100644
--- a/index.html
+++ b/index.html
@@ -107,7 +107,7 @@
<h3 class="text-center" data-tkey="signin_header">Please sign in</h3>
</div>
<div class="panel-body">
- <form class="form" role="form" method="post" action="login" accept-charset="UTF-8" id="login-form">
+ <form id="login-form" class="form" role="form" method="post" action="login" accept-charset="UTF-8">
<div class="form-group">
<label class="sr-only" for="username" data-tkey="username">Username</label>
<input type="text" class="form-control" id="username"
@@ -121,7 +121,7 @@
required="required" />
</div>
<button type="submit" class="btn btn-primary btn-block" data-tkey="signin_button">Sign in</button>
- <div class="login-failed" data-tkey="login_failed" style="display: none;">Login failed.</div>
+ <span class="error failed" data-tkey="login_failed" style="display: none;">Login failed.</span>
</form>
</div>
<div class="panel-body">
@@ -173,6 +173,7 @@
data-tkey-placeholder="username_placeholder" placeholder="Desired username"
data-tkey-title="username_title" title="Choose a alpha-numeric username of 5-15 characters."
pattern="^[a-z,A-Z,0-9,_]{5,15}$" data-valid-min="5" required="required" />
+ <span class="error username-exists" data-tkey="username_already_exists" style="display: none;">This username already exists.</span>
</div>
<div class="form-group">
<label class="control-label small" data-tkey="name">Display name</label>
@@ -200,11 +201,15 @@
data-tkey-placeholder="password_verify_placeholder" placeholder="Repeat the password again"
data-tkey-title="password_title" title="Choose a password with at least one number, one lowercase and one uppercase letter and at least 6 characters."
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" data-valid-min="6" required="required" />
+ <span class="error mismatch" data-tkey="passwords_do_not_match" style="display: none;">Passwords do not match.</span>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" id="signup-cancel" data-tkey="cancel">Cancel</button>
<button type="submit" class="btn btn-primary" data-tkey="signup_button">Sign up</button>
</div>
+ <div class="success" class="text-center">
+ <span data-tkey="welcome">Welcome</span>, <span class="username"></span>!
+ </div>
</form>
</div>
<div class="panel-footer">
@@ -219,7 +224,7 @@
</div>
<!-- change password screen -->
- <div class="container" id="screen-change-pass" style="display: none;">
+ <div class="container" id="screen-change-password" style="display: none;">
<div class="row">
<div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1">
<div class="panel panel-default">
@@ -241,6 +246,7 @@
data-tkey-placeholder="password_verify_placeholder" placeholder="Repeat the password again"
data-tkey-title="password_title" title="Choose a password with at least one number, one lowercase and one uppercase letter and at least 6 characters."
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" data-valid-min="6" required="required" />
+ <span class="error mismatch" data-tkey="passwords_do_not_match" style="display: none;">Passwords do not match.</span>
</div>
<div class="text-center">
<button type="button" class="btn btn-default" id="change-password-cancel" data-tkey="cancel">Cancel</button>