mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 11:33:38 +00:00
los campos de año tienen un listado de años posibles
This commit is contained in:
parent
81cd5d261b
commit
346761d164
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,11 @@
|
||||||
= number_field_tag field_name_for_post_as_string(name),
|
= number_field_tag field_name_for_post_as_string(name),
|
||||||
value,
|
value,
|
||||||
class: 'form-control',
|
class: 'form-control',
|
||||||
required: template.required?
|
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}
|
||||||
|
|
Loading…
Reference in a new issue