parent
a47c68eb5a
commit
3857adcdc6
@ -0,0 +1,26 @@
|
||||
use crate::{SupportedLanguage, Locale, VERSION};
|
||||
use axum::Form;
|
||||
use askama_axum::Template;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Default)]
|
||||
pub struct Login {
|
||||
username: String,
|
||||
password: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Login {
|
||||
fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(formatter, r#"
|
||||
<form method="POST">
|
||||
<label for="uname">Username</label>
|
||||
<input id="uname" type="text" name="username"/>
|
||||
<br/>
|
||||
<label for="pass">Password</label>
|
||||
<input id="pass" type="password" name="password"/>
|
||||
<input type="submit"/>
|
||||
</forn>
|
||||
"#);
|
||||
Ok(())
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{% extends "master.html" %}
|
||||
|
||||
{% block content %}
|
||||
{{ form|safe }}
|
||||
{% endblock %}
|
@ -0,0 +1,22 @@
|
||||
{% extends "master.html" %}
|
||||
|
||||
{% block content %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ localize("league_name") }}</th>
|
||||
<th>{{ localize("start_date") }}</th>
|
||||
<th>{{ localize("end_date") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for league in leagues %}
|
||||
<tr>
|
||||
<td>{{ league.name|nullable }}</td>
|
||||
<td>{{ league.start_date }}</td>
|
||||
<td>{{ league.end_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
@ -0,0 +1,8 @@
|
||||
{% extends "master.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% block form %}{% endblock %}
|
||||
<input type="submit" value="{% block submit_text %}{% endblock %}"/>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Reference in new issue