Skip to content

Commit ea78a6d

Browse files
ethantkoeniglunny
authored andcommitted
Spaces to tabs in templates (#2953)
1 parent 0f6dc41 commit ea78a6d

File tree

7 files changed

+184
-185
lines changed

7 files changed

+184
-185
lines changed

templates/home.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@
131131
<i class="octicon octicon-flame"></i> Facile à installer
132132
</h1>
133133
<p class="large">
134-
Il suffit de <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/install-from-binary/">lancer l'exécutable</a> correspondant à votre système.
135-
Ou d'utiliser Gitea avec <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> ou
136-
<a target="_blank" rel="noopener" href="https://github.com/alvaroaleman/ansible-gitea/blob/master/Vagrantfile">Vagrant</a>
137-
ou en l'installant depuis un <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/install-from-package/">package</a>.
134+
Il suffit de <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/install-from-binary/">lancer l'exécutable</a> correspondant à votre système.
135+
Ou d'utiliser Gitea avec <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> ou
136+
<a target="_blank" rel="noopener" href="https://github.com/alvaroaleman/ansible-gitea/blob/master/Vagrantfile">Vagrant</a>
137+
ou en l'installant depuis un <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/install-from-package/">package</a>.
138138
</p>
139139
</div>
140140
<div class="eight wide center column">

templates/install.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@
8585
<span class="help">{{.i18n.Tr "install.repo_path_helper"}}</span>
8686
</div>
8787
<div class="inline field {{if .Err_LFSRootPath}}error{{end}}">
88-
<label for="lfs_root_path">{{.i18n.Tr "install.lfs_path"}}</label>
89-
<input id="lfs_root_path" name="lfs_root_path" value="{{.lfs_root_path}}">
90-
<span class="help">{{.i18n.Tr "install.lfs_path_helper"}}</span>
91-
</div>
88+
<label for="lfs_root_path">{{.i18n.Tr "install.lfs_path"}}</label>
89+
<input id="lfs_root_path" name="lfs_root_path" value="{{.lfs_root_path}}">
90+
<span class="help">{{.i18n.Tr "install.lfs_path_helper"}}</span>
91+
</div>
9292
<div class="inline required field {{if .Err_RunUser}}error{{end}}">
9393
<label for="run_user">{{.i18n.Tr "install.run_user"}}</label>
9494
<input id="run_user" name="run_user" value="{{.run_user}}" required>

templates/repo/commit_status.tmpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{{if eq .State "pending"}}
2-
<a href="{{.TargetURL}}" target=_blank><i class="commit-status circle icon yellow"></i></a>
2+
<a href="{{.TargetURL}}" target=_blank><i class="commit-status circle icon yellow"></i></a>
33
{{end}}
44
{{if eq .State "success"}}
5-
<a href="{{.TargetURL}}" target=_blank><i class="commit-status check icon green"></i></a>
5+
<a href="{{.TargetURL}}" target=_blank><i class="commit-status check icon green"></i></a>
66
{{end}}
77
{{if eq .State "error"}}
8-
<a href="{{.TargetURL}}" target=_blank><i class="commit-status warning icon red"></i></a>
8+
<a href="{{.TargetURL}}" target=_blank><i class="commit-status warning icon red"></i></a>
99
{{end}}
1010
{{if eq .State "failure"}}
11-
<a href="{{.TargetURL}}" target=_blank><i class="commit-status remove icon red"></i></a>
11+
<a href="{{.TargetURL}}" target=_blank><i class="commit-status remove icon red"></i></a>
1212
{{end}}
1313
{{if eq .State "warning"}}
14-
<a href="{{.TargetURL}}" target=_blank><i class="commit-status warning sign icon yellow"></i></a>
14+
<a href="{{.TargetURL}}" target=_blank><i class="commit-status warning sign icon yellow"></i></a>
1515
{{end}}

templates/swagger.tmpl

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,66 @@
22
<!DOCTYPE html>
33
<html lang="en">
44
<head>
5-
<meta charset="UTF-8">
6-
<title>Swagger UI</title>
7-
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
8-
<link rel="stylesheet" type="text/css" href="{{AppSubUrl}}/vendor/assets/swagger-ui/swagger-ui.css" >
9-
<link rel="icon" type="image/png" href="{{AppSubUrl}}/vendor/assets/swagger-ui/favicon-32x32.png" sizes="32x32" />
10-
<link rel="icon" type="image/png" href="{{AppSubUrl}}/vendor/assets/swagger-ui/favicon-16x16.png" sizes="16x16" />
11-
<style>
12-
html
13-
{
14-
box-sizing: border-box;
15-
overflow: -moz-scrollbars-vertical;
16-
overflow-y: scroll;
17-
}
18-
*,
19-
*:before,
20-
*:after
21-
{
22-
box-sizing: inherit;
23-
}
24-
25-
body {
26-
margin:0;
27-
background: #fafafa;
28-
}
29-
</style>
5+
<meta charset="UTF-8">
6+
<title>Swagger UI</title>
7+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
8+
<link rel="stylesheet" type="text/css" href="{{AppSubUrl}}/vendor/assets/swagger-ui/swagger-ui.css" >
9+
<link rel="icon" type="image/png" href="{{AppSubUrl}}/vendor/assets/swagger-ui/favicon-32x32.png" sizes="32x32" />
10+
<link rel="icon" type="image/png" href="{{AppSubUrl}}/vendor/assets/swagger-ui/favicon-16x16.png" sizes="16x16" />
11+
<style>
12+
html
13+
{
14+
box-sizing: border-box;
15+
overflow: -moz-scrollbars-vertical;
16+
overflow-y: scroll;
17+
}
18+
*,
19+
*:before,
20+
*:after
21+
{
22+
box-sizing: inherit;
23+
}
24+
25+
body {
26+
margin:0;
27+
background: #fafafa;
28+
}
29+
</style>
3030
</head>
3131

3232
<body>
3333

3434
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
35-
<defs>
36-
<symbol viewBox="0 0 20 20" id="unlocked">
37-
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
38-
</symbol>
39-
40-
<symbol viewBox="0 0 20 20" id="locked">
41-
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"/>
42-
</symbol>
35+
<defs>
36+
<symbol viewBox="0 0 20 20" id="unlocked">
37+
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
38+
</symbol>
4339

44-
<symbol viewBox="0 0 20 20" id="close">
45-
<path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"/>
46-
</symbol>
40+
<symbol viewBox="0 0 20 20" id="locked">
41+
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"/>
42+
</symbol>
4743

48-
<symbol viewBox="0 0 20 20" id="large-arrow">
49-
<path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/>
50-
</symbol>
44+
<symbol viewBox="0 0 20 20" id="close">
45+
<path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"/>
46+
</symbol>
5147

52-
<symbol viewBox="0 0 20 20" id="large-arrow-down">
53-
<path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/>
54-
</symbol>
48+
<symbol viewBox="0 0 20 20" id="large-arrow">
49+
<path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/>
50+
</symbol>
5551

52+
<symbol viewBox="0 0 20 20" id="large-arrow-down">
53+
<path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/>
54+
</symbol>
5655

57-
<symbol viewBox="0 0 24 24" id="jump-to">
58-
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
59-
</symbol>
6056

61-
<symbol viewBox="0 0 24 24" id="expand">
62-
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
63-
</symbol>
57+
<symbol viewBox="0 0 24 24" id="jump-to">
58+
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
59+
</symbol>
6460

65-
</defs>
61+
<symbol viewBox="0 0 24 24" id="expand">
62+
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
63+
</symbol>
64+
</defs>
6665
</svg>
6766

6867
<div id="swagger-ui"></div>

templates/user/settings/keys_gpg.tmpl

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
<h4 class="ui top attached header">
2-
{{.i18n.Tr "settings.manage_gpg_keys"}}
3-
<div class="ui right">
4-
<div class="ui blue tiny show-panel button" data-panel="#add-gpg-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
5-
</div>
2+
{{.i18n.Tr "settings.manage_gpg_keys"}}
3+
<div class="ui right">
4+
<div class="ui blue tiny show-panel button" data-panel="#add-gpg-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
5+
</div>
66
</h4>
77
<div class="ui attached segment">
8-
<div class="ui key list">
9-
<div class="item">
10-
{{.i18n.Tr "settings.gpg_desc"}}
11-
</div>
12-
{{range .GPGKeys}}
13-
<div class="item">
14-
<div class="right floated content">
15-
<button class="ui red tiny button delete-button" id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}">
16-
{{$.i18n.Tr "settings.delete_key"}}
17-
</button>
18-
</div>
19-
<i class="mega-octicon octicon-key {{if or .Expired.IsZero (.Expired.After $.PageStartTime)}}green{{end}}"></i>
20-
<div class="content">
21-
{{range .Emails}}<strong>{{.Email}} </strong>{{end}}
22-
<div class="print meta">
23-
<b>{{$.i18n.Tr "settings.key_id"}}:</b> {{.KeyID}}
24-
<b>{{$.i18n.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
25-
</div>
26-
<div class="activity meta">
27-
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Added}}</span></i>
28-
-
29-
<i>{{if not .Expired.IsZero }}{{$.i18n.Tr "settings.valid_until"}} <span>{{DateFmtShort .Expired}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
30-
</div>
31-
</div>
32-
</div>
33-
{{end}}
34-
</div>
8+
<div class="ui key list">
9+
<div class="item">
10+
{{.i18n.Tr "settings.gpg_desc"}}
11+
</div>
12+
{{range .GPGKeys}}
13+
<div class="item">
14+
<div class="right floated content">
15+
<button class="ui red tiny button delete-button" id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}">
16+
{{$.i18n.Tr "settings.delete_key"}}
17+
</button>
18+
</div>
19+
<i class="mega-octicon octicon-key {{if or .Expired.IsZero (.Expired.After $.PageStartTime)}}green{{end}}"></i>
20+
<div class="content">
21+
{{range .Emails}}<strong>{{.Email}} </strong>{{end}}
22+
<div class="print meta">
23+
<b>{{$.i18n.Tr "settings.key_id"}}:</b> {{.KeyID}}
24+
<b>{{$.i18n.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
25+
</div>
26+
<div class="activity meta">
27+
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Added}}</span></i>
28+
-
29+
<i>{{if not .Expired.IsZero }}{{$.i18n.Tr "settings.valid_until"}} <span>{{DateFmtShort .Expired}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
30+
</div>
31+
</div>
32+
</div>
33+
{{end}}
34+
</div>
3535
</div>
3636
<br>
3737
<p>{{.i18n.Tr "settings.gpg_helper" "https://help.github.com/articles/about-gpg/" | Str2html}}</p>
3838
<div {{if not .HasGPGError}}class="hide"{{end}} id="add-gpg-key-panel">
39-
<h4 class="ui top attached header">
40-
{{.i18n.Tr "settings.add_new_gpg_key"}}
41-
</h4>
42-
<div class="ui attached segment">
43-
<form class="ui form" action="{{.Link}}" method="post">
44-
{{.CsrfTokenHtml}}
45-
<input type="hidden" name="title" value="none">
46-
<div class="field {{if .Err_Content}}error{{end}}">
47-
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
48-
<textarea id="gpg-key-content" name="content" required>{{.content}}</textarea>
49-
</div>
50-
<input name="type" type="hidden" value="gpg">
51-
<button class="ui green button">
52-
{{.i18n.Tr "settings.add_key"}}
53-
</button>
54-
</form>
55-
</div>
39+
<h4 class="ui top attached header">
40+
{{.i18n.Tr "settings.add_new_gpg_key"}}
41+
</h4>
42+
<div class="ui attached segment">
43+
<form class="ui form" action="{{.Link}}" method="post">
44+
{{.CsrfTokenHtml}}
45+
<input type="hidden" name="title" value="none">
46+
<div class="field {{if .Err_Content}}error{{end}}">
47+
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
48+
<textarea id="gpg-key-content" name="content" required>{{.content}}</textarea>
49+
</div>
50+
<input name="type" type="hidden" value="gpg">
51+
<button class="ui green button">
52+
{{.i18n.Tr "settings.add_key"}}
53+
</button>
54+
</form>
55+
</div>
5656
</div>
5757

5858
<div class="ui small basic delete modal" id="delete-gpg">

templates/user/settings/keys_ssh.tmpl

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
<h4 class="ui top attached header">
2-
{{.i18n.Tr "settings.manage_ssh_keys"}}
3-
<div class="ui right">
4-
{{if not .DisableSSH}}
5-
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
6-
{{else}}
7-
<div class="ui blue tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
8-
{{end}}
9-
</div>
2+
{{.i18n.Tr "settings.manage_ssh_keys"}}
3+
<div class="ui right">
4+
{{if not .DisableSSH}}
5+
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
6+
{{else}}
7+
<div class="ui blue tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
8+
{{end}}
9+
</div>
1010
</h4>
1111
<div class="ui attached segment">
12-
<div class="ui key list">
13-
<div class="item">
14-
{{.i18n.Tr "settings.ssh_desc"}}
15-
</div>
16-
{{range .Keys}}
17-
<div class="item">
18-
<div class="right floated content">
19-
<button class="ui red tiny button delete-button" id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}">
20-
{{$.i18n.Tr "settings.delete_key"}}
21-
</button>
22-
</div>
23-
<i class="mega-octicon octicon-key {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
24-
<div class="content">
25-
<strong>{{.Name}}</strong>
26-
<div class="print meta">
27-
{{.Fingerprint}}
28-
</div>
29-
<div class="activity meta">
30-
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
31-
</div>
32-
</div>
33-
</div>
34-
{{end}}
35-
</div>
12+
<div class="ui key list">
13+
<div class="item">
14+
{{.i18n.Tr "settings.ssh_desc"}}
15+
</div>
16+
{{range .Keys}}
17+
<div class="item">
18+
<div class="right floated content">
19+
<button class="ui red tiny button delete-button" id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}">
20+
{{$.i18n.Tr "settings.delete_key"}}
21+
</button>
22+
</div>
23+
<i class="mega-octicon octicon-key {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
24+
<div class="content">
25+
<strong>{{.Name}}</strong>
26+
<div class="print meta">
27+
{{.Fingerprint}}
28+
</div>
29+
<div class="activity meta">
30+
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
31+
</div>
32+
</div>
33+
</div>
34+
{{end}}
35+
</div>
3636
</div>
3737
<br>
3838
<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
3939
<div {{if not .HasSSHError}}class="hide"{{end}} id="add-ssh-key-panel">
40-
<h4 class="ui top attached header">
41-
{{.i18n.Tr "settings.add_new_key"}}
42-
</h4>
43-
<div class="ui attached segment">
44-
<form class="ui form" action="{{.Link}}" method="post">
45-
{{.CsrfTokenHtml}}
46-
<div class="field {{if .Err_Title}}error{{end}}">
47-
<label for="title">{{.i18n.Tr "settings.key_name"}}</label>
48-
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
49-
</div>
50-
<div class="field {{if .Err_Content}}error{{end}}">
51-
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
52-
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
53-
</div>
54-
<input name="type" type="hidden" value="ssh">
55-
<button class="ui green button">
56-
{{.i18n.Tr "settings.add_key"}}
57-
</button>
58-
</form>
59-
</div>
40+
<h4 class="ui top attached header">
41+
{{.i18n.Tr "settings.add_new_key"}}
42+
</h4>
43+
<div class="ui attached segment">
44+
<form class="ui form" action="{{.Link}}" method="post">
45+
{{.CsrfTokenHtml}}
46+
<div class="field {{if .Err_Title}}error{{end}}">
47+
<label for="title">{{.i18n.Tr "settings.key_name"}}</label>
48+
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
49+
</div>
50+
<div class="field {{if .Err_Content}}error{{end}}">
51+
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
52+
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
53+
</div>
54+
<input name="type" type="hidden" value="ssh">
55+
<button class="ui green button">
56+
{{.i18n.Tr "settings.add_key"}}
57+
</button>
58+
</form>
59+
</div>
6060
</div>
6161

6262
<div class="ui small basic delete modal" id="delete-ssh">

0 commit comments

Comments
 (0)