Fixed remember login option

pull/91/head
Ludovic Marcotte 2015-02-13 14:30:24 -05:00 committed by Francis Lachapelle
parent 23ce8904a9
commit b9e7e24344
2 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,10 @@
<md-content md-scroll-y="true">
<div data-ng-controller="loginController">
<script type="text/javascript">
var cookieUsername = '<var:string var:value="cookieUsername" const:escapeHTML="NO"/>';
</script>
<!-- <div id="aboutBox" style="display:none;">
<div>
<p class="logo"><img const:alt="SOGo" rsrc:src="img/sogo-logo.png"/></p>
@ -42,7 +46,7 @@
<md-input-container>
<label><var:string label:value="Username:"/>
</label>
<input type="text" data-ng-model="creds.username" var:data-ng-init='cookieUsername' required="required" />
<input type="text" data-ng-model="creds.username" required="required" />
</md-input-container>
<md-input-container>
<label><var:string label:value="Password:"/>

View File

@ -8,7 +8,7 @@
.controller('loginController', ['$scope', '$mdDialog', 'Authentication', function($scope, $mdDialog, Authentication) {
$scope.warning = false;
$scope.creds = { username: null, password: null };
$scope.creds = { username: cookieUsername, password: null };
$scope.login = function(creds) {
$scope.warning = false;
Authentication.login(creds)