OSDN Git Service

error fields highlight
authorgitlabhq <m@gitlabhq.com>
Fri, 21 Oct 2011 18:51:55 +0000 (21:51 +0300)
committergitlabhq <m@gitlabhq.com>
Sat, 22 Oct 2011 11:08:03 +0000 (14:08 +0300)
app/assets/stylesheets/projects.css.scss
app/models/project.rb

index 5178867..8caa281 100644 (file)
@@ -638,3 +638,12 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
     display:none;
   }
 }
+
+.field_with_errors {
+  input[type="text"],
+  input[type="password"],
+  textarea
+  {
+    background: none repeat scroll 0 0 #FFBBBB
+  }
+}
index 1dd04e1..5262e55 100644 (file)
@@ -35,7 +35,6 @@ class Project < ActiveRecord::Base
             :presence => true
 
   validate :check_limit
-  
   validate :repo_name
 
   after_destroy :destroy_gitosis_project
@@ -172,7 +171,7 @@ class Project < ActiveRecord::Base
 
   def repo_name
     if path == "gitosis-admin"
-      errors.add(:path, "Project path like 'gitosis-admin' is not allowed")
+      errors.add(:path, " like 'gitosis-admin' is not allowed")
     end
   end