Commit 34245ceb9962050bd8a953b4ea79e8e990558ab4
1 parent
a81002d9
Exists in
spb-stable
and in
3 other branches
Fix snippet form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
8 additions
and
19 deletions
Show diff stats
app/assets/stylesheets/common.scss
... | ... | @@ -119,18 +119,6 @@ p.time { |
119 | 119 | margin: 30px 3px 3px 2px; |
120 | 120 | } |
121 | 121 | |
122 | -.search-holder { | |
123 | - label, input { | |
124 | - height: 30px; | |
125 | - padding: 0; | |
126 | - font-size: 14px; | |
127 | - } | |
128 | - label { | |
129 | - line-height: 30px; | |
130 | - color: #666; | |
131 | - } | |
132 | -} | |
133 | - | |
134 | 122 | .highlight { |
135 | 123 | text-shadow: none; |
136 | 124 | } | ... | ... |
app/views/public/projects/index.html.haml
... | ... | @@ -6,8 +6,9 @@ |
6 | 6 | .clearfix |
7 | 7 | .pull-left |
8 | 8 | = form_tag public_projects_path, method: :get, class: 'form-inline form-tiny' do |f| |
9 | - .search-holder | |
10 | - = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "span4 search-text-input", id: "projects_search" | |
9 | + .form-group | |
10 | + = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search" | |
11 | + .form-group | |
11 | 12 | = submit_tag 'Search', class: "btn btn-primary wide" |
12 | 13 | |
13 | 14 | .pull-right | ... | ... |
app/views/snippets/_form.html.haml
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | = @snippet.new_record? ? "New Snippet" : "Edit Snippet ##{@snippet.id}" |
3 | 3 | %hr |
4 | 4 | .snippet-form-holder |
5 | - = form_for @snippet, as: :personal_snippet, url: url do |f| | |
5 | + = form_for @snippet, as: :personal_snippet, url: url, html: { class: "form-horizontal snippet-form" } do |f| | |
6 | 6 | -if @snippet.errors.any? |
7 | 7 | .alert.alert-danger |
8 | 8 | %ul |
... | ... | @@ -10,10 +10,10 @@ |
10 | 10 | %li= msg |
11 | 11 | |
12 | 12 | .form-group |
13 | - = f.label :title | |
13 | + = f.label :title, class: 'control-label' | |
14 | 14 | .col-sm-10= f.text_field :title, placeholder: "Example Snippet", class: 'form-control', required: true |
15 | 15 | .form-group |
16 | - = f.label "Access" | |
16 | + = f.label "Access", class: 'control-label' | |
17 | 17 | .col-sm-10 |
18 | 18 | = f.label :private_true, class: 'radio-label' do |
19 | 19 | = f.radio_button :private, true |
... | ... | @@ -29,11 +29,11 @@ |
29 | 29 | |
30 | 30 | .form-group |
31 | 31 | .file-editor |
32 | - = f.label :file_name, "File" | |
32 | + = f.label :file_name, "File", class: 'control-label' | |
33 | 33 | .col-sm-10 |
34 | 34 | .file-holder.snippet |
35 | 35 | .file-title |
36 | - = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true | |
36 | + = f.text_field :file_name, placeholder: "example.rb", class: 'form-control snippet-file-name', required: true | |
37 | 37 | .file-content.code |
38 | 38 | %pre#editor= @snippet.content |
39 | 39 | = f.hidden_field :content, class: 'snippet-file-content' | ... | ... |