File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
templates/repo/issue/view_content Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ func LockIssue(ctx *context.Context) {
21
21
22
22
if issue .IsLocked {
23
23
ctx .Flash .Error (ctx .Tr ("repo.issues.lock_duplicate" ))
24
- ctx .Redirect (issue .Link ())
24
+ ctx .JSONRedirect (issue .Link ())
25
25
return
26
26
}
27
27
28
28
if ! form .HasValidReason () {
29
29
ctx .Flash .Error (ctx .Tr ("repo.issues.lock.unknown_reason" ))
30
- ctx .Redirect (issue .Link ())
30
+ ctx .JSONRedirect (issue .Link ())
31
31
return
32
32
}
33
33
@@ -40,7 +40,7 @@ func LockIssue(ctx *context.Context) {
40
40
return
41
41
}
42
42
43
- ctx .Redirect (issue .Link ())
43
+ ctx .JSONRedirect (issue .Link ())
44
44
}
45
45
46
46
// UnlockIssue unlocks a previously locked issue.
@@ -52,7 +52,7 @@ func UnlockIssue(ctx *context.Context) {
52
52
53
53
if ! issue .IsLocked {
54
54
ctx .Flash .Error (ctx .Tr ("repo.issues.unlock_error" ))
55
- ctx .Redirect (issue .Link ())
55
+ ctx .JSONRedirect (issue .Link ())
56
56
return
57
57
}
58
58
@@ -64,5 +64,5 @@ func UnlockIssue(ctx *context.Context) {
64
64
return
65
65
}
66
66
67
- ctx .Redirect (issue .Link ())
67
+ ctx .JSONRedirect (issue .Link ())
68
68
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ func IssuePinOrUnpin(ctx *context.Context) {
31
31
return
32
32
}
33
33
34
- ctx .Redirect (issue .Link ())
34
+ ctx .JSONRedirect (issue .Link ())
35
35
}
36
36
37
37
// IssueUnpin unpins a Issue
Original file line number Diff line number Diff line change 556
556
<div class="ui divider"></div>
557
557
558
558
{{if or .PinEnabled .Issue.IsPinned}}
559
- <form class="gt-mt-2" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}>
559
+ <form class="gt-mt-2 form-fetch-action " method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}>
560
560
{{$.CsrfTokenHtml}}
561
561
<button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}">
562
562
{{if not .Issue.IsPinned}}
599
599
{{end}}
600
600
</div>
601
601
602
- <form class="ui form" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}"
602
+ <form class="ui form form-fetch-action " action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}"
603
603
method="post">
604
604
{{.CsrfTokenHtml}}
605
605
You can’t perform that action at this time.
0 commit comments