Merge pull request #5014 from opf/fix/24234-copy-workflow-form-looks-ugly

[24234] Copy workflow form looks ugly
pull/5018/head
Oliver Günther 8 years ago committed by GitHub
commit f1f44addaa
  1. 45
      app/views/workflows/copy.html.erb

@ -32,38 +32,43 @@ See doc/COPYRIGHT.rdoc for more details.
<%= styled_form_tag({}, id: 'workflow_copy_form') do %>
<section class="form--section">
<div class="form--field">
<label class="form--label" for="source_type_id"><%= l(:label_copy_source) %></label>
<div class="form--field-container -vertical">
<div>
<label for="source_type_id"><%= Type.model_name.human %></label>
<%= styled_select_tag('source_type_id',
<label class="form--label -required" for="source_type_id"><%= l(:label_copy_source) %>
<span class="form--label-required" aria-hidden="true">*</span>
</label>
<div class="form--field-container">
<div class="form--select-container -middle">
<label class="form--label" for="source_type_id"><%= Type.model_name.human %></label>
<%= select_tag('source_type_id',
"<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>".html_safe +
"<option value=\"any\">--- #{ l(:label_copy_same_as_target) } ---</option>".html_safe +
options_from_collection_for_select(@types, 'id', 'name', @source_type && @source_type.id)) %>
options_from_collection_for_select(@types, 'id', 'name', @source_type && @source_type.id), class: 'form--select') %>
</div>
<div>
<label for='source_role_id'><%= Role.model_name.human %></label>
<%= styled_select_tag('source_role_id',
<div class="form--select-container -middle">
<label class="form--label" for='source_role_id'><%= Role.model_name.human %></label>
<%= select_tag('source_role_id',
"<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>".html_safe +
"<option value=\"any\">--- #{ l(:label_copy_same_as_target) } ---</option>".html_safe +
options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %>
options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id), class: 'form--select') %>
</div>
</div>
</div>
<br />
<div class="form--field">
<label class="form--label" for="target_type_ids"><%= l(:label_copy_target) %></label>
<div class="form--field-container -vertical">
<div>
<label for="target_type_ids"><%= Type.model_name.human %></label>
<%= styled_select_tag 'target_type_ids',
<label class="form--label -required" for="target_type_ids"><%= l(:label_copy_target) %>
<span class="form--label-required" aria-hidden="true">*</span>
</label>
<div class="form--field-container">
<div class="form--select-container -middle">
<label class="form--label" for="target_type_ids"><%= Type.model_name.human %></label>
<%= select_tag 'target_type_ids',
"<option value=\"\" disabled=\"disabled\">--- #{l(:actionview_instancetag_blank_option)} ---</option>".html_safe +
options_from_collection_for_select(@types, 'id', 'name', @target_types && @target_types.map(&:id)), multiple: true %><br />
options_from_collection_for_select(@types, 'id', 'name', @target_types && @target_types.map(&:id)), multiple: true, class: 'form--select' %>
</div>
<div>
<label for='target_role_ids'><%= Role.model_name.human %></label>
<%= styled_select_tag 'target_role_ids',
<div class="form--select-container -middle">
<label class="form--label" for='target_role_ids'><%= Role.model_name.human %></label>
<%= select_tag 'target_role_ids',
"<option value=\"\" disabled=\"disabled\">--- #{l(:actionview_instancetag_blank_option)} ---</option>".html_safe +
options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), multiple: true %>
options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), multiple: true, class: 'form--select' %>
</div>
</div>
</div>

Loading…
Cancel
Save