X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Faccounts%2Fsrc%2Faccount%2Faccount.jsx;h=b7dbf358cf173f34933719e73254cb74a424364b;hb=ef3a1f2ff2307664018018f4049ecf1a195e3d32;hp=a3b0bf12e997b027e79840e094d1cf35ebf74122;hpb=9c013ddf2d997053c1c8d8bd732275a932ff6b0a;p=osm%2FUI.git diff --git a/skyquake/plugins/accounts/src/account/account.jsx b/skyquake/plugins/accounts/src/account/account.jsx index a3b0bf12e..b7dbf358c 100644 --- a/skyquake/plugins/accounts/src/account/account.jsx +++ b/skyquake/plugins/accounts/src/account/account.jsx @@ -1,5 +1,5 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,7 +18,7 @@ import React from 'react'; import Button from 'widgets/button/rw.button.js'; -import _ from 'lodash'; +import _cloneDeep from 'lodash/cloneDeep'; import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx'; import Crouton from 'react-crouton'; import TextInput from 'widgets/form_controls/textInput.jsx'; @@ -94,7 +94,7 @@ class Account extends React.Component { } } - let newAccount = _.cloneDeep(removeTrailingWhitespace(Account)); + let newAccount = _cloneDeep(removeTrailingWhitespace(Account)); delete newAccount.params; newAccount.nestedParams && newAccount.nestedParams['container-name'] && @@ -169,7 +169,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);