Skip to content

Commit 62277d2

Browse files
committed
Adding signup
1 parent 326c9dd commit 62277d2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

public/views/signup.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html ng-app="login">
3+
<head>
4+
<title>Login Page</title>
5+
6+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
7+
<link rel="stylesheet" type="text/css" href="../assets/css/styles.css">
8+
9+
<!-- Angular from Google CDN -->
10+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
11+
<!-- Load AppController -->
12+
<script type="text/javascript" src="../controllers/login.js"></script>
13+
</head>
14+
<body ng-controller="signupCtrl">
15+
<div class="container">
16+
17+
<!-- FORM TO CREATE USERS -->
18+
<div id="model-form" class="form-horizontal">
19+
<div class="col-sm-8 col-sm-offset-2 text-center" id="name-field">
20+
<p ng-show="isCheck" style="background:red;padding:5px;">{{ message }}</p>
21+
<!-- Only posts to Angular's createModel if form is valid and was submitted -->
22+
<form name="modelCreate" ng-submit="modelCreate.$valid && submitted && signUp()" novalidate>
23+
<div class="form-group">
24+
<!-- BIND THIS VALUE TO formData.name -->
25+
<div class="col-sm-12">
26+
<input type="text" name="firstname" class="form-control input-lg text-center" placeholder="First Name" ng-model="formData.firstname" required />
27+
<input type="text" name="lastname" class="form-control input-lg text-center" placeholder="Last Name" ng-model="formData.lastname" required />
28+
<input type="email" name="email" class="form-control input-lg text-center" placeholder="Email" ng-model="formData.email" required />
29+
<input type="password" name="password" class="form-control input-lg text-center" placeholder="Password" ng-model="formData.password" required />
30+
</div>
31+
</div>
32+
33+
<!-- Sets the value submitted to true to help with form validation -->
34+
<button type="submit" class="btn btn-primary btn-lg" ng-click="submitted=true" ng-disabled="modelCreate.password && modelCreate.password.$dirty && modelCreate.password.$invalid ||
35+
modelCreate.email.$dirty && modelCreate.email.$invalid && modelCreate.email">
36+
Register
37+
</button>
38+
</form>
39+
</div>
40+
</div>
41+
</div>
42+
</body>
43+
</html>

0 commit comments

Comments
 (0)