Skip to content

Commit 9ac536a

Browse files
authored
Fix "stop time tracking button" on navbar (#33084)
Fix #33083 By the way (something I was working on): 1. relax color/background-color for more markup elements 2. fix a command line sentence error
1 parent 45973a1 commit 9ac536a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
var CmdMigrate = &cli.Command{
1919
Name: "migrate",
2020
Usage: "Migrate the database",
21-
Description: "This is a command for migrating the database, so that you can run gitea admin create-user before starting the server.",
21+
Description: `This is a command for migrating the database, so that you can run "gitea admin create user" before starting the server.`,
2222
Action: runMigrate,
2323
}
2424

modules/markup/sanitizer_default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (st *Sanitizer) createDefaultPolicy() *bluemonday.Policy {
4848
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^(unchecked|checked|indeterminate)$`)).OnElements("li")
4949

5050
// Allow 'color' and 'background-color' properties for the style attribute on text elements.
51-
policy.AllowStyles("color", "background-color").OnElements("span", "p")
51+
policy.AllowStyles("color", "background-color").OnElements("div", "span", "p", "tr", "th", "td")
5252

5353
policy.AllowAttrs("src", "autoplay", "controls").OnElements("video")
5454

templates/base/head_navbar.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@
192192
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
193193
</a>
194194
<div class="tw-flex tw-gap-1">
195-
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
195+
<form class="stopwatch-commit form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
196196
{{.CsrfTokenHtml}}
197197
<button
198198
type="submit"
199199
class="ui button mini compact basic icon tw-mr-0"
200200
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
201201
>{{svg "octicon-square-fill"}}</button>
202202
</form>
203-
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
203+
<form class="stopwatch-cancel form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
204204
{{.CsrfTokenHtml}}
205205
<button
206206
type="submit"

0 commit comments

Comments
 (0)