Add a combobox

This commit is contained in:
Andrei Prigorshnev 2024-03-26 23:55:55 +04:00
parent 2676522abc
commit 16ec24b094
No known key found for this signature in database
GPG Key ID: 185E0A5F45783902
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,11 @@
<div class="control-group">
<label>{{i18n "discourse_assign.assign_modal.assignment_label"}}</label>
<ComboBox
@value={{1}}
@content={{this.assignments}}
/>
</div>
<div class="control-group {{if this.assigneeError 'assignee-error'}}">
<label>{{i18n "discourse_assign.assign_modal.assignee_label"}}</label>
<AssigneeChooser

View File

@ -18,6 +18,14 @@ export default class AssignUserForm extends Component {
this.args.formApi.submit = this.assign;
}
get assignments() {
return [
{ id: 1, name: "Topic" },
{ id: 2, name: "Post #1" },
{ id: 3, name: "Post #2" },
];
}
get availableStatuses() {
return this.siteSettings.assign_statuses
.split("|")

View File

@ -69,6 +69,7 @@ en:
reassign_title: "Reassign Topic"
assign: "Assign"
assignee_label: Assignee
assignment_label: Assignment
choose_assignee: Choose a user to assign.
note_label: Note
optional_label: "(optional)"