Commit 4e7a04a6852d7d05b0c87f24ab2ba296b757e5a9

Authored by Rafael Manzo
1 parent d2da3e7d

Style for form errors

app/assets/stylesheets/bootstrap_and_overrides.css
@@ -17,4 +17,23 @@ footer div { @@ -17,4 +17,23 @@ footer div {
17 17
18 .footer-left { 18 .footer-left {
19 float: left; 19 float: left;
  20 +}
  21 +
  22 +#error_explanation {
  23 + background-color: #F2DEDE;
  24 + border-color: #EED3D7;
  25 + color: #B94A48;
  26 + border-radius: 4px 4px 4px 4px;
  27 + margin-bottom: 20px;
  28 + padding: 8px 35px 8px 14px;
  29 + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  30 +}
  31 +
  32 +.field_with_errors .control-label{
  33 + color: #B94A48;
  34 +}
  35 +
  36 +.field_with_errors .form-control{
  37 + border-color: #B94A48;
  38 + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
20 } 39 }
21 \ No newline at end of file 40 \ No newline at end of file
app/views/projects/_form.html.erb
@@ -2,12 +2,12 @@ @@ -2,12 +2,12 @@
2 <%= render :partial => 'shared/form_errors', :locals => {:object => @project} %> 2 <%= render :partial => 'shared/form_errors', :locals => {:object => @project} %>
3 3
4 <div class="form-group"> 4 <div class="form-group">
5 - <%= f.label :name %><br> 5 + <%= f.label :name, class: 'control-label' %><br>
6 <%= f.text_field :name, class: 'form-control' %> 6 <%= f.text_field :name, class: 'form-control' %>
7 </div> 7 </div>
8 8
9 <div class="form-group"> 9 <div class="form-group">
10 - <%= f.label :description %><br> 10 + <%= f.label :description, class: 'control-label' %><br>
11 <%= f.text_area :description, class: 'form-control' %> 11 <%= f.text_area :description, class: 'form-control' %>
12 </div> 12 </div>
13 13
app/views/repositories/_form.html.erb
1 <%= render :partial => 'shared/form_errors', :locals => {:object => @repository} %> 1 <%= render :partial => 'shared/form_errors', :locals => {:object => @repository} %>
2 2
3 -<div class="field">  
4 - <%= f.label :name %><br>  
5 - <%= f.text_field :name %> 3 +<div class="form-group">
  4 + <%= f.label :name, class: 'control-label' %><br>
  5 + <%= f.text_field :name, class: 'form-control' %>
6 </div> 6 </div>
7 7
8 -<div class="field">  
9 - <%= f.label :type %><br>  
10 - <%= f.select( :type, @repository_types ) %> 8 +<div class="form-group">
  9 + <%= f.label :type, class: 'control-label' %><br>
  10 + <%= f.select( :type, @repository_types, {class: 'form-control'} ) %>
11 </div> 11 </div>
12 12
13 -<div class="field">  
14 - <%= f.label :address %><br>  
15 - <%= f.text_field :address %> 13 +<div class="form-group">
  14 + <%= f.label :address, class: 'control-label' %><br>
  15 + <%= f.text_field :address, class: 'form-control' %>
16 </div> 16 </div>
17 17
18 -<div class="field">  
19 - <%= f.label :configuration %><br/> 18 +<div class="form-group">
  19 + <%= f.label :configuration, class: 'control-label' %><br/>
20 <% configuration_list = KalibroEntities::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %> 20 <% configuration_list = KalibroEntities::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %>
21 - <%= f.select( :configuration_id, configuration_list ) %> 21 + <%= f.select( :configuration_id, configuration_list, {class: 'form-control'} ) %>
22 </div> 22 </div>
23 23
24 <div class="actions"> 24 <div class="actions">