2018-06-22 18:58:49 +00:00
|
|
|
= number_field_tag field_name_for_post_as_string(name),
|
|
|
|
value,
|
|
|
|
class: 'form-control',
|
2018-12-14 14:17:34 +00:00
|
|
|
required: template.required?,
|
|
|
|
list: "#{name}_years",
|
|
|
|
min: template.min,
|
|
|
|
max: Date.today.year
|
|
|
|
|
|
|
|
%datalist{id: "#{name}_years"}
|
|
|
|
- (template.min..Date.today.year).to_a.each do |y|
|
|
|
|
%option{value: y}
|