diff --git a/circle/dashboard/forms.py b/circle/dashboard/forms.py index acb3c12..816a5d9 100644 --- a/circle/dashboard/forms.py +++ b/circle/dashboard/forms.py @@ -1103,7 +1103,8 @@ class TraitForm(forms.ModelForm): class MyProfileForm(forms.ModelForm): class Meta: - fields = ('preferred_language', 'email_notifications', ) + fields = ('preferred_language', 'email_notifications', + 'use_gravatar', ) model = Profile @property diff --git a/circle/dashboard/templates/dashboard/profile.html b/circle/dashboard/templates/dashboard/profile.html index bb53421..1640bbe 100644 --- a/circle/dashboard/templates/dashboard/profile.html +++ b/circle/dashboard/templates/dashboard/profile.html @@ -38,7 +38,7 @@ {% if profile.profile.use_gravatar %}checked="checked"{% endif %} type="checkbox"/> <a href="https://gravatar.com">{% trans "What's Gravatar?" %}</a> </p> - <a href="{% url "dashboard.views.profile-preferences" %}">{% trans "Change password and language" %}</a> + <a href="{% url "dashboard.views.profile-preferences" %}">{% trans "Change my preferences" %}</a> {% endif %} </div> <div class="clearfix"></div> diff --git a/circle/dashboard/templates/dashboard/profile_form.html b/circle/dashboard/templates/dashboard/profile_form.html index 1fd228b..fe2c8cd 100644 --- a/circle/dashboard/templates/dashboard/profile_form.html +++ b/circle/dashboard/templates/dashboard/profile_form.html @@ -10,23 +10,39 @@ <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> - <a class="pull-right btn btn-default btn-xs" href="{% url "dashboard.index" %}">{% trans "Back" %}</a> + <a class="pull-right btn btn-default btn-xs" + href="{% url "dashboard.views.profile" username=object.user.username %}"> + {% trans "Go to my profile" %}</a> <h3 class="no-margin"><i class="icon-desktop"></i> {% trans "My profile" %}</h3> </div> <div class="panel-body"> <div class="row"> - <div class="col-sm-4" style="margin-bottom: 50px;"> + <div class="col-md-4" style="margin-bottom: 50px;"> <fieldset> <legend>{% trans "Password change" %}</legend> {% crispy forms.change_password %} </fieldset> </div> - <div class="col-sm-offset-5 col-sm-3"> + <div class="col-md-4" style="margin-bottom: 50px;"> <fieldset> <legend>{% trans "Language selection" %}</legend> {% crispy forms.change_language %} </fieldset> </div> + <div class="col-md-4"> + <fieldset> + <legend>{% trans "Current avatar" %}</legend> + <p> + <img id="dashboard-profile-avatar" + class="img-rounded" src="{{ object.get_avatar_url }}"/> + </p> + <p> + <a href="{% url "dashboard.views.profile" username=profile.user.username %}"> + {% trans "Go to my profile" %} + </a> + </p> + </fieldset> + </div> </div> </div> </div>