mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00

Users may want to change their usernames for a number of different reasons, but at the moment we require them to contact an admin to do that. Provided we validate the new username correctly and add a CAPTCHA to make automated enumeration difficult, we can add username to the Edit Profile form and then users can do that any time they wish. While we're doing this, show a message when the profile is successfully updated. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
53 lines
1.3 KiB
HTML
53 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - profile page template
|
|
|
|
Copyright (C) 2013 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
<!--
|
|
{% autoescape on %}
|
|
{% block title_append %} - profile{% endblock %}
|
|
{% endautoescape %}
|
|
-->
|
|
|
|
{% block content %}
|
|
{% autoescape on %}
|
|
|
|
<form method="post" action=".">
|
|
{% for hidden in form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
|
|
{% for field in form.visible_fields %}
|
|
{% if field.name in error_fields %}
|
|
<div class="form-group alert alert-danger">
|
|
{{ field.errors }}
|
|
{% else %}
|
|
<div class="form-group">
|
|
{% endif %}
|
|
<div class="control-label {% if field.required %}requiredlabel{% endif %}">
|
|
{{ field.label_tag }}
|
|
</div>
|
|
<div class="controls">
|
|
{{ field }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<input type="submit" class="btn btn-default" value="{% trans 'Save' %}" />
|
|
<a class="btn btn-default" href="{% url 'frontpage' %}">{% trans 'Cancel' %}</a>
|
|
<a class="btn btn-danger" href="{% url 'delete_account' %}">{% trans 'Delete account' %}</a>
|
|
{% csrf_token %}
|
|
</form>
|
|
|
|
{% endautoescape %}
|
|
|
|
{% endblock %}
|