tossettings.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. from misago.utils.fixtures import load_settings_fixture, update_settings_fixture
  2. from misago.utils.translation import ugettext_lazy as _
  3. settings_fixture = (
  4. # Avatars Settings
  5. ('tos', {
  6. 'name': _("Forum Terms of Service"),
  7. 'description': _("Those settings allow you to set up forum terms of service."),
  8. 'settings': (
  9. ('tos_title', {
  10. 'value': "Terms of Service",
  11. 'type': "string",
  12. 'input': "text",
  13. 'separator': _("Terms of Service Options"),
  14. 'name': _("Page Title"),
  15. 'description': _("Title of page community ToS are displayed on."),
  16. }),
  17. ('tos_url', {
  18. 'value': "",
  19. 'type': "string",
  20. 'input': "text",
  21. 'name': _("Link to remote page with ToS"),
  22. 'description': _("If your forum's ToS are located on remote page, enter here its address."),
  23. }),
  24. ('tos_content', {
  25. 'value': "",
  26. 'type': "string",
  27. 'input': "textarea",
  28. 'name': _("OR enter ToS content"),
  29. 'description': _("Instead of linking to remote page, forum can create dedicated ToS page for you. To display ToS page, enter here your forum Terms of Service."),
  30. }),
  31. ),
  32. }),
  33. )
  34. def load():
  35. load_settings_fixture(settings_fixture)
  36. def update():
  37. update_settings_fixture(settings_fixture)