logins.pt
11.5 KB
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en"
tal:define="home request._host;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--? <meta tal:condition="request.google_signin_client_id"-->
<!--? name="google-signin-client_id"-->
<!--? content="${request.google_signin_client_id}">-->
<link rel="shortcut icon" href="${home}/static/img/favicon.png">
<title tal:content="request.title" />
<!-- Basic Styles -->
<link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/font-awesome.min.css">
<!-- SmartAdmin Styles : Caution! DO NOT change the order -->
<link rel="stylesheet" type="text/css" media="screen"
href="${home}/static/v3/css/smartadmin-production-plugins.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-production.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-skins.min.css">
<!-- SmartAdmin RTL Support -->
<link rel="stylesheet" type="text/css" media="screen" href="${home}/static/v3/css/smartadmin-rtl.min.css">
<link rel="stylesheet" type="text/css" href="${home}/static/css/custom.css">
</head>
<style>
.container {
min-height: 100%;
height: 100%;
min-width: 100%;
width: 100%;
background-color: #2BBBAD;
}
.main {
min-height: 100vh;
height: 100vh;
min-width: 50%;
width: 50%;
}
.vcenter {
border: 5px solid;
position: absolute;
top: 50%;
transform: translate(0, -50%);
padding: 10px;
}
.field-holder {
position: relative;
margin-bottom: 1.25em;
}
input {
border: 0;
border-bottom: 3px solid #ffffff;
outline: none;
background-color: transparent;
}
/*label{*/
/* position: absolute;*/
/* top: 0;*/
/* left: 0;*/
/* font-size: 1em;*/
/* color: #424242;*/
/* display: flex;*/
/* align-items: center;*/
/* cursor: text;*/
/* transition: 3s ease-in-out;*/
/* !*background-color: #5b8dba;*!*/
/*}*/
/*input,label{*/
/* font-size: 1em;*/
/* width: 100%;*/
/* height: 55px;*/
/* outline: none;*/
/*}*/
/*input:focus * label,*/
/*input:valid * label*/
/*{*/
/* color: #424242;*/
/* font-size: .75em;*/
/* top: -25px;*/
/* pointer-events: none;*/
/* background-color: transparent;*/
/* outline: none;*/
/*}*/
/*input:focus,*/
/*input:valid{*/
/* border-bottom: 3px solid #424242;*/
/* background-color: transparent;*/
/* outline: none;*/
/*}*/
</style>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 main" style="background-color: #3d70b2">
Left
</div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 main" style="background-color: #5b8dba">
<div class="vcenter">
<div class="col-xs-12 col-sm-12 text-center">
<h1 style="color: white">Eksekutif Information System</h1>
</div>
<div class="col-xs-12 col-sm-12 text-center">
<span style="color:#9fbfd8;">Welcome back! Please Login to your account</span>
</div>
<div class="clearfix"></div>
<form>
<div class="field-holder">
<input id="username" type="text" name="username" class="form-control">
<label for="username">Username</label>
</div>
<div class="field-holder">
<input id="password" type="password" name="password" class="form-control">
<label for="password">Password</label>
</div>
<!--? <section>-->
<!--? <label class="label">PASSWORD</label>-->
<!--? <label class="input"> <i class="icon-append fa fa-lock"></i>-->
<!--? <input id="password" type="password" name="password" class="form-control">-->
<!--? <b class="tooltip tooltip-top-right"><i class="fa fa-lock txt-color-teal"></i> ISI-->
<!--? DENGAN PASSWORD ANDA</b> </label>-->
<!--? <div class="note">-->
<!--? <a id="lupa" name="lupa"-->
<!--? href="${home}/reset-password">Lupa Password?</a>-->
<!--? </div>-->
<!--? </section>-->
<!--? <footer>-->
<!--? <section>-->
<!--? <div class="row" style="float:right">-->
<!--? <button type="submit" id="login-btn" name="login"-->
<!--? class="btn btn-primary" style="float:left"-->
<!--? value="Login">-->
<!--? Login-->
<!--? </button>-->
<!--? <button tal:condition="allow_register(request)"-->
<!--? id="register" name="register" class="btn btn-info"-->
<!--? value="Register" style="float:left">-->
<!--? Register-->
<!--? </button>-->
<!--? <div class="clearfix"></div>-->
<!--? </div>-->
<!--? </section>-->
<!--? </footer>-->
<!--? <footer>-->
<!--? <section>-->
<!--? <div class="row" tal:condition="request.google_signin_client_id and allow_register(request)">-->
<!--? <div id="g_id_onload"-->
<!--? data-client_id="${request.google_signin_client_id}"-->
<!--? data-callback="onSignIn">-->
<!--? </div>-->
<!--? <div class="g_id_signin" data-type="standard"></div>-->
<!--? </div>-->
<!--? </section>-->
<!--? <section>-->
<!--? <input id="provider_name" type="hidden" name="provider_name" class="form-control">-->
<!--? <input id="id_token" type="hidden" name="id_token" class="form-control">-->
<!--? </section>-->
<!--? </footer>-->
</form>
</div>
</div>
</div>
<!--? <div class="row">-->
<!--? <div class="col-xs-12 col-sm-12 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4" style="margin-top:50px">-->
<!--? <div class="well no-padding">-->
<!--? <form id="deform" method="POST" enctype="multipart/form-data" accept-charset="utf-8"-->
<!--? class="smart-form client-form panel form-signin" style="border:0px;">-->
<!--? <header class="bg-color-blue">-->
<!--? <h1 class="txt-color-white login-header-big" align="center"-->
<!--? style="letter-spacing:1px;">${request.app_name}</h1>-->
<!--? </header>-->
<!--? <fieldset class="deformFormFieldset">-->
<!--? <input type="hidden" name="_charset_"/>-->
<!--? <input type="hidden" name="__formid__" value="deform"/>-->
<!--? <div tal:condition="request.session.peek_flash()">-->
<!--? <div class="alert alert-success" tal:repeat="message request.session.pop_flash()"><i-->
<!--? class="fa fa-fw fa-lg fa-check-circle"></i> ${message}-->
<!--? </div>-->
<!--? </div>-->
<!--? <div tal:condition="request.session.peek_flash('error')">-->
<!--? <div class="alert alert-danger" tal:repeat="message request.session.pop_flash('error')"><i-->
<!--? class="fa fa-fw fa-lg fa-times-circle"></i> ${message}-->
<!--? </div>-->
<!--? </div>-->
<!--? <div class="col-md-12" align="center">-->
<!--? --><!--? <img src="${home}/static/img/logo.png"-->
<!--? -->
<!--? class="img-float img-thumbnail" style="height:auto;width:auto;border:none;"/>-->
<!--? </div>-->
<!--? <section>-->
<!--? <div tal:condition="'csrf_token' in form">-->
<!--? <div tal:define="field form['csrf_token']" style="display: none;">-->
<!--? ${structure:field.serialize()}-->
<!--? </div>-->
<!--? </div>-->
<!--? </section>-->
<!--? </fieldset>-->
<!--? </form>-->
<!--? </div>-->
<!--? </div>-->
<!--? </div>-->
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="${home}/deform_static/scripts/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="${home}/deform_static/scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="${home}/deform_static/scripts/deform.js"></script>
<!--? <script tal:condition="request.google_signin_client_id"-->
<!--? src="https://apis.google.com/js/platform.js" async defer></script>-->
<script tal:condition="request.google_signin_client_id"
src="https://accounts.google.com/gsi/client" async defer></script>
<script tal:condition="request.google_signin_client_id">
window.onload = function (e) {
const value = document.cookie;
const parts = value.split(`g_state=`);
if (parts.length === 2) {
document.cookie = document.cookie + ";max-age=0";
}
}
function onSignIn(googleUser) {
// var profile = googleUser.getBasicProfile();
// console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
// console.log('Name: ' + profile.getName());
// console.log('Image URL: ' + profile.getImageUrl());
// console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
//getId(), getName(), getGivenName(), getFamilyName(), getImageUrl(), getEmail() methods, and
// console.log(googleUser);
// console.log(googleUser.getId());
// console.log(googleUser.getName());
// var id_token = googleUser.getAuthResponse().id_token;
document.getElementById('provider_name').value = "google";
document.getElementById('id_token').value = JSON.stringify(googleUser);
document.getElementById("deform").submit();
// var xhr = new XMLHttpRequest();
// xhr.open('POST', '/googlesignin');
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
// xhr.onload = function() {
// console.log('Signed in as: ' + xhr.responseText);
// };
// xhr.send('idtoken=' + id_token);
}
$(document).ready(function () {
$("form#deform").keypress(function (event) {
var keycode = (event.keyCode ? event.keyCode : event.which);
if (keycode == '13') {
event.preventDefault();
$("button#login-btn").click();
}
});
});
</script>
</body>
</html>