2020-12-05 02:51:50 +01:00
|
|
|
{% extends "users/settings_base.html" %}
|
2020-12-05 02:20:00 +01:00
|
|
|
|
|
|
|
{% block title %}
|
2020-12-05 02:51:50 +01:00
|
|
|
{{ _("Edit Profile | %(username)s", username=user.username) }}
|
2020-12-05 02:20:00 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2020-12-05 02:51:50 +01:00
|
|
|
{% block pane %}
|
|
|
|
<h2 class="mt-0">{{ _("Edit Profile") }}</h2>
|
|
|
|
|
2020-12-09 20:50:11 +01:00
|
|
|
<h3>{{ _("Profile Picture") }}</h3>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-2">
|
|
|
|
{% if user.forums_username %}
|
|
|
|
<a href="https://forum.minetest.net/ucp.php?i=profile&mode=avatar">
|
|
|
|
{% elif user.email %}
|
|
|
|
<a href="https://en.gravatar.com/">
|
|
|
|
{% endif %}
|
|
|
|
<img class="img-fluid user-photo img-thumbnail img-thumbnail-1" src="{{ user.getProfilePicURL() }}">
|
|
|
|
{% if user.forums_username or user.email %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2020-12-05 02:20:00 +01:00
|
|
|
</div>
|
2020-12-09 20:50:11 +01:00
|
|
|
<div class="col">
|
|
|
|
{% if user.forums_username %}
|
|
|
|
<form method="post" action="{{ url_for('users.user_check', username=user.username) }}" class="" style="display:inline-block;">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="submit" class="btn btn-primary" value="{{ _('Sync with Forums') }}" />
|
|
|
|
</form>
|
2020-12-05 02:51:50 +01:00
|
|
|
{% endif %}
|
2020-12-09 20:50:11 +01:00
|
|
|
{% if user.email %}
|
|
|
|
<a class="btn btn-primary" href="https://en.gravatar.com/">
|
|
|
|
Gravatar
|
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
<a class="btn btn-primary disabled"
|
|
|
|
data-toggle="tooltip" data-placement="bottom"
|
|
|
|
title="Please add an email address to use Gravatar"
|
|
|
|
style="pointer-events: all;">
|
|
|
|
Gravatar
|
|
|
|
</a>
|
2020-12-05 02:51:50 +01:00
|
|
|
{% endif %}
|
2020-12-09 20:50:11 +01:00
|
|
|
</div>
|
2020-12-05 02:51:50 +01:00
|
|
|
</div>
|
2020-12-05 02:20:00 +01:00
|
|
|
|
2020-12-09 20:50:11 +01:00
|
|
|
<h3>{{ _("Profile Information") }}</h3>
|
|
|
|
|
2020-12-10 00:59:31 +01:00
|
|
|
{% from "macros/forms.html" import render_field, render_field_prefix, render_submit_field %}
|
2020-12-09 20:50:11 +01:00
|
|
|
<form action="" method="POST" class="form" role="form">
|
|
|
|
{{ form.hidden_tag() }}
|
2020-12-05 02:51:50 +01:00
|
|
|
|
2020-12-09 20:50:11 +01:00
|
|
|
{% if user.checkPerm(current_user, "CHANGE_USERNAMES") %}
|
|
|
|
{{ render_field(form.display_name, tabindex=230) }}
|
|
|
|
{{ render_field(form.forums_username, tabindex=230) }}
|
2020-12-10 00:59:31 +01:00
|
|
|
{{ render_field_prefix(form.github_username, tabindex=230) }}
|
2020-12-09 20:50:11 +01:00
|
|
|
{% endif %}
|
2020-12-05 02:51:50 +01:00
|
|
|
|
2020-12-09 20:50:11 +01:00
|
|
|
{% if user.checkPerm(current_user, "CHANGE_PROFILE_URLS") %}
|
|
|
|
{{ render_field(form.website_url, tabindex=232) }}
|
|
|
|
{{ render_field(form.donate_url, tabindex=233) }}
|
|
|
|
{% endif %}
|
2020-12-05 02:51:50 +01:00
|
|
|
|
2020-12-09 20:50:11 +01:00
|
|
|
{% if user.checkPerm(current_user, "CHANGE_RANK") %}
|
|
|
|
{{ render_field(form.rank, tabindex=250) }}
|
|
|
|
{% endif %}
|
2020-12-05 02:51:50 +01:00
|
|
|
|
2020-12-09 20:50:11 +01:00
|
|
|
<p>
|
|
|
|
{{ render_submit_field(form.submit, tabindex=280) }}
|
|
|
|
</p>
|
|
|
|
</form>
|
2020-12-05 02:20:00 +01:00
|
|
|
|
|
|
|
{% endblock %}
|