Rename property 'fadeIn' to 'groupPhaseEnabled'
I think this name is much more descriptive of what this property actually represents.
This commit is contained in:
parent
e473c9af3e
commit
d957ad417d
|
|
@ -91,8 +91,11 @@ function CreateTournamentCard() {
|
||||||
class CreateTournamentForm extends React.Component {
|
class CreateTournamentForm extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {fadeIn: false, teams: []};
|
this.state = {
|
||||||
this.toggle = this.toggle.bind(this);
|
groupPhaseEnabled: false,
|
||||||
|
teams: []
|
||||||
|
};
|
||||||
|
this.handleGroupPhaseEnabledInput = this.handleGroupPhaseEnabledInput.bind(this);
|
||||||
this.teamListUpdate = this.teamListUpdate.bind(this);
|
this.teamListUpdate = this.teamListUpdate.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,9 +115,10 @@ class CreateTournamentForm extends React.Component {
|
||||||
<CustomInput type="checkbox" id="public"
|
<CustomInput type="checkbox" id="public"
|
||||||
label="Turnier öffentlich anzeigen (schreibgeschützt)"/>
|
label="Turnier öffentlich anzeigen (schreibgeschützt)"/>
|
||||||
<CustomInput type="checkbox" id="mix-teams" label="Teams mischen"/>
|
<CustomInput type="checkbox" id="mix-teams" label="Teams mischen"/>
|
||||||
<CustomInput type="checkbox" id="group-phase" label="Gruppenphase" onClick={this.toggle}/>
|
<CustomInput type="checkbox" id="group-phase" label="Gruppenphase"
|
||||||
|
checked={this.state.groupPhaseEnabled} onChange={this.handleGroupPhaseEnabledInput}/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<Fade in={this.state.fadeIn} tag="div" className="mt-3" baseClass="d-none"
|
<Fade in={this.state.groupPhaseEnabled} tag="div" className="mt-3" baseClass="d-none"
|
||||||
baseClassActive="d-block">
|
baseClassActive="d-block">
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label for="teams-per-group">Anzahl Teams pro Gruppe</Label>
|
<Label for="teams-per-group">Anzahl Teams pro Gruppe</Label>
|
||||||
|
|
@ -139,9 +143,7 @@ class CreateTournamentForm extends React.Component {
|
||||||
this.setState({teams: list});
|
this.setState({teams: list});
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle() {
|
handleGroupPhaseEnabledInput(input) {
|
||||||
this.setState({
|
this.setState({ groupPhaseEnabled: input.target.checked });
|
||||||
fadeIn: !this.state.fadeIn
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue