Identification
This commit is contained in:
2
controllers/prototype/dbrequests.js
vendored
2
controllers/prototype/dbrequests.js
vendored
@@ -477,7 +477,7 @@ DBReq.UserCreator = function(finishAction) {
|
||||
DBReq.UserCreator.prototype.execute = function() {
|
||||
var self = this;
|
||||
this.client.query(
|
||||
"INSERT INTO users(name) VALUES('anonymous'); SELECT currval('users_id_seq');",
|
||||
"INSERT INTO users DEFAULT VALUES; SELECT currval('users_id_seq');",
|
||||
[],
|
||||
function(err, result) {
|
||||
self.finalResult = result.rows[0].currval;
|
||||
|
||||
9
controllers/prototype/index.js
vendored
9
controllers/prototype/index.js
vendored
@@ -207,3 +207,12 @@ module.exports.viewer = function(req, res, next) {
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
module.exports.userstudy = function(req, res) {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
|
||||
res.render('user_study.jade', res.lcals, function(err, result) {
|
||||
res.send(result);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
3
controllers/prototype/urls.js
vendored
3
controllers/prototype/urls.js
vendored
@@ -9,5 +9,6 @@ module.exports = {
|
||||
'/prototype/tutorial': 'tutorial',
|
||||
'/prototype/sponza': 'sponza',
|
||||
'/prototype/coin-creator/:scene': 'clicker',
|
||||
'/prototype/coin-viewer/:scene': 'viewer'
|
||||
'/prototype/coin-viewer/:scene': 'viewer',
|
||||
'/user-study': 'userstudy'
|
||||
};
|
||||
|
||||
22
controllers/prototype/views/user_study.jade
Normal file
22
controllers/prototype/views/user_study.jade
Normal file
@@ -0,0 +1,22 @@
|
||||
extends ../../../views/base.jade
|
||||
|
||||
block extrahead
|
||||
link(rel="stylesheet", href="/static/css/signin.css")
|
||||
|
||||
block content
|
||||
form.form-signin(method="POST", action='/identification')
|
||||
h2 Please sign in
|
||||
label(for='inputId').sr-only Id
|
||||
input#inputId.form-control(name="inputId", type="text", placeholder='Id', required, autofocus)
|
||||
label(for='inputAge').sr-only Age
|
||||
input#inputAge.form-control(name="inputAge", type="number", placeholder='Age', min="18", required)
|
||||
|
||||
div(style={'text-align': 'center', 'margin-top':'10px', 'margin-bottom':'10px'})
|
||||
label.radio-inline
|
||||
input(type='radio', name='inputGender', value="male")
|
||||
| Male
|
||||
label.radio-inline
|
||||
input(type='radio', name='inputGender', value="female")
|
||||
| Female
|
||||
|
||||
button.btn.btn-lg.btn-primary.btn-block(type='submit') Sign in
|
||||
Reference in New Issue
Block a user