{% extends "user/user_base.html" %}
{% load i18n %}
{% block title %}{% trans "User Profile" %}{% endblock %}
{% block userinfoentity %}
<div class="col-4">
    <h3>{% trans "Receiver Choose" %}</h3>
    <br>
    <select onchange="location = this.options[this.selectedIndex].value;">
        <option value="{% url "order:order_preview" %}"></option>
        {% for userinfo in user.owneduserinfos %}
        <option value="{% url "user:profile_view" %}?userinfoentity={{userinfo.id}}">{{userinfo.name}}</option>
        {% endfor %}
    </select>
</div>
<div class="col-4">
    <h3>{% trans "Receiver Info Management" %}</h3>
    <form action="{% url "user:userinfo_manage" %}" method="post">
    {{ userinfo_form.as_p }}
    {% csrf_token %}
    <p><input type="submit" value="{% trans "Save Receiver Info" %}"></p>
    </form>
    <p>{{ loginresult }}</p>
</div>
{% endblock %}
{% block h3 %}{% trans "Profile Management" %}{% endblock%}
{% block user_form %}
<form action="{% url "user:profile_change" user.id %}" method="post">
    {{ profile_form.as_p }}
    {% csrf_token %}
    <p><input type="submit" value="{% trans "Save Profile" %}"></p>
</form>
<p>{{ loginresult }}</p>
{% endblock %}

