]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/settings/users.py
adding functionality to freeze accept rate to 100% for specific users
[osqa.git] / forum / settings / users.py
index 2a7994283c1c6ce0fcc3074222ec9acc7745ae6d..a108ebf408882ccc4adce5620b48ba9d909bcfa6 100644 (file)
@@ -1,4 +1,4 @@
-from forms import CommaStringListWidget
+from forms import CommaStringListWidget, StringListWidget
 from django.forms import CheckboxSelectMultiple
 from django.forms.widgets import RadioSelect
 from base import Setting, SettingSet
@@ -6,6 +6,16 @@ from django.utils.translation import ugettext as _
 
 USERS_SET = SettingSet('users', _('Users settings'), _("General settings for the OSQA users."), 20)
 
+ALLOW_NEGATIVE_REPUTATION = Setting('ALLOW_NEGATIVE_REPUTATION', True, USERS_SET, dict(
+label = _("Allow negative reputation"),
+help_text = _("Check if you want to allow negative user reputations in the community."),
+required=False))
+
+STORE_GREETING_IN_COOKIE = Setting('STORE_GREETING_IN_COOKIE', True, USERS_SET, dict(
+label = _("Store greeting in cookie"),
+help_text = _("If you check this the greeting will be stored in a cookie and the users won't be notified on logout."),
+required=False))
+
 EDITABLE_SCREEN_NAME = Setting('EDITABLE_SCREEN_NAME', False, USERS_SET, dict(
 label = _("Editable screen name"),
 help_text = _("Allow users to alter their screen name."),
@@ -22,6 +32,28 @@ label = _("Disabled usernames"),
 help_text = _("A comma separated list of disabled usernames (usernames not allowed during a new user registration)."),
 widget=CommaStringListWidget))
 
+TRUNCATE_LONG_USERNAMES = Setting('TRUNCATE_LONG_USERNAMES', True, USERS_SET, dict(
+label=_("Truncate long usernames"),
+help_text = _("The long usernames will be truncated.."),
+required=False,
+))
+
+SHOW_USER_ACCEPT_RATE = Setting('SHOW_USER_ACCEPT_RATE', True, USERS_SET, dict(
+label = _("Show user accept rate"),
+help_text = _("If you check this the user accept rate will be displayed on the user posts."),
+required=False))
+
+FREEZE_ACCEPT_RATE_FOR = Setting('FREEZE_ACCEPT_RATE_FOR',
+["admin",],
+USERS_SET, dict(
+label = _("Freeze accept rate"),
+help_text = _("Freeze answers accept rate for the selected users."),
+widget=StringListWidget))
+
+TRUNCATE_USERNAMES_LONGER_THAN = Setting('TRUNCATE_USERNAMES_LONGER_THAN', 15, USERS_SET, dict(
+label = _("Truncate usernames longer than"),
+help_text = _("The usernames that are longer than this will be truncated and ... will be appended.")))
+
 SHOW_STATUS_DIAMONDS = Setting('SHOW_STATUS_DIAMONDS', True, USERS_SET, dict(
 label=_("Show status diamonds"),
 help_text = _("Show status \"diamonds\" next to moderators or superusers usernames."),
@@ -30,7 +62,8 @@ required=False,
 
 EMAIL_UNIQUE = Setting('EMAIL_UNIQUE', True, USERS_SET, dict(
 label = _("Force unique email"),
-help_text = _("Should each user have an unique email.")))
+help_text = _("Should each user have an unique email."),
+required=False))
 
 REQUIRE_EMAIL_VALIDATION_TO = Setting('REQUIRE_EMAIL_VALIDATION_TO', [], USERS_SET, dict(
 label = _("Require email validation to..."),