Skip to content

Commit

Permalink
Merge pull request #250 from CloudBoost/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
shubhamqweasd authored Sep 13, 2017
2 parents c5c3151 + 25c487c commit 0242a74
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
9 changes: 6 additions & 3 deletions api/pages/Page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*
# CloudBoost - Core Engine that powers Bakend as a Service
# CloudBoost - Core Engine that powers Backend as a Service
# (c) 2014 HackerBay, Inc.
# CloudBoost may be freely distributed under the Apache 2 License
*/
Expand Down Expand Up @@ -98,7 +98,7 @@ module.exports = function() {

var appId = req.params.appId || null;
var sdk = req.body.sdk || "REST";

var promises=[];
promises.push(global.appService.getApp(appId));
promises.push(global.appService.getAllSettings(appId));
Expand All @@ -125,10 +125,13 @@ module.exports = function() {
authSettings=auth.settings;
}

delete authSettings.resetPasswordEmail.template;
delete authSettings.signupEmail.template;

res.render(global.rootPath+'/page-templates/user/login',{
appKeys:appKeys,
generalSettings: generalSettings,
authSettings: authSettings,
authSettings: authSettings
});

},function(error){
Expand Down
32 changes: 14 additions & 18 deletions page-templates/user/login.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link rel="stylesheet" href="/css/login.css">


<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://cloudboost.io/js-sdk/cloudboost.js"></script>

</head>
<body>

Expand Down Expand Up @@ -59,7 +61,7 @@
<div id="authenticate-mainbody" style="">
<!--Error Block-->
<div id="authenticate-error" style="background-color: #f04848;padding: 10px;" class="solo-horizontal-center">
<span style="color:white;">Unknow Error</span>
<span style="color:white;">Unknown Error</span>
</div>
<!--Error Block-->

Expand Down Expand Up @@ -269,7 +271,7 @@
<!--Error Block-->
<div id="forgetpassword-error" style="background-color: #f04848;padding: 10px;" class="solo-horizontal-center">
<span style="color:white;">Unknow Error</span>
<span style="color:white;">Unknown Error</span>
</div>
<!--Error Block-->
Expand Down Expand Up @@ -334,17 +336,6 @@
</div>
</body>
<!--IMPORTANT:Bind data from server to javascript variables-->
<script type="text/javascript">
var _appKeys=<%- JSON.stringify(appKeys) %>;
var _generalSettings=<%- JSON.stringify(generalSettings) %>;
var _authSettings=<%- JSON.stringify(authSettings) %>;
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://cloudboost.io/js-sdk/cloudboost.js"></script>
<script>
var serverURL="https://api.cloudboost.io";
var __isDevelopment = false;
Expand All @@ -356,7 +347,7 @@
//This is the fucntion to get querysting,
//This is the fucntion to get querystring,
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
Expand Down Expand Up @@ -426,10 +417,15 @@
}
var isLoginFields=true;
$(document).ready(function(){
// Binding the server variables
var _appKeys =<%-JSON.stringify(appKeys)%>;
var _generalSettings =<%-JSON.stringify(generalSettings)%>;
var _authSettings =<%-JSON.stringify(authSettings)%>;
$(document).ready(function(){
//Init CloudBoost
CB.CloudApp.init(serverURL,_appKeys.appId, _appKeys.masterKey);
CB.CloudApp.init(serverURL,_appKeys.appId, _appKeys.masterKey);
$("#forgetpassword-card").hide();
$("#forgetpassword-error").hide();
Expand Down

0 comments on commit 0242a74

Please sign in to comment.