save.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Discussion topic add/edit form body
  4. *
  5. */
  6. $title = elgg_extract('title', $vars, '');
  7. $desc = elgg_extract('description', $vars, '');
  8. $status = elgg_extract('status', $vars, '');
  9. $tags = elgg_extract('tags', $vars, '');
  10. $access_id = elgg_extract('access_id', $vars, ACCESS_DEFAULT);
  11. $container_guid = elgg_extract('container_guid', $vars);
  12. $guid = elgg_extract('guid', $vars, null);
  13. ?>
  14. <div>
  15. <label><?php echo elgg_echo('title'); ?></label><br />
  16. <?php echo elgg_view('input/text', array('name' => 'title', 'value' => $title)); ?>
  17. </div>
  18. <div>
  19. <label><?php echo elgg_echo('groups:topicmessage'); ?></label>
  20. <?php echo elgg_view('input/longtext', array('name' => 'description', 'value' => $desc)); ?>
  21. </div>
  22. <div>
  23. <label><?php echo elgg_echo('tags'); ?></label>
  24. <?php echo elgg_view('input/tags', array('name' => 'tags', 'value' => $tags)); ?>
  25. </div>
  26. <div>
  27. <label><?php echo elgg_echo("groups:topicstatus"); ?></label><br />
  28. <?php
  29. echo elgg_view('input/select', array(
  30. 'name' => 'status',
  31. 'value' => $status,
  32. 'options_values' => array(
  33. 'open' => elgg_echo('status:open'),
  34. 'closed' => elgg_echo('status:closed'),
  35. ),
  36. ));
  37. ?>
  38. </div>
  39. <div>
  40. <label><?php echo elgg_echo('access'); ?></label><br />
  41. <?php echo elgg_view('input/access', array(
  42. 'name' => 'access_id',
  43. 'value' => $access_id,
  44. 'entity' => get_entity($guid),
  45. 'entity_type' => 'object',
  46. 'entity_subtype' => 'groupforumtopic',
  47. )); ?>
  48. </div>
  49. <div class="elgg-foot">
  50. <?php
  51. echo elgg_view('input/hidden', array('name' => 'container_guid', 'value' => $container_guid));
  52. if ($guid) {
  53. echo elgg_view('input/hidden', array('name' => 'topic_guid', 'value' => $guid));
  54. }
  55. echo elgg_view('input/submit', array('value' => elgg_echo("save")));
  56. ?>
  57. </div>