2014-08-24 16:59:47 +04:00
<div class="field">
2015-12-08 01:30:52 +03:00
<h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
2015-08-28 18:36:13 +03:00
<div class="grouped event type fields">
2015-12-08 01:30:52 +03:00
<div class="field">
<div class="ui radio non-events checkbox">
<input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
<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 19:30:06 +03:00
</div>
2015-08-28 18:36:13 +03:00
2015-12-08 01:30:52 +03: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>
<!-- 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>
</div>
2014-08-24 16:59:47 +04:00
</div>
2015-08-28 18:36:13 +03:00
<div class="ui divider"></div>
2015-08-26 19:30:06 +03:00
<div class="inline field">
2015-12-08 01:30:52 +03:00
<div class="ui checkbox">
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.active"}}</label>
<span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
</div>
2014-08-24 16:59:47 +04:00
</div>
<div class="field">
2015-08-26 19:30:06 +03:00
{{if .PageIsSettingsHooksNew}}
2015-12-08 01:30:52 +03: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>
<a class="ui red delete-button button" data-url="{{.BaseLink}}/settings/hooks/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
{{end}}
2014-08-24 16:59:47 +04:00
</div>
2015-08-26 19:30:06 +03:00
{{template "repo/settings/hook_delete_modal" .}}