DEV: Add outlets and actions to move topic modal (#24913)
This commit is contained in:
parent
2477bcc32e
commit
388a2c5274
|
@ -166,23 +166,55 @@
|
|||
"topic.split_topic.instructions" count=@model.selectedPostsCount
|
||||
)
|
||||
}}</p>
|
||||
<form>
|
||||
<label>{{i18n "topic.split_topic.topic_name"}}</label>
|
||||
<TextField
|
||||
@value={{this.topicName}}
|
||||
@placeholderKey="composer.title_placeholder"
|
||||
id="split-topic-name"
|
||||
/>
|
||||
<form class="split-new-topic-form">
|
||||
<div class="control-group">
|
||||
<label>{{i18n "topic.split_topic.topic_name"}}</label>
|
||||
<TextField
|
||||
@value={{this.topicName}}
|
||||
@placeholderKey="composer.title_placeholder"
|
||||
id="split-topic-name"
|
||||
/>
|
||||
<PluginOutlet
|
||||
@name="split-new-topic-title-after"
|
||||
@outletArgs={{hash
|
||||
selectedPosts=@model.selectedPosts
|
||||
updateTopicName=this.updateTopicName
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "categories.category"}}</label>
|
||||
<CategoryChooser
|
||||
@value={{this.categoryId}}
|
||||
class="small"
|
||||
@onChange={{action (mut this.categoryId)}}
|
||||
/>
|
||||
<PluginOutlet
|
||||
@name="split-new-topic-category-after"
|
||||
@outletArgs={{hash
|
||||
selectedPosts=@model.selectedPosts
|
||||
updateCategoryId=this.updateCategoryId
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<label>{{i18n "categories.category"}}</label>
|
||||
<CategoryChooser
|
||||
@value={{this.categoryId}}
|
||||
class="small"
|
||||
@onChange={{action (mut this.categoryId)}}
|
||||
/>
|
||||
{{#if this.canAddTags}}
|
||||
<label>{{i18n "tagging.tags"}}</label>
|
||||
<TagChooser @tags={{this.tags}} @categoryId={{this.categoryId}} />
|
||||
<div class="control-group">
|
||||
<label>{{i18n "tagging.tags"}}</label>
|
||||
<TagChooser
|
||||
@tags={{this.tags}}
|
||||
@categoryId={{this.categoryId}}
|
||||
/>
|
||||
<PluginOutlet
|
||||
@name="split-new-topic-tag-after"
|
||||
@outletArgs={{hash
|
||||
selectedPosts=@model.selectedPosts
|
||||
updateTags=this.updateTags
|
||||
tags=this.tags
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
</form>
|
||||
{{/if}}
|
||||
|
|
|
@ -162,4 +162,19 @@ export default class MoveToTopic extends Component {
|
|||
this.saving = false;
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
updateTopicName(newName) {
|
||||
this.topicName = newName;
|
||||
}
|
||||
|
||||
@action
|
||||
updateCategoryId(newId) {
|
||||
this.categoryId = newId;
|
||||
}
|
||||
|
||||
@action
|
||||
updateTags(newTags) {
|
||||
this.tags = newTags;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue