Commit 6dd29f48 by Kálmán Viktor

dashboard: add gravatar option to my preferences

parent 9ece75fb
...@@ -1103,7 +1103,8 @@ class TraitForm(forms.ModelForm): ...@@ -1103,7 +1103,8 @@ class TraitForm(forms.ModelForm):
class MyProfileForm(forms.ModelForm): class MyProfileForm(forms.ModelForm):
class Meta: class Meta:
fields = ('preferred_language', 'email_notifications', ) fields = ('preferred_language', 'email_notifications',
'use_gravatar', )
model = Profile model = Profile
@property @property
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
{% if profile.profile.use_gravatar %}checked="checked"{% endif %} {% if profile.profile.use_gravatar %}checked="checked"{% endif %}
type="checkbox"/> <a href="https://gravatar.com">{% trans "What's Gravatar?" %}</a> type="checkbox"/> <a href="https://gravatar.com">{% trans "What's Gravatar?" %}</a>
</p> </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 %} {% endif %}
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
......
...@@ -10,23 +10,39 @@ ...@@ -10,23 +10,39 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <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> <h3 class="no-margin"><i class="icon-desktop"></i> {% trans "My profile" %}</h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
<div class="col-sm-4" style="margin-bottom: 50px;"> <div class="col-md-4" style="margin-bottom: 50px;">
<fieldset> <fieldset>
<legend>{% trans "Password change" %}</legend> <legend>{% trans "Password change" %}</legend>
{% crispy forms.change_password %} {% crispy forms.change_password %}
</fieldset> </fieldset>
</div> </div>
<div class="col-sm-offset-5 col-sm-3"> <div class="col-md-4" style="margin-bottom: 50px;">
<fieldset> <fieldset>
<legend>{% trans "Language selection" %}</legend> <legend>{% trans "Language selection" %}</legend>
{% crispy forms.change_language %} {% crispy forms.change_language %}
</fieldset> </fieldset>
</div> </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> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment