racers page
This commit is contained in:
parent
c87ff05370
commit
d1626a8460
@ -72,6 +72,5 @@ class Racer(models.Model):
|
||||
paid = models.BooleanField(default=False)
|
||||
invoice_id = models.IntegerField(null=True, blank=True, unique=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return f"<Racer {self.email} {self.first_name} {self.last_name} {self.team}>"
|
||||
|
@ -164,7 +164,7 @@ class Main extends Component {
|
||||
</li>
|
||||
{Object.keys(this.state.login_status).length === 0 &&
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#login">Přihlašování</a>
|
||||
<a class="nav-link" href="#login">Přihlášení</a>
|
||||
</li>
|
||||
}
|
||||
{Object.keys(this.state.login_status).length === 0 &&
|
||||
@ -172,6 +172,11 @@ class Main extends Component {
|
||||
<a class="nav-link" href="#register_user">Registrace</a>
|
||||
</li>
|
||||
}
|
||||
{this.state.login_status.racers.length > 1 &&
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#racers">Závodníci</a>
|
||||
</li>
|
||||
}
|
||||
{Object.keys(this.state.login_status).length > 0 &&
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#register_racer">Registrovat závodníka</a>
|
||||
@ -193,6 +198,9 @@ class Main extends Component {
|
||||
<div class="absolute container-fluid alert alert-danger" onClick={(e) => {this.setState({status: "", status_text:""})}}>
|
||||
{this.state.status_text}
|
||||
</div>}
|
||||
{this.state.page == "#racers" &&
|
||||
this.state.login_status.racers
|
||||
}
|
||||
{this.state.page == "#register_racer" &&
|
||||
<div>
|
||||
<form id="form" class="container" action="/api/register_racer" onSubmit={(e) => this.onSubmit(e)}>
|
||||
@ -250,11 +258,11 @@ class Main extends Component {
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password1" class="form-label">Heslo:</label>
|
||||
<input type="password1" class="form-control" name="password1"/>
|
||||
<input type="password" class="form-control" name="password1"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password2" class="form-label">Znovu heslo:</label>
|
||||
<input type="password2" class="form-control" name="password2"/>
|
||||
<input type="password" class="form-control" name="password2"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Registrovat</button>
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user