nová registrace
This commit is contained in:
parent
163ccdfe00
commit
37caf989a5
@ -85,7 +85,7 @@ DATABASES = {
|
||||
|
||||
|
||||
COMGATE_MERCHANT = 485044
|
||||
COMGATE_TEST = False
|
||||
COMGATE_TEST = True
|
||||
COMGATE_SECRET = '4c36b7faf40575073b26570066ca2a9f'
|
||||
|
||||
|
||||
|
@ -117,7 +117,6 @@ class Main extends Component {
|
||||
</button>
|
||||
}
|
||||
render(){
|
||||
console.log(this.state.login_status);
|
||||
let photos_gallery = [];
|
||||
let photos_carousel = [];
|
||||
if(this.state.gallery_open !== undefined){
|
||||
@ -169,9 +168,14 @@ class Main extends Component {
|
||||
</li>
|
||||
}
|
||||
{Object.keys(this.state.login_status).length > 0 &&
|
||||
<li>
|
||||
Přihlášen {this.state.login_status.first_name} {this.state.login_status.last_name} <a href="/api/logout">Odhlásit</a>
|
||||
<div>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#register_racer">Registrovat závodníka</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
Přihlášen {this.state.login_status.first_name} {this.state.login_status.last_name} <a class="nav-link" href="/api/logout">Odhlásit</a>
|
||||
</li>
|
||||
</div>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@ -184,6 +188,38 @@ 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 == "#register_racer" &&
|
||||
<div>
|
||||
<form id="form" class="container" action="/api/register" onSubmit={(e) => this.onSubmit(e)}>
|
||||
<h1>Registrace Závodníka</h1>
|
||||
<div class="mb-3">
|
||||
<label for="first_name" class="form-label">Jméno</label>
|
||||
<input type="text" class="form-control" id="first_name" name="first_name" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="last_name" class="form-label">Přijmení</label>
|
||||
<input type="text" class="form-control" id="last_name" name="last_name" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Emailová adresa (volitelné)</label>
|
||||
<input type="email" class="form-control" id="email" name="email" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="date_of_birth" class="form-label">Datum narození</label>
|
||||
<input type="date" class="form-control" id="date_of_birth" name="date_of_birth" max={new Date().toJSON().slice(0, 10)} />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label">Telefonní číslo (volitelné)</label>
|
||||
<input type="text" class="form-control" id="phone" name="phone" />
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="agreement" name="agreement" />
|
||||
<label class="form-check-label" for="agreement">Souhlas se <a href="/public/ochrana_osobnich_udaju.pdf">zpracováním osobních údajů</a>, <a href="/public/reverz.pdf">podmínkami závodu</a> a <a href="/public/obchodni_podminky_alkator.pdf">obchodníma podmínkami závodu</a>.</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Registrovat a zaplatit</button>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
{this.state.page == "#login" &&
|
||||
<div>
|
||||
<form id="form" action="/api/login" class="container" onSubmit={(e) => this.onSubmit(e)}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user