1
0
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 09:45:53 +01:00
gitea/templates/user/settings/applications_oauth2_edit.tmpl

69 lines
2.7 KiB
Handlebars
Raw Normal View History

2019-03-08 17:42:50 +01:00
{{template "base/head" .}}
<div class="page-content user settings applications">
2019-03-08 17:42:50 +01:00
{{template "user/settings/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
{{.locale.Tr "settings.edit_oauth2_application"}}
2019-03-08 17:42:50 +01:00
</h4>
<div class="ui attached segment">
<p>{{.locale.Tr "settings.oauth2_application_create_description"}}</p>
2019-03-08 17:42:50 +01:00
</div>
<div class="ui attached segment form ignore-dirty">
{{.CsrfTokenHtml}}
<div class="field">
<label for="client-id">{{.locale.Tr "settings.oauth2_client_id"}}</label>
2019-03-08 17:42:50 +01:00
<input id="client-id" readonly value="{{.App.ClientID}}">
</div>
{{if .ClientSecret}}
<div class="field">
<label for="client-secret">{{.locale.Tr "settings.oauth2_client_secret"}}</label>
2019-03-08 17:42:50 +01:00
<input id="client-secret" type="text" readonly value="{{.ClientSecret}}">
</div>
{{else}}
<div class="field">
<label for="client-secret">{{.locale.Tr "settings.oauth2_client_secret"}}</label>
2019-03-08 17:42:50 +01:00
<input id="client-secret" type="password" readonly value="averysecuresecret">
</div>
{{end}}
<div class="item">
<!-- TODO add regenerate secret functionality */ -->
{{.locale.Tr "settings.oauth2_regenerate_secret_hint"}}
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}/regenerate_secret" method="post">
{{.CsrfTokenHtml}}
<a href="#" onclick="event.target.parentNode.submit()">{{.locale.Tr "settings.oauth2_regenerate_secret"}}</a>
</form>
2019-03-08 17:42:50 +01:00
</div>
</div>
<div class="ui attached bottom segment">
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}" method="post">
2019-03-08 17:42:50 +01:00
{{.CsrfTokenHtml}}
<div class="field {{if .Err_AppName}}error{{end}}">
<label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label>
2019-03-08 17:42:50 +01:00
<input id="application-name" value="{{.App.Name}}" name="application_name" required>
</div>
<div class="field {{if .Err_RedirectURI}}error{{end}}">
<label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label>
2019-03-08 17:42:50 +01:00
<input type="url" name="redirect_uri" value="{{.App.PrimaryRedirectURI}}" id="redirect-uri">
</div>
<button class="ui green button">
{{.locale.Tr "settings.save_application"}}
2019-03-08 17:42:50 +01:00
</button>
</form>
</div>
</div>
</div>
<div class="ui small basic delete modal" id="delete-oauth2-application">
<div class="ui icon header">
{{svg "octicon-trash"}}
{{.locale.Tr "settings.remove_oauth2_application"}}
2019-03-08 17:42:50 +01:00
</div>
<div class="content">
<p>{{.locale.Tr "settings.remove_oauth2_application_desc"}}</p>
2019-03-08 17:42:50 +01:00
</div>
{{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}