2011-09-12 19:28:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Init owncloud
|
2012-05-04 15:19:25 +00:00
|
|
|
OCP\JSON::checkLoggedIn();
|
|
|
|
OCP\JSON::checkAppEnabled('tasks');
|
2011-09-12 19:28:28 +00:00
|
|
|
|
|
|
|
$id = $_GET['id'];
|
2012-02-22 19:12:49 +00:00
|
|
|
$details = OC_Calendar_App::getVCalendar($id)->VTODO;
|
2012-04-14 12:55:37 +00:00
|
|
|
$categories = $details->getAsString('CATEGORIES');
|
2011-09-13 20:44:15 +00:00
|
|
|
|
2012-04-15 13:38:44 +00:00
|
|
|
$category_options = OC_Calendar_App::getCategoryOptions();
|
2011-09-13 20:44:15 +00:00
|
|
|
$percent_options = range(0, 100, 10);
|
2012-02-22 19:11:38 +00:00
|
|
|
$priority_options = OC_Task_App::getPriorityOptions();
|
2011-09-13 20:44:15 +00:00
|
|
|
|
2012-05-06 21:00:36 +00:00
|
|
|
$tmpl = new OCP\Template('tasks','part.edittaskform');
|
2011-09-13 20:44:15 +00:00
|
|
|
$tmpl->assign('category_options', $category_options);
|
|
|
|
$tmpl->assign('percent_options', $percent_options);
|
|
|
|
$tmpl->assign('priority_options', $priority_options);
|
2012-02-22 19:12:49 +00:00
|
|
|
$tmpl->assign('id',$id);
|
2011-09-12 19:28:28 +00:00
|
|
|
$tmpl->assign('details',$details);
|
2011-09-13 20:44:15 +00:00
|
|
|
$tmpl->assign('categories', $categories);
|
2011-09-12 19:28:28 +00:00
|
|
|
$page = $tmpl->fetchPage();
|
|
|
|
|
2012-05-04 15:19:25 +00:00
|
|
|
OCP\JSON::success(array('data' => array( 'page' => $page )));
|