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