diff options
author | Chongyi Zheng <harry@harryzheng.com> | 2022-10-01 09:07:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 16:07:05 +0300 |
commit | c333b4d499d29500e5577a3e6f02f8a328baab73 (patch) | |
tree | e26dec88d7225f7f86b76ade64eecce059bb2fc4 /templates | |
parent | edfba99f11e78f189cc483a5f07292d9e6384526 (diff) | |
download | gitea-c333b4d499d29500e5577a3e6f02f8a328baab73.tar.gz gitea-c333b4d499d29500e5577a3e6f02f8a328baab73.zip |
Fix issue that `sync_on_commit` is not set (#21309)
<!--
Please check the following:
1. Make sure you are targeting the `main` branch, pull requests on
release branches are only allowed for bug fixes.
2. Read contributing guidelines:
https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
3. Describe what your pull request does and which issue you're targeting
(if any)
-->
Fixes #21308.
With the original frontend template
`templates/repo/settings/options.tmpl`, the field
`push_mirror_sync_on_commit` is always empty even when checkbox is
checked. Removing `value` from the input tag seems to solve the issue,
and will set `push_mirror_sync_on_commit: on` when the checkbox is
checked.
(I'm not familiar with the frontend logics Gitea is using, so I don't
really understand the cause of it)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/settings/options.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 0214df4514..9030235e7c 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -221,7 +221,7 @@ </details> <div class="field"> <div class="ui checkbox"> - <input id="push_mirror_sync_on_commit" name="push_mirror_sync_on_commit" type="checkbox" value="{{.push_mirror_sync_on_commit}}"> + <input id="push_mirror_sync_on_commit" name="push_mirror_sync_on_commit" type="checkbox" {{if .push_mirror_sync_on_commit}}checked{{end}}> <label for="push_mirror_sync_on_commit">{{.locale.Tr "repo.mirror_sync_on_commit"}}</label> </div> </div> |