diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-22 08:18:26 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-22 08:18:26 +0000 |
| commit | 2a7e01b63e58db7ce0ef19210aef9874e022a7c5 (patch) | |
| tree | ce22bfbbf5e9f908d8aa10817549c93bb4a05d30 /views | |
| parent | e0da9feb10efd002f6ebaa99870b4317687a4557 (diff) | |
Added validation checks for signup
Diffstat (limited to 'views')
| -rw-r--r-- | views/partials/header.hbs | 2 | ||||
| -rw-r--r-- | views/signin.hbs | 38 | ||||
| -rw-r--r-- | views/signup.hbs | 4 |
3 files changed, 41 insertions, 3 deletions
diff --git a/views/partials/header.hbs b/views/partials/header.hbs index 8298ce2..4e7f1c2 100644 --- a/views/partials/header.hbs +++ b/views/partials/header.hbs @@ -36,7 +36,7 @@ <li><a href="#">Fourth Year</a></li> </ul> </li> - <li><a href="#" data-toggle="modal" data-target=".login-window">Log In</a></li> + <li><a href="/signin" >Sign In</a></li> <li><a href="/admin">Admin Panel</a></li> <!--<li><a href="#" data-toggle="modal" data-target=".registration-window">Sign up</a></li>--> <li><a href="/signup" >Sign up</a></li> diff --git a/views/signin.hbs b/views/signin.hbs new file mode 100644 index 0000000..dd82338 --- /dev/null +++ b/views/signin.hbs @@ -0,0 +1,38 @@ +<main id="solutions-main"> + + <div class="row" id="solutions-main"> + + <div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3"> + {{# if success }} + <section class="alert alert-success"> + <!-- Change those to banners later --> + <h2>Signup Successful!</h2> + </section> + {{ else }} + {{# if errors }} + <section class="alert alert-danger"> + <ul> + {{# each errors }} + <li>{{ this.msg }}</li> + {{/each}} + </ul> + </section> + {{/if}} + {{/if}} + + <h2><i class="fa fa-sign-in" aria-hidden="true"></i> Sign In</h2> + <form action="/signin" method="post"> + <div class="form-group"> + <input type="text" class="form-control" placeholder="New Username" name="usrname"> + </div> + <div class="form-group"> + <input type="password" class="form-control" placeholder="New Password" name="password"> + </div> + <input type="hidden" name="_csrf" value="{{ csrfToken }}"> + <button type="signin" class="btn btn-primary">Sign In</button> + </form> + </div> + + </div> + +</main>
\ No newline at end of file diff --git a/views/signup.hbs b/views/signup.hbs index 24fad1f..ced61e6 100644 --- a/views/signup.hbs +++ b/views/signup.hbs @@ -35,14 +35,14 @@ </div> <div class="form-group"> - <input type="email" class="form-control" placeholder="New Username" name="usrname"> + <input type="text" class="form-control" placeholder="New Username" name="usrname"> </div> <div class="form-group"> <input type="password" class="form-control" placeholder="New Password" name="password"> </div> <div class="form-group"> - <input type="password" class="form-control" placeholder="New Password" name="confirmPassword"> + <input type="password" class="form-control" placeholder="Confirm Password" name="confirmPassword"> </div> <div class="form-group"> <input type="number" class="form-control" placeholder="Phone Number (optional)" name="phone_num"> |
