79 lines
No EOL
2.9 KiB
HTML
79 lines
No EOL
2.9 KiB
HTML
{% extends "base_with_header.html" %}
|
|
|
|
{% block main_container %}
|
|
|
|
{% if let Some(user) = context.user %}
|
|
|
|
<div class="content" id="user-edit">
|
|
<h1>{{ context.tr.t(Sentence::ProfileTitle) }}</h1>
|
|
|
|
<form action="/{{ context.tr.current_lang_code() }}/user/edit" method="post">
|
|
|
|
<label for="input-name">{{ context.tr.t(Sentence::Name) }}</label>
|
|
<input
|
|
id="input-name"
|
|
type="text"
|
|
name="name"
|
|
value="{{ username }}"
|
|
autocapitalize="none"
|
|
autocomplete="title"
|
|
autofocus="autofocus">
|
|
<span></span>
|
|
|
|
<label for="input-email">{{ context.tr.t(Sentence::ProfileEmail) }}</label>
|
|
<input id="input-email" type="email"
|
|
name="email" value="{{ email }}"
|
|
autocapitalize="none" autocomplete="email" autofocus="autofocus">
|
|
<span class="user-message">{{ message_email }}</span>
|
|
|
|
<label for="input-password-1">{{ context.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">
|
|
<span></span>
|
|
|
|
<label for="input-password-2">{{ context.tr.t(Sentence::ReEnterPassword) }}</label>
|
|
<input id="input-password-2" type="password" name="password_2" autocomplete="new-password">
|
|
<span class="user-message">{{ message_password }}</span>
|
|
|
|
<label for="input-servings">{{ context.tr.t(Sentence::ProfileDefaultServings) }}</label>
|
|
<input
|
|
id="input-servings"
|
|
type="number"
|
|
step="1" min="1" max="100"
|
|
name="default_servings"
|
|
value="{{ default_servings }}">
|
|
<span></span>
|
|
|
|
<label for="input-first-day-of-week">{{ context.tr.t(Sentence::ProfileFirstDayOfWeek) }}</label>
|
|
<select id="input-first-day-of-week" name="first_day_of_the_week">
|
|
<option value="Mon"
|
|
{%~ if user.first_day_of_the_week == chrono::Weekday::Mon %}
|
|
selected
|
|
{% endif %}
|
|
>
|
|
{{ context.tr.t(Sentence::CalendarMonday) }}
|
|
</option>
|
|
<option value="Sat"
|
|
{%~ if user.first_day_of_the_week == chrono::Weekday::Sat %}
|
|
selected
|
|
{% endif %}
|
|
>
|
|
{{ context.tr.t(Sentence::CalendarSaturday) }}
|
|
</option>
|
|
<option value="Sun"
|
|
{%~ if user.first_day_of_the_week == chrono::Weekday::Sun %}
|
|
selected
|
|
{% endif %}
|
|
>
|
|
{{ context.tr.t(Sentence::CalendarSunday) }}
|
|
</option>
|
|
</select>
|
|
|
|
<input type="submit" name="commit" value="{{ context.tr.t(Sentence::Save) }}">
|
|
</form>
|
|
|
|
<span class="user-message">{{ message }}</span>
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %} |