2019-04-19 08:15:02 +05:30
|
|
|
{{if eq .HookType "telegram"}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<p>{{.locale.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (.locale.Tr "repo.settings.web_hook_name_telegram") | Str2html}}</p>
|
2019-04-19 08:15:02 +05:30
|
|
|
<form class="ui form" action="{{.BaseLink}}/telegram/{{or .Webhook.ID "new"}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="required field {{if .Err_BotToken}}error{{end}}">
|
2022-06-28 02:28:46 +05:30
|
|
|
<label for="bot_token">{{.locale.Tr "repo.settings.bot_token"}}</label>
|
2019-04-19 08:15:02 +05:30
|
|
|
<input id="bot_token" name="bot_token" type="text" value="{{.TelegramHook.BotToken}}" autofocus required>
|
|
|
|
</div>
|
2021-04-11 09:16:37 +05:30
|
|
|
<div class="required field {{if .Err_ChatID}}error{{end}}">
|
2022-06-28 02:28:46 +05:30
|
|
|
<label for="chat_id">{{.locale.Tr "repo.settings.chat_id"}}</label>
|
2021-04-11 09:16:37 +05:30
|
|
|
<input id="chat_id" name="chat_id" type="text" value="{{.TelegramHook.ChatID}}" required>
|
|
|
|
</div>
|
2019-04-19 08:15:02 +05:30
|
|
|
{{template "repo/settings/webhook/settings" .}}
|
|
|
|
</form>
|
|
|
|
{{end}}
|