forgejo/templates/repo
Sai Nane 1e54e211ca Fix milestone assignment in New Issue
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.
2024-09-17 17:45:02 +02:00
..
actions Update module github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker to v3 2024-08-09 21:03:37 +02:00
branch Move lock icon position and add additional tooltips to branch list page (#31839) 2024-08-25 11:56:35 +02:00
cite ui: fix go to citation button url (#4597) 2024-08-22 15:36:12 +00:00
code
diff Revert "Prevent allow/reject reviews on merged/closed PRs" 2024-08-12 12:24:52 +01:00
editor
find
graph
issue Fix milestone assignment in New Issue 2024-09-17 17:45:02 +02:00
migrate
projects
pulls
release New release form semantics 2024-09-11 13:30:30 +02:00
settings Remove urls from translations (#31950) 2024-09-12 17:28:58 +05:00
tag
wiki ui(wiki): fix search result overflow for long lines 2024-09-14 14:22:01 +00:00
activity.tmpl
admin_flags.tmpl
blame.tmpl
branch_dropdown.tmpl fix: add gap between branch dropdown and PR button 2024-08-16 01:26:41 +02:00
clone_buttons.tmpl
clone_script.tmpl
code_frequency.tmpl
commit_load_branches_and_tags.tmpl
commit_page.tmpl feat(performance): remove BranchName in /:owner/:repo/commit/:commit 2024-08-08 22:29:42 +02:00
commit_status.tmpl
commit_statuses.tmpl
commits.tmpl
commits_list.tmpl
commits_list_small.tmpl
commits_search_dropdown.tmpl
commits_table.tmpl
contributors.tmpl
create.tmpl feat(i18n): allow different translations of creation links and titles (#4829) 2024-08-07 16:54:05 +00:00
create_helper.tmpl
empty.tmpl
file_info.tmpl [UI] Adjust trailing EOL behavior for empty file 2024-08-19 20:23:15 +02:00
flags.tmpl
forks.tmpl
graph.tmpl
header.tmpl
header_fork.tmpl
home.tmpl ui: fix go to citation button url (#4597) 2024-08-22 15:36:12 +00:00
icon.tmpl
latest_commit.tmpl fix: enlargen gap between avatar and name 2024-08-14 17:19:23 +02:00
navbar.tmpl
packages.tmpl
pulse.tmpl
recent_commits.tmpl
release_tag_header.tmpl
search.tmpl
search_name.tmpl
shabox_badge.tmpl
star_unstar.tmpl
sub_menu.tmpl
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl ui: refactor user-cards as a grid 2024-08-02 19:27:31 +05:00
view_file.tmpl
view_list.tmpl
watch_unwatch.tmpl
watchers.tmpl