mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
generalize edit file control
This commit is contained in:
parent
3e78c99771
commit
bb09c691f8
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ class EditFileWidgetControl extends React.Component {
|
|||
let fileOptions = [];
|
||||
if (this.state.files.length > 0){
|
||||
fileOptions.push(
|
||||
<option key = {0} default>Select image file</option>
|
||||
<option key = {0} default>Select file</option>
|
||||
)
|
||||
fileOptions.push(this.state.files.map((file, index) => (
|
||||
<option key={index+1} value={file.id}>{file.name}</option>
|
||||
|
@ -60,7 +60,7 @@ class EditFileWidgetControl extends React.Component {
|
|||
|
||||
return <div>
|
||||
<FormGroup controlId="file">
|
||||
<FormLabel>Image</FormLabel>
|
||||
<FormLabel>File</FormLabel>
|
||||
<FormControl
|
||||
as="select"
|
||||
value={isCustomProperty ? this.props.widget[parts[0]][parts[1]] : this.props.widget[this.props.controlId]}
|
||||
|
|
Loading…
Add table
Reference in a new issue