From 4647b88071d1c583c38994b929124bcb42bbe7eb Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 31 Jan 2014 11:38:17 -0500 Subject: [PATCH 1/3] added optional forum terms of use to ACP, closes #775 --- public/language/en_GB/register.json | 4 +++- public/src/forum/register.js | 13 +++++++++++++ public/templates/admin/settings.tpl | 2 ++ public/templates/register.tpl | 15 +++++++++++++++ src/routes/api.js | 7 ++++--- 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/public/language/en_GB/register.json b/public/language/en_GB/register.json index 6b8a26f282..26196c765d 100644 --- a/public/language/en_GB/register.json +++ b/public/language/en_GB/register.json @@ -12,5 +12,7 @@ "confirm_password": "Confirm Password", "confirm_password_placeholder": "Confirm Password", "register_now_button": "Register Now", - "alternative_registration": "Alternative Registration" + "alternative_registration": "Alternative Registration", + "terms_of_use": "Terms of Use", + "agree_to_terms_of_use": "I agree to the Terms of Use" } \ No newline at end of file diff --git a/public/src/forum/register.js b/public/src/forum/register.js index aa8fc66b59..4f0acb2a0d 100644 --- a/public/src/forum/register.js +++ b/public/src/forum/register.js @@ -11,6 +11,7 @@ define(function() { email_notify = $('#email-notify'), password_notify = $('#password-notify'), password_confirm_notify = $('#password-confirm-notify'), + agreeTerms = $('#agree-terms'), validationError = false, successIcon = ''; @@ -154,6 +155,18 @@ define(function() { e.preventDefault(); } }); + + if(agreeTerms.length) { + agreeTerms.on('click', function() { + if ($(this).prop('checked')) { + register.removeAttr('disabled'); + } else { + register.attr('disabled', 'disabled'); + } + }); + + register.attr('disabled', 'disabled'); + } }; return Register; diff --git a/public/templates/admin/settings.tpl b/public/templates/admin/settings.tpl index 6da4d3594a..823ce09112 100644 --- a/public/templates/admin/settings.tpl +++ b/public/templates/admin/settings.tpl @@ -94,6 +94,8 @@
Maximum Signature Length

+ Forum Terms of Use (Leave blank to disable)
+
diff --git a/public/templates/register.tpl b/public/templates/register.tpl index c6e7e3b898..9fe4134633 100644 --- a/public/templates/register.tpl +++ b/public/templates/register.tpl @@ -58,6 +58,21 @@ + +
+ +
+
+ [[register:terms_of_use]] + +
+ +
+
+
+

diff --git a/src/routes/api.js b/src/routes/api.js index cbc09b983b..1fa7cfe9fd 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -161,9 +161,10 @@ var path = require('path'), data.authentication = login_strategies; data.token = res.locals.csrf_token; - data.minimumUsernameLength = meta.config['minimumUsernameLength']; - data.maximumUsernameLength = meta.config['maximumUsernameLength']; - data.minimumPasswordLength = meta.config['minimumPasswordLength']; + data.minimumUsernameLength = meta.config.minimumUsernameLength; + data.maximumUsernameLength = meta.config.maximumUsernameLength; + data.minimumPasswordLength = meta.config.minimumPasswordLength; + data.termsOfUse = meta.config.termsOfUse; res.json(data); }); From 5b3862f58e817b5df47c3ee88d553761354e627a Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 31 Jan 2014 11:47:11 -0500 Subject: [PATCH 2/3] updated links on ACP home page, part of #461 --- public/templates/admin/index.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/templates/admin/index.tpl b/public/templates/admin/index.tpl index 84c08b1609..aa4838ef35 100644 --- a/public/templates/admin/index.tpl +++ b/public/templates/admin/index.tpl @@ -3,10 +3,10 @@

Welcome to NodeBB


- NodeBB Forum - Get Plugins - Get Themes - dcplabs + NodeBB Community Forum + Get Plugins and Themes + Follow @NodeBB + NodeBB Wiki

You are running NodeBB v{version}. Always make sure that your NodeBB is up to date for the latest security patches and bug fixes.

From 1b794f00bd2b6bfdcd7ae8dfe064c362b0ea5631 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 31 Jan 2014 11:48:05 -0500 Subject: [PATCH 3/3] slovak updates --- public/language/sk/global.json | 28 +++++++++++++-------------- public/language/sk/notifications.json | 2 +- public/language/sk/recent.json | 2 +- public/language/sk/topic.json | 10 +++++----- public/language/sk/unread.json | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/public/language/sk/global.json b/public/language/sk/global.json index 944b55f3fa..c1af071d40 100644 --- a/public/language/sk/global.json +++ b/public/language/sk/global.json @@ -18,27 +18,27 @@ "header.admin": "Administrácia", "header.recent": "Aktuality", "header.unread": "Neprečítané", - "header.popular": "Popular", + "header.popular": "Populárne", "header.users": "Užívatelia", - "header.chats": "Chats", - "header.notifications": "Notifications", + "header.chats": "Chaty", + "header.notifications": "Notifikácie", "header.search": "Hľadať", "header.profile": "Moj profil", - "notifications.loading": "Načítanie upozornení", + "notifications.loading": "Načítanie notifikácií", "chats.loading": "Načítanie grafov", "motd.welcome": "Vítajte na NodeBB, diskusná platforma budúcnosti.", "motd.get": "Získať NodeBB", "motd.fork": "Fork", "motd.like": "To sa mi ľúbi", "motd.follow": "Sledovať", - "previouspage": "Previous Page", - "nextpage": "Next Page", - "alert.success": "Success", - "alert.error": "Error", - "alert.banned": "Banned", - "alert.banned.message": "You are banned you will be logged out!", - "alert.unfollow": "You are no longer following %1!", - "alert.follow": "You are now following %1!", - "posts": "Posts", - "views": "Views" + "previouspage": "Predchádzajúca strana", + "nextpage": "Ďalšia strana", + "alert.success": "Úspešne", + "alert.error": "Chyba", + "alert.banned": "Zakázany", + "alert.banned.message": "Tvoj prístup bol zakázany a budeš odhlasená/ý!", + "alert.unfollow": "Už nenasleduješ %!", + "alert.follow": "Nasleduješ %1!", + "posts": "Príspevkov", + "views": "Zhliadnutí" } \ No newline at end of file diff --git a/public/language/sk/notifications.json b/public/language/sk/notifications.json index 1d2ab839ed..872e605465 100644 --- a/public/language/sk/notifications.json +++ b/public/language/sk/notifications.json @@ -1,5 +1,5 @@ { - "title": "Upozornenie", + "title": "Notifikácie", "back_to_home": "Späť na úvodnú stránku", "outgoing_link": "Odkaz mimo fórum", "outgoing_link_message": "Teraz opúšťate fórum", diff --git a/public/language/sk/recent.json b/public/language/sk/recent.json index fc9fc4b66d..1d6ecd1506 100644 --- a/public/language/sk/recent.json +++ b/public/language/sk/recent.json @@ -1,5 +1,5 @@ { - "title": "Recent", + "title": "Nedávne", "day": "Deň", "week": "Týždeň", "month": "Mesiac" diff --git a/public/language/sk/topic.json b/public/language/sk/topic.json index 9e2c7a9a23..87c5b6f17e 100644 --- a/public/language/sk/topic.json +++ b/public/language/sk/topic.json @@ -14,12 +14,12 @@ "fork": "Rozdeliť", "banned": "Zakázaný", "link": "Odkaz", - "share": "Share", - "tools": "Tools", - "flag": "Flag", - "flag_title": "Flag this post for moderation", + "share": "Zdieľaj", + "tools": "Nástroje", + "flag": "Označiť", + "flag_title": "Označiť príspevok pre moderáciu", "thread_tools.title": "Nástroje", - "thread_tools.markAsUnreadForAll": "Mark Unread", + "thread_tools.markAsUnreadForAll": "Označ ako neprečítané", "thread_tools.pin": "Zvýrazniť vlákno", "thread_tools.lock": "Uzamknúť vlákno", "thread_tools.move": "Presunúť vlákno", diff --git a/public/language/sk/unread.json b/public/language/sk/unread.json index cfe129b9d9..252ab9d3e4 100644 --- a/public/language/sk/unread.json +++ b/public/language/sk/unread.json @@ -1,5 +1,5 @@ { - "title": "Unread", + "title": "Neprečítané", "no_unread_topics": "Nie sú tu žiadne neprečítané témy.", "mark_all_read": "Označit všetko ako prečítané", "load_more": "Načítať dalšie"