From d9025a960170bcb30ab5265f514b6d315326d73e Mon Sep 17 00:00:00 2001 From: zmagod Date: Mon, 12 Dec 2016 14:42:06 +0100 Subject: [PATCH] changes create/edit mode buttons [fixes SCI-777] --- .../stylesheets/sample_types_groups.scss | 27 +++---------- app/views/sample_groups/_edit.html.erb | 33 +++++++-------- app/views/sample_groups/index.html.erb | 40 +++++++++---------- app/views/sample_types/_edit.html.erb | 26 ++++++------ app/views/sample_types/index.html.erb | 33 +++++++++------ config/locales/en.yml | 1 + 6 files changed, 74 insertions(+), 86 deletions(-) diff --git a/app/assets/stylesheets/sample_types_groups.scss b/app/assets/stylesheets/sample_types_groups.scss index 3131cb6c0..c6b41fc7c 100644 --- a/app/assets/stylesheets/sample_types_groups.scss +++ b/app/assets/stylesheets/sample_types_groups.scss @@ -26,13 +26,16 @@ #remove { margin-left: 5px; - margin-top: 10px; } } + .form-inline .form-group, + .form-inline .form-control { + width: 100%; + } + #name-input { padding: 5px; - width: 203px; } .new-resource-form { @@ -87,26 +90,6 @@ color: $color-black; } } - - .sample-group-controls { - - .edit { - margin-top: 3px; - } - - .delete { - margin-top: 3px; - } - } - - .sample-group-submit { - display: inline-block; - vertical-align: top; - - #submit { - margin-top: 8px; - } - } } #new_sample_group .color-picker { diff --git a/app/views/sample_groups/_edit.html.erb b/app/views/sample_groups/_edit.html.erb index 36b1a45b5..5a3582159 100644 --- a/app/views/sample_groups/_edit.html.erb +++ b/app/views/sample_groups/_edit.html.erb @@ -4,28 +4,23 @@ sample_group)%>" data-color="<%= sample_group.color %>">
-
<%= form_for [organization, sample_group], html: { class: 'form-inline' }, remote: true do |f| %> -
- <%= f.text_field :name, value: sample_group.name , class: 'form-control' %> - - +
+
+ <%= f.text_field :name, value: sample_group.name , class: 'form-control' %> +
+
+
+ +
<% end %>
-
- - - <%= bootstrap_form_for [organization, sample_group], remote: true do |f| %> - <%= f.color_picker_select :color, - Constants::TAG_COLORS, - class: 'edit-sample-group-color' %> - <% end %> - - - -
diff --git a/app/views/sample_groups/index.html.erb b/app/views/sample_groups/index.html.erb index 0362ab91b..964ec7df8 100644 --- a/app/views/sample_groups/index.html.erb +++ b/app/views/sample_groups/index.html.erb @@ -27,27 +27,25 @@