From 372869d709dc12232996cb64a615c99c708dcd7d Mon Sep 17 00:00:00 2001 From: Alice Harris Date: Sat, 1 Nov 2014 11:03:01 +1000 Subject: [PATCH] enable feature to block chat until user agrees to guidelines --- views/options/social/chat-box.jade | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/views/options/social/chat-box.jade b/views/options/social/chat-box.jade index 7953e7b1b6..a4224b92b8 100644 --- a/views/options/social/chat-box.jade +++ b/views/options/social/chat-box.jade @@ -1,18 +1,16 @@ -//div.chat-form.guidelines-not-accepted(ng-if='!user.flags.communityGuidelinesAccepted') -// p If you would like to post messages in the Tavern or any party or guild chat, please first read our -// |  -// a(target='_blank', href='/static/community-guidelines')=env.t('communityGuidelines') -// | and then click the button below to indicate that you accept them. -// .chat-controls -// div -// button.btn.btn-warning(ng-click='acceptCommunityGuidelines()')=env.t('iAcceptCommunityGuidelines') -// .chat-buttons -// button(type="button", ng-click='sync(group)', tooltip=env.t('toolTipMsg')) -// span.glyphicon.glyphicon-refresh +div.chat-form.guidelines-not-accepted(ng-if='!user.flags.communityGuidelinesAccepted') + p If you would like to post messages in the Tavern or any party or guild chat, please first read our + |  + a(target='_blank', href='/static/community-guidelines')=env.t('communityGuidelines') + | and then click the button below to indicate that you accept them. + .chat-controls + div + button.btn.btn-warning(ng-click='acceptCommunityGuidelines()')=env.t('iAcceptCommunityGuidelines') + .chat-buttons + button(type="button", ng-click='sync(group)', tooltip=env.t('toolTipMsg')) + span.glyphicon.glyphicon-refresh -//form.chat-form(ng-if='user.flags.communityGuidelinesAccepted' ng-submit='postChat(group,message.content)') -//////////// When we want to block the ability to chat until the Community Guidelines have been accepted, delete the one line immediately below this comment and un-comment all lines above. -form.chat-form(ng-submit='postChat(group,message.content)') +form.chat-form(ng-if='user.flags.communityGuidelinesAccepted' ng-submit='postChat(group,message.content)') div(ng-controller='AutocompleteCtrl') textarea.form-control(rows=4, ui-keypress='{13:"postChat(group,message.content)"}', ng-model='message.content', updateinterval='250', flag='@', at-user, auto-complete) span.user-list(ng-show='!isAtListHidden')