mirror of
1
Fork 0

Revert repo-legacy.js to pre-#4542

The New Issue form should not use the new HTMX system. This first requires
we restore the ability to locally assign the milestone ID.
This commit is contained in:
Sai Nane 2024-09-04 03:07:15 +00:00 committed by Otto Richter
parent 7f02f4722c
commit b42ca2ed0c
1 changed files with 4 additions and 1 deletions

View File

@ -270,7 +270,9 @@ export function initRepoCommentForm() {
} }
let icon = ''; let icon = '';
if (input_id === '#project_id') { if (input_id === '#milestone_id') {
icon = svg('octicon-milestone', 18, 'tw-mr-2');
} else if (input_id === '#project_id') {
icon = svg('octicon-project', 18, 'tw-mr-2'); icon = svg('octicon-project', 18, 'tw-mr-2');
} else if (input_id === '#assignee_id') { } else if (input_id === '#assignee_id') {
icon = `<img class="ui avatar image tw-mr-2" alt="avatar" src=${$(this).data('avatar')}>`; icon = `<img class="ui avatar image tw-mr-2" alt="avatar" src=${$(this).data('avatar')}>`;
@ -311,6 +313,7 @@ export function initRepoCommentForm() {
// Milestone, Assignee, Project // Milestone, Assignee, Project
selectItem('.select-project', '#project_id'); selectItem('.select-project', '#project_id');
selectItem('.select-milestone', '#milestone_id');
selectItem('.select-assignee', '#assignee_id'); selectItem('.select-assignee', '#assignee_id');
} }