Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

[FIX] Fix logging in from send urls (RT-3508) #2573

Merged
merged 1 commit into from
Aug 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/js/tabs/login.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ LoginTab.prototype.angular = function(module) {
store.set('profile_status', $location.search().status);

if ($location.search().redirect_to) {
$location.path($location.search().redirect_to).search('');
$location.url($location.search().redirect_to);
} else {
$location.path('/balance').search('');
}
Expand All @@ -64,7 +64,7 @@ LoginTab.prototype.angular = function(module) {
}

$scope.submitForm = function(authAction) {
$scope.redirectTo = $location.path();
$scope.redirectTo = encodeURIComponent($location.url());
$scope.authAction = $sce.trustAsResourceUrl(Options.backend_url + '/auth/' + authAction);
};

Expand Down
31 changes: 14 additions & 17 deletions src/templates/tabs/login.jade
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,17 @@ section.col-xs-12.content(ng-controller="LoginCtrl")

.col-xs-12.col-sm-6.col-md-5.col-lg-4.col-lg-offset-1.auth-form-container
.auth-form-wrapper
form(name='loginForm', ng-submit='submitForm()')
.loginWrapper
h2.loginTop(l10n) Log In
include ../tabs/login/form
.row
.col-xs-12.text-status(ng-show='status')
span(ng-bind="status")
br
.backend(ng-repeat="message in backendMessages")
span(ng-bind="message")
.row
.col-xs-12
button.btn.btn-lg.btn-submit.btn-block.btn-primary(type='submit', ng-disabled="loginForm.$invalid || ajax_loading", l10n)
img(src="img/button-s.png", class="loader", ng-show="ajax_loading")
| Log In
p.literal.landing(l10n) New to {{productName}}? 
a(href='#/register', l10n-inc) Create an account
.loginOverlay(ng-show='loggingIn')
img.loader(src='img/main.png', alt='', title='')
.text-status(ng-show='status')
span.loggingIn(ng-bind="status")
br
.backend.error(ng-repeat="message in backendMessages")
span.error(ng-bind="message")
form(name='loginForm' action='{{authAction}}')
.submit-btn-container
button.btn.btn-submit.btn-block.btn-success#loginBtn(type="submit" ng-click="submitForm('login')")
span(l10n) Log In
button.btn.btn-submit.btn-block.btn-success#registerBtn(type="submit" ng-click="submitForm('register')")
span(l10n) Sign Up
input(name='redirect_to', type='hidden', value='{{redirectTo}}')