From b9e95ef7cbff4865a60314c5e05ed4fb55e798f0 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 5 Jun 2023 16:43:11 +0200
Subject: [PATCH 1/2] fix "Remove stars when repo goes private #19904"

---
 templates/repo/settings/options.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 809fd87dc6eb0..2f2519115562e 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -26,7 +26,7 @@
 				{{if not .Repository.IsFork}}
 					<div class="inline field">
 						<label>{{.locale.Tr "repo.visibility"}}</label>
-						<div class="ui checkbox{{if and (not .Repository.IsPrivate) (gt .Repository.NumStars 0)}} tooltip{{end}}" data-content="{{.locale.Tr "repo.stars_remove_warning"}}">
+						<div class="ui checkbox{{if and (not .Repository.IsPrivate) (gt .Repository.NumStars 0)}} tooltip{{end}}" data-tooltip-content="{{.locale.Tr "repo.stars_remove_warning"}}">
 							{{if .IsAdmin}}
 							<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
 							{{else}}

From 9c138f3d994829d4f81879b69c94210ca1f189e5 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 5 Jun 2023 16:49:05 +0200
Subject: [PATCH 2/2] Update templates/repo/settings/options.tmpl

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
---
 templates/repo/settings/options.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 2f2519115562e..1e940c581b3eb 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -26,7 +26,7 @@
 				{{if not .Repository.IsFork}}
 					<div class="inline field">
 						<label>{{.locale.Tr "repo.visibility"}}</label>
-						<div class="ui checkbox{{if and (not .Repository.IsPrivate) (gt .Repository.NumStars 0)}} tooltip{{end}}" data-tooltip-content="{{.locale.Tr "repo.stars_remove_warning"}}">
+						<div class="ui checkbox" {{if and (not .Repository.IsPrivate) (gt .Repository.NumStars 0)}}data-tooltip-content="{{.locale.Tr "repo.stars_remove_warning"}}"{{end}}>
 							{{if .IsAdmin}}
 							<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
 							{{else}}