Browse Source

pkg/context: rename {CsrfToken, CsrfTokenHtml} -> {CSRFToken, CSRFTokenHTML}

pull/3974/merge
Unknwon 8 years ago
parent
commit
2c404daca6
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 6
      pkg/context/context.go
  2. 2
      templates/admin/auth/edit.tmpl
  3. 2
      templates/admin/auth/new.tmpl
  4. 2
      templates/admin/config.tmpl
  5. 2
      templates/admin/user/edit.tmpl
  6. 2
      templates/admin/user/new.tmpl
  7. 2
      templates/base/head.tmpl
  8. 2
      templates/org/create.tmpl
  9. 2
      templates/org/member/invite.tmpl
  10. 2
      templates/org/settings/delete.tmpl
  11. 4
      templates/org/settings/options.tmpl
  12. 2
      templates/org/team/members.tmpl
  13. 2
      templates/org/team/new.tmpl
  14. 2
      templates/org/team/repositories.tmpl
  15. 2
      templates/repo/create.tmpl
  16. 2
      templates/repo/editor/delete.tmpl
  17. 2
      templates/repo/editor/edit.tmpl
  18. 4
      templates/repo/editor/upload.tmpl
  19. 6
      templates/repo/issue/labels.tmpl
  20. 2
      templates/repo/issue/milestone_new.tmpl
  21. 2
      templates/repo/issue/new_form.tmpl
  22. 6
      templates/repo/issue/view_content.tmpl
  23. 2
      templates/repo/migrate.tmpl
  24. 2
      templates/repo/pulls/fork.tmpl
  25. 2
      templates/repo/release/new.tmpl
  26. 2
      templates/repo/settings/branches.tmpl
  27. 2
      templates/repo/settings/collaboration.tmpl
  28. 2
      templates/repo/settings/deploy_keys.tmpl
  29. 2
      templates/repo/settings/githook_edit.tmpl
  30. 16
      templates/repo/settings/options.tmpl
  31. 2
      templates/repo/settings/protected_branch.tmpl
  32. 2
      templates/repo/settings/webhook/discord.tmpl
  33. 2
      templates/repo/settings/webhook/gogs.tmpl
  34. 2
      templates/repo/settings/webhook/slack.tmpl
  35. 2
      templates/repo/wiki/new.tmpl
  36. 2
      templates/user/auth/activate.tmpl
  37. 2
      templates/user/auth/forgot_passwd.tmpl
  38. 2
      templates/user/auth/login.tmpl
  39. 2
      templates/user/auth/reset_passwd.tmpl
  40. 2
      templates/user/auth/signup.tmpl
  41. 2
      templates/user/auth/two_factor.tmpl
  42. 2
      templates/user/auth/two_factor_recovery_code.tmpl
  43. 2
      templates/user/settings/applications.tmpl
  44. 2
      templates/user/settings/avatar.tmpl
  45. 2
      templates/user/settings/delete.tmpl
  46. 4
      templates/user/settings/email.tmpl
  47. 2
      templates/user/settings/password.tmpl
  48. 2
      templates/user/settings/profile.tmpl
  49. 2
      templates/user/settings/sshkeys.tmpl
  50. 2
      templates/user/settings/two_factor_enable.tmpl
  51. 2
      templates/user/settings/two_factor_recovery_codes.tmpl

6
pkg/context/context.go

@ -212,10 +212,10 @@ func Contexter() macaron.Handler {
} }
} }
ctx.Data["CsrfToken"] = x.GetToken() ctx.Data["CSRFToken"] = x.GetToken()
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`) ctx.Data["CSRFTokenHTML"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
log.Trace("Session ID: %s", sess.ID()) log.Trace("Session ID: %s", sess.ID())
log.Trace("CSRF Token: %v", ctx.Data["CsrfToken"]) log.Trace("CSRF Token: %v", ctx.Data["CSRFToken"])
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding

2
templates/admin/auth/edit.tmpl

@ -10,7 +10,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="id" value="{{.Source.ID}}"> <input type="hidden" name="id" value="{{.Source.ID}}">
<div class="inline field"> <div class="inline field">
<label>{{$.i18n.Tr "admin.auths.auth_type"}}</label> <label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>

2
templates/admin/auth/new.tmpl

@ -10,7 +10,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<!-- Types and name --> <!-- Types and name -->
<div class="inline required field {{if .Err_Type}}error{{end}}"> <div class="inline required field {{if .Err_Type}}error{{end}}">
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label> <label>{{.i18n.Tr "admin.auths.auth_type"}}</label>

2
templates/admin/config.tmpl

@ -178,7 +178,7 @@
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt> <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br> <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
<form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post"> <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field ui left"> <div class="inline field ui left">
<div class="ui input"> <div class="ui input">
<input type="email" name="email" required> <input type="email" name="email" required>

2
templates/admin/user/edit.tmpl

@ -10,7 +10,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field {{if .Err_UserName}}error{{end}}"> <div class="inline field {{if .Err_UserName}}error{{end}}">
<label for="user_name">{{.i18n.Tr "username"}}</label> <label for="user_name">{{.i18n.Tr "username"}}</label>
<span>{{.User.Name}}</span> <span>{{.User.Name}}</span>

2
templates/admin/user/new.tmpl

@ -10,7 +10,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<!-- Types and name --> <!-- Types and name -->
<div class="inline required field {{if .Err_LoginType}}error{{end}}"> <div class="inline required field {{if .Err_LoginType}}error{{end}}">
<label>{{.i18n.Tr "admin.users.auth_source"}}</label> <label>{{.i18n.Tr "admin.users.auth_source"}}</label>

2
templates/base/head.tmpl

@ -9,7 +9,7 @@
<meta name="keywords" content="go, git, self-hosted, gogs"> <meta name="keywords" content="go, git, self-hosted, gogs">
{{end}} {{end}}
<meta name="referrer" content="no-referrer" /> <meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="{{.CsrfToken}}" /> <meta name="_csrf" content="{{.CSRFToken}}" />
<meta name="_suburl" content="{{AppSubUrl}}" /> <meta name="_suburl" content="{{AppSubUrl}}" />
{{if .GoGetImport}} {{if .GoGetImport}}
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}"> <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">

2
templates/org/create.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "new_org"}} {{.i18n.Tr "new_org"}}
</h3> </h3>

2
templates/org/member/invite.tmpl

@ -6,7 +6,7 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<h2>{{.i18n.Tr "org.members.invite_desc" .Org.DisplayName}}</h2> <h2>{{.i18n.Tr "org.members.invite_desc" .Org.DisplayName}}</h2>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field ui left"> <div class="inline field ui left">
<div id="search-user-box"> <div id="search-user-box">
<div class="ui input"> <div class="ui input">

2
templates/org/settings/delete.tmpl

@ -14,7 +14,7 @@
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p> <p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
</div> </div>
<form class="ui form" id="delete-form" action="{{.Link}}" method="post"> <form class="ui form" id="delete-form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input class="fake" type="password"> <input class="fake" type="password">
<div class="inline required field {{if .Err_Password}}error{{end}}"> <div class="inline required field {{if .Err_Password}}error{{end}}">
<label for="password">{{.i18n.Tr "password"}}</label> <label for="password">{{.i18n.Tr "password"}}</label>

4
templates/org/settings/options.tmpl

@ -11,7 +11,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_Name}}error{{end}}"> <div class="required field {{if .Err_Name}}error{{end}}">
<label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label> <label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required> <input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
@ -51,7 +51,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data"> <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field"> <div class="inline field">
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label> <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" > <input name="avatar" type="file" >

2
templates/org/team/members.tmpl

@ -25,7 +25,7 @@
{{if .IsOrganizationOwner}} {{if .IsOrganizationOwner}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
<form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post"> <form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="uid" value="{{.SignedUser.ID}}"> <input type="hidden" name="uid" value="{{.SignedUser.ID}}">
<div class="inline field ui left"> <div class="inline field ui left">
<div id="search-user-box"> <div id="search-user-box">

2
templates/org/team/new.tmpl

@ -4,7 +4,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post"> <form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}} {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}}
</h3> </h3>

2
templates/org/team/repositories.tmpl

@ -26,7 +26,7 @@
{{if $canAddRemove}} {{if $canAddRemove}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
<form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post"> <form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field ui left"> <div class="inline field ui left">
<div id="search-repo-box" data-uid="{{.Org.ID}}"> <div id="search-repo-box" data-uid="{{.Org.ID}}">
<div class="ui input"> <div class="ui input">

2
templates/repo/create.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "new_repo"}} {{.i18n.Tr "new_repo"}}
</h3> </h3>

2
templates/repo/editor/delete.tmpl

@ -4,7 +4,7 @@
<div class="ui container"> <div class="ui container">
{{template "base/alert" .}} {{template "base/alert" .}}
<form class="ui form" method="post"> <form class="ui form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
{{template "repo/editor/commit_form" .}} {{template "repo/editor/commit_form" .}}
</form> </form>
</div> </div>

2
templates/repo/editor/edit.tmpl

@ -4,7 +4,7 @@
<div class="ui container"> <div class="ui container">
{{template "base/alert" .}} {{template "base/alert" .}}
<form class="ui edit form" method="post"> <form class="ui edit form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="last_commit" value="{{.last_commit}}"> <input type="hidden" name="last_commit" value="{{.last_commit}}">
<div class="ui secondary menu"> <div class="ui secondary menu">
<div class="fitted item treepath"> <div class="fitted item treepath">

4
templates/repo/editor/upload.tmpl

@ -4,7 +4,7 @@
<div class="ui container"> <div class="ui container">
{{template "base/alert" .}} {{template "base/alert" .}}
<form class="ui comment form" method="post"> <form class="ui comment form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="ui secondary menu"> <div class="ui secondary menu">
<div class="item fitted treepath"> <div class="item fitted treepath">
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
@ -27,7 +27,7 @@
</div> </div>
<div class="field"> <div class="field">
<div class="files"></div> <div class="files"></div>
<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{.RepoLink}}/upload-file" data-remove-url="{{.RepoLink}}/upload-remove" data-csrf="{{.CsrfToken}}" data-accepts="{{.UploadAllowedTypes}}" data-max-file="{{.UploadMaxFiles}}" data-max-size="{{.UploadMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div> <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{.RepoLink}}/upload-file" data-remove-url="{{.RepoLink}}/upload-remove" data-csrf="{{.CSRFToken}}" data-accepts="{{.UploadAllowedTypes}}" data-max-file="{{.UploadMaxFiles}}" data-max-size="{{.UploadMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
</div> </div>
{{template "repo/editor/commit_form" .}} {{template "repo/editor/commit_form" .}}
</form> </form>

6
templates/repo/issue/labels.tmpl

@ -12,7 +12,7 @@
</div> </div>
<div class="ui new-label segment hide"> <div class="ui new-label segment hide">
<form class="ui form" action="{{$.RepoLink}}/labels/new" method="post"> <form class="ui form" action="{{$.RepoLink}}/labels/new" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="ui grid"> <div class="ui grid">
<div class="five wide column"> <div class="five wide column">
<div class="ui small input"> <div class="ui small input">
@ -51,7 +51,7 @@
<p>{{.i18n.Tr "repo.issues.label_templates.info"}}</p> <p>{{.i18n.Tr "repo.issues.label_templates.info"}}</p>
<br/> <br/>
<form class="ui form center" action="{{.Link}}/initialize" method="post"> <form class="ui form center" action="{{.Link}}/initialize" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="field"> <div class="field">
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" name="template_name" value="Default"> <input type="hidden" name="template_name" value="Default">
@ -111,7 +111,7 @@
</div> </div>
<div class="content"> <div class="content">
<form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post"> <form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input id="label-modal-id" name="id" type="hidden"> <input id="label-modal-id" name="id" type="hidden">
<div class="ui grid"> <div class="ui grid">
<div class="five wide column"> <div class="five wide column">

2
templates/repo/issue/milestone_new.tmpl

@ -22,7 +22,7 @@
</h2> </h2>
{{template "base/alert" .}} {{template "base/alert" .}}
<form class="ui form grid" action="{{.Link}}" method="post"> <form class="ui form grid" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="eleven wide column"> <div class="eleven wide column">
<div class="field {{if .Err_Title}}error{{end}}"> <div class="field {{if .Err_Title}}error{{end}}">
<label>{{.i18n.Tr "repo.milestones.title"}}</label> <label>{{.i18n.Tr "repo.milestones.title"}}</label>

2
templates/repo/issue/new_form.tmpl

@ -1,5 +1,5 @@
<form class="ui comment form grid" action="{{EscapePound .Link}}" method="post"> <form class="ui comment form grid" action="{{EscapePound .Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
{{if .Flash}} {{if .Flash}}
<div class="sixteen wide column"> <div class="sixteen wide column">
{{template "base/alert" .}} {{template "base/alert" .}}

6
templates/repo/issue/view_content.tmpl

@ -166,7 +166,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<div> <div>
<form class="ui form" action="{{.DeleteBranchLink}}" method="post"> <form class="ui form" action="{{.DeleteBranchLink}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<button class="ui red button">{{$.i18n.Tr "repo.pulls.delete_branch"}}</button> <button class="ui red button">{{$.i18n.Tr "repo.pulls.delete_branch"}}</button>
</form> </form>
</div> </div>
@ -194,7 +194,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<div> <div>
<form class="ui form" action="{{.Link}}/merge" method="post"> <form class="ui form" action="{{.Link}}/merge" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<button class="ui green button"> <button class="ui green button">
<span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}} <span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}}
</button> </button>
@ -224,7 +224,7 @@
<div class="content"> <div class="content">
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post"> <form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
{{template "repo/issue/comment_tab" .}} {{template "repo/issue/comment_tab" .}}
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input id="status" name="status" type="hidden"> <input id="status" name="status" type="hidden">
<div class="text right"> <div class="text right">
{{if and .IsIssueOwner (not .DisableStatusChange)}} {{if and .IsIssueOwner (not .DisableStatusChange)}}

2
templates/repo/migrate.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "new_migrate"}} {{.i18n.Tr "new_migrate"}}
</h3> </h3>

2
templates/repo/pulls/fork.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "new_fork"}} {{.i18n.Tr "new_fork"}}
</h3> </h3>

2
templates/repo/release/new.tmpl

@ -13,7 +13,7 @@
</h2> </h2>
{{template "base/alert" .}} {{template "base/alert" .}}
<form class="ui form grid" action="{{.Link}}" method="post"> <form class="ui form grid" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="ui seven wide column target"> <div class="ui seven wide column target">
<div class="inline field {{if .Err_TagName}}error{{end}}"> <div class="inline field {{if .Err_TagName}}error{{end}}">
{{if .PageIsEditRelease}} {{if .PageIsEditRelease}}

2
templates/repo/settings/branches.tmpl

@ -12,7 +12,7 @@
<div class="ui attached segment default-branch"> <div class="ui attached segment default-branch">
<p>{{.i18n.Tr "repo.settings.default_branch_desc"}}</p> <p>{{.i18n.Tr "repo.settings.default_branch_desc"}}</p>
<form class="ui form" action="{{.Link}}/default_branch" method="post"> <form class="ui form" action="{{.Link}}/default_branch" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required inline field {{if .Repository.IsBare}}disabled{{end}}"> <div class="required inline field {{if .Repository.IsBare}}disabled{{end}}">
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}"> <input type="hidden" id="branch" name="branch" value="{{.Repository.DefaultBranch}}">

2
templates/repo/settings/collaboration.tmpl

@ -40,7 +40,7 @@
</div> </div>
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post"> <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field ui left"> <div class="inline field ui left">
<div id="search-user-box"> <div id="search-user-box">
<div class="ui input"> <div class="ui input">

2
templates/repo/settings/deploy_keys.tmpl

@ -52,7 +52,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="field"> <div class="field">
{{.i18n.Tr "repo.settings.deploy_key_desc"}} {{.i18n.Tr "repo.settings.deploy_key_desc"}}
</div> </div>

2
templates/repo/settings/githook_edit.tmpl

@ -12,7 +12,7 @@
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p> <p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
{{with .Hook}} {{with .Hook}}
<div class="inline field"> <div class="inline field">
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label> <label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>

16
templates/repo/settings/options.tmpl

@ -11,7 +11,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="update"> <input type="hidden" name="action" value="update">
<div class="required field {{if .Err_RepoName}}error{{end}}"> <div class="required field {{if .Err_RepoName}}error{{end}}">
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}<span class="text red hide" id="repo-name-change-prompt"> {{.i18n.Tr "repo.settings.change_reponame_prompt"}}</span></label> <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}<span class="text red hide" id="repo-name-change-prompt"> {{.i18n.Tr "repo.settings.change_reponame_prompt"}}</span></label>
@ -48,7 +48,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" method="post"> <form class="ui form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="mirror"> <input type="hidden" name="action" value="mirror">
<div class="inline field {{if .Err_EnablePrune}}error{{end}}"> <div class="inline field {{if .Err_EnablePrune}}error{{end}}">
<label>{{.i18n.Tr "repo.mirror_prune"}}</label> <label>{{.i18n.Tr "repo.mirror_prune"}}</label>
@ -75,7 +75,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
<form class="ui form" method="post"> <form class="ui form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="mirror-sync"> <input type="hidden" name="action" value="mirror-sync">
<div class="inline field"> <div class="inline field">
<label>{{.i18n.Tr "repo.mirror_last_synced"}}</label> <label>{{.i18n.Tr "repo.mirror_last_synced"}}</label>
@ -93,7 +93,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" method="post"> <form class="ui form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="advanced"> <input type="hidden" name="action" value="advanced">
<!-- Wiki --> <!-- Wiki -->
@ -277,7 +277,7 @@
{{.i18n.Tr "repo.settings.convert_notices_1" | Safe}} {{.i18n.Tr "repo.settings.convert_notices_1" | Safe}}
</div> </div>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="convert"> <input type="hidden" name="action" value="convert">
<div class="field"> <div class="field">
<label> <label>
@ -309,7 +309,7 @@
{{.i18n.Tr "repo.settings.transfer_notices_2" | Safe}} {{.i18n.Tr "repo.settings.transfer_notices_2" | Safe}}
</div> </div>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="transfer"> <input type="hidden" name="action" value="transfer">
<div class="field"> <div class="field">
<label> <label>
@ -347,7 +347,7 @@
{{end}} {{end}}
</div> </div>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="delete"> <input type="hidden" name="action" value="delete">
<div class="field"> <div class="field">
<label> <label>
@ -379,7 +379,7 @@
{{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}} {{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
</div> </div>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="action" value="delete-wiki"> <input type="hidden" name="action" value="delete-wiki">
<div class="field"> <div class="field">
<label> <label>

2
templates/repo/settings/protected_branch.tmpl

@ -12,7 +12,7 @@
<div class="ui attached segment branch-protection"> <div class="ui attached segment branch-protection">
<p>{{.i18n.Tr "repo.settings.branch_protection_desc" .Branch.Name | Str2html}}</p> <p>{{.i18n.Tr "repo.settings.branch_protection_desc" .Branch.Name | Str2html}}</p>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<input class="enable-protection" name="protected" type="checkbox" data-target="#protection_box" {{if .Branch.Protected}}checked{{end}}> <input class="enable-protection" name="protected" type="checkbox" data-target="#protection_box" {{if .Branch.Protected}}checked{{end}}>

2
templates/repo/settings/webhook/discord.tmpl

@ -1,7 +1,7 @@
{{if eq .HookType "discord"}} {{if eq .HookType "discord"}}
<p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com/" | Str2html}}</p> <p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com/" | Str2html}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/discord/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post"> <form class="ui form" action="{{.BaseLink}}/settings/hooks/discord/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}"> <div class="required field {{if .Err_PayloadURL}}error{{end}}">
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label> <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required> <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>

2
templates/repo/settings/webhook/gogs.tmpl

@ -1,7 +1,7 @@
{{if eq .HookType "gogs"}} {{if eq .HookType "gogs"}}
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://gogs.io/docs/features/webhook.html" | Str2html}}</p> <p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://gogs.io/docs/features/webhook.html" | Str2html}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post"> <form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}"> <div class="required field {{if .Err_PayloadURL}}error{{end}}">
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label> <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required> <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>

2
templates/repo/settings/webhook/slack.tmpl

@ -1,7 +1,7 @@
{{if eq .HookType "slack"}} {{if eq .HookType "slack"}}
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "https://slack.com" | Str2html}}</p> <p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "https://slack.com" | Str2html}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post"> <form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}"> <div class="required field {{if .Err_PayloadURL}}error{{end}}">
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label> <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required> <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>

2
templates/repo/wiki/new.tmpl

@ -12,7 +12,7 @@
{{end}} {{end}}
</div> </div>
<form class="ui form" action="{{EscapePound .Link}}" method="post"> <form class="ui form" action="{{EscapePound .Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input type="hidden" name="old_title" value="{{.old_title}}"> <input type="hidden" name="old_title" value="{{.old_title}}">
<div class="field {{if .Err_Title}}error{{end}}"> <div class="field {{if .Err_Title}}error{{end}}">
<input name="title" value="{{.title}}" autofocus required> <input name="title" value="{{.title}}" autofocus required>

2
templates/user/auth/activate.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{AppSubUrl}}/user/activate" method="post"> <form class="ui form" action="{{AppSubUrl}}/user/activate" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h2 class="ui top attached header"> <h2 class="ui top attached header">
{{.i18n.Tr "auth.active_your_account"}} {{.i18n.Tr "auth.active_your_account"}}
</h2> </h2>

2
templates/user/auth/forgot_passwd.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h2 class="ui top attached header"> <h2 class="ui top attached header">
{{.i18n.Tr "auth.forgot_password"}} {{.i18n.Tr "auth.forgot_password"}}
</h2> </h2>

2
templates/user/auth/login.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "sign_in"}} {{.i18n.Tr "sign_in"}}
</h3> </h3>

2
templates/user/auth/reset_passwd.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input name="code" type="hidden" value="{{.Code}}"> <input name="code" type="hidden" value="{{.Code}}">
<h2 class="ui top attached header"> <h2 class="ui top attached header">
{{.i18n.Tr "auth.reset_password"}} {{.i18n.Tr "auth.reset_password"}}

2
templates/user/auth/signup.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.i18n.Tr "sign_up"}} {{.i18n.Tr "sign_up"}}
</h3> </h3>

2
templates/user/auth/two_factor.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached center header"> <h3 class="ui top attached center header">
{{.i18n.Tr "auth.login_two_factor"}} {{.i18n.Tr "auth.login_two_factor"}}
</h3> </h3>

2
templates/user/auth/two_factor_recovery_code.tmpl

@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column"> <div class="column">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<h3 class="ui top attached center header"> <h3 class="ui top attached center header">
{{.i18n.Tr "auth.login_two_factor_recovery"}} {{.i18n.Tr "auth.login_two_factor_recovery"}}
</h3> </h3>

2
templates/user/settings/applications.tmpl

@ -46,7 +46,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<p>{{.i18n.Tr "settings.new_token_desc"}}</p> <p>{{.i18n.Tr "settings.new_token_desc"}}</p>
<div class="field {{if .Err_Name}}error{{end}}"> <div class="field {{if .Err_Name}}error{{end}}">
<label for="name">{{.i18n.Tr "settings.token_name"}}</label> <label for="name">{{.i18n.Tr "settings.token_name"}}</label>

2
templates/user/settings/avatar.tmpl

@ -11,7 +11,7 @@
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data"> <form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
{{if not DisableGravatar}} {{if not DisableGravatar}}
<div class="inline field"> <div class="inline field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">

2
templates/user/settings/delete.tmpl

@ -13,7 +13,7 @@
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p> <p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
</div> </div>
<form class="ui form" id="delete-form" action="{{.Link}}" method="post"> <form class="ui form" id="delete-form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<input class="fake" type="password"> <input class="fake" type="password">
<div class="required field {{if .Err_Password}}error{{end}}"> <div class="required field {{if .Err_Password}}error{{end}}">
<label for="password">{{.i18n.Tr "password"}}</label> <label for="password">{{.i18n.Tr "password"}}</label>

4
templates/user/settings/email.tmpl

@ -27,7 +27,7 @@
{{if .IsActivated}} {{if .IsActivated}}
<div class="ui right"> <div class="ui right">
<form action="{{$.Link}}" method="post"> <form action="{{$.Link}}" method="post">
{{$.CsrfTokenHtml}} {{$.CSRFTokenHTML}}
<input name="_method" type="hidden" value="PRIMARY"> <input name="_method" type="hidden" value="PRIMARY">
<input name="id" type="hidden" value="{{.ID}}"> <input name="id" type="hidden" value="{{.ID}}">
<button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button> <button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
@ -42,7 +42,7 @@
</div> </div>
<div class="ui attached bottom segment"> <div class="ui attached bottom segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_Email}}error{{end}}"> <div class="required field {{if .Err_Email}}error{{end}}">
<label for="email">{{.i18n.Tr "settings.add_new_email"}}</label> <label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
<input id="email" name="email" type="email" autofocus required> <input id="email" name="email" type="email" autofocus required>

2
templates/user/settings/password.tmpl

@ -11,7 +11,7 @@
<div class="ui attached segment"> <div class="ui attached segment">
{{if .SignedUser.IsLocal}} {{if .SignedUser.IsLocal}}
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_OldPassword}}error{{end}}"> <div class="required field {{if .Err_OldPassword}}error{{end}}">
<label for="old_password">{{.i18n.Tr "settings.old_password"}}</label> <label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
<input id="old_password" name="old_password" type="password" autofocus required> <input id="old_password" name="old_password" type="password" autofocus required>

2
templates/user/settings/profile.tmpl

@ -11,7 +11,7 @@
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{.i18n.Tr "settings.profile_desc"}}</p> <p>{{.i18n.Tr "settings.profile_desc"}}</p>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required field {{if .Err_Name}}error{{end}}"> <div class="required field {{if .Err_Name}}error{{end}}">
<label for="username">{{.i18n.Tr "username"}}<span class="text red {{if eq .name .origin_name}}hide{{end}}" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label> <label for="username">{{.i18n.Tr "username"}}<span class="text red {{if eq .name .origin_name}}hide{{end}}" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
<input id="username" name="name" value="{{.name}}" data-name="{{.origin_name}}" autofocus required {{if not .SignedUser.IsLocal}}readonly{{end}}> <input id="username" name="name" value="{{.name}}" data-name="{{.origin_name}}" autofocus required {{if not .SignedUser.IsLocal}}readonly{{end}}>

2
templates/user/settings/sshkeys.tmpl

@ -50,7 +50,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="field {{if .Err_Title}}error{{end}}"> <div class="field {{if .Err_Title}}error{{end}}">
<label for="title">{{.i18n.Tr "settings.key_name"}}</label> <label for="title">{{.i18n.Tr "settings.key_name"}}</label>
<input id="title" name="title" value="{{.title}}" autofocus required> <input id="title" name="title" value="{{.title}}" autofocus required>

2
templates/user/settings/two_factor_enable.tmpl

@ -13,7 +13,7 @@
<img src="{{.QRCode}}" alt="{{.TwoFactorSecret}}"> <img src="{{.QRCode}}" alt="{{.TwoFactorSecret}}">
<p>{{.i18n.Tr "settings.two_factor_or_enter_secret"}} <b>{{.TwoFactorSecret}}</b></p> <p>{{.i18n.Tr "settings.two_factor_or_enter_secret"}} <b>{{.TwoFactorSecret}}</b></p>
<form class="ui form" method="post"> <form class="ui form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<div class="required inline field"> <div class="required inline field">
<span>{{.i18n.Tr "settings.two_factor_then_enter_passcode"}}</span> <span>{{.i18n.Tr "settings.two_factor_then_enter_passcode"}}</span>
<input class="ui input" name="passcode" autocomplete="off" autofocus required> <input class="ui input" name="passcode" autocomplete="off" autofocus required>

2
templates/user/settings/two_factor_recovery_codes.tmpl

@ -25,7 +25,7 @@
</ul> </ul>
<form class="ui form" method="post"> <form class="ui form" method="post">
{{.CsrfTokenHtml}} {{.CSRFTokenHTML}}
<button class="ui blue button">{{.i18n.Tr "settings.two_factor_regenerate_recovery_codes"}}</button> <button class="ui blue button">{{.i18n.Tr "settings.two_factor_regenerate_recovery_codes"}}</button>
</form> </form>
</div> </div>

Loading…
Cancel
Save