FS-8976 [verto_communicator] Properly alert that the login has failed vs silently failing and sitting there.
This commit is contained in:
parent
ad03c5c354
commit
b6057f10de
|
@ -92,6 +92,7 @@
|
||||||
"LOGIN_INFORMATION": "Login Information",
|
"LOGIN_INFORMATION": "Login Information",
|
||||||
"SAVE_LOGIN_INFORMATION": "Save Login Information",
|
"SAVE_LOGIN_INFORMATION": "Save Login Information",
|
||||||
"INVALID_LOGIN_FIELDS": "Verify the fields below and try again.",
|
"INVALID_LOGIN_FIELDS": "Verify the fields below and try again.",
|
||||||
|
"INVALID_SETTINGS_FIELDS": "Verify the settings below and try again.",
|
||||||
"NAME": "Name",
|
"NAME": "Name",
|
||||||
"YOUR_NAME": "Your name",
|
"YOUR_NAME": "Your name",
|
||||||
"EMAIL": "Email",
|
"EMAIL": "Email",
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
"LOGIN_INFORMATION": "Informações de login",
|
"LOGIN_INFORMATION": "Informações de login",
|
||||||
"SAVE_LOGIN_INFORMATION": "Salvar informações de login",
|
"SAVE_LOGIN_INFORMATION": "Salvar informações de login",
|
||||||
"INVALID_LOGIN_FIELDS": "Verifique os campos abaixo e tente novamente.",
|
"INVALID_LOGIN_FIELDS": "Verifique os campos abaixo e tente novamente.",
|
||||||
|
"INVALID_SETTINGS_FIELDS": "Verifique as configurações abaixo e tente novamente.",
|
||||||
"NAME": "Nome",
|
"NAME": "Nome",
|
||||||
"YOUR_NAME": "Seu nome",
|
"YOUR_NAME": "Seu nome",
|
||||||
"EMAIL": "E-mail",
|
"EMAIL": "E-mail",
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
<p>{{ 'INVALID_LOGIN_FIELDS' | translate }}</p>
|
<p>{{ 'INVALID_LOGIN_FIELDS' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ng-show="loginFailed" class="alert alert-danger">
|
||||||
|
<p>{{ 'INVALID_SETTINGS_FIELDS' | translate }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form name="form" class="css-form" novalidate ng-init="advanced = false">
|
<form name="form" class="css-form" novalidate ng-init="advanced = false">
|
||||||
<div class="form-group {{ (((!form.name.$pristine || form.$submitted) && !form.name.$valid) ? 'has-error': '') }}">
|
<div class="form-group {{ (((!form.name.$pristine || form.$submitted) && !form.name.$valid) ? 'has-error': '') }}">
|
||||||
<label class="control-label" for="login-name">{{ 'NAME' | translate}}</label>
|
<label class="control-label" for="login-name">{{ 'NAME' | translate}}</label>
|
||||||
|
@ -19,25 +23,25 @@
|
||||||
<input type="email" name="email" class="form-control" id="login-email" placeholder="{{ 'YOUR_EMAIL' | translate}}" required="" ng-model="verto.data.email" ng-model-options="{debounce: 250}">
|
<input type="email" name="email" class="form-control" id="login-email" placeholder="{{ 'YOUR_EMAIL' | translate}}" required="" ng-model="verto.data.email" ng-model-options="{debounce: 250}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" ng-hide="!advanced">
|
<div class="form-group" ng-show="advanced || loginFailed">
|
||||||
<label class="control-label" for="login-user">{{ 'USER' | translate}}</label>
|
<label class="control-label" for="login-user">{{ 'USER' | translate}}</label>
|
||||||
<input type="text" class="form-control" id="login-user" placeholder="{{ 'USER' | translate}}" ng-model="verto.data.login">
|
<input type="text" class="form-control" id="login-user" placeholder="{{ 'USER' | translate}}" ng-model="verto.data.login">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" ng-hide="!advanced">
|
<div class="form-group" ng-show="advanced || loginFailed">
|
||||||
<label class="control-label" for="login-password">{{ 'PASSWORD' | translate}}</label>
|
<label class="control-label" for="login-password">{{ 'PASSWORD' | translate}}</label>
|
||||||
<input type="password" class="form-control" id="login-password" placeholder={{ 'PASSWORD' | translate}} ng-model="verto.data.password">
|
<input type="password" class="form-control" id="login-password" placeholder={{ 'PASSWORD' | translate}} ng-model="verto.data.password">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" ng-hide="!advanced">
|
<div class="form-group" ng-show="advanced || loginFailed">
|
||||||
<label class="control-label" for="login-callerid">{{ 'CALLER_ID' | translate}}</label>
|
<label class="control-label" for="login-callerid">{{ 'CALLER_ID' | translate}}</label>
|
||||||
<input type="text" class="form-control" id="login-callerid" placeholder="{{ 'CALLER_ID' | translate}}" ng-model="verto.data.callerid">
|
<input type="text" class="form-control" id="login-callerid" placeholder="{{ 'CALLER_ID' | translate}}" ng-model="verto.data.callerid">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" ng-hide="!advanced">
|
<div class="form-group" ng-show="advanced || loginFailed">
|
||||||
<label class="control-label" for="login-hostname">{{ 'HOSTNAME' | translate}}</label>
|
<label class="control-label" for="login-hostname">{{ 'HOSTNAME' | translate}}</label>
|
||||||
<input type="text" class="form-control" id="login-hostname" placeholder="{{ 'HOSTNAME' | translate}}" ng-model="verto.data.hostname">
|
<input type="text" class="form-control" id="login-hostname" placeholder="{{ 'HOSTNAME' | translate}}" ng-model="verto.data.hostname">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" ng-hide="!advanced">
|
<div class="form-group" ng-show="advanced || loginFailed">
|
||||||
<label class="control-label" for="login-wsurl">{{ 'WEBSOCKET_URL' | translate}}</label>
|
<label class="control-label" for="login-wsurl">{{ 'WEBSOCKET_URL' | translate}}</label>
|
||||||
<input type="text" class="form-control" id="login-wsurl" placeholder="{{ 'WEBSOCKET_URL' | translate}}" ng-model="verto.data.wsURL">
|
<input type="text" class="form-control" id="login-wsurl" placeholder="{{ 'WEBSOCKET_URL' | translate}}" ng-model="verto.data.wsURL">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -577,6 +577,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
||||||
var callbacks = {
|
var callbacks = {
|
||||||
onWSLogin: function(v, success) {
|
onWSLogin: function(v, success) {
|
||||||
data.connected = success;
|
data.connected = success;
|
||||||
|
$rootScope.loginFailed = !success;
|
||||||
$rootScope.$emit('ws.login', success);
|
$rootScope.$emit('ws.login', success);
|
||||||
console.debug('Connected to verto server:', success);
|
console.debug('Connected to verto server:', success);
|
||||||
|
|
||||||
|
@ -679,7 +680,6 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
|
||||||
|
|
||||||
onWSClose: function(v, success) {
|
onWSClose: function(v, success) {
|
||||||
console.debug('onWSClose:', success);
|
console.debug('onWSClose:', success);
|
||||||
|
|
||||||
$rootScope.$emit('ws.close', success);
|
$rootScope.$emit('ws.close', success);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue