forked from forgejo/forgejo
Add add and delete SSH key
This commit is contained in:
parent
efa039a0f7
commit
897329a644
11 changed files with 117 additions and 78 deletions
|
@ -12,10 +12,11 @@
|
|||
<li class="list-group-item"><a href="#">Kill Myself</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="gogs-user-setting-container" class="col-md-9">
|
||||
<div id="gogs-ssh-keys">
|
||||
<h4>SSH Keys</h4>{{if .AddSSHKeySuccess}}
|
||||
<p class="alert alert-success">New SSH Key is added !</p>{{end}}
|
||||
<p class="alert alert-success">New SSH Key has been added !</p>{{else if .HasError}}<p class="alert alert-danger">{{.ErrorMsg}}</p>{{end}}
|
||||
<ul id="gogs-ssh-keys-list" class="list-group">
|
||||
<li class="list-group-item"><span class="name">SSH Key's name</span></li>{{range .Keys}}
|
||||
<li class="list-group-item">
|
||||
|
@ -34,6 +35,7 @@
|
|||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Add SSH Key</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">The name of key<strong class="text-danger">*</strong></label>
|
||||
|
@ -41,6 +43,7 @@
|
|||
<input name="keyname" class="form-control" placeholder="Type your preferred name" required="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">SSH Key<strong class="text-danger">*</strong></label>
|
||||
<div class="col-md-8">
|
||||
|
@ -48,6 +51,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Save SSH Key</button>
|
||||
|
@ -55,7 +59,7 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>Need help?</strong> Check out our guide to <a href="https://help.github.com/articles/generating-ssh-keys" target="_blank">generating SSH keys</a> or troubleshoot <a href="https://help.github.com/ssh-issues/" target="_blank">common SSH Problems</a></p>
|
||||
<p><strong>Need help?</strong> Check out the guide to <a href="https://help.github.com/articles/generating-ssh-keys" target="_blank">generating SSH keys</a> or troubleshoot <a href="https://help.github.com/ssh-issues/" target="_blank">common SSH Problems</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Name of this public key: </label>
|
||||
<div class="col-md-3">
|
||||
<input name="keyname" class="form-control" placeholder="Type your preferred name">
|
||||
<input name="keyname" class="form-control" placeholder="Type your preferred name" value="{{.KeyName}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Paste your key here: </label>
|
||||
<div class="col-md-3">
|
||||
<textarea name="key_content" cols="30" rows="10" class="form-control"></textarea>
|
||||
<textarea name="key_content" cols="30" rows="10" class="form-control">{{.KeyContent}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<li class="list-group-item"><a href="#">Notifications</a></li>
|
||||
<li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
|
||||
<li class="list-group-item"><a href="#">Security</a></li>
|
||||
<li class="list-group-item"><a href="#">Kill myself</a></li>
|
||||
<li class="list-group-item"><a href="#">Kill Myself</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="gogs-user-setting-container" class="col-md-9">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue