Commit 421b11158d8420b3fe337b63d5686c24b5644c94

Authored by gitlabhq
1 parent e7570250

error fields highlight

app/assets/stylesheets/projects.css.scss
... ... @@ -638,3 +638,12 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
638 638 display:none;
639 639 }
640 640 }
  641 +
  642 +.field_with_errors {
  643 + input[type="text"],
  644 + input[type="password"],
  645 + textarea
  646 + {
  647 + background: none repeat scroll 0 0 #FFBBBB
  648 + }
  649 +}
... ...
app/models/project.rb
... ... @@ -35,7 +35,6 @@ class Project < ActiveRecord::Base
35 35 :presence => true
36 36  
37 37 validate :check_limit
38   -
39 38 validate :repo_name
40 39  
41 40 after_destroy :destroy_gitosis_project
... ... @@ -172,7 +171,7 @@ class Project < ActiveRecord::Base
172 171  
173 172 def repo_name
174 173 if path == "gitosis-admin"
175   - errors.add(:path, "Project path like 'gitosis-admin' is not allowed")
  174 + errors.add(:path, " like 'gitosis-admin' is not allowed")
176 175 end
177 176 end
178 177  
... ...