X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/9396e4eb81c51af990a074c0042980e938612b59..722638fd8cc9400c5228106537effa1dcd0f7fa5:/time_edit.php diff --git a/time_edit.php b/time_edit.php index 5670f193..17ba34b4 100644 --- a/time_edit.php +++ b/time_edit.php @@ -210,7 +210,8 @@ if ($user->isPluginEnabled('iv')) if ($user->can('manage_invoices') && $user->isPluginEnabled('ps')) $form->addInput(array('type'=>'checkbox','name'=>'paid','value'=>$cl_paid)); $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_save or btn_copy click. -$form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.save'))); +// TODO: improve on conditional confirmSave. +$form->addInput(array('type'=>'submit','name'=>'btn_save','onclick'=>'browser_today.value=get_date();return(confirmSave())','value'=>$i18n->get('button.save'))); $form->addInput(array('type'=>'submit','name'=>'btn_copy','onclick'=>'browser_today.value=get_date()','value'=>$i18n->get('button.copy'))); $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete'))); @@ -400,6 +401,9 @@ if ($request->isPost()) { } } // isPost +// TODO: improve on conditional confirmSave. +$smarty->assign('entry_date', $cl_date); + $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('task_list', $task_list);