2019-03-18 22:33:20 -04:00
|
|
|
{{$isNew:=or .PageIsSettingsHooksNew .PageIsAdminHooksNew}}
|
2014-08-24 08:59:47 -04:00
|
|
|
<div class="field">
|
2015-12-07 17:30:52 -05:00
|
|
|
<h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
|
2015-08-28 11:36:13 -04:00
|
|
|
<div class="grouped event type fields">
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio non-events checkbox">
|
2019-03-18 22:33:20 -04:00
|
|
|
<input class="hidden" name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}>
|
2015-12-07 17:30:52 -05:00
|
|
|
<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio non-events checkbox">
|
|
|
|
<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio events checkbox">
|
|
|
|
<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-26 12:30:06 -04:00
|
|
|
</div>
|
2015-08-28 11:36:13 -04:00
|
|
|
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
|
|
|
|
<!-- Create -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_create"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-16 10:01:55 -04:00
|
|
|
<!-- Delete -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="delete" type="checkbox" tabindex="0" {{if .Webhook.Delete}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_delete"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_delete_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Fork -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="fork" type="checkbox" tabindex="0" {{if .Webhook.Fork}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_fork"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_fork_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
<!-- Push -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_push"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-16 10:01:55 -04:00
|
|
|
<!-- Issues -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issues" type="checkbox" tabindex="0" {{if .Webhook.Issues}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_issues"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_issues_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Issue Comment -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="issue_comment" type="checkbox" tabindex="0" {{if .Webhook.IssueComment}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_issue_comment"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_issue_comment_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-14 06:32:24 -04:00
|
|
|
<!-- Pull Request -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="pull_request" type="checkbox" tabindex="0" {{if .Webhook.PullRequest}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_pull_request"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_pull_request_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-03 04:20:24 -04:00
|
|
|
<!-- Repository -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="repository" type="checkbox" tabindex="0" {{if .Webhook.Repository}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_repository"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_repository_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-16 10:01:55 -04:00
|
|
|
<!-- Release -->
|
|
|
|
<div class="seven wide column">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input class="hidden" name="release" type="checkbox" tabindex="0" {{if .Webhook.Release}}checked{{end}}>
|
|
|
|
<label>{{.i18n.Tr "repo.settings.event_release"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.event_release_desc"}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2014-08-24 08:59:47 -04:00
|
|
|
</div>
|
2015-08-28 11:36:13 -04:00
|
|
|
|
2019-09-09 01:48:21 -04:00
|
|
|
<!-- Branch filter -->
|
|
|
|
<div class="field">
|
|
|
|
<label for="branch_filter">{{.i18n.Tr "repo.settings.branch_filter"}}</label>
|
|
|
|
<input name="branch_filter" type="text" tabindex="0" value="{{or .Webhook.BranchFilter "*"}}">
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.branch_filter_desc" | Str2html}}</span>
|
|
|
|
</div>
|
|
|
|
|
2015-08-28 11:36:13 -04:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
2015-08-26 12:30:06 -04:00
|
|
|
<div class="inline field">
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="ui checkbox">
|
2019-03-18 22:33:20 -04:00
|
|
|
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or $isNew .Webhook.IsActive}}checked{{end}}>
|
2015-12-07 17:30:52 -05:00
|
|
|
<label>{{.i18n.Tr "repo.settings.active"}}</label>
|
|
|
|
<span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
|
|
|
|
</div>
|
2014-08-24 08:59:47 -04:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2019-03-18 22:33:20 -04:00
|
|
|
{{if $isNew}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<button class="ui green button">{{.i18n.Tr "repo.settings.add_webhook"}}</button>
|
|
|
|
{{else}}
|
|
|
|
<button class="ui green button">{{.i18n.Tr "repo.settings.update_webhook"}}</button>
|
2019-03-18 22:33:20 -04:00
|
|
|
<a class="ui red delete-button button" data-url="{{.BaseLink}}/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
|
2015-12-07 17:30:52 -05:00
|
|
|
{{end}}
|
2014-08-24 08:59:47 -04:00
|
|
|
</div>
|
2015-08-26 12:30:06 -04:00
|
|
|
|
2018-05-16 10:01:55 -04:00
|
|
|
{{template "repo/settings/webhook/delete_modal" .}}
|