Skip to content

Commit

Permalink
polls: PollDetail/PollQuestions.jsx: clean up isReadOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
hom3mad3 committed Dec 18, 2024
1 parent 3c1628f commit 420c74c
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions adhocracy4/polls/static/PollDetail/PollQuestions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,32 +437,33 @@ class PollQuestions extends React.Component {
)
: (
<>
{this.state.useTermsOfUse &&
this.state.agreedTermsOfUse === false && (
<div className="col-12">
<TermsOfUseCheckbox
id="terms-of-use"
onChange={(val) =>
this.setState({ checkedTermsOfUse: val })}
orgTermsUrl={this.state.orgTermsUrl}
/>
</div>
{/* Terms of Use Section */}
{this.state.useTermsOfUse && !this.state.agreedTermsOfUse && (
<div className="col-12">
<TermsOfUseCheckbox
id="terms-of-use"
onChange={(val) => this.setState({ checkedTermsOfUse: val })}
orgTermsUrl={this.state.orgTermsUrl}
/>
</div>
)}

{/* Captcha Section */}
{this.state.allowUnregisteredUsers &&
this.state.questions.length > 0 &&
!this.state.questions[0].authenticated && (
<Captcha
onChange={(val) => this.setState({ captcha: val })}
apiUrl={this.props.captchaUrl}
name="id_captcheck"
refresh={this.state.refreshCaptcha}
/>
this.state.questions.length > 0 &&
!this.state.questions[0].authenticated && (
<Captcha
onChange={(val) => this.setState({ captcha: val })}
apiUrl={this.props.captchaUrl}
name="id_captcheck"
refresh={this.state.refreshCaptcha}
/>
)}

{/* Button Wrapper */}
<div className="poll poll__btn--wrapper">
{this.buttonVote}
{!this.state.loading
? this.linkShowResults()
: this.loadingIndicator}
{!this.state.loading ? this.linkShowResults() : this.loadingIndicator}
</div>
</>
)}
Expand Down

0 comments on commit 420c74c

Please sign in to comment.