]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/users/edit.html
making the user edit url contain the user slug
[osqa.git] / forum / skins / default / templates / users / edit.html
index bdd0921ecc49cc761b8c276d8008e19981fd76f3..ce54c773e6633b551b7f7414a34ff0e97e4a4843 100644 (file)
 {% endblock %}\r
 {% block content %}\r
 <div id="main-bar" class="headNormal">\r
-    {{ request.user.username }} - {% trans "edit profile" %}\r
+    {{ user.username }} - {% trans "edit profile" %}\r
 </div>\r
 <div id="main-body" style="width:100%;padding-top:10px">\r
-    <form name="" action="{% url edit_user request.user.id %}" method="post">\r
+    <form name="" action="{% url edit_user user.id user.username|slugify %}" method="post">\r
+        {% csrf_token %}\r
         <div id="left" style="float:left;width:180px">\r
-            {% if request.user.email %}\r
-            {% gravatar request.user 128 %}\r
+            {% if user.email %}\r
+            {% gravatar user 128 %}\r
             {% else %}\r
             <img src="{% media  "/media/images/nophoto.png" %}">\r
             {% endif %}\r
             <div style="padding:20px 0 0 20px;font-weight:bold;font-size:150%">\r
                 <a href="http://www.gravatar.com/" target="_blank" \r
-                                       title="gravatar {% trans "image associated with your email address" %}">{% blocktrans %}avatar, see {{gravatar_faq_url}}{% endblocktrans %}</a>\r
+                                       title="gravatar {% trans "image associated with your email address" %}">{% trans "gravatar" %}</a>\r
             </div>\r
         </div>\r
         \r
@@ -59,7 +60,7 @@
                        {% if form.username %}\r
                            {{ form.username }} <span class="form-error"></span> {{ form.username.errors }}\r
                        {% else %}\r
-                           {{ request.user.username }}\r
+                           {{ user.username }}\r
                        {% endif %}\r
                        </td>\r
                    </tr>\r