diff options
author | zsloan | 2015-05-06 14:11:02 -0500 |
---|---|---|
committer | zsloan | 2015-05-06 14:11:02 -0500 |
commit | de670c307c8f4fcb4758c89fb2b2454e833ecdc8 (patch) | |
tree | d91cc4db4c127f0e347d1e170a62a7ec9dc7275d | |
parent | a3342afd77425eb8edaaef0b09ee1b88c79dfdfc (diff) | |
parent | f8dee92b54a3b5f727ec574158c0faa7c5774241 (diff) | |
download | genenetwork2-de670c307c8f4fcb4758c89fb2b2454e833ecdc8.tar.gz |
Merge pull request #18 from lomereiter/login_form_validation
email and pass validation
-rwxr-xr-x | wqflask/wqflask/templates/new_security/login_user.html | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/wqflask/wqflask/templates/new_security/login_user.html b/wqflask/wqflask/templates/new_security/login_user.html index 81e8b53a..a66a85d6 100755 --- a/wqflask/wqflask/templates/new_security/login_user.html +++ b/wqflask/wqflask/templates/new_security/login_user.html @@ -24,18 +24,18 @@ <h4>Already have an account? Sign in here.</h4> - <form class="form-horizontal" action="/n/login" method="POST" name="login_user_form"> + <form class="form-horizontal" action="/n/login" method="POST" name="login_user_form" id="loginUserForm"> <fieldset> <div class="form-group"> <label style="text-align:left;" class="col-xs-1 control-label" for="email_address">Email Address</label> - <div style="margin-left:20px;" class="col-xs-10"> + <div style="margin-left:20px;" class="col-xs-4"> <input id="email_address" class="focused" name="email_address" type="text" value=""> </div> </div> <div class="form-group"> <label style="text-align:left;" class="col-xs-1 control-label" for="password">Password</label> - <div style="margin-left:20px;" class="col-xs-3 controls"> + <div style="margin-left:20px;" class="col-xs-4 controls"> <input id="password" name="password" type="password" value=""> <br /> <a href="/n/forgot_password">Forgot your password?</a><br/> @@ -45,14 +45,14 @@ <div class="form-group"> <label class="col-xs-1 control-label" for="remember"></label> - <div style="margin-left:20px;" class="col-xs-3 controls"> + <div style="margin-left:20px;" class="col-xs-4 controls"> <input id="remember" name="remember" type="checkbox" value="y"> <b>Remember me</b> </div> </div> <div class="form-group"> <label class="col-xs-1 control-label" for="submit"></label> - <div style="margin-left:20px;" class="col-xs-3 controls"> + <div style="margin-left:20px;" class="col-xs-4 controls"> <input id="next" name="next" type="hidden" value=""> <input class="btn btn-primary" id="submit" name="submit" type="submit" value="Sign in"> </div> @@ -66,9 +66,42 @@ {% endblock %} +{% block css %} +<style type="text/css"> +input.error{ + border:1px solid #FF0000 !important; +} + +label.error,div.error{ + font-weight:normal; + color:#FF0000 !important; +} +</style> +{% endblock %} + {% block js %} <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>--> + <script type="text/javascript" src="/static/new/packages/ValidationPlugin/dist/jquery.validate.min.js"></script> + <script> + $(document).ready(function () { + $("#loginUserForm").validate({ + onkeyup: false, + onsubmit: true, + onfocusout: function(element) { $(element).valid(); }, + rules: { + email_address: { + required: true, + email: true + }, + password: { + required: true + } + } + }); + }); + </script> + {% include "new_security/_scripts.html" %} {% endblock %} |