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.

66 lines
2.7 KiB

  1. <div class="field">
  2. <h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
  3. <div class="grouped event type fields">
  4. <div class="field">
  5. <div class="ui radio non-events checkbox">
  6. <input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
  7. <label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
  8. </div>
  9. </div>
  10. <div class="field">
  11. <div class="ui radio non-events checkbox">
  12. <input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
  13. <label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
  14. </div>
  15. </div>
  16. <div class="field">
  17. <div class="ui radio events checkbox">
  18. <input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
  19. <label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
  24. <!-- Create -->
  25. <div class="seven wide column">
  26. <div class="field">
  27. <div class="ui checkbox">
  28. <input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
  29. <label>{{.i18n.Tr "repo.settings.event_create"}}</label>
  30. <span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
  31. </div>
  32. </div>
  33. </div>
  34. <!-- Push -->
  35. <div class="seven wide column">
  36. <div class="field">
  37. <div class="ui checkbox">
  38. <input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
  39. <label>{{.i18n.Tr "repo.settings.event_push"}}</label>
  40. <span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="ui divider"></div>
  47. <div class="inline field">
  48. <div class="ui checkbox">
  49. <input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>
  50. <label>{{.i18n.Tr "repo.settings.active"}}</label>
  51. <span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
  52. </div>
  53. </div>
  54. <div class="field">
  55. {{if .PageIsSettingsHooksNew}}
  56. <button class="ui green button">{{.i18n.Tr "repo.settings.add_webhook"}}</button>
  57. {{else}}
  58. <button class="ui green button">{{.i18n.Tr "repo.settings.update_webhook"}}</button>
  59. <a class="ui red delete-button button" data-url="{{.BaseLink}}/settings/hooks/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
  60. {{end}}
  61. </div>
  62. {{template "repo/settings/hook_delete_modal" .}}