forked from simpulton/angularjs-mailchimp-signup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (96 loc) · 6.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<html ng-app="ngMailChimp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MailChimp Signup Demo</title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/animations.css"/>
</head>
<body ng-controller="SignUpController as ctrl">
<div class="signup-wrapper">
<div class="logo">
<img src="assets/images/logo.png" alt="Logo"/>
</div>
<div class="alert alert-success message-animation" role="alert" ng-if="ctrl.showSubmittedPrompt">
Thank you! Your account has been created.
</div>
<form name="ctrl.signupForm" ng-submit="ctrl.signup()" novalidate>
<div class="form-group" ng-class="{'has-error':ctrl.hasErrorClass('email')}">
<label for="email">Email</label>
<input id="email" name="email" class="form-control" type="email" required
ng-model="ctrl.newCustomer.email" ng-model-options="{ updateOn : 'default blur' }"
ng-focus="ctrl.toggleEmailPrompt(true)" ng-blur="ctrl.toggleEmailPrompt(false)"/>
<div class="my-messages">
<div class="prompt message-animation" ng-if="ctrl.showEmailPrompt">
What's your email address?
</div>
</div>
<div class="my-messages" ng-messages="ctrl.signupForm.email.$error" ng-if="ctrl.showMessages('email')">
<div class="message-animation" ng-message="required">
<strong>This field is required.</strong>
</div>
<div class="message-animation" ng-message="email">
<strong>Please format your email correctly.</strong>
</div>
</div>
</div>
<div class="form-group" ng-class="{'has-error':ctrl.hasErrorClass('userName')}">
<label for="userName">Username</label>
<input id="userName" name="userName" class="form-control" type="text" required
ng-model="ctrl.newCustomer.userName" ng-model-options="{ updateOn : 'default blur' }"
ng-focus="ctrl.toggleUsernamePrompt(true)" ng-blur="ctrl.toggleUsernamePrompt(false)"/>
<div class="my-messages">
<div class="prompt message-animation" ng-if="ctrl.showUsernamePrompt">
Choose a username that contains only letters and numbers, or use your email address.
</div>
</div>
<div class="my-messages" ng-messages="ctrl.signupForm.userName.$error" ng-if="ctrl.showMessages('userName')">
<div class="message-animation" ng-message="required">
<strong>This field is required.</strong>
</div>
</div>
</div>
<div class="form-group">
<label for="password">Password</label>
<div class="input-group" ng-class="{'has-error':ctrl.hasErrorClass('password')}">
<input id="password" name="password" class="form-control" required
type="{{ctrl.getPasswordType()}}"
ng-model-options="{ updateOn : 'default blur' }"
ng-model="ctrl.newCustomer.password"
validate-password-characters/>
<span class="input-group-addon">
<input type="checkbox" ng-model="ctrl.signupForm.showPassword"> Show
</span>
</div>
<div class="my-messages" ng-messages="ctrl.signupForm.password.$error" ng-if="ctrl.showMessages('password')">
<div class="message-animation" ng-message="required">
<strong>This field is required.</strong>
</div>
</div>
<div class="password-requirements" ng-if="!ctrl.signupForm.password.$valid">
<ul class="float-left">
<li ng-class="{'completed':!ctrl.signupForm.password.$error.lowerCase}">One lowercase character</li>
<li ng-class="{'completed':!ctrl.signupForm.password.$error.upperCase}">One uppercase character</li>
<li ng-class="{'completed':!ctrl.signupForm.password.$error.number}">One number</li>
</ul>
<ul class="selfclear clearfix">
<li ng-class="{'completed':!ctrl.signupForm.password.$error.specialCharacter}">One special character</li>
<li ng-class="{'completed':!ctrl.signupForm.password.$error.eightCharacters}">Eight characters minimum</li>
</ul>
</div>
<div class="alert alert-success message-animation" role="alert" ng-if="ctrl.signupForm.password.$valid">
Your password is secure and you are good to go!
</div>
</div>
<button class="btn btn-primary" type="submit">Create My Account</button>
</form>
</div>
<script type="text/javascript" src="vendor/angular.min.js"></script>
<script type="text/javascript" src="vendor/angular-aria.min.js"></script>
<script type="text/javascript" src="vendor/angular-messages.min.js"></script>
<script type="text/javascript" src="vendor/angular-animate.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>