[PORT] Add warning message in merge instructions when AutodetectManualMerge was not enabled (gitea#31805)

---

Conflict resolution: trivial
Things done differently: Improve localization message, use the paragraph
element instead of the div element, fix passing this variable to the
template and add a integration test

(cherry picked from commit 9633f336c87947dc7d2a5e76077a10699ba5e50d)
This commit is contained in:
a1012112796 2024-08-10 09:09:34 +08:00 committed by Gusted
parent 44002a6399
commit e5f8d144f2
No known key found for this signature in database
GPG key ID: FD821B732837125F
5 changed files with 53 additions and 2 deletions

View file

@ -1881,6 +1881,8 @@ func ViewIssue(ctx *context.Context) {
}
prConfig := prUnit.PullRequestsConfig()
ctx.Data["AutodetectManualMerge"] = prConfig.AutodetectManualMerge
var mergeStyle repo_model.MergeStyle
// Check correct values and select default
if ms, ok := ctx.Data["MergeStyle"].(repo_model.MergeStyle); !ok ||