deploy key creation restyled
This commit is contained in:
parent
809413d9e7
commit
c9ea5f1316
10 changed files with 41 additions and 62 deletions
|
@ -1,16 +1,18 @@
|
|||
%div
|
||||
= form_for [@project, @key], :url => project_deploy_keys_path, :remote => true do |f|
|
||||
= form_for [@project, @key], :url => project_deploy_keys_path do |f|
|
||||
-if @key.errors.any?
|
||||
%ul
|
||||
%ul.errors_holder
|
||||
- @key.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.form-row
|
||||
= f.label :title
|
||||
= f.text_field :title, :style => "width:300px"
|
||||
.form-row
|
||||
= f.label :key
|
||||
= f.text_area :key, :style => "width:300px; height:130px"
|
||||
.form-row
|
||||
|
||||
%table.no-borders
|
||||
%tr
|
||||
%td= f.label :title
|
||||
%td= f.text_field :title, :style => "width:300px"
|
||||
%tr
|
||||
%td= f.label :key
|
||||
%td= f.text_area :key, :style => "width:300px; height:130px"
|
||||
%br
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "grey-button"
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
- if @key.valid?
|
||||
:plain
|
||||
$("#new_key_dialog").dialog("close");
|
||||
$("#keys-table .data").append("#{escape_javascript(render(:partial => 'show', :locals => {:key => @key} ))}");
|
||||
$("#no_ssh_key_defined").hide();
|
||||
- else
|
||||
:plain
|
||||
$("#new_key_dialog").empty();
|
||||
$("#new_key_dialog").append("#{escape_javascript(render('form'))}");
|
|
@ -1,7 +0,0 @@
|
|||
%h1 Editing key
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Show', @key
|
||||
\|
|
||||
= link_to 'Back', project_deploy_keys_path
|
|
@ -1,5 +1,5 @@
|
|||
%h1 New key
|
||||
= render "repositories/head"
|
||||
|
||||
%h2 New Deploy key
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Back', project_deploy_keys_path
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
:plain
|
||||
var new_key_dialog = $("<div id='new_key_dialog'></div>");
|
||||
new_key_dialog.html("#{escape_javascript(render('form'))}");
|
||||
$(new_key_dialog).dialog({
|
||||
width: 350,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
title: "Add new public key",
|
||||
close: function(event, ui) { $("#new_key_dialog").remove();},
|
||||
modal: true
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue