-
Notifications
You must be signed in to change notification settings - Fork 87
/
register.html
58 lines (54 loc) · 1.75 KB
/
register.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
<div class="register container">
<div class="span7">
<div class="header"></div>
<div class="form">
<form class="form-horizontal">
<legend>Register</legend>
<div class="form-group">
<label class="col-lg-2 control-label" for="inputUsername">Username</label>
<div class="col-lg-4" style="padding-top: 5px">
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" id="inputUsername" class="inputUsername form-control" placeholder="Username (e-mail address)">
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="inputName">Name</label>
<div class="col-lg-4">
<input type="text" id="inputName" class="inputName form-control" placeholder="Full name">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button type="submit" class="btn btn-primary registerButton">Register</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
function Register(containerDiv) {
var othis = this;
this.registerClick = function(event){
event.preventDefault();
Global.bimServerApi.callWithFullIndication("ServiceInterface", "addUser", {
username: $(".inputUsername").val(),
name: $(".inputName").val(),
type: "USER",
selfRegistration: true,
resetUrl: Global.baseDir + "?page=ResetPassword"
}, function(){
var username = $(".inputUsername").val();
$(".indexcontainer").load(Global.baseDir + "login.html", function(){
new Login(null, username);
});
});
};
$(".header").load(Global.baseDir + "header.html");
pushHistory({page: "Register"}, "Register");
$(".registerButton").click(othis.registerClick);
$(".inputUsername").focus();
}
</script>