X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=project_edit.php;h=e1792e48cc0b428912e739b8028c0a22218ff1db;hb=4fb3e6fdb5dff1a08126d53fb4e8baec64074da7;hp=1402eb112e827e428e66280437e0dfc28f8b0993;hpb=ea116938e30f04a448b87956b7660baeec83876e;p=timetracker.git diff --git a/project_edit.php b/project_edit.php index 1402eb11..e1792e48 100644 --- a/project_edit.php +++ b/project_edit.php @@ -94,18 +94,18 @@ if ($request->isPost()) { if ($request->getParameter('btn_save')) { $existing_project = ttProjectHelper::getProjectByName($cl_name); if (!$existing_project || ($cl_project_id == $existing_project['id'])) { - // Update project information. - if (ttProjectHelper::update(array( - 'id' => $cl_project_id, - 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'users' => $cl_users, - 'tasks' => $cl_tasks))) { - header('Location: projects.php'); - exit(); + // Update project information. + if (ttProjectHelper::update(array( + 'id' => $cl_project_id, + 'name' => $cl_name, + 'description' => $cl_description, + 'status' => $cl_status, + 'users' => $cl_users, + 'tasks' => $cl_tasks))) { + header('Location: projects.php'); + exit(); } else - $err->add($i18n->get('error.db')); + $err->add($i18n->get('error.db')); } else $err->add($i18n->get('error.object_exists')); } @@ -128,7 +128,7 @@ if ($request->isPost()) { } // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('onload', 'onLoad="document.projectForm.name.focus()"'); +$smarty->assign('onload', 'onLoad="document.projectForm.project_name.focus()"'); $smarty->assign('show_users', count($users) > 0); $smarty->assign('show_tasks', $show_tasks); $smarty->assign('title', $i18n->get('title.edit_project'));