Support disabling of Loop Instance Properties "Save" button 58/110158/1
authorTed Humphrey <Thomas.Humphrey@att.com>
Tue, 14 Jul 2020 13:04:01 +0000 (09:04 -0400)
committerTed Humphrey <Thomas.Humphrey@att.com>
Tue, 14 Jul 2020 13:04:01 +0000 (09:04 -0400)
Issue-ID: CLAMP-895
Change-Id: I0e8fd70b750a59c14bb8e73407c49cc09f1d2657
Signed-off-by: Ted Humphrey <Thomas.Humphrey@att.com>
ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js

index c0a2084..acd0aca 100644 (file)
@@ -48,6 +48,7 @@ export default class LoopPropertiesModal extends React.Component {
                this.renderDcaeParameters = this.renderDcaeParameters.bind(this);
                this.renderAllParameters = this.renderAllParameters.bind(this);
                this.getDcaeParameters = this.getDcaeParameters.bind(this);
+               this.readOnly = props.readOnly !== undefined ? props.readOnly : false;
        }
 
        componentWillReceiveProps(newProps) {
@@ -109,7 +110,7 @@ export default class LoopPropertiesModal extends React.Component {
                                        {this.renderAllParameters()}
                                <Modal.Footer>
                                        <Button variant="secondary" type="null" onClick={this.handleClose}>Cancel</Button>
-                                       <Button variant="primary" type="submit" onClick={this.handleSave}>Save Changes</Button>
+                                       <Button variant="primary" type="submit" disabled={this.readOnly}  onClick={this.handleSave}>Save Changes</Button>
                                </Modal.Footer>
                        </ModalStyled>
                );