@ -1,5 +1,5 @@
/ *
* Copyright ( c ) 201 6 , WSO2 Inc . ( http : //www.wso2.org) All Rights Reserved.
* Copyright ( c ) 201 5 , WSO2 Inc . ( http : //www.wso2.org) All Rights Reserved.
*
* WSO2 Inc . licenses this file to you under the Apache License ,
* Version 2.0 ( the "License" ) ; you may not use this file except
@ -72,8 +72,8 @@ var disableInlineError = function (inputField, errorMsg, errorSign) {
* Validate if provided username is valid against RegEx configures .
* /
validateInline [ "user-name" ] = function ( ) {
var username i nput = $ ( "input#username" ) ;
if ( inputIsValid ( username input. data ( "regex" ) , usernamei nput. val ( ) ) ) {
var username I nput = $ ( "input#username" ) ;
if ( inputIsValid ( username Input. data ( "regex" ) , usernameI nput. val ( ) ) ) {
disableInlineError ( "usernameInputField" , "usernameEmpty" , "usernameError" ) ;
} else {
enableInlineError ( "usernameInputField" , "usernameEmpty" , "usernameError" ) ;
@ -84,9 +84,9 @@ validateInline["user-name"] = function () {
* Validate if provided first name is valid against RegEx configures .
* /
validateInline [ "first-name" ] = function ( ) {
var firstname i nput = $ ( "input#firstname" ) ;
if ( firstname i nput. val ( ) ) {
disableInlineError ( "firstNameField" , "fnError" ) ;
var firstname I nput = $ ( "input#firstname" ) ;
if ( firstname I nput. val ( ) ) {
disableInlineError ( "firstNameField" , "fnError" ) ;
} else {
enableInlineError ( "firstNameField" , "fnError" ) ;
}
@ -96,8 +96,8 @@ validateInline["first-name"] = function () {
* Validate if provided last name is valid against RegEx configures .
* /
validateInline [ "last-name" ] = function ( ) {
var lastname i nput = $ ( "input#lastname" ) ;
if ( lastname i nput. val ( ) ) {
var lastname I nput = $ ( "input#lastname" ) ;
if ( lastname I nput. val ( ) ) {
disableInlineError ( "lastNameField" , "lnError" ) ;
} else {
enableInlineError ( "lastNameField" , "lnError" ) ;
@ -165,9 +165,9 @@ $("#userStore").change(
function ( ) {
var str = "" ;
$ ( "select option:selected" ) . each ( function ( ) {
str += $ ( this ) . text ( ) + " ";
str += $ ( this ) . text ( ) + " ";
} ) ;
var getRolesAPI = deviceMgtAPIsBasePath + "/roles /"+ str ;
var getRolesAPI = deviceMgtAPIsBasePath + "/roles ?user-store=" + str + "&limit=100" ;
invokerUtil . get (
getRolesAPI ,
@ -188,8 +188,7 @@ $("#userStore").change(
}
) ;
}
) . change ( ) ;
} ) . change ( ) ;
$ ( document ) . ready ( function ( ) {
$ ( "#emailValidationText" ) . hide ( ) ;
@ -207,7 +206,7 @@ $(document).ready(function () {
var usernameInput = $ ( "input#username" ) ;
var firstnameInput = $ ( "input#firstname" ) ;
var lastnameInput = $ ( "input#lastname" ) ;
//var charLimit = parseInt($("input#username").attr("limit"));
var charLimit = parseInt ( $ ( "input#username" ) . attr ( "limit" ) ) ;
var domain = $ ( "#userStore" ) . val ( ) ;
var username = usernameInput . val ( ) . trim ( ) ;
var firstname = firstnameInput . val ( ) ;