diff options
author | John Olheiser <john.olheiser@gmail.com> | 2022-06-24 12:22:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-24 12:22:08 -0500 |
commit | 02eb4b143b24f2091d82137aa3ee7d3469598499 (patch) | |
tree | d0b739650021822f035108bf25283ef0bf3fa4c2 /templates/repo | |
parent | d789d3646c086cec819f718c86a91f9a49c01dc9 (diff) | |
download | gitea-02eb4b143b24f2091d82137aa3ee7d3469598499.tar.gz gitea-02eb4b143b24f2091d82137aa3ee7d3469598499.zip |
Disable status checks in template if none found (#20088)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/settings/protected_branch.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index 597567f057..e7228f2ac9 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -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> |