Skip to content

Commit

Permalink
fixed placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
dhakelila committed Oct 31, 2016
1 parent 3826fa3 commit 05fd41c
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/views/analyses/_agrochemicals.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<span id="agrochemicalRiceAmount" class="c-field -medium -light -disabled -fixed-height">
<%= f.number_field :agrochemical_amount, class: '-right -js-numeric',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/analyses/_crops.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</span>
<span class="c-field -huge">
<%= builder.number_field :amount, class: '-right -js-required',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>
of
Expand All @@ -45,7 +45,7 @@
and
<span class="c-field -medium">
<%= builder.number_field :amount, class: '-right -js-required',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>
of
Expand Down
2 changes: 1 addition & 1 deletion app/views/analyses/_fertilizer_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= f.hidden_field :category, value: Category::FERTILIZER %>
<span class="c-field -little">
<%= f.number_field :amount, class: '-right -js-required', autocomplete: 'off',
min: '0', placeholder: 0.0 %>
min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>
of
Expand Down
2 changes: 1 addition & 1 deletion app/views/analyses/_fertilizer_sidebar_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<span class="-js-input-wrapper input-wrapper">
<%= f.hidden_field :category, value: Category::FERTILIZER %>
<%= f.number_field :amount, value: f.object.amount, min: 0, class: "-js-is-resetable",
placeholder: 0.0 %>
placeholder: 0 %>
<%= f.select :addition_type, select_options(Analysis::FERTILIZER_TYPES, f.object.addition_type), {}, class: '-theme-3' %>
<div class="options-wrapper">
<button class="btn-reset -js-reset-analysis is-hidden" data-previous-value="<%= f.object.amount %>">
Expand Down
6 changes: 3 additions & 3 deletions app/views/analyses/_fuel.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div>
<div class="c-field -little -light">
<%= builder.number_field :amount, class: '-right -js-numeric',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
</div>

<div class="c-field -little -light">
Expand Down Expand Up @@ -40,7 +40,7 @@
<div class="c-field -little -light">
<%= builder.hidden_field :category, value: Category::IRRIGATION_FUEL %>
<%= builder.number_field :amount, class: '-right -js-numeric', autocomplete: 'off',
min: '0', placeholder: 0.0 %>
min: '0', placeholder: 0 %>
</div>
<div class="c-field -little -light">
<%= builder.select :unit, select_options(Analysis::FUEL_UNITS, builder.object.unit), {}, class: '-theme-5' %>
Expand All @@ -67,7 +67,7 @@
<div class="c-field -little -light">
<%= builder.hidden_field :category, value: Category::FUEL %>
<%= builder.number_field :amount, class: '-right -js-numeric', autocomplete: 'off',
min: '0', placeholder: 0.0 %>
min: '0', placeholder: 0 %>
</div>
<div class="c-field -little -light">
<%= builder.select :unit, select_options(Analysis::FUEL_UNITS, builder.object.unit), {}, class: '-theme-5' %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/analyses/_liming.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</div>
<div id="limingAmount" class="c-field -light -medium -disabled -fixed-height">
<%= f.number_field :lime_amount, class: '-right',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</div>
</div>
Expand All @@ -32,7 +32,7 @@
</div>
<div id="dolomiteAmount" class="c-field -light -medium -disabled -fixed-height">
<%= f.number_field :dolomite_amount, class: '-right',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/analyses/_manure_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<span class="-js-input-wrapper c-field-wrapper -medium -space-between">
<%= f.hidden_field :category, value: Category::MANURE %>
<span class="c-field -little">
<%= f.number_field :amount, class: '-right -js-required', autocomplete: 'off', min: '0', placeholder: 0.0 %>
<%= f.number_field :amount, class: '-right -js-required', autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>
of
Expand Down
2 changes: 1 addition & 1 deletion app/views/analyses/_manure_sidebar_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<span class="-js-input-wrapper input-wrapper">
<%= f.hidden_field :category, value: Category::MANURE %>
<%= f.number_field :amount, value: f.object.amount, min: 0, class: "-js-is-resetable",
placeholder: 0.0 %>
placeholder: 0 %>
<%= f.select :addition_type, select_options(Analysis::MANURE_TYPES, f.object.addition_type), {}, class: "-theme-3" %>
<span class="options-wrapper">
<button class="btn-reset -js-reset-analysis is-hidden" data-previous-value="<%= f.object.amount %>">
Expand Down
18 changes: 9 additions & 9 deletions app/views/analyses/_printable_inputs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</p>
<% end %>

<% unless analysis.fertilizers.select{|t| t.amount && t.amount > 0.0}.empty? %>
<% unless analysis.fertilizers.select{|t| t.amount && t.amount > 0}.empty? %>
<% analysis.fertilizers.each do |fert| %>
<p>
<span class="text -print-figure"><%= fert.amount %></span>
Expand All @@ -20,7 +20,7 @@
<% end %>
<% end %>

<% unless analysis.manures.select{|t| t.amount && t.amount > 0.0}.empty? %>
<% unless analysis.manures.select{|t| t.amount && t.amount > 0}.empty? %>
<% analysis.manures.each do |manure| %>
<p>
<span class="text -print-figure"><%= manure.amount %></span>
Expand Down Expand Up @@ -66,23 +66,23 @@
<% end %>
<% end %>

<% if analysis.lime_amount.present? && analysis.lime_amount > 0.0 %>
<% if analysis.lime_amount.present? && analysis.lime_amount > 0 %>
<p>
<span class="text -print-figure"><%= analysis.lime_amount %></span>
<span class="text -print-units">kg/ha/year</span>
<span class="text -print-product">of Lime applied</span>
</p>
<% end %>

<% if analysis.dolomite_amount.present? && analysis.dolomite_amount > 0.0 %>
<% if analysis.dolomite_amount.present? && analysis.dolomite_amount > 0 %>
<p>
<span class="text -print-figure"><%= analysis.dolomite_amount %></span>
<span class="text -print-units">kg/ha/year</span>
<span class="text -print-product">of Dolomite applied</span>
</p>
<% end %>

<% if analysis.agrochemical_amount.present? && analysis.agrochemical_amount > 0.0%>
<% if analysis.agrochemical_amount.present? && analysis.agrochemical_amount > 0%>
<p>
<span class="text -print-figure"><%= analysis.agrochemical_amount %></span>
<span class="text -print-units">kg/ha/year</span>
Expand All @@ -92,7 +92,7 @@

<% if analysis.paddy_rice? %>

<% unless analysis.nutrient_managements.select{|t| t.amount && t.amount > 0.0}.empty? %>
<% unless analysis.nutrient_managements.select{|t| t.amount && t.amount > 0}.empty? %>
<p>
You incorporate
<% analysis.nutrient_managements.each do |nut| %>
Expand All @@ -109,7 +109,7 @@
</p>
<% end %>

<% unless analysis.transportation_fuels.select{|t| t.amount && t.amount > 0.0}.empty? %>
<% unless analysis.transportation_fuels.select{|t| t.amount && t.amount > 0}.empty? %>
<% analysis.transportation_fuels.each do |fuel| %>
<% if fuel.amount.present? %>
<p>
Expand All @@ -122,7 +122,7 @@
<% end %>


<% unless analysis.irrigation_fuels.select{|t| t.amount && t.amount > 0.0}.empty? %>
<% unless analysis.irrigation_fuels.select{|t| t.amount && t.amount > 0}.empty? %>
<% analysis.irrigation_fuels.each do |fuel| %>
<% if fuel.amount.present? %>
<p>
Expand All @@ -134,7 +134,7 @@
<% end %>
<% end %>

<% unless analysis.fuels.select{|t| t.amount && t.amount > 0.0}.empty? %>
<% unless analysis.fuels.select{|t| t.amount && t.amount > 0}.empty? %>
<% analysis.fuels.each do |fuel| %>
<% if fuel.amount.present? %>
<p>
Expand Down
4 changes: 2 additions & 2 deletions app/views/analyses/_rice_nutrient_management.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= builder.hidden_field :category, value: Category::NUTRIENT_MANAGEMENT %>
<span class="c-field -two-elements -light">
<%= builder.number_field :amount, class: '-right -js-numeric',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>
<span class="c-text">of</span>
Expand Down Expand Up @@ -37,7 +37,7 @@

<span id="riceStrawBurningAmount" class="c-field -medium -light -disabled -fixed-height">
<%= f.number_field :rice_straw_burned, class: '-right -js-numeric',
autocomplete: 'off', min: '0', placeholder: 0.0 %>
autocomplete: 'off', min: '0', placeholder: 0 %>
<span class="unit">kg/ha/year</span>
</span>

Expand Down

0 comments on commit 05fd41c

Please sign in to comment.