aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms/tasks/edit.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-17 12:00:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-17 12:00:58 -0300
commit228d3697bcd0218605be2e28131574cc85293a2e (patch)
tree6a59c627f6226bd2b3056b959acc9cc871eb1f8f /views/default/forms/tasks/edit.php
downloadelgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.gz
elgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.bz2
Squashed 'mod/tasks/' content from commit c9b1097
git-subtree-dir: mod/tasks git-subtree-split: c9b1097ce081d6893f9c939146208559c089dc15
Diffstat (limited to 'views/default/forms/tasks/edit.php')
-rw-r--r--views/default/forms/tasks/edit.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/views/default/forms/tasks/edit.php b/views/default/forms/tasks/edit.php
new file mode 100644
index 000000000..27061987d
--- /dev/null
+++ b/views/default/forms/tasks/edit.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Task edit form body
+ *
+ * @package ElggTasks
+ */
+
+$variables = elgg_get_config('tasks');
+foreach ($variables as $name => $type) {
+?>
+<div>
+<?php
+ // dont show label for task lists since for now it's hidden
+ if ($type != 'tasks/list') {
+?>
+ <label><?php echo elgg_echo("tasks:$name") ?></label>
+ <?php
+ if ($type != 'longtext') {
+ echo '<br />';
+ }
+ }
+ ?>
+ <?php echo elgg_view("input/$type", array(
+ 'name' => $name,
+ 'value' => $vars[$name],
+ ));
+ ?>
+</div>
+<?php
+}
+
+$cats = elgg_view('categories', $vars);
+if (!empty($cats)) {
+ echo $cats;
+}
+
+
+echo '<div class="elgg-foot">';
+if ($vars['guid']) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'task_guid',
+ 'value' => $vars['guid'],
+ ));
+}
+echo elgg_view('input/hidden', array(
+ 'name' => 'container_guid',
+ 'value' => $vars['container_guid'],
+));
+echo elgg_view('input/hidden', array(
+ 'name' => 'list_guid',
+ 'value' => $vars['list_guid'],
+));
+// Referers value isn't saved in the task
+if ($vars['referer_guid']) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'referer_guid',
+ 'value' => $vars['referer_guid'],
+ ));
+}
+
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+
+echo '</div>';