mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 13:55:27 +00:00
64f2d70262
Should look exactly like before for normal dividers. "Horizontal" ones look better because they no longer use image backgrounds. <img width="917" alt="Screenshot 2023-06-27 at 19 07 56" src="https://github.com/go-gitea/gitea/assets/115237/d97d8dec-6859-44a8-85ba-e4549b4dd9df"> <img width="914" alt="Screenshot 2023-06-27 at 19 05 58" src="https://github.com/go-gitea/gitea/assets/115237/8bf98544-2d82-4ebf-ac68-d6dc237bd6b2"> <img width="1246" alt="Screenshot 2023-06-27 at 19 00 42" src="https://github.com/go-gitea/gitea/assets/115237/36a6bb21-6029-4f53-8bee-535f55c66fed"> <img width="344" alt="Screenshot 2023-06-27 at 18 58 15" src="https://github.com/go-gitea/gitea/assets/115237/a9e70aee-8e6b-4ea1-9e93-19c9f96aec6e"> <img width="823" alt="Screenshot 2023-06-27 at 18 56 22" src="https://github.com/go-gitea/gitea/assets/115237/e7a497cd-f262-4683-8872-23c3c8cce32f"> <img width="330" alt="Screenshot 2023-06-27 at 19 21 11" src="https://github.com/go-gitea/gitea/assets/115237/42f24149-a655-4c7e-bd26-8ab52db6446b">
289 lines
12 KiB
Handlebars
289 lines
12 KiB
Handlebars
{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminDefaultHooksNew .PageIsAdminSystemHooksNew}}
|
|
<div class="field">
|
|
<h4>{{.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>
|
|
</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>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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>
|
|
</div>
|
|
<!-- Create -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_create"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_create_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Delete -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="delete" type="checkbox" tabindex="0" {{if .Webhook.Delete}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_delete"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_delete_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Fork -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="fork" type="checkbox" tabindex="0" {{if .Webhook.Fork}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_fork"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_fork_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Push -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_push"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_push_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Repository -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="repository" type="checkbox" tabindex="0" {{if .Webhook.Repository}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_repository"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_repository_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Release -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="release" type="checkbox" tabindex="0" {{if .Webhook.Release}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_release"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_release_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Package -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="package" type="checkbox" tabindex="0" {{if .Webhook.Package}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_package"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_package_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Wiki -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_wiki"}}</label>
|
|
<span class="help">{{.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>
|
|
</div>
|
|
<!-- Issues -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="issues" type="checkbox" tabindex="0" {{if .Webhook.Issues}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.event_issues"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.event_issues_desc"}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Issue Assign -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="issue_assign" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Issue Label -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="issue_label" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Issue Milestone -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="issue_milestone" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Issue Comment -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="issue_comment" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Pull Request Events -->
|
|
<div class="fourteen wide column">
|
|
<label>{{.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" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Assign -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_assign" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Label -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_label" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Milestone -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_milestone" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Comment -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_comment" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Review -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_review" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Sync -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_sync" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Pull Request Review Request -->
|
|
<div class="seven wide column">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input name="pull_request_review_request" type="checkbox" tabindex="0" {{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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Branch filter -->
|
|
<div class="field">
|
|
<label for="branch_filter">{{.locale.Tr "repo.settings.branch_filter"}}</label>
|
|
<input name="branch_filter" type="text" tabindex="0" value="{{or .Webhook.BranchFilter "*"}}">
|
|
<span class="help">{{.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>
|
|
<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>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="inline field">
|
|
<div class="ui checkbox">
|
|
<input name="active" type="checkbox" tabindex="0" {{if or $isNew .Webhook.IsActive}}checked{{end}}>
|
|
<label>{{.locale.Tr "repo.settings.active"}}</label>
|
|
<span class="help">{{.locale.Tr "repo.settings.active_helper"}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
{{if $isNew}}
|
|
<button class="ui green button">{{.locale.Tr "repo.settings.add_webhook"}}</button>
|
|
{{else}}
|
|
<button class="ui green 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>
|
|
{{end}}
|
|
</div>
|
|
|
|
{{template "repo/settings/webhook/delete_modal" .}}
|