Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-25 03:06:10 +01:00
forgejo/templates/repo/settings/hook_slack.tmpl

17 lines
1.3 KiB
Cheetah
Raw Normal View History

<div id="slack" class="{{if or .PageIsSettingsHooksNew (and .PageIsSettingsHooksEdit (not (eq .HookType "Slack")))}}hidden{{end}}">
2015-08-26 15:45:51 +02:00
<form class="form form-align panel-body repo-setting-form" id="repo-setting-form-slack" action="{{if .RepoLink}}{{.RepoLink}}{{else if .OrgLink}}{{.OrgLink}}{{end}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
2014-08-24 14:59:47 +02:00
{{.CsrfTokenHtml}}
<input type="hidden" name="hook_type" value="slack">
2014-11-10 11:30:07 +01:00
<div class="text-center panel-desc">{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</div>
2014-08-24 14:59:47 +02:00
<div class="field">
2014-10-24 14:56:12 +02:00
<label class="req" for="payload-url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
2015-08-26 15:45:51 +02:00
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="payload-url" name="payload_url" type="url" value="{{.Webhook.URL}}" required />
2014-08-24 14:59:47 +02:00
</div>
<div class="field">
<label class="req" for="channel">{{.i18n.Tr "repo.settings.slack_channel"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="channel" name="channel" type="text" value="{{.SlackHook.Channel}}" placeholder="#general" required />
</div>
{{template "repo/settings/hook_settings" .}}
</form>
</div>