You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/web_src/js/features
HesterG a43ea22479
Change form actions to fetch for submit review box (#25219)
Co-author: @wxiaoguang 

Close #25096 

The way to fix it in this PR is to change form submit to fetch using
formData, and add flags to avoid post repeatedly.
Should be able to apply to more forms that have the same issue after
this PR.

In the demo below, 'approve' is clicked several times, and then
'comment' is clicked several time after 'request changes' clicked.

After:


https://github.com/go-gitea/gitea/assets/17645053/beabeb1d-fe66-4b76-b048-4f022b4e83a0


Update: screenshots from /devtest

>
![image](https://user-images.githubusercontent.com/2114189/245680011-ee4231e0-a53d-4c2a-a9c2-71ccd98005cc.png)
> 
>
![image](https://user-images.githubusercontent.com/2114189/245680057-9215d348-63d8-406d-8828-17e171163aaa.png)
> 
>
![image](https://user-images.githubusercontent.com/2114189/245680148-89d7b3d1-d7b6-442f-b69e-eadaee112482.png)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago
..
admin Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
comp Change form actions to fetch for submit review box (#25219) 2 years ago
captcha.js Add new captcha: cloudflare turnstile (#22369) 2 years ago
citation.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
clipboard.js Use clippie module to copy to clipboard (#23801) 2 years ago
codeeditor.js Improve "goto issue by number" button (#24577) 2 years ago
colorpicker.js JS refactors (#22227) 2 years ago
common-global.js Change form actions to fetch for submit review box (#25219) 2 years ago
common-issue-list.js Improve "goto issue by number" button (#24577) 2 years ago
common-issue-list.test.js Improve "goto issue by number" button (#24577) 2 years ago
common-organization.js Fix Org edit page bugs: renaming detection, maxlength (#24161) 2 years ago
contextpopup.js Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
copycontent.js Add two eslint plugins (#24776) 2 years ago
dropzone.js JS refactors (#22227) 2 years ago
emoji.js JS refactors (#22227) 2 years ago
eventsource.sharedworker.js Fix the JS error "EventSource is not defined" caused by some non-standard browsers (#20584) 3 years ago
file-fold.js Scroll collapsed file into view (#23702) 2 years ago
heatmap.js Localize activity heatmap (except tooltip) (#24131) 2 years ago
imagediff.js Fix various ImageDiff/SVG bugs (#23312) 2 years ago
install.js Fix various bugs for "install" page (#23194) 2 years ago
notification.js Rework notifications list (#24812) 2 years ago
org-team.js Add status indicator on main home screen for each repo (#24638) 2 years ago
pull-view-file.js Improve accessibility when (re-)viewing files (#24817) 2 years ago
repo-branch.js Display warning when user try to rename default branch (#24512) 2 years ago
repo-code.js Change form actions to fetch for submit review box (#25219) 2 years ago
repo-code.test.js Ignore line anchor links with leading zeroes (#21728) 2 years ago
repo-commit.js Fix hidden commit status on multiple checks (#22889) 2 years ago
repo-common.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
repo-diff-filetree.js JS refactors (#22227) 2 years ago
repo-diff.js Refactor diffFileInfo / DiffTreeStore (#24998) 2 years ago
repo-editor.js Add popup to hashed comments/pull requests/issues in file editing/adding preview tab (#24040) 2 years ago
repo-findfile.js Refactor branch/tag selector to Vue SFC (#23421) 2 years ago
repo-findfile.test.js Refactor branch/tag selector to Vue SFC (#23421) 2 years ago
repo-graph.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-home.js Sort repo topic labels by name (#24123) 2 years ago
repo-issue-content.js Improve and fix bugs surrounding reactions (#24760) 2 years ago
repo-issue-list.js Add the ability to pin Issues (#24406) 2 years ago
repo-issue-pr-form.js JS refactors (#22227) 2 years ago
repo-issue.js Fix mobile navbar and misc cleanups (#25134) 2 years ago
repo-legacy.js Improve and fix bugs surrounding reactions (#24760) 2 years ago
repo-migrate.js Make repo migration cancelable and fix various bugs (#24605) 2 years ago
repo-migration.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-projects.js Disable `Create column` button while the column name is empty (#25192) 2 years ago
repo-release.js Update JS dependencies, add new eslint rules (#24597) 2 years ago
repo-settings.js Support for status check pattern (#24633) 2 years ago
repo-template.js Add status indicator on main home screen for each repo (#24638) 2 years ago
repo-unicode-escape.js Improve accessibility when (re-)viewing files (#24817) 2 years ago
repo-wiki.js Fix EasyMDE toolbar (#24489) 2 years ago
sshkey-helper.js Use explicit jQuery import, remove unused eslint globals (#18435) 3 years ago
stopwatch.js Move helpers to be prefixed with `gt-` (#22879) 2 years ago
tablesort.js JS refactors (#22227) 2 years ago
tribute.js Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
user-auth-webauthn.js Fix webauthn regression and improve code (#25113) 2 years ago
user-auth.js Fix OAuth loading state (#24788) 2 years ago
user-settings.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago