1
0
mirror of https://github.com/flarum/core.git synced 2025-07-22 01:01:28 +02:00

Extensibility: data when starting a new discussion

This commit is contained in:
Toby Zerner
2015-05-02 08:39:44 +09:30
parent 50e4dbf3b4
commit ce0c8903a5
3 changed files with 16 additions and 19 deletions

View File

@@ -50,14 +50,18 @@ export default class ComposerDiscussion extends ComposerBody {
return (this.title() || this.content()) && !confirm(this.props.confirmExit);
}
onsubmit(content) {
data() {
return {
title: this.title(),
content: this.content()
};
}
onsubmit() {
this.loading(true);
m.redraw();
var data = {
title: this.title(),
content: content
};
var data = this.data();
app.store.createRecord('discussions').save(data).then(discussion => {
app.composer.hide();