summaryrefslogtreecommitdiff
path: root/app/views/snippets
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-02 13:26:58 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-02 13:26:58 +0200
commit34245ceb9962050bd8a953b4ea79e8e990558ab4 (patch)
tree521d1f090d962b6488372c593cf718013d796b66 /app/views/snippets
parenta81002d920b7df1dadb4c3b931642135f2f28ec8 (diff)
downloadgitlab-ce-34245ceb9962050bd8a953b4ea79e8e990558ab4.tar.gz
Fix snippet form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/snippets')
-rw-r--r--app/views/snippets/_form.html.haml10
1 files changed, 5 insertions, 5 deletions
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'