diff options
author | qwerty287 <80460567+qwerty287@users.noreply.github.com> | 2021-10-08 18:15:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 18:15:09 +0200 |
commit | 56d79301b9f212e7801cbced1475238cc61c0748 (patch) | |
tree | 7cb9ca6f1c41b8e75123640f0d10ff183ee51251 /templates | |
parent | 001dbf100de40f19c7ade5b8f013fbcccbe09ec3 (diff) | |
download | gitea-56d79301b9f212e7801cbced1475238cc61c0748.tar.gz gitea-56d79301b9f212e7801cbced1475238cc61c0748.zip |
Move add deploy key form before the list and add a cancel button (#17228)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/settings/deploy_keys.tmpl | 73 |
1 files changed, 39 insertions, 34 deletions
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index d2e9e256d2..68ab36b593 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -4,6 +4,45 @@ {{template "repo/settings/navbar" .}} <div class="ui container"> {{template "base/alert" .}} + <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel"> + <h4 class="ui top attached header"> + {{.i18n.Tr "repo.settings.add_deploy_key"}} + <div class="ui right"> + <button class="ui red tiny hide-panel button" data-panel="#add-deploy-key-panel"> + {{.i18n.Tr "cancel"}} + </button> + </div> + </h4> + <div class="ui attached segment"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <div class="field"> + {{.i18n.Tr "repo.settings.deploy_key_desc"}} + </div> + <div class="field {{if .Err_Title}}error{{end}}"> + <label for="title">{{.i18n.Tr "repo.settings.title"}}</label> + <input id="ssh-key-title" name="title" value="{{.title}}" autofocus required> + </div> + <div class="field {{if .Err_Content}}error{{end}}"> + <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label> + <textarea id="ssh-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea> + </div> + <div class="field"> + <div class="ui checkbox {{if .Err_IsWritable}}error{{end}}"> + <input id="ssh-key-is-writable" name="is_writable" class="hidden" type="checkbox" value="1"> + <label for="is_writable"> + {{.i18n.Tr "repo.settings.is_writable"}} + </label> + <small style="padding-left: 26px;">{{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}}</small> + </div> + </div> + <button class="ui green button"> + {{.i18n.Tr "repo.settings.add_deploy_key"}} + </button> + </form> + </div> + <br> + </div> <h4 class="ui top attached header"> {{.i18n.Tr "repo.settings.deploy_keys"}} <div class="ui right"> @@ -43,40 +82,6 @@ {{.i18n.Tr "repo.settings.no_deploy_keys"}} {{end}} </div> - <br> - <div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel"> - <h4 class="ui top attached header"> - {{.i18n.Tr "repo.settings.add_deploy_key"}} - </h4> - <div class="ui attached segment"> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <div class="field"> - {{.i18n.Tr "repo.settings.deploy_key_desc"}} - </div> - <div class="field {{if .Err_Title}}error{{end}}"> - <label for="title">{{.i18n.Tr "repo.settings.title"}}</label> - <input id="ssh-key-title" name="title" value="{{.title}}" autofocus required> - </div> - <div class="field {{if .Err_Content}}error{{end}}"> - <label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label> - <textarea id="ssh-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea> - </div> - <div class="field"> - <div class="ui checkbox {{if .Err_IsWritable}}error{{end}}"> - <input id="ssh-key-is-writable" name="is_writable" class="hidden" type="checkbox" value="1"> - <label for="is_writable"> - {{.i18n.Tr "repo.settings.is_writable"}} - </label> - <small style="padding-left: 26px;">{{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}}</small> - </div> - </div> - <button class="ui green button"> - {{.i18n.Tr "repo.settings.add_deploy_key"}} - </button> - </form> - </div> - </div> </div> </div> |