summaryrefslogtreecommitdiffstats
path: root/templates/webhook/new/telegram.tmpl
blob: 3627dff36a39f4cc7c8c2a4815995864e1e42143 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (ctx.Locale.Tr "repo.settings.web_hook_name_telegram")}}</p>
<form class="ui form" action="{{.BaseLink}}/{{or .Webhook.ID "telegram/new"}}" method="post">
	{{.CsrfTokenHtml}}
	<div class="required field {{if .Err_BotToken}}error{{end}}">
		<label for="bot_token">{{ctx.Locale.Tr "repo.settings.bot_token"}}</label>
		<input id="bot_token" name="bot_token" type="text" value="{{.HookMetadata.BotToken}}" autofocus required>
	</div>
	<div class="required field {{if .Err_ChatID}}error{{end}}">
		<label for="chat_id">{{ctx.Locale.Tr "repo.settings.chat_id"}}</label>
		<input id="chat_id" name="chat_id" type="text" value="{{.HookMetadata.ChatID}}" required>
	</div>
	<div class="field {{if .Err_ThreadID}}error{{end}}">
		<label for="thread_id">{{ctx.Locale.Tr "repo.settings.thread_id"}}</label>
		<input id="thread_id" name="thread_id" type="text" value="{{.HookMetadata.ThreadID}}">
	</div>
	{{template "webhook/shared-settings" .}}
</form>