-
Notifications
You must be signed in to change notification settings - Fork 9
/
register_confirm.tpl
58 lines (47 loc) · 2.43 KB
/
register_confirm.tpl
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
{{ config_load file="{{ $gimme->language->english_name }}.conf" }}
{{ include "_tpl/_html-head.tpl" }}
<body>
{{ include "_tpl/responsive-menu.tpl"}}
<div id="main-container" class="snap-content overthrow">
<div class="container">
{{ include "_tpl/header.tpl" }}
<main id="main">
<div class="row">
<div class="col-lg-8 col-md-8">
<h1 class="page-title">{{ #register# }} </h1>
<div id="content" class="index-page">
<br>
<div class="globalnews-form well">
{{ $form }}
</div>
<script type="text/javascript">
$('#first_name, #last_name').keyup(function() {
$.post('{{ $view->url(['controller' => 'register', 'action' => 'generate-username'], 'default') }}?format=json', {
'first_name': $('#first_name').val(),
'last_name': $('#last_name').val()
}, function (data) {
$('#username').val(data.username).css('color', 'green');
}, 'json');
});
$('#username').change(function() {
$.post('{{ $view->url(['controller' => 'register', 'action' => 'check-username'], 'default') }}?format=json', {
'username': $(this).val()
}, function (data) {
if (data.status) {
$('#username').css('color', 'green');
} else {
$('#username').css('color', 'red');
}
}, 'json');
}).keyup(function() {
$(this).change();
});
</script>
</div>
<!-- End Content -->
</div>
{{ include "_tpl/sidebar-community.tpl" }}
</div>
</main>
{{ include "_tpl/footer.tpl" }}
{{ include "_tpl/_html-footer.tpl" }}