Revize b80053a3
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/controllers/users.php | ||
---|---|---|
}
|
||
else
|
||
{
|
||
if (empty($min_age))
|
||
{
|
||
$form->date('birthday')
|
||
->label('Birthday')
|
||
->years(date('Y') - 100, date('Y'))
|
||
->value($user->birthday === NULL ? '' : strtotime($user->birthday));
|
||
}
|
||
else
|
||
if (!empty($min_age) && $user->type == User_Model::MAIN_USER)
|
||
{
|
||
$form->checkbox('older_than')
|
||
->label(__("I'm older than %d years", array($min_age)))
|
||
->rules('required')
|
||
->checked(TRUE);
|
||
}
|
||
else
|
||
{
|
||
$form->date('birthday')
|
||
->label('Birthday')
|
||
->years(date('Y') - 100, date('Y'))
|
||
->value($user->birthday === NULL ? '' : strtotime($user->birthday));
|
||
}
|
||
}
|
||
|
||
if ($this->acl_check_edit(get_class($this), 'comment', $user->member_id))
|
||
... | ... | |
$empty_birthday = Settings::get('users_birthday_empty_enabled');
|
||
$min_age = Settings::get('members_age_min_limit');
|
||
|
||
$form->date('birthday')
|
||
->label('Birthday')
|
||
->years(date('Y') - 100, date('Y'));
|
||
|
||
if ($empty_birthday == 0)
|
||
{
|
||
$form->date('birthday')
|
||
->label('Birthday')
|
||
->years(date('Y') - 100, date('Y'))
|
||
$form->inputs['birthday']
|
||
->rules('required');
|
||
}
|
||
else
|
||
{
|
||
if (empty($min_age))
|
||
{
|
||
$form->date('birthday')
|
||
->label('Birthday')
|
||
->years(date('Y') - 100, date('Y'))
|
||
->value('');
|
||
}
|
||
else
|
||
{
|
||
$form->checkbox('older_than')
|
||
->label(__("I'm older than %d years", array($min_age)))
|
||
->rules('required');
|
||
}
|
||
$form->inputs['birthday']
|
||
->value('');
|
||
}
|
||
|
||
if ($this->acl_check_new(get_class($this),'comment',$member_id))
|
Také k dispozici: Unified diff
refs #957: "I'm older than x years" checkbox is only shown when adding/editing main user