2019-04-18 19:45:02 -07:00
|
|
|
{{if eq .HookType "telegram"}}
|
2024-02-22 11:05:47 -07:00
|
|
|
<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>
|
2019-04-18 19:45:02 -07:00
|
|
|
<form class="ui form" action="{{.BaseLink}}/telegram/{{or .Webhook.ID "new"}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="required field {{if .Err_BotToken}}error{{end}}">
|
2023-09-25 01:56:50 -07:00
|
|
|
<label for="bot_token">{{ctx.Locale.Tr "repo.settings.bot_token"}}</label>
|
2019-04-18 19:45:02 -07:00
|
|
|
<input id="bot_token" name="bot_token" type="text" value="{{.TelegramHook.BotToken}}" autofocus required>
|
|
|
|
</div>
|
2021-04-10 20:46:37 -07:00
|
|
|
<div class="required field {{if .Err_ChatID}}error{{end}}">
|
2023-09-25 01:56:50 -07:00
|
|
|
<label for="chat_id">{{ctx.Locale.Tr "repo.settings.chat_id"}}</label>
|
2021-04-10 20:46:37 -07:00
|
|
|
<input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required>
|
|
|
|
</div>
|
2023-08-13 07:00:06 -07:00
|
|
|
<div class="field {{if .Err_ThreadID}}error{{end}}">
|
2023-09-25 01:56:50 -07:00
|
|
|
<label for="thread_id">{{ctx.Locale.Tr "repo.settings.thread_id"}}</label>
|
2023-08-13 07:00:06 -07:00
|
|
|
<input id="thread_id" name="thread_id" type="text" value="{{.TelegramHook.ThreadID}}">
|
|
|
|
</div>
|
2019-04-18 19:45:02 -07:00
|
|
|
{{template "repo/settings/webhook/settings" .}}
|
|
|
|
</form>
|
|
|
|
{{end}}
|