diff --git a/app/assets/stylesheets/common/simple_form.css.scss b/app/assets/stylesheets/common/simple_form.css.scss
index ee64e96a6..661c6c489 100644
--- a/app/assets/stylesheets/common/simple_form.css.scss
+++ b/app/assets/stylesheets/common/simple_form.css.scss
@@ -43,3 +43,20 @@ form.simple_form {
}
}
+form.inline-form {
+ display: table;
+
+ > div.input {
+ display: table-row;
+ line-height: 2em;
+
+ label {
+ text-align: right;
+ }
+
+ label, input {
+ display: table-cell;
+ padding-right: 1em;
+ }
+ }
+}
diff --git a/app/views/comments/search.html.erb b/app/views/comments/search.html.erb
index ae5720a0d..eab275a4e 100644
--- a/app/views/comments/search.html.erb
+++ b/app/views/comments/search.html.erb
@@ -2,13 +2,16 @@
Search Comments
- <%= form_tag(comments_path, :method => :get, :class => "simple_form") do %>
+ <%= simple_form_for(:search, :method => :get, url: comments_path, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
<%= hidden_field_tag "group_by", "comment", :id => "group_by_full" %>
-
- <%= search_field "body_matches", :label => "Body" %>
- <%= search_field "creator_name", :label => "User" %>
- <%= search_field "post_tags_match", :label => "Tags" %>
- <%= submit_tag "Search" %>
+ <%= f.input :creator_name, label: "Commenter" %>
+ <%= f.input :body_matches, label: "Body" %>
+ <%= f.input :post_tags_match, label: "Tags" %>
+ <%= f.input :is_deleted, label: "Deleted?", collection: [["Yes", true], ["No", false]] %>
+ <%= f.input :is_sticky, label: "Sticky?", collection: [["Yes", true], ["No", false]] %>
+ <%= f.input :do_not_bump_post, label: "Bumping?", collection: [["Yes", false], ["No", true]] %>
+ <%= f.input :order, include_blank: false, collection: [%w(Created id_desc), %w(Updated updated_at_desc), %w(Score score_desc), %w(Post post_id_desc)] %>
+ <%= f.submit "Search" %>
<% end %>