Technical limitation of how old one can be on D* 5373
This commit is contained in:
parent
63363340f6
commit
6b105274af
2 changed files with 16 additions and 1 deletions
15
app/helpers/profile_helper.rb
Normal file
15
app/helpers/profile_helper.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
module ProfileHelper
|
||||
def upper_limit_date_of_birth
|
||||
minimum_year = AppConfig.settings.terms.minimum_age.get
|
||||
minimum_year = minimum_year ? minimum_year.to_i : 13
|
||||
minimum_year.years.ago.year
|
||||
end
|
||||
|
||||
def lower_limit_date_of_birth
|
||||
125.years.ago.year
|
||||
end
|
||||
end
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
= t('profiles.edit.your_birthday')
|
||||
|
||||
.row-fluid
|
||||
= select_date profile.birthday, { :prompt => true, :default => true, :order => t('date.order'), :start_year => 2000, :end_year => 1910, :prefix => 'profile[date]' }, { :class => 'span4' }
|
||||
= select_date profile.birthday, { :prompt => true, :default => true, :order => t('date.order'), :start_year => upper_limit_date_of_birth, :end_year => lower_limit_date_of_birth, :prefix => 'profile[date]' }, { :class => 'span4' }
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue