precondition for each tutorial is at least one instruction and one task

This commit is contained in:
Delucse
2020-09-28 15:41:17 +02:00
parent 4a5d24f2d1
commit 8d752e0430
4 changed files with 22 additions and 8 deletions
+8 -1
View File
@@ -19,11 +19,15 @@ import Button from '@material-ui/core/Button';
import Backdrop from '@material-ui/core/Backdrop';
import CircularProgress from '@material-ui/core/CircularProgress';
import Divider from '@material-ui/core/Divider';
import FormHelperText from '@material-ui/core/FormHelperText';
const styles = (theme) => ({
backdrop: {
zIndex: theme.zIndex.drawer + 1,
color: '#fff',
},
errorColor: {
color: theme.palette.error.dark
}
});
@@ -138,9 +142,12 @@ class Builder extends Component {
</label>
<Button style={{marginRight: '10px', marginBottom: '10px'}} variant='contained' color='primary' onClick={() => this.uploadJsonString()}>String laden</Button>
</div>
<Divider variant='fullWidth' style={{margin: '10px 0 30px 0'}}/>
<Divider variant='fullWidth' style={{margin: '10px 0 15px 0'}}/>
{/*Tutorial-Builder-Form*/}
{this.props.error.type ?
<FormHelperText style={{lineHeight: 'initial'}} className={this.props.classes.errorColor}>{`Ein Tutorial muss mindestens jeweils eine Instruktion und eine Aufgabe enthalten.`}</FormHelperText>
: null}
<Id error={this.props.error.id} value={this.props.id}/>
<Textfield value={this.props.title} property={'title'} label={'Titel'} error={this.props.error.title}/>