-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_phone.html
240 lines (156 loc) · 10.1 KB
/
test_phone.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html ng-app="akcApp" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="libs/css/bootstrap.min.css">
<link rel="stylesheet" href="libs/css/bootstrap-datepicker3.css">
<script src="libs/js/jquery_3.3.1.min.js"></script>
<script src="js/jquery-1.9.1.js"></script>
<script src="libs/js/bootstrap_3.3.7.min.js"></script>
<script src="libs/js/bootstrap-datepicker-1.4.1.min.js"></script>
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="libs/js/moment.min.js"></script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.min.js"></script>-->
<script type="text/javascript" src="https://nosir.github.io/cleave.js/dist/cleave.min.js"></script>
<script type="text/javascript" src="https://nosir.github.io/cleave.js/dist/cleave-phone.i18n.js"></script>
<title>Create User</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular-resource.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular-messages.min.js"></script>
<script src="js/akcApp.js"></script>
<script type="text/javascript">
$(window).load(function(){
var code={BD:"880",BE:"32",BF:"226",BG:"359",BA:"387",BB:"1",WF:"681",BL:"590",BM:"1",BN:"673",BO:"591",BH:"973",BI:"257",BJ:"229",BT:"975",JM:"1",BW:"267",WS:"685",BQ:"599",BR:"55",BS:"1",JE:"44",BY:"375",BZ:"501",RU:"7",RW:"250",RS:"381",TL:"670",RE:"262",TM:"993",TJ:"992",RO:"40",TK:"690",GW:"245",GU:"1",GT:"502",GR:"30",GQ:"240",GP:"590",JP:"81",GY:"592",GG:"44",GF:"594",GE:"995",GD:"1",GB:"44",GA:"241",SV:"503",GN:"224",GM:"220",GL:"299",GI:"350",GH:"233",OM:"968",TN:"216",JO:"962",HR:"385",HT:"509",HU:"36",HK:"852",HN:"504",VE:"58",PR:"1",PS:"970",PW:"680",PT:"351",SJ:"47",PY:"595",IQ:"964",PA:"507",PF:"689",PG:"675",PE:"51",PK:"92",PH:"63",PN:"870",PL:"48",PM:"508",ZM:"260",EH:"212",EE:"372",EG:"20",ZA:"27",EC:"593",IT:"39",VN:"84",SB:"677",ET:"251",SO:"252",ZW:"263",SA:"966",ES:"34",ER:"291",ME:"382",MD:"373",MG:"261",MF:"590",MA:"212",MC:"377",UZ:"998",MM:"95",ML:"223",MO:"853",MN:"976",MH:"692",MK:"389",MU:"230",MT:"356",MW:"265",MV:"960",MQ:"596",MP:"1",MS:"1",MR:"222",IM:"44",UG:"256",TZ:"255",MY:"60",MX:"52",IL:"972",FR:"33",IO:"246",SH:"290",FI:"358",FJ:"679",FK:"500",FM:"691",FO:"298",NI:"505",NL:"31",NO:"47",NA:"264",VU:"678",NC:"687",NE:"227",NF:"672",NG:"234",NZ:"64",NP:"977",NR:"674",NU:"683",CK:"682",CI:"225",CH:"41",CO:"57",CN:"86",CM:"237",CL:"56",CC:"61",CA:"1",CG:"242",CF:"236",CD:"243",CZ:"420",CY:"357",CX:"61",CR:"506",CW:"599",CV:"238",CU:"53",SZ:"268",SY:"963",SX:"599",KG:"996",KE:"254",SS:"211",SR:"597",KI:"686",KH:"855",KN:"1",KM:"269",ST:"239",SK:"421",KR:"82",SI:"386",KP:"850",KW:"965",SN:"221",SM:"378",SL:"232",SC:"248",KZ:"7",KY:"1",SG:"65",SE:"46",SD:"249",DO:"1",DM:"1",DJ:"253",DK:"45",VG:"1",DE:"49",YE:"967",DZ:"213",US:"1",UY:"598",YT:"262",UM:"1",LB:"961",LC:"1",LA:"856",TV:"688",TW:"886",TT:"1",TR:"90",LK:"94",LI:"423",LV:"371",TO:"676",LT:"370",LU:"352",LR:"231",LS:"266",TH:"66",TG:"228",TD:"235",TC:"1",LY:"218",VA:"379",VC:"1",AE:"971",AD:"376",AG:"1",AF:"93",AI:"1",VI:"1",IS:"354",IR:"98",AM:"374",AL:"355",AO:"244",AS:"1",AR:"54",AU:"61",AT:"43",AW:"297",IN:"91",AX:"358",AZ:"994",IE:"353",ID:"62",UA:"380",QA:"974",MZ:"258"};
var selectCountry = $('#countries');
var html = '';
for (var i in code) {
html += '<option value="+' + code[i] + '">' + i + '</option>';
}
selectCountry.html(html);
selectCountry.val('+61');
var cleavePhone = new Cleave('.input-phone', {
phone: true,
phoneRegionCode: 'AU'
});
selectCountry.on('change', function () {
cleavePhone.setPhoneRegionCode(this.value);
cleavePhone.setRawValue(this.value);
$('.input-phone').focus();
document.getElementById('phone').disabled = false;
});
});
</script>
<script type="text/javascript">
$(function() {
$('input[name="birthdate"]').datepicker({
singleDatePicker: true,
showDropdowns: true
},
function(start, end, label) {
var years = moment().diff(start, 'years');
alert("You are " + years + " years old.");
});
});
</script>
</head>
<body>
<div class="container" ng-controller="userCtrl">
<div class="row">
<div class="col-md-12">
<div class="well well-sm">
<form class="form-horizontal" name="myForm" ng-submit="sendData();">
<fieldset>
<legend class="text-center header">User Information</legend>
<div class="form-group">
<span class="col-md-2 col-md-offset-1 text-center">Name *</span>
<div class="col-md-4">
<input id="fname" name="fname" ng-model="fname" type="text" placeholder="First Name" class="form-control" required>
<div ng-messages="myForm.fname.$error" ng-show="myForm.fname.$touched">
<div ng-message="required" class="text-danger">This field is required</div>
</div>
</div>
<div class="col-md-4">
<input id="lname" name="lname" ng-model="lname" type="text" placeholder="Last Name" class="form-control" required>
<div ng-messages="myForm.lname.$error" ng-show="myForm.lname.$touched">
<div ng-message="required" class="text-danger">This field is required</div>
</div>
</div>
</div>
<div class="form-group">
<span class="col-md-2 col-md-offset-1 text-center">Email *</span>
<div class="col-md-8">
<input id="email" name="email" type="email" ng-model="email" placeholder="Email Address" class="form-control" required>
<div ng-messages="myForm.email.$error" ng-show="myForm.email.$touched">
<div ng-message="required" class="text-danger">This field is required</div>
<div ng-message="email" class="text-danger">Your email address is invalid</div>
</div>
</div>
</div>
<div class="form-group">
<span class="col-md-2 col-md-offset-1 text-center">Phone Number*</i></span>
<div class="col-md-8">
<select class="form-control" name="code" id="countries" style="width:auto;"></select>
<input type="phonenumber" class="input-phone" name="phone" id="phone" ng-model="phone" placeholder="Enter phone number" required disabled/>
<div ng-messages="myForm.phone.$error" ng-show="myForm.phone.$touched">
<div ng-message="required" class="text-danger">This field is required</div>
</div>
</div>
</div>
<div class="form-group">
<!--<p class="col-md-offset-1 col-md-10 help-block">Street address, P.O. box, company name, c/o</p>-->
<span class="col-md-2 col-md-offset-1 text-center">Address *</span>
<div class="col-md-1">
<input type="number" class="form-control" id="inputAddressLine1" name="address-line1" ng-model="num" placeholder="N.">
</div>
<div class="col-md-3">
<input type="text" class="form-control" id="inputAddressLine1" name="address-line1" ng-model="rue" placeholder="Rue">
</div>
<div class="col-md-2">
<input type="text" class="form-control" id="inputAddressLine1" name="address-line1" ng-model="city" placeholder="City">
</div>
<div class="col-md-2">
<input type="text" class="form-control" id="inputAddressLine1" name="address-line1" ng-model="code" placeholder="Code">
</div>
</div>
<div class="form-group">
<span class="col-md-2 col-md-offset-1 text-center">Birth Date *</span>
<div class="col-md-2">
<input class="form-control" id="birthdate" name="birthdate" ng-model="birthdate" placeholder="MM/DD/YYY" type="text" required/>
<div ng-messages="myForm.birthdate.$error" ng-show="myForm.birthdate.$touched">
<div ng-message="required" class="text-danger">This field is required</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<button type="submit" name="submit" formnovalidate class="btn btn-primary btn-lg">Submit</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<div id="credsMsg"></div>
<script>
// tell the embed parent frame the height of the content
if (window.parent && window.parent.parent){
window.parent.parent.postMessage(["resultsFrame", {
height: document.body.getBoundingClientRect().height,
slug: "0amruddk"
}], "*")
}
</script>
</body>
</html>