Skip to content

Commit

Permalink
remove auth from views
Browse files Browse the repository at this point in the history
  • Loading branch information
tevko committed Nov 20, 2024
1 parent 18fafae commit 3a0451a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,6 @@ class ConversationConfig extends React.Component {
notifications when there are new comments to vote on.
</CheckboxField>

<CheckboxField field="auth_opt_fb" label="Facebook login prompt">
Show Facebook login prompt
</CheckboxField>

<CheckboxField field="auth_opt_tw" label="Twitter login prompt">
Show Twitter login prompt
</CheckboxField>

<Heading
as="h6"
sx={{
Expand All @@ -187,18 +179,6 @@ class ConversationConfig extends React.Component {
<CheckboxField field="strict_moderation">
No comments shown without moderator approval
</CheckboxField>

<CheckboxField
field="auth_needed_to_write"
label="Require Auth to Comment">
Participants cannot submit comments without first connecting either
Facebook or Twitter
</CheckboxField>

<CheckboxField field="auth_needed_to_vote" label="Require Auth to Vote">
Participants cannot vote without first connecting either Facebook or
Twitter
</CheckboxField>
</Box>
)
}
Expand Down
6 changes: 6 additions & 0 deletions client-participation/js/templates/vote-view.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

<div id="comment_shower">

{{#if needSocial}}
{{!-- ================ CONNECT FACEBOOK / TWITTER ================ --}}


{{else}} {{!-- !needSocial --}}

{{#if empty}}
<div style="margin: 20px;" class="Notification Notification--warning"> {{!-- empty scenario div --}}
{{#if subscribed}}
Expand Down
6 changes: 3 additions & 3 deletions client-participation/js/views/comment-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ module.exports = Handlebones.ModelView.extend({
Utils.shouldFocusOnTextareaWhenWritePaneShown();
ctx.hasTwitter = userObject.hasTwitter;
ctx.hasFacebook = userObject.hasFacebook && Constants.FB_APP_ID;
ctx.auth_opt_tw = preload.firstConv.auth_opt_tw;
ctx.auth_opt_fb = preload.firstConv.auth_opt_fb;
ctx.auth_opt_tw = false;
ctx.auth_opt_fb = false;
ctx.s = Strings;
ctx.desktop = !display.xs();
ctx.hideHelp = !Utils.userCanSeeHelp() || preload.firstConv.help_type === 0;
Expand Down Expand Up @@ -251,7 +251,7 @@ module.exports = Handlebones.ModelView.extend({
window.userObject.hasFacebook ||
window.userObject.hasTwitter ||
!_.isUndefined(xid);
var needsSocial = preload.firstConv.auth_needed_to_write;
var needsSocial = false;
M.add(M.COMMENT_SUBMIT_CLICK);
if (hasSocial || !needsSocial) {
M.add(M.COMMENT_SUBMIT_INIT);
Expand Down

0 comments on commit 3a0451a

Please sign in to comment.