Commit b0c9c0d77aa139dbbc069fd9bcf2d2670cbe3aeb

Authored by Daniel Alves
Committed by Rafael Manzo
1 parent 3c82cc5b

Compound metric configuration fields name and script are required

Signed off by: Heitor Reis <marcheing@gmail.com>
app/assets/stylesheets/form_with_tooltip.css
... ... @@ -58,3 +58,7 @@ input:required {
58 58 background: #f0ffff;
59 59 text-shadow: none;
60 60 }
  61 +
  62 +textarea:required {
  63 + background: #f0ffff;
  64 +}
... ...
app/views/compound_metric_configurations/_metric_options.html.erb
1 1 <div class="form-row">
2 2 <div class="field-container">
3 3 <%= f.label :name, class: 'control-label' %>
4   - <%-#FIXME Change the following field to "required => true" after CompoundMetrics Form Bug fix -%>
5   - <%= f.text_field :name, class: 'text-field form-control', value: (metric.name unless metric.nil?) %>
  4 + <%= f.text_field :name, :required => true, class: 'text-field form-control', value: (metric.name unless metric.nil?) %>
6 5 </div>
7 6 <div class="help-container">
8 7 <p>
... ... @@ -26,8 +25,7 @@
26 25 <div class="form-row">
27 26 <div class="field-container">
28 27 <%= f.label :script, class: 'control-label' %>
29   - <%-#FIXME Change the following field to "required => true" after CompoundMetrics Form Bug fix -%>
30   - <%= f.text_area :script, class: 'text-area form-control', value: (metric.script unless metric.nil?) %>
  28 + <%= f.text_area :script, :required => true, class: 'text-area form-control', value: (metric.script unless metric.nil?) %>
31 29 </div>
32 30 <div class="help-container">
33 31 <p>
... ...