X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mobile%2Fuser_edit.php;h=b353047a3f9c4892515c889331b7e9356168227b;hb=3f7ed883e1c7d75aacc49900b403f8e84a68dc3f;hp=6077a13a9a11b1c8612f6d4f0a3462fe57245cc2;hpb=4070ac772a00d8ffb9590ffdeca10e5d494c26e2;p=timetracker.git diff --git a/mobile/user_edit.php b/mobile/user_edit.php index 6077a13a..b353047a 100644 --- a/mobile/user_edit.php +++ b/mobile/user_edit.php @@ -35,7 +35,7 @@ import('form.Table'); import('form.TableColumn'); // Access check. -if (!ttAccessCheck(right_manage_team)) { +if (!ttAccessAllowed('manage_users')) { header('Location: access_denied.php'); exit(); } @@ -107,8 +107,8 @@ $form = new Form('userForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name)); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login)); if (!$auth->isPasswordExternal()) { - $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas1','aspassword'=>true,'value'=>$cl_password1)); - $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas2','aspassword'=>true,'value'=>$cl_password2)); + $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1)); + $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2)); } $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email)); @@ -135,15 +135,14 @@ class NameCellRenderer extends DefaultCellRenderer { class RateCellRenderer extends DefaultCellRenderer { function render(&$table, $value, $row, $column, $selected = false) { global $assigned_projects; - $field = new FloatField('rate_'.$table->getValueAtName($row,'id'), $table->getValueAtName($row, 'p_rate')); + $field = new FloatField('rate_'.$table->getValueAtName($row,'id')); $field->setFormName($table->getFormName()); - $field->setLocalization($GLOBALS['I18N']); $field->setSize(5); $field->setFormat('.2'); foreach ($assigned_projects as $p) { if ($p['id'] == $table->getValueAtName($row,'id')) $field->setValue($p['rate']); } - $this->setValue($field->toStringControl()); + $this->setValue($field->getHtml()); return $this->toString(); } } @@ -189,7 +188,7 @@ if ($request->isPost()) { 'status' => $cl_status, 'rate' => $cl_rate, 'projects' => $assigned_projects); - if (right_assign_roles & $user->rights) { + if (in_array('manage_users', $user->rights)) { $fields['role'] = $cl_role; $fields['client_id'] = $cl_client_id; }