diff --git a/app/javascript/src/styles/common/simple_form.scss b/app/javascript/src/styles/common/simple_form.scss index 3be79d184..9d39c3a05 100644 --- a/app/javascript/src/styles/common/simple_form.scss +++ b/app/javascript/src/styles/common/simple_form.scss @@ -3,15 +3,27 @@ form.simple_form { margin: 0 0 1em 0; + fieldset.inline-fieldset { + > label { + display: block; + font-weight: bold; + } + + div.input { + display: inline; + margin-right: 2em; + } + } + div.input.boolean { label { display: inline; + font-weight: normal; vertical-align: middle; - margin-left: 0.5em; + } - input { - margin-right: 0.25em; - } + input { + margin-right: 0.25em; } } @@ -45,17 +57,12 @@ form.simple_form { line-height: 1.5em; } - fieldset { - border: none; - display: inline; - margin: 0; - padding: 0; - - label { + &.radio_buttons { + span.radio label { font-weight: normal; - width: auto; - margin-right: 2em; display: inline; + margin: 0 2em 0 0.25em; + vertical-align: middle; } } } diff --git a/app/views/posts/partials/show/_edit.html.erb b/app/views/posts/partials/show/_edit.html.erb index 6c066f890..fa02138e2 100644 --- a/app/views/posts/partials/show/_edit.html.erb +++ b/app/views/posts/partials/show/_edit.html.erb @@ -6,69 +6,40 @@ <%= render "sources/info" %> -<%= form_for(post, :html => {:class => "simple_form", :id => "form"}) do |f| %> +<%= simple_form_for(post, html: { id: "form" }) do |f| %> <%= hidden_field_tag :tags_query, params[:q] %> <%= hidden_field_tag :pool_id, params[:pool_id] %> <%= hidden_field_tag :favgroup_id, params[:favgroup_id] %> - <%= f.hidden_field :old_tag_string, :value => post.tag_string %> - <%= f.hidden_field :old_parent_id, :value => post.parent_id %> - <%= f.hidden_field :old_source, :value => post.source %> - <%= f.hidden_field :old_rating, :value => post.rating %> + <%= f.input :old_tag_string, as: :hidden, input_html: { value: post.tag_string } %> + <%= f.input :old_parent_id, as: :hidden, input_html: { value: post.parent_id } %> + <%= f.input :old_source, as: :hidden, input_html: { value: post.source } %> + <%= f.input :old_rating, as: :hidden, input_html: { value: post.rating } %> -