recipes/backend/templates/profile.html

52 lines
No EOL
1.6 KiB
HTML

{% extends "base_with_header.html" %}
{% block main_container %}
{% if let Some(user) = user %}
<div class="content" id="user-edit">
<h1>{{ tr.t(Sentence::ProfileTitle) }}</h1>
<form action="/user/edit" method="post">
<label for="input-name">{{ tr.t(Sentence::Name) }}</label>
<input
id="input-name"
type="text"
name="name"
value="{{ username }}"
autocapitalize="none"
autocomplete="title"
autofocus="autofocus">
<label for="input-email">{{ tr.t(Sentence::ProfileEmail) }}</label>
<input id="input-email" type="email"
name="email" value="{{ email }}"
autocapitalize="none" autocomplete="email" autofocus="autofocus">
{{ message_email }}
<label for="input-servings">{{ tr.t(Sentence::ProfileDefaultServings) }}</label>
<input
id="input-servings"
type="number"
step="1" min="1" max="100"
name="default_servings"
value="{{ default_servings }}">
<label for="input-password-1">{{ tr.tp(Sentence::ProfileNewPassword, [Box::new(common::consts::MIN_PASSWORD_SIZE)]) }}</label>
<input id="input-password-1" type="password" name="password_1" autocomplete="new-password">
<label for="input-password-2">{{ tr.t(Sentence::ReEnterPassword) }}</label>
<input id="input-password-2" type="password" name="password_2" autocomplete="new-password">
{{ message_password }}
<input type="submit" name="commit" value="{{ tr.t(Sentence::Save) }}">
</form>
{{ message }}
</div>
{% endif %}
{% endblock %}