Commit 421b11158d8420b3fe337b63d5686c24b5644c94
1 parent
e7570250
Exists in
master
and in
4 other branches
error fields highlight
Showing
2 changed files
with
10 additions
and
2 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
| @@ -638,3 +638,12 @@ tbody tr:nth-child(2n) td, tbody tr.even td { | @@ -638,3 +638,12 @@ tbody tr:nth-child(2n) td, tbody tr.even td { | ||
| 638 | display:none; | 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,7 +35,6 @@ class Project < ActiveRecord::Base | ||
| 35 | :presence => true | 35 | :presence => true |
| 36 | 36 | ||
| 37 | validate :check_limit | 37 | validate :check_limit |
| 38 | - | ||
| 39 | validate :repo_name | 38 | validate :repo_name |
| 40 | 39 | ||
| 41 | after_destroy :destroy_gitosis_project | 40 | after_destroy :destroy_gitosis_project |
| @@ -172,7 +171,7 @@ class Project < ActiveRecord::Base | @@ -172,7 +171,7 @@ class Project < ActiveRecord::Base | ||
| 172 | 171 | ||
| 173 | def repo_name | 172 | def repo_name |
| 174 | if path == "gitosis-admin" | 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 | end | 175 | end |
| 177 | end | 176 | end |
| 178 | 177 |