Revize b80053a3
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/controllers/settings.php | ||
---|---|---|
->checked(Settings::get('users_birthday_empty_enabled'));
|
||
|
||
$this->form->input('members_age_min_limit')
|
||
->label('Minimum age of user')
|
||
->label('Minimum age of main user')
|
||
->rules('valid_numeric')
|
||
->value(Settings::get('members_age_min_limit'));
|
||
|
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))
|
application/i18n/cs_CZ/texts.php | ||
---|---|---|
'minimal password length' => 'Minimální délka hesla',
|
||
'minimal password level' => 'Minimální úroveň hesla',
|
||
'minimal suggest amount' => 'Minimální navrhovaná částka',
|
||
'minimum age of user' => 'Minimální věk uživatele',
|
||
'minimum age of main user' => 'Minimální věk hlavního uživatele',
|
||
'minimum of traffic' => 'Minimální provoz',
|
||
'minimum membership interrupt period (months)' => 'Minimální doba přerušení členství (měsíce)',
|
||
'minute' => 'minuta',
|
application/views/users/show.php | ||
---|---|---|
</tr>
|
||
<tr>
|
||
<th><?php echo __('Birthday') ?></th>
|
||
<td><?php echo (Settings::get('users_birthday_empty_enabled') == 1 && Settings::get('members_age_min_limit') !== '' ? "> ".Settings::get('members_age_min_limit').' '.__('years') : $user_data->birthday) ?></td>
|
||
<td><?php echo (Settings::get('users_birthday_empty_enabled') == 1 && Settings::get('members_age_min_limit') !== '' ? ($user_data->type==1 ? "> ".Settings::get('members_age_min_limit').' '.__('years') : $user_data->birthday) : $user_data->birthday) ?></td>
|
||
</tr>
|
||
<?php if ($this->acl_check_view('Users_Controller', 'application_password', $user_data->member->id)) { ?>
|
||
<tr>
|
Také k dispozici: Unified diff
refs #957: "I'm older than x years" checkbox is only shown when adding/editing main user