1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00

Make Generate New Token panel shown by default (#3832)

This is mostly a 'feel' change. The behaviour that is currently on the
access tokens pages is, as far as I know, not present in any other parts
of the frontend, and there's no real good reason to keep the 'Generate
New Token' panel hidden by default in my opinion.
This commit is contained in:
Morgan Bazalgette 2018-04-29 21:34:59 +02:00 committed by Lauris BH
parent 7ea4bfc561
commit fb8535e305

View file

@ -5,9 +5,6 @@
{{template "base/alert" .}}
<h4 class="ui top attached header">
{{.i18n.Tr "settings.manage_access_token"}}
<div class="ui right">
<div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
</div>
</h4>
<div class="ui attached segment">
<div class="ui key list">
@ -32,24 +29,21 @@
{{end}}
</div>
</div>
<br>
<div {{if not .HasError}}class="hide"{{end}} id="add-access-token-panel">
<h4 class="ui top attached header">
{{.i18n.Tr "settings.generate_new_token"}}
</h4>
<div class="ui attached segment">
<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<p>{{.i18n.Tr "settings.new_token_desc"}}</p>
<div class="field {{if .Err_Name}}error{{end}}">
<label for="name">{{.i18n.Tr "settings.token_name"}}</label>
<input id="name" name="name" value="{{.name}}" autofocus required>
</div>
<button class="ui green button">
{{.i18n.Tr "settings.generate_token"}}
</button>
</form>
</div>
<h4 class="ui top attached header">
{{.i18n.Tr "settings.generate_new_token"}}
</h4>
<div class="ui attached segment">
<p>{{.i18n.Tr "settings.new_token_desc"}}</p>
<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_Name}}error{{end}}">
<label for="name">{{.i18n.Tr "settings.token_name"}}</label>
<input id="name" name="name" value="{{.name}}" autofocus required>
</div>
<button class="ui green button">
{{.i18n.Tr "settings.generate_token"}}
</button>
</form>
</div>
</div>
</div>