X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Faccounts%2Fsrc%2Faccount%2Faccount.jsx;h=41a3046ab57c5bedb11aabd224fe40764e33127a;hb=706d84720cce4449aabc931edd3a928d9d86590d;hp=e588e744a257c728a7690316fcf986464d8bc05d;hpb=4ef8c40c2c013c21f5487330daeab2561ba25fb3;p=osm%2FUI.git diff --git a/skyquake/plugins/accounts/src/account/account.jsx b/skyquake/plugins/accounts/src/account/account.jsx index e588e744a..41a3046ab 100644 --- a/skyquake/plugins/accounts/src/account/account.jsx +++ b/skyquake/plugins/accounts/src/account/account.jsx @@ -23,6 +23,7 @@ import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx' import Crouton from 'react-crouton'; import TextInput from 'widgets/form_controls/textInput.jsx'; import {AccountConnectivityStatus} from '../account_sidebar/accountSidebar.jsx'; +import Utils from 'utils/utils.js'; import 'style/common.scss'; import './account.scss'; class Account extends React.Component { @@ -106,8 +107,8 @@ class Account extends React.Component { self.props.router.push({pathname:'accounts'}); self.props.flux.actions.global.hideScreenLoader.defer(); }, - function() { - self.props.flux.actions.global.showNotification("There was an error creating your account. Please contact your system administrator."); + function(error) { + self.props.flux.actions.global.showNotification(Utils.parseError(error)); self.props.flux.actions.global.hideScreenLoader.defer(); }); } @@ -169,7 +170,7 @@ class Account extends React.Component { } evaluateSubmit = (e) => { if (e.keyCode == 13) { - if (this.props.edit) { + if (this.props.params.name != 'create') { this.update(e); } else { this.create(e);