nextcloud/apps/tasks/ajax/edittaskform.php

26 lines
809 B
PHP
Raw Normal View History

2011-09-12 23:28:28 +04:00
<?php
// Init owncloud
require_once('../../../lib/base.php');
2011-10-06 23:21:38 +04:00
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('tasks');
2011-09-12 23:28:28 +04:00
$id = $_GET['id'];
$details = OC_Calendar_App::getVCalendar($id)->VTODO;
$categories = $details->getAsString('CATEGORIES');
2011-09-14 00:44:15 +04:00
2012-04-15 17:38:44 +04:00
$category_options = OC_Calendar_App::getCategoryOptions();
2011-09-14 00:44:15 +04:00
$percent_options = range(0, 100, 10);
$priority_options = OC_Task_App::getPriorityOptions();
2011-09-14 00:44:15 +04:00
2011-09-12 23:28:28 +04:00
$tmpl = new OC_Template('tasks','part.edittaskform');
2011-09-14 00:44:15 +04:00
$tmpl->assign('category_options', $category_options);
$tmpl->assign('percent_options', $percent_options);
$tmpl->assign('priority_options', $priority_options);
$tmpl->assign('id',$id);
2011-09-12 23:28:28 +04:00
$tmpl->assign('details',$details);
2011-09-14 00:44:15 +04:00
$tmpl->assign('categories', $categories);
2011-09-12 23:28:28 +04:00
$page = $tmpl->fetchPage();
2011-10-06 23:21:38 +04:00
OC_JSON::success(array('data' => array( 'page' => $page )));