$cl_project_required = $request->getParameter('project_required');
$cl_task_required = $request->getParameter('task_required');
$cl_record_type = $request->getParameter('record_type');
$cl_project_required = $request->getParameter('project_required');
$cl_task_required = $request->getParameter('task_required');
$cl_record_type = $request->getParameter('record_type');
$cl_allow_overlap = $request->getParameter('allow_overlap');
$cl_future_entries = $request->getParameter('future_entries');
$cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators');
$cl_allow_overlap = $request->getParameter('allow_overlap');
$cl_future_entries = $request->getParameter('future_entries');
$cl_uncompleted_indicators = $request->getParameter('uncompleted_indicators');
$cl_project_required = $user->project_required;
$cl_task_required = $user->task_required;
$cl_record_type = $user->record_type;
$cl_project_required = $user->project_required;
$cl_task_required = $user->task_required;
$cl_record_type = $user->record_type;
$cl_allow_overlap = $user->allow_overlap;
$cl_future_entries = $user->future_entries;
$cl_uncompleted_indicators = $user->uncompleted_indicators;
$cl_allow_overlap = $user->allow_overlap;
$cl_future_entries = $user->future_entries;
$cl_uncompleted_indicators = $user->uncompleted_indicators;
$longname_lang[] = array('id'=>I18n::getLangFromFilename($lfile),'name'=>$lname);
}
$longname_lang = mu_sort($longname_lang, 'name');
$longname_lang[] = array('id'=>I18n::getLangFromFilename($lfile),'name'=>$lname);
}
$longname_lang = mu_sort($longname_lang, 'name');
- $form->addInput(array('type'=>'combobox','name'=>'lang','style'=>'width: 150px','data'=>$longname_lang,'datakeys'=>array('id','name'),'value'=>$cl_lang));
+ $form->addInput(array('type'=>'combobox','name'=>'lang','style'=>'width: 200px','data'=>$longname_lang,'datakeys'=>array('id','name'),'value'=>$cl_lang));
$DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>','));
$form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark,
$DECIMAL_MARK_OPTIONS = array(array('id'=>'.','name'=>'.'),array('id'=>',','name'=>','));
$form->addInput(array('type'=>'combobox','name'=>'decimal_mark','style'=>'width: 150px','data'=>$DECIMAL_MARK_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_decimal_mark,
$form->addInput(array('type'=>'combobox','name'=>'date_format','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_date_format,
'onchange'=>'MakeFormatPreview("date_format_preview", this);'));
$TIME_FORMAT_OPTIONS = array(
$form->addInput(array('type'=>'combobox','name'=>'date_format','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_date_format,
'onchange'=>'MakeFormatPreview("date_format_preview", this);'));
$TIME_FORMAT_OPTIONS = array(
- array('id'=>'%H:%M','name'=>$i18n->getKey('form.profile.24_hours')),
- array('id'=>'%I:%M %p','name'=>$i18n->getKey('form.profile.12_hours')));
+ array('id'=>'%H:%M','name'=>$i18n->get('form.profile.24_hours')),
+ array('id'=>'%I:%M %p','name'=>$i18n->get('form.profile.12_hours')));
$form->addInput(array('type'=>'combobox','name'=>'time_format','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_time_format,
'onchange'=>'MakeFormatPreview("time_format_preview", this);'));
$form->addInput(array('type'=>'combobox','name'=>'time_format','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_time_format,
'onchange'=>'MakeFormatPreview("time_format_preview", this);'));
- $tracking_mode_options[MODE_TIME] = $i18n->getKey('form.profile.mode_time');
- $tracking_mode_options[MODE_PROJECTS] = $i18n->getKey('form.profile.mode_projects');
- $tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->getKey('form.profile.mode_projects_and_tasks');
+ $tracking_mode_options[MODE_TIME] = $i18n->get('form.profile.mode_time');
+ $tracking_mode_options[MODE_PROJECTS] = $i18n->get('form.profile.mode_projects');
+ $tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->get('form.profile.mode_projects_and_tasks');
$form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode,'onchange'=>'handleTaskRequiredCheckbox()'));
$form->addInput(array('type'=>'checkbox','name'=>'project_required','value'=>$cl_project_required));
$form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required));
// Prepare record type choices.
$record_type_options = array();
$form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode,'onchange'=>'handleTaskRequiredCheckbox()'));
$form->addInput(array('type'=>'checkbox','name'=>'project_required','value'=>$cl_project_required));
$form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required));
// Prepare record type choices.
$record_type_options = array();
- $record_type_options[TYPE_ALL] = $i18n->getKey('form.profile.type_all');
- $record_type_options[TYPE_START_FINISH] = $i18n->getKey('form.profile.type_start_finish');
- $record_type_options[TYPE_DURATION] = $i18n->getKey('form.profile.type_duration');
+ $record_type_options[TYPE_ALL] = $i18n->get('form.profile.type_all');
+ $record_type_options[TYPE_START_FINISH] = $i18n->get('form.profile.type_start_finish');
+ $record_type_options[TYPE_DURATION] = $i18n->get('form.profile.type_duration');
$form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type));
$form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type));
- // Punch in mode checkbox.
- $form->addInput(array('type'=>'checkbox','name'=>'punch_in_mode','value'=>$cl_punch_in_mode));
+ // Punch mode checkbox.
+ $form->addInput(array('type'=>'checkbox','name'=>'punch_mode','value'=>$cl_punch_mode));
// Allow overlap checkbox.
$form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap));
// Allow overlap checkbox.
$form->addInput(array('type'=>'checkbox','name'=>'allow_overlap','value'=>$cl_allow_overlap));
$form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()'));
$form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()'));
}
$form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()'));
$form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()'));
}
// New login must be unique.
if ($cl_login != $user->login && ttUserHelper::getUserByLogin($cl_login))
// New login must be unique.
if ($cl_login != $user->login && ttUserHelper::getUserByLogin($cl_login))
- if (!ttValidString($cl_password1)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.password'));
- if (!ttValidString($cl_password2)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.confirm_password'));
+ if (!ttValidString($cl_password1)) $err->add($i18n->get('error.field'), $i18n->get('label.password'));
+ if (!ttValidString($cl_password2)) $err->add($i18n->get('error.field'), $i18n->get('label.confirm_password'));
- $err->add($i18n->getKey('error.not_equal'), $i18n->getKey('label.password'), $i18n->getKey('label.confirm_password'));
+ $err->add($i18n->get('error.not_equal'), $i18n->get('label.password'), $i18n->get('label.confirm_password'));
- if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email'));
+ if (!ttValidEmail($cl_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.email'));
- if (!ttValidString($cl_team, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.team_name'));
- if (!ttValidString($cl_currency, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.currency'));
+ if (!ttValidString($cl_team, true)) $err->add($i18n->get('error.field'), $i18n->get('label.team_name'));
+ if (!ttValidString($cl_currency, true)) $err->add($i18n->get('error.field'), $i18n->get('label.currency'));
- if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.bcc'));
+ if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.bcc'));
// Prepare config string.
if ($cl_show_holidays)
$config .= ',show_holidays';
// Prepare config string.
if ($cl_show_holidays)
$config .= ',show_holidays';
}
} // isPost
$smarty->assign('auth_external', $auth->isPasswordExternal());
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="handleTaskRequiredCheckbox(); handlePluginCheckboxes();"');
}
} // isPost
$smarty->assign('auth_external', $auth->isPasswordExternal());
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="handleTaskRequiredCheckbox(); handlePluginCheckboxes();"');
$smarty->assign('content_page_name', 'profile_edit.tpl');
$smarty->display('index.tpl');
$smarty->assign('content_page_name', 'profile_edit.tpl');
$smarty->display('index.tpl');