-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
142 lines (109 loc) · 4.2 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<html lang="en" ng-app="app_form_validation">
<head>
<meta charset="utf-8">
<title>Example form validation</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/app.js"></script>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background: #e8edf2 none repeat scroll 0 0;
margin: 40px;
font-size:14px;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#body {
margin: 0 15px 0 15px;
}
p.footer {
text-align: right;
font-size: 11px;
border-top: 1px solid #D0D0D0;
line-height: 32px;
padding: 0 10px 0 10px;
margin: 20px 0 0 0;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
</style>
</head>
<body>
<h1>Welcome to form validation</h1>
<div class="panel-content container">
<div id="body" style="min-height:300px;">
<div class="row">
<form name="form_validation" ng-submit="form_validation.$valid && submit()" novalidate ng-controller="BasicFormValidation">
<div class="col-md-5">
<!-- Message Starts -->
<div class="success_notice" style="display:none;">
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">×</a>
New Alert Created Successfully.</div>
</div>
<div class="error_notice" style="display:none;">
<div class="alert alert-success">
<a href="#" class="close" data-dismiss="alert">×</a>
Something Wrond :-(, Please try again.</div>
</div>
<div ng-show="form_validation.$submitted || form_validation.to_address.$touched">
<div class="alert alert-warning" ng-show="form_validation.to_address.$error.required || form_validation.to_address.$error.email"><a href="#" class="close" data-dismiss="alert">×</a>Enter valid Email Addresses.</div>
</div>
<div ng-show="form_validation.$submitted || form_validation.frequencies.$touched">
<div class="alert alert-warning" ng-show="form_validation.frequencies.$error.required"><a href="#" class="close" data-dismiss="alert">×</a>Select valid Frequency.</div>
</div>
<div ng-show="form_validation.$submitted || form_validation.average.$touched">
<div class="alert alert-warning" ng-show="form_validation.average.$error.required"><a href="#" class="close" data-dismiss="alert">×</a>Select valid Average Number.</div>
</div>
<div class="form-group">
<label for="ToAddress"> To Address: </label>
<input type="email" name="to_address" id="to_address" class="form-control" ng-model="user.to_address" ng-required="true"/>
</div>
<div class="form-group">
<label for="ClassName">Name: </label>
<input type="text" name="class_name" id="class_name" class="form-control" ng-model="user.class_name" ng-required="true" />
</div>
<div class="form-group">
<label for="Reports">Frequency: </label>
<select name="frequencies" id="frequencies" class="form-control" ng-model="user.frequency" ng-required="true" minlength="1">
<option value="" disabled selected>Select any Frequency</option>
<option ng-repeat = "frequency in frequencies" value="{{frequency.id}}">{{frequency.name}}</value>
</select>
</div>
<div class="form-group">
<input type="submit" name="update" id="update" value="Submit" class="btn btn-primary" />
</div>
</div> <!-- Ends Col -->
</div>
</form>
</div> <!-- Ends Container -->