summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx80
1 files changed, 46 insertions, 34 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx
index af759f1206..04a00177d3 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/overview/summary/LicenseModelDescriptionEdit.jsx
@@ -18,42 +18,54 @@ import i18n from 'nfvo-utils/i18n/i18n.js';
import Input from 'nfvo-components/input/validation/Input.jsx';
class LicenseModelDescriptionEdit extends React.Component {
- render() {
- //TODO check if buttons
- let {onDataChanged, description, genericFieldInfo} = this.props;
- let {isValid, errorText} = genericFieldInfo.description;
- let saveButtonClassName = isValid ? 'description-save' : 'description-save disabled';
- return(
- <div className='vendor-description-edit'>
+ render() {
+ //TODO check if buttons
+ let { onDataChanged, description, genericFieldInfo } = this.props;
+ let { isValid, errorText } = genericFieldInfo.description;
+ let saveButtonClassName = isValid
+ ? 'description-save'
+ : 'description-save disabled';
+ return (
+ <div className="vendor-description-edit">
+ <Input
+ onChange={description => onDataChanged({ description })}
+ value={description}
+ isValid={isValid}
+ errorText={errorText}
+ className="description-edit-textarea"
+ type="textarea"
+ />
+ <div className="buttons-row">
+ <div className="buttons-wrapper">
+ <div
+ onClick={() => this.submit()}
+ className={saveButtonClassName}
+ data-test-id="vlm-summary-vendor-desc-save-btn">
+ {i18n('Save')}
+ </div>
+ <div
+ onClick={() => this.onClose()}
+ className="description-button"
+ data-test-id="vlm-summary-vendor-desc-cancel-btn">
+ {i18n('Cancel')}
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
- <Input
- onChange={description => onDataChanged({description})}
- value={description}
- isValid={isValid}
- errorText={errorText}
- className='description-edit-textarea'
- type='textarea'/>
- <div className='buttons-row'>
- <div className='buttons-wrapper'>
- <div onClick={() => this.submit()} className={saveButtonClassName} data-test-id='vlm-summary-vendor-desc-save-btn'>{i18n('Save')}</div>
- <div onClick={() => this.onClose()} className='description-button' data-test-id='vlm-summary-vendor-desc-cancel-btn'>{i18n('Cancel')}</div>
- </div>
- </div>
- </div>
- );
- }
+ onClose() {
+ this.props.onClose();
+ }
- onClose() {
- this.props.onClose();
- }
-
- submit() {
- let {onSubmit, data, description} = this.props;
- onSubmit({
- ...data,
- description: description.trim()
- });
- }
+ submit() {
+ let { onSubmit, data, description } = this.props;
+ onSubmit({
+ ...data,
+ description: description.trim()
+ });
+ }
}
export default LicenseModelDescriptionEdit;