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.

58 lines
2.0 KiB

  1. <h4 class="ui top attached header">
  2. {{.i18n.Tr "settings.manage_oauth2_applications"}}
  3. </h4>
  4. <div class="ui attached segment">
  5. <div class="ui key list">
  6. <div class="item">
  7. {{.i18n.Tr "settings.oauth2_application_create_description"}}
  8. </div>
  9. {{range $app := .Applications}}
  10. <div class="item">
  11. <div class="right floated content">
  12. <a href="{{$.Link}}/oauth2/{{$app.ID}}" class="ui primary tiny icon button">
  13. <i class="pencil alternate icon"></i>
  14. {{$.i18n.Tr "settings.oauth2_application_edit"}}
  15. </a>
  16. <button class="ui red tiny button delete-button" id="remove-gitea-oauth2-application"
  17. data-url="{{AppSubUrl}}/user/settings/applications/oauth2/delete"
  18. data-id="{{$app.ID}}">
  19. {{$.i18n.Tr "settings.delete_key"}}
  20. </button>
  21. </div>
  22. <div class="content">
  23. <strong>{{$app.Name}}</strong>
  24. </div>
  25. </div>
  26. {{end}}
  27. </div>
  28. </div>
  29. <div class="ui attached bottom segment">
  30. <h5 class="ui top header">
  31. {{.i18n.Tr "settings.create_oauth2_application" }}
  32. </h5>
  33. <form class="ui form ignore-dirty" action="{{.Link}}/oauth2" method="post">
  34. {{.CsrfTokenHtml}}
  35. <div class="field {{if .Err_AppName}}error{{end}}">
  36. <label for="application-name">{{.i18n.Tr "settings.oauth2_application_name"}}</label>
  37. <input id="application-name" name="application_name" value="{{.application_name}}" required>
  38. </div>
  39. <div class="field {{if .Err_RedirectURI}}error{{end}}">
  40. <label for="redirect-uri">{{.i18n.Tr "settings.oauth2_redirect_uri"}}</label>
  41. <input type="url" name="redirect_uri" id="redirect-uri">
  42. </div>
  43. <button class="ui green button">
  44. {{.i18n.Tr "settings.create_oauth2_application_button"}}
  45. </button>
  46. </form>
  47. </div>
  48. <div class="ui small basic delete modal" id="remove-gitea-oauth2-application">
  49. <div class="ui icon header">
  50. <i class="trash icon"></i>
  51. {{.i18n.Tr "settings.remove_oauth2_application"}}
  52. </div>
  53. <div class="content">
  54. <p>{{.i18n.Tr "settings.oauth2_application_remove_description"}}</p>
  55. </div>
  56. {{template "base/delete_modal_actions" .}}
  57. </div>