1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-05 05:51:29 +03:00
gitea/templates/repo/settings/slack_hook.tmpl

21 lines
1.5 KiB
Cheetah
Raw Normal View History

2014-08-24 16:59:47 +04:00
<div id="slack" class="{{if or .PageIsSettingsHooksNew (and .PageIsSettingsHooksEdit (not (eq .HookType "slack")))}}hidden{{end}}">
<form class="form form-align panel-body repo-setting-form" id="repo-setting-form-slack" action="{{.RepoLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.Id}}{{end}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="hook_type" value="slack">
<div class="text-center panel-desc">{{.i18n.Tr "repo.settings.add_slack_hook_desc" | Str2html}}</div>
<div class="field">
<label class="req" for="domain">{{.i18n.Tr "repo.settings.slack_domain"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="domain" name="domain" type="text" value="{{.SlackHook.Domain}}" placeholde="myslack" required />
</div>
<div class="field">
<label class="req" for="token">{{.i18n.Tr "repo.settings.slack_token"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="token" name="token" type="text" value="{{.SlackHook.Token}}" autocomplete="off" required />
</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>