Revize f3563506
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/controllers/registration.php | ||
---|---|---|
$form->input('title2')
|
||
->label('Post title')
|
||
->rules('length[3,30]');
|
||
|
||
$form->date('birthday')
|
||
|
||
$empty_birthday = Settings::get('users_birthday_empty_enabled');
|
||
$min_age = Settings::get('members_age_min_limit');
|
||
|
||
if ($empty_birthday == 0)
|
||
{
|
||
$form->date('birthday')
|
||
->label('Birthday')
|
||
->years(date('Y') - 100, date('Y'))
|
||
->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');
|
||
}
|
||
}
|
||
|
||
$legalp_group = $form->group('Legal person innformation')->visible(FALSE);
|
||
|
||
... | ... | |
$user->surname = $form_data['surname'];
|
||
$user->pre_title = $form_data['title1'];
|
||
$user->post_title = $form_data['title2'];
|
||
$user->birthday = date('Y-m-d', $form_data['birthday']);
|
||
$user->birthday = (empty($form_data['birthday']) ? NULL : date("Y-m-d",$form_data['birthday']));
|
||
$user->type = User_Model::MAIN_USER;
|
||
|
||
// entrance fee
|
Také k dispozici: Unified diff
ref #957: Birthday is not required