mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-13 20:51:05 +00:00
1e54e211ca
Avoids the use of HTMX on milestone assignment within a New Issue form. The New Issue form doesn't have an issue ID to send to a milestone change URL, which the backend expects in order to construct a proper reply. The frontend template was also not built to use the new HTMX response. This resulted in a backend error and a large warning whenever anyone tried to set a milestone from within the New Issue form (new pull requests were also affected), rather than from a View Issue page. This introduces a new parameter into the `issue/milestone/select_menu` template, "NewIssuePage". When unset, the template produces the same results as before. Selection uses `hx-post` to notify the server immediately, using the updated htmx fragment from the reply. When set to a truthy value, the old style of form is used. Selection uses `data-id` and `data-href` to update the selected milestone locally, via `selectItem` in `repo-legacy.js`, recreating the selected element and updating the hidden form value. Fixes #5176. |
||
---|---|---|
.. | ||
fields | ||
labels | ||
milestone | ||
view_content | ||
card.tmpl | ||
choose.tmpl | ||
comment_tab.tmpl | ||
filter_actions.tmpl | ||
filter_list.tmpl | ||
filters.tmpl | ||
label_precolors.tmpl | ||
labels.tmpl | ||
list.tmpl | ||
milestone_issues.tmpl | ||
milestone_new.tmpl | ||
milestones.tmpl | ||
navbar.tmpl | ||
new.tmpl | ||
new_form.tmpl | ||
openclose.tmpl | ||
search.tmpl | ||
view.tmpl | ||
view_content.tmpl | ||
view_title.tmpl |