Skip to content

Commit

Permalink
fix other answer input field being disabled for unregistered users
Browse files Browse the repository at this point in the history
  • Loading branch information
goapunk committed Jan 9, 2025
1 parent 0e031ca commit 5f38173
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions adhocracy4/polls/static/PollDetail/ChoiceRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const ChoiceRow = React.memo(({
disabled,
otherChoiceAnswer,
onOtherChange,
isAuthenticated,
isReadOnly,
errors
}) => {
Expand Down Expand Up @@ -88,7 +87,7 @@ export const ChoiceRow = React.memo(({
id={choice.id}
value={textareaValue} // Always use the local state value
onChange={handleTextareaChange}
disabled={!isAuthenticated || isReadOnly}
disabled={disabled}
error={errors}
/>
)}
Expand Down
1 change: 0 additions & 1 deletion adhocracy4/polls/static/PollDetail/PollChoice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export const PollChoice = (props) => {
disabled={!userAllowedVote || props.question.isReadOnly}
otherChoiceAnswer={otherChoiceAnswer}
onOtherChange={handleOtherChange}
isAuthenticated={props.question.authenticated}
isReadOnly={props.question.isReadOnly}
errors={errors}
/>
Expand Down
3 changes: 3 additions & 0 deletions changelog/_0002.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- fixed other answer input field being disabled for unregistered users

0 comments on commit 5f38173

Please sign in to comment.