Adjust the usage of WarningPopup to its new implementation

This commit is contained in:
Jonny 2019-06-18 12:15:09 +02:00
parent 1c9c6b275e
commit 2d8fd3734b
1 changed files with 27 additions and 28 deletions

View File

@ -181,38 +181,37 @@ class EditTournamentForm extends React.Component {
onChange={this.handlePublicInput.bind(this)}/> onChange={this.handlePublicInput.bind(this)}/>
<label htmlFor="isPublic" className="custom-control-label">Das Turnier öffentlich anzeigen</label> <label htmlFor="isPublic" className="custom-control-label">Das Turnier öffentlich anzeigen</label>
</div> </div>
<FormGroup>
<Label for="playoff-teams-amount">Anzahl Teams in der Playoff-Stage</Label>
<Col xs="3" className="pl-0">
<NumericInput value={this.state.playoffTeamsAmount}
incrementText="&#215;2" incrementCallback={this.increasePlayoffTeamsAmount}
decrementText="&#247;2" decrementCallback={this.decreasePlayoffTeamsAmount}/>
</Col>
</FormGroup>
<FormGroup>
<Label for="instant-finalists-amount">
Anzahl Teams, die direkt in die Playoff-Stage weiter kommen</Label>
<Col xs="3" className="pl-0">
<NumericInput value={this.state.instantFinalistAmount}
incrementText="+1" incrementCallback={this.increaseInstantFinalistsAmount}
decrementText="-1" decrementCallback={this.decreaseInstantFinalistsAmount}/>
</Col>
</FormGroup>
<FormGroup>
<Label for="intermediate-round-participants">
Anzahl Teams, die in einer Zwischenrunde um die Playoff-Stage spielen müssen</Label>
<Col xs="3" className="pl-0">
<NumericInput value={this.state.intermediateRoundParticipants}
incrementText="+1" incrementCallback={this.increaseIntermediateRoundParticipants}
decrementText="-1" decrementCallback={this.decreaseIntermediateRoundParticipants}/>
</Col>
</FormGroup>
<WarningPopup <WarningPopup
text="Die Anzahl der Teams im Playoff muss der Anzahl an Teams, die direkt im Playoff sind text="Die Anzahl der Teams im Playoff muss der Anzahl an Teams, die direkt im Playoff sind
plus der Hälfte der Anzahl an Teams in der Zwischenrunde entsprechen." plus der Hälfte der Anzahl an Teams in der Zwischenrunde entsprechen."
shown={this.state.playoffTeamsAmount !== this.state.instantFinalistAmount + shown={this.state.playoffTeamsAmount !== this.state.instantFinalistAmount +
(this.state.intermediateRoundParticipants / 2)}> (this.state.intermediateRoundParticipants / 2)}/>
<FormGroup>
<Label for="playoff-teams-amount">Anzahl Teams in der Playoff-Stage</Label>
<Col xs="3" className="pl-0">
<NumericInput value={this.state.playoffTeamsAmount}
incrementText="&#215;2" incrementCallback={this.increasePlayoffTeamsAmount}
decrementText="&#247;2" decrementCallback={this.decreasePlayoffTeamsAmount}/>
</Col>
</FormGroup>
<FormGroup>
<Label for="instant-finalists-amount">
Anzahl Teams, die direkt in die Playoff-Stage weiter kommen</Label>
<Col xs="3" className="pl-0">
<NumericInput value={this.state.instantFinalistAmount}
incrementText="+1" incrementCallback={this.increaseInstantFinalistsAmount}
decrementText="-1" decrementCallback={this.decreaseInstantFinalistsAmount}/>
</Col>
</FormGroup>
<FormGroup>
<Label for="intermediate-round-participants">
Anzahl Teams, die in einer Zwischenrunde um die Playoff-Stage spielen müssen</Label>
<Col xs="3" className="pl-0">
<NumericInput value={this.state.intermediateRoundParticipants}
incrementText="+1" incrementCallback={this.increaseIntermediateRoundParticipants}
decrementText="-1" decrementCallback={this.decreaseIntermediateRoundParticipants}/>
</Col>
</FormGroup>
</WarningPopup>
<div className="form-group"> <div className="form-group">
<div className="input-group"> <div className="input-group">
<Button color="success" className="px-5" id="edittournament-button" <Button color="success" className="px-5" id="edittournament-button"