Show combobox only when editing topic assignments
This commit is contained in:
parent
7c188b010c
commit
0a05e0a621
|
@ -1,10 +1,12 @@
|
|||
<div class="control-group">
|
||||
<label>{{i18n "discourse_assign.assign_modal.assignment_label"}}</label>
|
||||
<ComboBox
|
||||
@value={{1}}
|
||||
@content={{this.assignments}}
|
||||
/>
|
||||
</div>
|
||||
{{#if this.editingTopicAssignments}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n "discourse_assign.assign_modal.assignment_label"}}</label>
|
||||
<ComboBox
|
||||
@value={{1}}
|
||||
@content={{this.assignments}}
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="control-group {{if this.assigneeError 'assignee-error'}}">
|
||||
<label>{{i18n "discourse_assign.assign_modal.assignee_label"}}</label>
|
||||
|
|
|
@ -32,6 +32,10 @@ export default class AssignUserForm extends Component {
|
|||
.map((status) => ({ id: status, name: status }));
|
||||
}
|
||||
|
||||
get editingTopicAssignments() {
|
||||
return this.args.model.targetType === "Topic" && this.args.model.reassign;
|
||||
}
|
||||
|
||||
get status() {
|
||||
return (
|
||||
this.args.model.status || this.siteSettings.assign_statuses.split("|")[0]
|
||||
|
|
|
@ -19,13 +19,17 @@ export default class AssignUser extends Component {
|
|||
return I18n.t("discourse_assign.assign_post_modal.title");
|
||||
}
|
||||
|
||||
if (this.model.reassign) {
|
||||
if (this.editingTopicAssignments) {
|
||||
return I18n.t("discourse_assign.assign_modal.edit_assignments_title");
|
||||
} else {
|
||||
return I18n.t("discourse_assign.assign_modal.title");
|
||||
}
|
||||
}
|
||||
|
||||
get editingTopicAssignments() {
|
||||
return this.model.targetType === "Topic" && this.model.reassign;
|
||||
}
|
||||
|
||||
@action
|
||||
async onSubmit() {
|
||||
this.args.closeModal();
|
||||
|
|
Loading…
Reference in New Issue