Skip to content

Commit c333b4d

Browse files
authored
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)
1 parent edfba99 commit c333b4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/settings/options.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
</details>
222222
<div class="field">
223223
<div class="ui checkbox">
224-
<input id="push_mirror_sync_on_commit" name="push_mirror_sync_on_commit" type="checkbox" value="{{.push_mirror_sync_on_commit}}">
224+
<input id="push_mirror_sync_on_commit" name="push_mirror_sync_on_commit" type="checkbox" {{if .push_mirror_sync_on_commit}}checked{{end}}>
225225
<label for="push_mirror_sync_on_commit">{{.locale.Tr "repo.mirror_sync_on_commit"}}</label>
226226
</div>
227227
</div>

0 commit comments

Comments
 (0)