本站源代码
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

41 line
1.9KB

  1. {{if eq .HookType "gitea"}}
  2. <p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}</p>
  3. <form class="ui form" action="{{.BaseLink}}/gitea/{{or .Webhook.ID "new"}}" method="post">
  4. {{.CsrfTokenHtml}}
  5. <div class="required field {{if .Err_PayloadURL}}error{{end}}">
  6. <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
  7. <input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
  8. </div>
  9. <div class="field">
  10. <label>{{.i18n.Tr "repo.settings.http_method"}}</label>
  11. <div class="ui selection dropdown">
  12. <input type="hidden" id="http_method" name="http_method" value="{{if .Webhook.HTTPMethod}}{{.Webhook.HTTPMethod}}{{else}}POST{{end}}">
  13. <div class="default text"></div>
  14. <i class="dropdown icon"></i>
  15. <div class="menu">
  16. <div class="item" data-value="POST">POST</div>
  17. <div class="item" data-value="GET">GET</div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="field">
  22. <label>{{.i18n.Tr "repo.settings.content_type"}}</label>
  23. <div class="ui selection dropdown">
  24. <input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
  25. <div class="default text"></div>
  26. <i class="dropdown icon"></i>
  27. <div class="menu">
  28. <div class="item" data-value="1">application/json</div>
  29. <div class="item" data-value="2">application/x-www-form-urlencoded</div>
  30. </div>
  31. </div>
  32. </div>
  33. <input class="fake" type="password">
  34. <div class="field {{if .Err_Secret}}error{{end}}">
  35. <label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
  36. <input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
  37. </div>
  38. {{template "repo/settings/webhook/settings" .}}
  39. </form>
  40. {{end}}
上海开阖软件有限公司 沪ICP备12045867号-1