aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets')
-rw-r--r--views/default/widgets/add.php26
-rw-r--r--views/default/widgets/add_button.php2
2 files changed, 21 insertions, 7 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>
diff --git a/views/default/widgets/add_button.php b/views/default/widgets/add_button.php
index 8ec36b086..2957513b6 100644
--- a/views/default/widgets/add_button.php
+++ b/views/default/widgets/add_button.php
@@ -1,7 +1,7 @@
<?php
?>
-<div class="widget" id="widget_add_button">
+<div id="widget_add_button">
<?php
$options = array(
'href' => '#',