Skip to content

Commit

Permalink
chore: dummy implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Jan 29, 2024
1 parent d425ec5 commit 9233b03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 43 deletions.
46 changes: 4 additions & 42 deletions js/src/forum/components/Poll/PollOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,15 @@ import ItemList from 'flarum/common/utils/ItemList';

export default class PollOptions extends Component {
view(): Mithril.Children {
return (
<div className="aaa">
<label className="ba bbb">
<input
type="radio"
name="privacy-setting"
value="Public access"
className="ccc"
aria-labelledby="privacy-setting-0-label"
aria-describedby="privacy-setting-0-description"
/>
<span className="ddd">
<span id="privacy-setting-0-label" className="fff">
Public access
</span>
<span id="privacy-setting-0-description" className="ggg">
This project would be available to anyone who has the link
</span>
</span>
</label>
{this.pollOptions().toArray()}
<label className="bba bbb">
<input
type="radio"
name="privacy-setting"
value="Private to you"
className="ccc"
aria-labelledby="privacy-setting-2-label"
aria-describedby="privacy-setting-2-description"
/>
<span className="ddd">
<span id="privacy-setting-2-label" className="fff">
Private to you
</span>
<span id="privacy-setting-2-description" className="ggg">
You are the only one able to access this project
</span>
</span>
</label>
</div>
);
return <div className="aaa">{this.pollOptions().toArray()}</div>;
}

pollOptions(): ItemList<Mithril.Children> {
const items = new ItemList<Mithril.Children>();

items.add('test', <PollOption />);
items.add('test1', <PollOption />);
items.add('test2', <PollOption />);
items.add('test3', <PollOption />);

return items;
}
Expand Down
6 changes: 5 additions & 1 deletion js/src/forum/components/Poll/PollSubmitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ import Button from 'flarum/common/components/Button';
export default class PollSubmitButton extends Component {
view(): Mithril.Children {
return (
<Button className="Button" type="submit">
<Button className="Button" type="submit" onclick={() => this.submit()}>
Submit
</Button>
);
}

submit() {
console.log('submitted');
}
}

0 comments on commit 9233b03

Please sign in to comment.