Skip to content

Commit

Permalink
Merge pull request Ericsson#2276 from csordasmarton/fix-login-autofill
Browse files Browse the repository at this point in the history
[server] Fix login form autocompletion
  • Loading branch information
bruntib committed Aug 23, 2019
2 parents ae33ec1 + 62b8f55 commit 72b8946
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web/server/www/scripts/login/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ function (declare, cookie, dom, domConstruct, domClass, ioQuery, keys, on,
_doLogin : function() {
var that = this;

var userName = this.txtUser.get('value');
var pass = this.txtPass.get('value');

// No username supplied.
if (!this.txtUser.value || !this.txtUser.value.trim().length) {
if (!userName || !userName.trim().length) {
domClass.add(that._mbox.domNode, 'mbox-error');
that._mbox.show("Failed to log in!", "No username supplied.");
return;
Expand All @@ -76,7 +79,7 @@ function (declare, cookie, dom, domConstruct, domClass, ioQuery, keys, on,
this._standBy.show();

CC_AUTH_SERVICE.performLogin(
'Username:Password', this.txtUser.value + ':' + this.txtPass.value,
'Username:Password', userName + ':' + pass,
function (sessionToken) {
domClass.add(that._mbox.domNode, 'mbox-success');
that._mbox.show("Successfully logged in!", '');
Expand Down Expand Up @@ -270,7 +273,7 @@ function (declare, cookie, dom, domConstruct, domClass, ioQuery, keys, on,
var loginContainer = new ContentPane({
region : 'center',
postCreate : function () {
var smallerContainer = domConstruct.create('div', {
var smallerContainer = domConstruct.create('form', {
id : 'login-form'
}, this.containerNode);

Expand Down

0 comments on commit 72b8946

Please sign in to comment.