Skip to content

Commit

Permalink
Fix snippet form
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
  • Loading branch information
dzaporozhets committed Jan 2, 2014
1 parent a81002d commit 34245ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
12 changes: 0 additions & 12 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,6 @@ p.time {
margin: 30px 3px 3px 2px;
}

.search-holder {
label, input {
height: 30px;
padding: 0;
font-size: 14px;
}
label {
line-height: 30px;
color: #666;
}
}

.highlight {
text-shadow: none;
}
Expand Down
5 changes: 3 additions & 2 deletions app/views/public/projects/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
.clearfix
.pull-left
= form_tag public_projects_path, method: :get, class: 'form-inline form-tiny' do |f|
.search-holder
= search_field_tag :search, params[:search], placeholder: "Filter by name", class: "span4 search-text-input", id: "projects_search"
.form-group
= search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search"
.form-group
= submit_tag 'Search', class: "btn btn-primary wide"

.pull-right
Expand Down
10 changes: 5 additions & 5 deletions app/views/snippets/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
= @snippet.new_record? ? "New Snippet" : "Edit Snippet ##{@snippet.id}"
%hr
.snippet-form-holder
= form_for @snippet, as: :personal_snippet, url: url do |f|
= form_for @snippet, as: :personal_snippet, url: url, html: { class: "form-horizontal snippet-form" } do |f|
-if @snippet.errors.any?
.alert.alert-danger
%ul
- @snippet.errors.full_messages.each do |msg|
%li= msg

.form-group
= f.label :title
= f.label :title, class: 'control-label'
.col-sm-10= f.text_field :title, placeholder: "Example Snippet", class: 'form-control', required: true
.form-group
= f.label "Access"
= f.label "Access", class: 'control-label'
.col-sm-10
= f.label :private_true, class: 'radio-label' do
= f.radio_button :private, true
Expand All @@ -29,11 +29,11 @@

.form-group
.file-editor
= f.label :file_name, "File"
= f.label :file_name, "File", class: 'control-label'
.col-sm-10
.file-holder.snippet
.file-title
= f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true
= f.text_field :file_name, placeholder: "example.rb", class: 'form-control snippet-file-name', required: true
.file-content.code
%pre#editor= @snippet.content
= f.hidden_field :content, class: 'snippet-file-content'
Expand Down

0 comments on commit 34245ce

Please sign in to comment.