mirror of
https://github.com/flarum/framework.git
synced 2025-05-28 19:06:35 +08:00
Extensibility: data when starting a new discussion
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user