diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-17 12:00:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-17 12:00:58 -0300 |
commit | 228d3697bcd0218605be2e28131574cc85293a2e (patch) | |
tree | 6a59c627f6226bd2b3056b959acc9cc871eb1f8f /views/default/forms/tasks/comments/add.php | |
download | elgg-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/comments/add.php')
-rw-r--r-- | views/default/forms/tasks/comments/add.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/views/default/forms/tasks/comments/add.php b/views/default/forms/tasks/comments/add.php new file mode 100644 index 000000000..ddbca14f5 --- /dev/null +++ b/views/default/forms/tasks/comments/add.php @@ -0,0 +1,45 @@ +<?php +/** + * Tasks comments add form + * + * @package ElggTasks + * + * @uses ElggEntity $vars['entity'] The entity to comment on + * @uses bool $vars['inline'] Show a single line version of the form? + */ + +elgg_load_library('elgg:tasks'); + +if (isset($vars['entity']) && elgg_is_logged_in()) { + + $inline = elgg_extract('inline', $vars, false); + + if ($inline) { + echo elgg_view('input/text', array('name' => 'generic_comment')); + echo elgg_view('input/submit', array('value' => elgg_echo('comment'))); + } else { +?> + <div> + <label><?php echo elgg_echo("generic_comments:add"); ?></label> + <?php echo elgg_view('input/longtext', array('name' => 'generic_comment')); ?> + <br /><label><?php echo elgg_echo('tasks:state:actions'); ?></label> + <?php + echo elgg_view('input/radio', array( + 'name' => 'state_action', + 'options' => tasks_prepare_radio_options($vars['entity']), + )); + ?> + </div> + <div class="elgg-foot"> +<?php + echo elgg_view('input/submit', array('value' => elgg_echo("tasks:comments:post"))); +?> + </div> +<?php + } + + echo elgg_view('input/hidden', array( + 'name' => 'entity_guid', + 'value' => $vars['entity']->getGUID() + )); +} |