本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3KB

  1. {{if eq .HookType "gogs"}}
  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}}/gogs/{{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.content_type"}}</label>
  11. <div class="ui selection dropdown">
  12. <input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
  13. <div class="default text"></div>
  14. <i class="dropdown icon"></i>
  15. <div class="menu">
  16. <div class="item" data-value="1">application/json</div>
  17. <div class="item" data-value="2">application/x-www-form-urlencoded</div>
  18. </div>
  19. </div>
  20. </div>
  21. <input class="fake" type="password">
  22. <div class="field {{if .Err_Secret}}error{{end}}">
  23. <label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
  24. <input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
  25. </div>
  26. {{template "repo/settings/webhook/settings" .}}
  27. </form>
  28. {{end}}
上海开阖软件有限公司 沪ICP备12045867号-1