diff options
Diffstat (limited to 'templates/repo/settings/webhook/settings.tmpl')
-rw-r--r-- | templates/repo/settings/webhook/settings.tmpl | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl index a669d2c9a3..addf99d45a 100644 --- a/templates/repo/settings/webhook/settings.tmpl +++ b/templates/repo/settings/webhook/settings.tmpl @@ -1,23 +1,23 @@ {{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}} <div class="field"> - <h4>{{.locale.Tr "repo.settings.event_desc"}}</h4> + <h4>{{ctx.Locale.Tr "repo.settings.event_desc"}}</h4> <div class="grouped event type fields"> <div class="field"> <div class="ui radio non-events checkbox"> <input name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_push_only" | Str2html}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_push_only" | Str2html}}</label> </div> </div> <div class="field"> <div class="ui radio non-events checkbox"> <input name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_send_everything" | Str2html}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_send_everything" | Str2html}}</label> </div> </div> <div class="field"> <div class="ui radio events checkbox"> <input name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_choose" | Str2html}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_choose" | Str2html}}</label> </div> </div> </div> @@ -25,15 +25,15 @@ <div class="events fields ui grid {{if not .Webhook.ChooseEvents}}gt-hidden{{end}}"> <!-- Repository Events --> <div class="fourteen wide column"> - <label>{{.locale.Tr "repo.settings.event_header_repository"}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_header_repository"}}</label> </div> <!-- Create --> <div class="seven wide column"> <div class="field"> <div class="ui checkbox"> <input name="create" type="checkbox" {{if .Webhook.Create}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_create"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_create_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_create"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_create_desc"}}</span> </div> </div> </div> @@ -42,8 +42,8 @@ <div class="field"> <div class="ui checkbox"> <input name="delete" type="checkbox" {{if .Webhook.Delete}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_delete"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_delete_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_delete"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_delete_desc"}}</span> </div> </div> </div> @@ -52,8 +52,8 @@ <div class="field"> <div class="ui checkbox"> <input name="fork" type="checkbox" {{if .Webhook.Fork}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_fork"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_fork_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_fork"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_fork_desc"}}</span> </div> </div> </div> @@ -62,8 +62,8 @@ <div class="field"> <div class="ui checkbox"> <input name="push" type="checkbox" {{if .Webhook.Push}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_push"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_push_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_push"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_push_desc"}}</span> </div> </div> </div> @@ -72,8 +72,8 @@ <div class="field"> <div class="ui checkbox"> <input name="repository" type="checkbox" {{if .Webhook.Repository}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_repository"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_repository_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_repository"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_repository_desc"}}</span> </div> </div> </div> @@ -82,8 +82,8 @@ <div class="field"> <div class="ui checkbox"> <input name="release" type="checkbox" {{if .Webhook.Release}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_release"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_release_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_release"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_release_desc"}}</span> </div> </div> </div> @@ -92,8 +92,8 @@ <div class="field"> <div class="ui checkbox"> <input name="package" type="checkbox" {{if .Webhook.Package}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_package"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_package_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_package"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_package_desc"}}</span> </div> </div> </div> @@ -103,23 +103,23 @@ <div class="field"> <div class="ui checkbox"> <input name="wiki" type="checkbox" {{if .Webhook.Wiki}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_wiki"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_wiki_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_wiki"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_wiki_desc"}}</span> </div> </div> </div> <!-- Issue Events --> <div class="fourteen wide column"> - <label>{{.locale.Tr "repo.settings.event_header_issue"}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_header_issue"}}</label> </div> <!-- Issues --> <div class="seven wide column"> <div class="field"> <div class="ui checkbox"> <input name="issues" type="checkbox" {{if .Webhook.Issues}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_issues"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_issues_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_issues"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_issues_desc"}}</span> </div> </div> </div> @@ -128,8 +128,8 @@ <div class="field"> <div class="ui checkbox"> <input name="issue_assign" type="checkbox" {{if .Webhook.IssueAssign}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_issue_assign"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_issue_assign_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_issue_assign"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_assign_desc"}}</span> </div> </div> </div> @@ -138,8 +138,8 @@ <div class="field"> <div class="ui checkbox"> <input name="issue_label" type="checkbox" {{if .Webhook.IssueLabel}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_issue_label"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_issue_label_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_issue_label"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_label_desc"}}</span> </div> </div> </div> @@ -148,8 +148,8 @@ <div class="field"> <div class="ui checkbox"> <input name="issue_milestone" type="checkbox" {{if .Webhook.IssueMilestone}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_issue_milestone"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_issue_milestone_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_issue_milestone"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_milestone_desc"}}</span> </div> </div> </div> @@ -158,23 +158,23 @@ <div class="field"> <div class="ui checkbox"> <input name="issue_comment" type="checkbox" {{if .Webhook.IssueComment}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_issue_comment"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_issue_comment_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_issue_comment"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_issue_comment_desc"}}</span> </div> </div> </div> <!-- Pull Request Events --> <div class="fourteen wide column"> - <label>{{.locale.Tr "repo.settings.event_header_pull_request"}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_header_pull_request"}}</label> </div> <!-- Pull Request --> <div class="seven wide column"> <div class="field"> <div class="ui checkbox"> <input name="pull_request" type="checkbox" {{if .Webhook.PullRequest}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_desc"}}</span> </div> </div> </div> @@ -183,8 +183,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_assign" type="checkbox" {{if .Webhook.PullRequestAssign}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_assign"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_assign_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_assign"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_assign_desc"}}</span> </div> </div> </div> @@ -193,8 +193,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_label" type="checkbox" {{if .Webhook.PullRequestLabel}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_label"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_label_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_label"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_label_desc"}}</span> </div> </div> </div> @@ -203,8 +203,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_milestone" type="checkbox" {{if .Webhook.PullRequestMilestone}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_milestone"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_milestone_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_milestone"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_milestone_desc"}}</span> </div> </div> </div> @@ -213,8 +213,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_comment" type="checkbox" {{if .Webhook.PullRequestComment}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_comment"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_comment_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_comment"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_comment_desc"}}</span> </div> </div> </div> @@ -223,8 +223,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_review" type="checkbox" {{if .Webhook.PullRequestReview}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_review"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_review_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_review"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_review_desc"}}</span> </div> </div> </div> @@ -233,8 +233,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_sync" type="checkbox" {{if .Webhook.PullRequestSync}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_sync"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_sync_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_sync"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_sync_desc"}}</span> </div> </div> </div> @@ -243,8 +243,8 @@ <div class="field"> <div class="ui checkbox"> <input name="pull_request_review_request" type="checkbox" {{if .Webhook.PullRequestReviewRequest}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.event_pull_request_review_request"}}</label> - <span class="help">{{.locale.Tr "repo.settings.event_pull_request_review_request_desc"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.event_pull_request_review_request"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.event_pull_request_review_request_desc"}}</span> </div> </div> </div> @@ -253,17 +253,17 @@ <!-- Branch filter --> <div class="field"> - <label for="branch_filter">{{.locale.Tr "repo.settings.branch_filter"}}</label> + <label for="branch_filter">{{ctx.Locale.Tr "repo.settings.branch_filter"}}</label> <input name="branch_filter" type="text" value="{{or .Webhook.BranchFilter "*"}}"> - <span class="help">{{.locale.Tr "repo.settings.branch_filter_desc" | Str2html}}</span> + <span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc" | Str2html}}</span> </div> <!-- Authorization Header --> <div class="field{{if eq .HookType "matrix"}} required{{end}}"> - <label for="authorization_header">{{.locale.Tr "repo.settings.authorization_header"}}</label> + <label for="authorization_header">{{ctx.Locale.Tr "repo.settings.authorization_header"}}</label> <input id="authorization_header" name="authorization_header" type="text" value="{{.Webhook.HeaderAuthorization}}"{{if eq .HookType "matrix"}} placeholder="Bearer $access_token" required{{end}}> {{if ne .HookType "matrix"}}{{/* Matrix doesn't make the authorization optional but it is implied by the help string, should be changed.*/}} - <span class="help">{{.locale.Tr "repo.settings.authorization_header_desc" "<code>Bearer token123456</code>, <code>Basic YWxhZGRpbjpvcGVuc2VzYW1l</code>" | Str2html}}</span> + <span class="help">{{ctx.Locale.Tr "repo.settings.authorization_header_desc" "<code>Bearer token123456</code>, <code>Basic YWxhZGRpbjpvcGVuc2VzYW1l</code>" | Str2html}}</span> {{end}} </div> @@ -272,16 +272,16 @@ <div class="inline field"> <div class="ui checkbox"> <input name="active" type="checkbox" {{if or $isNew .Webhook.IsActive}}checked{{end}}> - <label>{{.locale.Tr "repo.settings.active"}}</label> - <span class="help">{{.locale.Tr "repo.settings.active_helper"}}</span> + <label>{{ctx.Locale.Tr "repo.settings.active"}}</label> + <span class="help">{{ctx.Locale.Tr "repo.settings.active_helper"}}</span> </div> </div> <div class="field"> {{if $isNew}} - <button class="ui primary button">{{.locale.Tr "repo.settings.add_webhook"}}</button> + <button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_webhook"}}</button> {{else}} - <button class="ui primary button">{{.locale.Tr "repo.settings.update_webhook"}}</button> - <a class="ui red delete-button button" data-url="{{.BaseLink}}/delete" data-id="{{.Webhook.ID}}">{{.locale.Tr "repo.settings.delete_webhook"}}</a> + <button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_webhook"}}</button> + <a class="ui red delete-button button" data-url="{{.BaseLink}}/delete" data-id="{{.Webhook.ID}}">{{ctx.Locale.Tr "repo.settings.delete_webhook"}}</a> {{end}} </div> |