1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Disable model and configuration controls while not usable

This commit is contained in:
Markus Grigull 2018-05-30 13:33:54 +02:00
parent b6207cf80b
commit 472af5c126
2 changed files with 5 additions and 5 deletions

View file

@ -123,7 +123,7 @@ class SelectFile extends React.Component {
</Col>
<Col sm={9} md={10}>
<FormControl componentClass='select' placeholder='Select file' onChange={this.handleChange}>
<FormControl disabled={this.props.disabled} componentClass='select' placeholder='Select file' onChange={this.handleChange}>
{fileOptions}
</FormControl>
</Col>
@ -131,13 +131,13 @@ class SelectFile extends React.Component {
<FormGroup>
<Col sm={9} md={10} smOffset={3} mdOffset={2}>
<FormControl type='file' onChange={this.selectUploadFile} />
<FormControl disabled={this.props.disabled} type='file' onChange={this.selectUploadFile} />
</Col>
</FormGroup>
<FormGroup>
<Col sm={9} md={10} smOffset={3} mdOffset={2}>
<Button bsSize='small' onClick={this.startFileUpload}>
<Button disabled={this.props.disabled} bsSize='small' onClick={this.startFileUpload}>
Upload file
</Button>

View file

@ -126,9 +126,9 @@ class SimulationModel extends React.Component {
<Col xs={12} sm={12}>
<SelectSimulator onChange={this.handleSimulatorChange} value={this.state.simulationModel.simulator} />
<SelectFile type='model' name='Model' onChange={this.handleModelChange} value={this.state.simulationModel.model} />
<SelectFile disabled type='model' name='Model' onChange={this.handleModelChange} value={this.state.simulationModel.model} />
<SelectFile type='configuration' name='Configuration' onChange={this.handleConfigurationChange} value={this.state.simulationModel.configuration} />
<SelectFile disabled type='configuration' name='Configuration' onChange={this.handleConfigurationChange} value={this.state.simulationModel.configuration} />
</Col>
<Col xs={12} sm={6}>