edittaskform.php 774 B

12345678910111213141516171819202122232425
  1. <?php
  2. // Init owncloud
  3. OCP\JSON::checkLoggedIn();
  4. OCP\JSON::checkAppEnabled('tasks');
  5. $id = $_GET['id'];
  6. $details = OC_Calendar_App::getVCalendar($id)->VTODO;
  7. $categories = $details->getAsString('CATEGORIES');
  8. $category_options = OC_Calendar_App::getCategoryOptions();
  9. $percent_options = range(0, 100, 10);
  10. $priority_options = OC_Task_App::getPriorityOptions();
  11. $tmpl = new OCP\Template('tasks','part.edittaskform');
  12. $tmpl->assign('category_options', $category_options);
  13. $tmpl->assign('percent_options', $percent_options);
  14. $tmpl->assign('priority_options', $priority_options);
  15. $tmpl->assign('id',$id);
  16. $tmpl->assign('details',$details);
  17. $tmpl->assign('categories', $categories);
  18. $page = $tmpl->fetchPage();
  19. OCP\JSON::success(array('data' => array( 'page' => $page )));