Projekt

Obecné

Profil

« Předchozí | Další » 

Revize b6eb1915

Přidáno uživatelem David Raška před asi 9 roky(ů)

refs #957: "I'm older than x years" checkbox is only shown on self-register page

Zobrazit rozdíly:

application/controllers/members.php
$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('');
}
$form->date('entrance_date')

Také k dispozici: Unified diff