Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Remove generate_field_value method (no real value added)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliuk2012 committed May 5, 2017
1 parent 270fb13 commit f291dbc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/gov_uk_date_fields/form_fields.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ def generate_error_message
result
end

def generate_field_value (field_value)
%Q|value="#{field_value}"|
end

def generate_input_fields
result = generate_start_fieldset
result += generate_today_button if @today_button
Expand Down Expand Up @@ -146,7 +142,7 @@ def generate_day_input_field(day_value)
%Q|
<div class="form-group form-group-day">
<label for="#{html_id(:day)}">Day</label>
<input class="form-control" id="#{html_id(:day)}" name="#{html_name(:day)}" type="number" min="0" max="31" aria-describedby="#{@hint_id}" #{generate_field_value(day_value)}>
<input class="form-control" id="#{html_id(:day)}" name="#{html_name(:day)}" type="number" min="0" max="31" aria-describedby="#{@hint_id}" value="#{day_value}">
</div>
|
end
Expand All @@ -155,7 +151,7 @@ def generate_month_input_field(month_value)
%Q|
<div class="form-group form-group-month">
<label for="#{html_id(:month)}">Month</label>
<input class="form-control" id="#{html_id(:month)}" name="#{html_name(:month)}" type="number" min="0" max="12" #{generate_field_value(month_value)}>
<input class="form-control" id="#{html_id(:month)}" name="#{html_name(:month)}" type="number" min="0" max="12" value="#{month_value}">
</div>
|
end
Expand All @@ -164,7 +160,7 @@ def generate_year_input_field(year_value)
%Q|
<div class="form-group form-group-year">
<label for="#{html_id(:year)}">Year</label>
<input class="form-control" id="#{html_id(:year)}" name="#{html_name(:year)}" type="number" min="0" max="2100" #{generate_field_value(year_value)}>
<input class="form-control" id="#{html_id(:year)}" name="#{html_name(:year)}" type="number" min="0" max="2100" value="#{year_value}">
</div>
|
end
Expand Down

0 comments on commit f291dbc

Please sign in to comment.