diff options
author | 2018-07-02 14:05:17 +0300 | |
---|---|---|
committer | 2018-07-03 07:44:48 +0000 | |
commit | 8ae8f7eba59880eb81b985e98d87961e631013c7 (patch) | |
tree | 036a293b92bb8e45e4fef455cdde0f3c0fd8e0c4 /openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx | |
parent | 4cc66168639fc4448023b73c9e42363823dd4788 (diff) |
archive fix & archive/filter toggle removed
Issue-ID: SDC-1383
Change-Id: I38548e5e0b5cce224e0d1324a97f9edce6dc0cfb
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx index 432493065f..c9693d4f93 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreationView.jsx @@ -1,5 +1,5 @@ /*! - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright © 2016-2018 European Support Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,13 +91,10 @@ class SoftwareProductCreationView extends React.Component { onChange={name => onDataChanged( { name }, - SP_CREATION_FORM_NAME, - { - name: name => - this.validateName(name) - } + SP_CREATION_FORM_NAME ) } + onBlur={this.validateIsNameUnique} isValid={genericFieldInfo.name.isValid} errorText={genericFieldInfo.name.errorText} type="text" @@ -207,17 +204,15 @@ class SoftwareProductCreationView extends React.Component { } getVendorList() { - let { finalizedLicenseModelList } = this.props; + let { vendorList } = this.props; return [{ enum: '', title: i18n('please select...') }].concat( - sortByStringProperty(finalizedLicenseModelList, 'name').map( - vendor => { - return { - enum: vendor.id, - title: vendor.name - }; - } - ) + sortByStringProperty(vendorList, 'name').map(vendor => { + return { + enum: vendor.id, + title: vendor.name + }; + }) ); } @@ -270,6 +265,13 @@ class SoftwareProductCreationView extends React.Component { }; } + validateIsNameUnique = e => { + const value = e.target.value; + if (value) { + this.props.isNameUnique(value, 'name', SP_CREATION_FORM_NAME); + } + }; + validate() { this.props.onValidateForm(SP_CREATION_FORM_NAME); } @@ -290,6 +292,7 @@ const OnboardingProcedure = ({ onboardingMethod === onboardingMethodConst.NETWORK_PACKAGE } + errorText={genericFieldInfo.onboardingMethod.errorText} onChange={() => onDataChanged( { |