Skip to content

Commit

Permalink
Disable status checks in template if none found (go-gitea#20088)
Browse files Browse the repository at this point in the history
Signed-off-by: jolheiser <john.olheiser@gmail.com>
  • Loading branch information
jolheiser authored and Sysoev, Vladimir committed Aug 10, 2022
1 parent c2ff9b2 commit 9fa4511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/settings/protected_branch.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

<div class="field">
<div class="ui checkbox">
<input class="enable-statuscheck" name="enable_status_check" type="checkbox" data-target="#statuscheck_contexts_box" {{if .Branch.EnableStatusCheck}}checked{{end}}>
<input class="enable-statuscheck" name="enable_status_check" type="checkbox" data-target="#statuscheck_contexts_box" {{if eq (len .branch_status_check_contexts) 0}}disabled{{end}} {{if .Branch.EnableStatusCheck}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.protect_check_status_contexts"}}</label>
<p class="help">{{.i18n.Tr "repo.settings.protect_check_status_contexts_desc"}}</p>
</div>
Expand Down

0 comments on commit 9fa4511

Please sign in to comment.