-$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email,'enable'=>$can_change_login));
-if ($user->canManageTeam()) {
- $form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','value'=>$cl_team));
- $form->addInput(array('type'=>'textarea','name'=>'address','maxlength'=>'255','style'=>'width: 350px;','cols'=>'55','rows'=>'4','value'=>$cl_address));
- $form->addInput(array('type'=>'text','maxlength'=>'7','name'=>'currency','value'=>$cl_currency));
- $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,
- 'onchange'=>'adjustDecimalPreview()'));
- // Prepare an array of available languages.
- $lang_files = I18n::getLangFileList();
- foreach ($lang_files as $lfile) {
- $content = file(RESOURCE_DIR."/".$lfile);
- $lname = '';
- foreach ($content as $line) {
- if (strstr($line, 'i18n_language')) {
- $a = explode('=', $line);
- $lname = trim(str_replace(';','',str_replace("'","",$a[1])));
- break;
- }
- }
- unset($content);
- $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));
- $DATE_FORMAT_OPTIONS = array(
- array('id'=>'%Y-%m-%d','name'=>'Y-m-d'),
- array('id'=>'%m/%d/%Y','name'=>'m/d/Y'),
- array('id'=>'%d.%m.%Y','name'=>'d.m.Y'),
- array('id'=>'%d.%m.%Y %a','name'=>'d.m.Y a'));
- $form->addInput(array('type'=>'combobox','name'=>'format_date','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_custom_format_date,
- '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')));
- $form->addInput(array('type'=>'combobox','name'=>'format_time','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_custom_format_time,
- 'onchange'=>'MakeFormatPreview("time_format_preview", this);'));
-
- // Prepare week start choices.
- $week_start_options = array();
- foreach ($i18n->weekdayNames as $id => $week_dn) {
- $week_start_options[] = array('id' => $id, 'name' => $week_dn);
- }
- $form->addInput(array('type'=>'combobox','name'=>'start_week','style'=>'width: 150px;','data'=>$week_start_options,'datakeys'=>array('id','name'),'value'=>$cl_start_week));
-
- // Prepare tracking mode choices.
- $tracking_mode_options = array();
- $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');
- $form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode));
-
- // 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');
- $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type));
-
- $form->addInput(array('type'=>'checkbox','name'=>'charts','data'=>1,'value'=>$cl_charts));
- $form->addInput(array('type'=>'checkbox','name'=>'clients','data'=>1,'value'=>$cl_clients,'onchange'=>'handlePluginCheckboxes()'));
- $form->addInput(array('type'=>'checkbox','name'=>'client_required','data'=>1,'value'=>$cl_client_required));
-
- $form->addInput(array('type'=>'checkbox','name'=>'invoices','data'=>1,'value'=>$cl_invoices));
- $form->addInput(array('type'=>'checkbox','name'=>'custom_fields','data'=>1,'value'=>$cl_custom_fields,'onchange'=>'handlePluginCheckboxes()'));
- $form->addInput(array('type'=>'checkbox','name'=>'expenses','data'=>1,'value'=>$cl_expenses,'onchange'=>'handlePluginCheckboxes()'));
- $form->addInput(array('type'=>'checkbox','name'=>'tax_expenses','data'=>1,'value'=>$cl_tax_expenses));
- $form->addInput(array('type'=>'checkbox','name'=>'notifications','data'=>1,'value'=>$cl_notifications,'onchange'=>'handlePluginCheckboxes()'));
- $form->addInput(array('type'=>'checkbox','name'=>'locking','data'=>1,'value'=>$cl_locking,'onchange'=>'handlePluginCheckboxes()'));
- $form->addInput(array('type'=>'checkbox','name'=>'quotas','data'=>1,'value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()'));
-}
-$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save')));