aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/add.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets/add.php')
-rw-r--r--views/default/widgets/add.php26
1 files changed, 20 insertions, 6 deletions
diff --git a/views/default/widgets/add.php b/views/default/widgets/add.php
index 2cc06dab7..9687c5bea 100644
--- a/views/default/widgets/add.php
+++ b/views/default/widgets/add.php
@@ -3,18 +3,32 @@
$widgets = $vars['widgets'];
$widget_types = get_widget_types();
+$context = $vars['context'];
+
?>
<div class="widgets_add hidden">
<p>
<?php echo elgg_echo('widgets:add:description'); ?>
</p>
<ul>
- <?php
- foreach ($widget_types as $widget_type) {
- $link = elgg_view('output/url', array('text' => $widget_type->name, 'href' => '#'));
- echo "<li>$link</li>";
- }
- ?>
+<?php
+ foreach ($widget_types as $handler => $widget_type) {
+ $options = array(
+ 'text' => $widget_type->name,
+ 'href' => '#',
+ 'internalid' => $handler,
+ );
+ $link = elgg_view('output/url', $options);
+ echo "<li>$link</li>";
+ }
+?>
</ul>
+<?php
+ $params = array(
+ 'internalname' => 'widget_context',
+ 'value' => $context
+ );
+ echo elgg_view('input/hidden', $params);
+?>
<div class="clearfloat"></div>
</div>