summaryrefslogtreecommitdiffstats
path: root/templates/user/profile.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/user/profile.tmpl')
-rw-r--r--templates/user/profile.tmpl10
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 945cc90f0d..f3cac7befb 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -65,9 +65,15 @@
{{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
<li class="follow">
{{if .SignedUser.IsFollowing .Owner.ID}}
- <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}">{{svg "octicon-person" 16}} {{.i18n.Tr "user.unfollow"}}</a>
+ <form method="post" action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}">
+ {{$.CsrfTokenHtml}}
+ <button type="submit" class="ui basic red button">{{svg "octicon-person" 16}} {{.i18n.Tr "user.unfollow"}}</button>
+ </form>
{{else}}
- <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}">{{svg "octicon-person" 16}} {{.i18n.Tr "user.follow"}}</a>
+ <form method="post" action="{{.Link}}/action/follow?redirect_to={{$.Link}}">
+ {{$.CsrfTokenHtml}}
+ <button type="submit" class="ui basic green button">{{svg "octicon-person" 16}} {{.i18n.Tr "user.follow"}}</button>
+ </form>
{{end}}
</li>
{{end}}