Skip to content

Commit 0ea9e29

Browse files
committed
Fix "stop time tracking button" on navbar (go-gitea#33084)
Fix go-gitea#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 c09e43a commit 0ea9e29

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
@@ -191,15 +191,15 @@
191191
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
192192
</a>
193193
<div class="tw-flex tw-gap-1">
194-
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
194+
<form class="stopwatch-commit form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
195195
{{.CsrfTokenHtml}}
196196
<button
197197
type="submit"
198198
class="ui button mini compact basic icon tw-mr-0"
199199
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
200200
>{{svg "octicon-square-fill"}}</button>
201201
</form>
202-
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
202+
<form class="stopwatch-cancel form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
203203
{{.CsrfTokenHtml}}
204204
<button
205205
type="submit"

0 commit comments

Comments
 (0)