summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/conf/user_settings.py9
-rw-r--r--askbot/forms.py1
-rw-r--r--askbot/skins/default/templates/base.html5
-rw-r--r--askbot/skins/default/templates/user_profile/user_edit.html21
-rw-r--r--askbot/skins/default/templates/widgets/header.html1
5 files changed, 28 insertions, 9 deletions
diff --git a/askbot/conf/user_settings.py b/askbot/conf/user_settings.py
index cec13083..086f7583 100644
--- a/askbot/conf/user_settings.py
+++ b/askbot/conf/user_settings.py
@@ -27,6 +27,15 @@ settings.register(
settings.register(
livesettings.BooleanValue(
USER_SETTINGS,
+ 'EDITABLE_EMAIL',
+ default = True,
+ description = _('Allow users change own email addresses')
+ )
+)
+
+settings.register(
+ livesettings.BooleanValue(
+ USER_SETTINGS,
'ALLOW_ACCOUNT_RECOVERY_BY_EMAIL',
default = True,
description = _('Allow account recovery by email')
diff --git a/askbot/forms.py b/askbot/forms.py
index 00735b72..019e5f83 100644
--- a/askbot/forms.py
+++ b/askbot/forms.py
@@ -920,7 +920,6 @@ class EditAnswerForm(forms.Form):
class EditUserForm(forms.Form):
email = forms.EmailField(
label=u'Email',
- help_text=_('this email will be linked to gravatar'),
required=True,
max_length=255,
widget=forms.TextInput(attrs={'size' : 35})
diff --git a/askbot/skins/default/templates/base.html b/askbot/skins/default/templates/base.html
index 1102007b..8287f5ba 100644
--- a/askbot/skins/default/templates/base.html
+++ b/askbot/skins/default/templates/base.html
@@ -17,6 +17,11 @@
<body class="{% block body_class %}{% endblock %}{% if user_messages %} user-messages{% endif %}{% if page_class %} {{page_class}}{% endif %}{% if request.user.is_anonymous() %} anon{% endif %} lang-{{settings.LANGUAGE_CODE}}">
{% include "widgets/system_messages.html" %}
{% include "custom_header.html" ignore missing %}
+ {% if settings.CUSTOM_HEADER|trim != '' %}
+ <div id="custom-header">
+ {{settings.CUSTOM_HEADER}}
+ </div>
+ {% endif %}
{% include "widgets/header.html" %} {# Logo, user tool navigation and meta navitation #}
{% include "widgets/secondary_header.html" %} {# Scope selector, search input and ask button #}
<div class="content-wrapper">
diff --git a/askbot/skins/default/templates/user_profile/user_edit.html b/askbot/skins/default/templates/user_profile/user_edit.html
index daaa3663..94a1d58d 100644
--- a/askbot/skins/default/templates/user_profile/user_edit.html
+++ b/askbot/skins/default/templates/user_profile/user_edit.html
@@ -42,17 +42,24 @@
{{ form.username }}
<span class="form-error"></span> {{ form.username.errors }} </td>
{% else %}
- {{ request.user.username }}
+ {{ view_user.username }}
{% endif %}
</td>
</tr>
<tr>
- <td>{{ form.email.label_tag() }}:</td>
- <td>{{ form.email }} <span class="form-error"></span> {{ form.email.errors }} </td>
- </tr>
- <tr>
- <td></td>
- <td class="title-desc">{{ form.email.help_text }}</td>
+ <td>
+ {{ form.email.label_tag() }}:
+ </td>
+ <td>
+ {% if settings.EDITABLE_EMAIL %}
+ {{ form.email }}
+ <span class="form-error"></span>
+ {{ form.email.errors }}
+ {% else %}
+ {{ view_user.email }}
+ {% trans %}(cannot be changed){% endtrans %}
+ {% endif %}
+ </td>
</tr>
<tr>
<td>{{ form.realname.label_tag() }}:</td>
diff --git a/askbot/skins/default/templates/widgets/header.html b/askbot/skins/default/templates/widgets/header.html
index d4e7d66a..52e528bc 100644
--- a/askbot/skins/default/templates/widgets/header.html
+++ b/askbot/skins/default/templates/widgets/header.html
@@ -7,7 +7,6 @@
<div class="content-wrapper">
<div id="userToolsNav">
{% include "widgets/user_navigation.html" %}
- {{settings.CUSTOM_HEADER}}
</div>
{% if settings.SHOW_LOGO %}
{% include "widgets/logo.html" %}