From 34245ceb9962050bd8a953b4ea79e8e990558ab4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jan 2014 13:26:58 +0200 Subject: [PATCH] Fix snippet form Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/common.scss | 12 ------------ app/views/public/projects/index.html.haml | 5 +++-- app/views/snippets/_form.html.haml | 10 +++++----- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 56ec8593c9f..9bcdb8c183b 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -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; } diff --git a/app/views/public/projects/index.html.haml b/app/views/public/projects/index.html.haml index 002ffa916b5..d511a3037aa 100644 --- a/app/views/public/projects/index.html.haml +++ b/app/views/public/projects/index.html.haml @@ -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 diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml index 9675a2ec6d5..d466dc1af14 100644 --- a/app/views/snippets/_form.html.haml +++ b/app/views/snippets/_form.html.haml @@ -2,7 +2,7 @@ = @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 @@ -10,10 +10,10 @@ %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 @@ -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'