basic authentication stuff
This commit is contained in:
@@ -7,22 +7,24 @@ html lang="en"
|
||||
title Qwaiter
|
||||
= stylesheet_link_tag "user/foundation/application"
|
||||
= javascript_include_tag "vendor/modernizr"
|
||||
/= javascript_include_tag 'http://connect.facebook.net/en_US/all.js'
|
||||
= javascript_include_tag "user/flat/application"
|
||||
- if ENV['QWAITER_MOBILE_EXPORT'] == 'yes'
|
||||
javascript:
|
||||
var QMobile, Qwaiter, Quser;
|
||||
var data_host = 'http://data.qwaiter.com';
|
||||
var event_host = '#{Qwaiter.event_host}';
|
||||
var $data_host = 'http://data.qwaiter.com';
|
||||
var $event_host = '#{Qwaiter.event_host}';
|
||||
var $asset_path = '##assets_path##';
|
||||
var Qstorage = localStorage;
|
||||
var $root_url = 'http://www.qwaiter.com/user';
|
||||
- else
|
||||
javascript:
|
||||
var QMobile, Qwaiter, Quser;
|
||||
var data_host = 'http://data.qwaiter.com';
|
||||
var event_host = '#{Qwaiter.event_host}';
|
||||
var $event_host = '#{Qwaiter.event_host}';
|
||||
var $asset_path = '/assets/';
|
||||
var Qstorage = localStorage;
|
||||
#{user_dynamic_data_host}
|
||||
#{user_dynamic_data_host};
|
||||
#{user_dynamic_root_url};
|
||||
QMobile || (QMobile = {
|
||||
scanQr: function(){window.location = '/select_qrcode'},
|
||||
activateRotation: function(){},
|
||||
@@ -35,7 +37,7 @@ html lang="en"
|
||||
this.authentication_object_storage = '{"auth_token": "'+token+'"}'
|
||||
},
|
||||
root_url: function(){return 'file:///Users/bterkuile/Documents/workspace/Qwaiter/assets/user'},
|
||||
root_url: function(){return '/user'},
|
||||
$root_url: function(){return '/user'},
|
||||
goHome: function(){ redirect_to('user_root')},
|
||||
connection_problem: function(){alert('There is a problem connecting to the server')},
|
||||
token: function(){return this.auth_token},
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
doctype html
|
||||
html lang="en"
|
||||
head
|
||||
meta charset="utf-8"
|
||||
meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"
|
||||
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
||||
title Qwaiter
|
||||
= stylesheet_link_tag "user/foundation/application"
|
||||
= javascript_include_tag "vendor/modernizr"
|
||||
javascript:
|
||||
var Qstorage = localStorage;
|
||||
body
|
||||
= yield
|
||||
@@ -1,20 +1,21 @@
|
||||
= top_bar title: 'obtain_token.title' do
|
||||
span
|
||||
|
||||
.well
|
||||
.alert.alert-warming.user-alert.hide
|
||||
form.form-horizontal
|
||||
.control-group
|
||||
label.control-label data-t='attributes.user.email' Email
|
||||
.controls
|
||||
input#user-email.email type="email" placeholder="Email"
|
||||
.control-group
|
||||
label.control-label data-t='attributes.user.password' Password
|
||||
.controls
|
||||
.row
|
||||
h1 data-t='obtain_token.title' = t('user.obtain_token.title')
|
||||
hr
|
||||
form
|
||||
.form-row
|
||||
.form-label
|
||||
label.control-label data-t='attributes.user.email' = User.human_attribute_name(:email)
|
||||
.form-field
|
||||
input#user-email.email type="email" placeholder=User.human_attribute_name(:email)
|
||||
.form-row
|
||||
.form-label
|
||||
label.control-label data-t='attributes.user.password' Password
|
||||
.form-field
|
||||
input#user-password.password type="password" placeholder="Password"
|
||||
.control-group
|
||||
.controls
|
||||
button.btn.btn-primary data-t="obtain_token.obtain" onclick="Quser.authenticate_user(); return false"
|
||||
.form-row
|
||||
.form-label
|
||||
.form-field
|
||||
button.btn.btn-primary data-t="obtain_token.obtain" onclick="Quser.authenticate_user(); return false" = t('user.obtain_token.obtain')
|
||||
- unless current_user.blank? || ENV['QWAITER_MOBILE_EXPORT']=='yes'
|
||||
javascript:
|
||||
Qstorage.setItem('auth_token', '#{current_user.authentication_token}');
|
||||
|
||||
Reference in New Issue
Block a user