File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 1- {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
2- {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
1+ {{- $isHeadForkedRepo := and .Issue.PullRequest .Issue.PullRequest.HeadRepo (ne .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName) -}}
2+ {{if $isHeadForkedRepo}}
3+ {{- $isPullPoster := and .Issue.IsPull .IsIssuePoster -}}
4+ {{- $isPullEditable := and .Issue.PullRequest (not .Issue.IsClosed) (not .Repository.IsArchived) -}}
5+ {{- $allowToChange := and $isPullPoster $isPullEditable -}}
36 <div class="divider"></div>
4- <div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
7+ <div class="ui checkbox {{if not $allowToChange}}disabled{{end}} loading-icon-2px"
8+ {{if $allowToChange}}
9+ id="allow-edits-from-maintainers"
510 data-url="{{.Issue.Link}}"
611 data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
712 data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
13+ {{end}}
814 >
915 <label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
10- <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
16+ <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}} {{if not $allowToChange}}disabled{{end}} >
1117 </div>
12- {{end}}
1318{{end}}
You can’t perform that action at this time.
0 commit comments