[#325] try to fix input
This commit is contained in:
parent
bf86eb22b3
commit
f29eee6d5d
|
@ -2111,3 +2111,11 @@ table tbody {
|
|||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.fork_name {
|
||||
height: 20px;
|
||||
margin: 0 0 5px 10px;
|
||||
width: 400px;
|
||||
padding: 0 5px;
|
||||
margin:auto;
|
||||
}
|
||||
|
|
|
@ -279,10 +279,3 @@ table.blame td.message .message {
|
|||
background: #ECECEC;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.fork_name {
|
||||
height: 20px;
|
||||
margin-left: 10px;
|
||||
width: 450px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
- if owner.own_projects.exists? :name => name
|
||||
- is_group = owner.class == Group ? "(#{t 'activerecord.models.group'})" : ''
|
||||
- full_name = "#{owner.uname}/#{name} #{is_group}"
|
||||
|
||||
- if owner.own_projects.exists? :name => name
|
||||
%p.center
|
||||
=t 'layout.projects.already_exists'
|
||||
=link_to "#{owner.uname}/#{name} #{is_group}", project_path(owner, name)
|
||||
=link_to full_name, project_path(owner, name)
|
||||
- else
|
||||
= form_for @project, :url => fork_project_path(@project), :html => { :class => :form, :multipart => true, :method => :post } do |f|
|
||||
= hidden_field_tag :group, owner.id if owner.class == Group
|
||||
= hidden_field_tag :fork_name, name, :name => 'fork_name'
|
||||
=f.submit t('layout.projects.fork_to', :to => "#{owner.uname} #{is_group}"), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :id => 'create_fork'
|
||||
=f.submit t('layout.projects.fork_to', :to => full_name), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :id => 'create_fork'
|
||||
|
||||
:javascript
|
||||
$('#create_fork').click(function () {
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
%a.close{"data-dismiss" => "modal"} ×
|
||||
%h3=t 'layout.projects.fork_modal_header'
|
||||
= hidden_field_tag :possible_forks, possible_forks_project_path(@project)
|
||||
%div
|
||||
= Project.human_attribute_name :name
|
||||
= text_field_tag 'fork_name', @project.name, :id => 'fork_name', :class => 'fork_name'
|
||||
%div{:align => 'center'}= text_field_tag 'fork_name', @project.name, :id => 'fork_name', :class => 'fork_name'
|
||||
#forks_list.modal-body.modal-body-fork
|
||||
= render 'forks', :owner => current_user, :name => @project.name
|
||||
|
||||
|
|
Loading…
Reference in New Issue