-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprofile.html
109 lines (91 loc) · 4.81 KB
/
profile.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Include jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include AngularJS -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<!-- Using Bootstrap CDN to include Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<!-- My own css -->
<link rel="stylesheet" type="text/css" href="/css/style.css">
<!-- Slider UI (https://github.com/seiyria/bootstrap-slider) -->
<link rel="stylesheet" type="text/css" href="/css/bootstrap-slider.min.css">
<script src="/js/bootstrap-slider.min.js"></script>
<!-- Bootbox: http://bootboxjs.com -->
<script src="/js/bootbox.min.js" async defer></script>
<title>Update Profile</title>
</head>
<body ng-app="profile">
<div class="container" id="profile" ng-controller="ProfCtrl as prof">
<div class="row">
<div class="col-md-12">
<h4>Update Profile</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
<form id="profForm" name="profForm" ng-submit="prof.submitForm(profForm.$valid)" novalidate>
<fieldset class="form-group">
<label>Email <em><small><span ng-show="prof.emailVerified">(verified)</span><span ng-show="!prof.emailVerified">(unverified)</span></small></em></label>
<input type="email" class="form-control" id="contact-email" name="email" ng-model="prof.email" ng-readonly="!prof.fbUser" placeholder="Email" required>
<p ng-show="profForm.email.$invalid && !profForm.email.$pristine" class="help-block">Valid email is required</p>
</fieldset>
<hr>
<fieldset class="form-group">
<label>First Name</label>
<input type="text" class="form-control" id="first-name" name="firstName" ng-model="prof.firstName" placeholder="First Name" required>
<p ng-show="profForm.firstName.$invalid && !profForm.firstName.$pristine" class="help-block">First name is required</p>
</fieldset>
<fieldset class="form-group">
<label>Last Name</label>
<input type="text" class="form-control" id="last-name" name="lastName" ng-model="prof.lastName" placeholder="Last Name" required>
<p ng-show="profForm.lastName.$invalid && !profForm.lastName.$pristine" class="help-block">Last name is required</p>
</fieldset>
<fieldset class="form-group">
<label>Gender</label>
<select class="form-control" id="gender" name="gender" ng-model="prof.gender" required>
<option value="m">M</option>
<option value="f">F</option>
</select>
<p ng-show="profForm.gender.$invalid && !profForm.gender.$pristine" class="help-block">Gender is required</p>
</fieldset>
<fieldset class="form-group">
<label>NTRP Rating</label>
<br>
<input id="ntrp" name="ntrp" type="text" ng-model="prof.ntrp" required
data-provide="slider"
data-slider-ticks="[2.5, 3.0, 3.5, 4.0, 4.50, 5.0]"
data-slider-ticks-labels='["2.5", "3.0", "3.5", "4.0", "4.5", "5.0"]'
data-slider-step="0.5"
data-slider-value="3.5"
data-slider-selection="none"
data-slider-tooltip="hide" />
<p ng-show="profForm.ntrp.$invalid && !profForm.ntrp.$pristine" class="help-block">NTRP rating is required</p>
</fieldset>
<hr>
<fieldset class="form-group">
<label>Match Reminders/Notifications</label><br>
<div><input type="checkbox" id="fb-notif-en" ng-disabled="!prof.fbUser" ng-checked="prof.fbNotifEn"> Enable Facebook notifications</div>
<div><input type="checkbox" id="email-notif-en" ng-checked="prof.emailNotifEn"> Enable email notifications<span ng-show="!prof.emailVerified"><em> (email verification required)</em></span></div>
</fieldset>
<button type="submit" class="btn btn-primary" id="update-profile" ng-disabled="profForm.$invalid">Update Profile</button>
<button type="button" class="btn btn-default" id="cancel">Cancel</button>
</form>
</div>
</div>
</div>
<script src="/js/settings.js"></script>
<script src="/js/profile.js"></script>
<!-- Google App Engine API -->
<script>
function init() {
gapi.client.load('tennis', 'v1', onGapiLoad, '//' + window.location.host + '/_ah/api');
};
</script>
<script src="https://apis.google.com/js/client.js?onload=init"></script>
</body>
</html>