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.

applications_oauth2_list.tmpl 2.2KB

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