Skip to content

Commit

Permalink
Fix poll answer image URLs not saving
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin committed Jul 7, 2024
1 parent ef998b5 commit cb48551
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js/src/forum/components/PollForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export default class PollForm extends Component<PollFormAttrs, PollFormState> {
type="text"
name={'answerImage' + (i + 1)}
className="FormControl"
bidi={imgFunc[i]}
bidi={imgFunc}
placeholder={app.translator.trans('fof-polls.forum.modal.image_option_placeholder')}
/>
)}
Expand Down Expand Up @@ -359,6 +359,15 @@ export default class PollForm extends Component<PollFormAttrs, PollFormState> {
throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));
}

console.log(
'option answers',
this.optionAnswers.map((o) => o())
);
console.log(
'option image urls',
this.optionImageUrls.map((o) => o())
);

const pollExists = this.state.poll.exists;
const options = this.options.map((option, i) => {
option.pushAttributes({
Expand Down

0 comments on commit cb48551

Please sign in to comment.