forgejo/templates/webhook/new/telegram.tmpl

20 lines
1.1 KiB
Go HTML Template
Raw Normal View History

2019-04-19 02:45:02 +00:00
{{if eq .HookType "telegram"}}
<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 13:33:59 +00:00
<form class="ui form" action="{{.BaseLink}}/{{or .Webhook.ID "telegram/new"}}" method="post">
2019-04-19 02:45:02 +00:00
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_BotToken}}error{{end}}">
<label for="bot_token">{{ctx.Locale.Tr "repo.settings.bot_token"}}</label>
2024-03-20 14:44:01 +00:00
<input id="bot_token" name="bot_token" type="text" value="{{.HookMetadata.BotToken}}" autofocus required>
2019-04-19 02:45:02 +00:00
</div>
<div class="required field {{if .Err_ChatID}}error{{end}}">
<label for="chat_id">{{ctx.Locale.Tr "repo.settings.chat_id"}}</label>
2024-03-20 14:44:01 +00:00
<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>
2024-03-20 14:44:01 +00:00
<input id="thread_id" name="thread_id" type="text" value="{{.HookMetadata.ThreadID}}">
</div>
2019-04-19 02:45:02 +00:00
{{template "repo/settings/webhook/settings" .}}
</form>
{{end}}