aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 17:18:35 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 17:18:35 +0000
commit9abd6ad3de13d4a5a6c6f00a216d6310d6df4cc0 (patch)
tree8c2063f6c4938dc7b46c07e0e373dad2f85a5cce /views/default/widgets
parent26ca356ea7bb4521d763204fb68d0cba8086684b (diff)
downloadelgg-9abd6ad3de13d4a5a6c6f00a216d6310d6df4cc0.tar.gz
elgg-9abd6ad3de13d4a5a6c6f00a216d6310d6df4cc0.tar.bz2
Fixes #1342 dashboard widgets do not have access controls
git-svn-id: http://code.elgg.org/elgg/trunk@7386 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/widgets')
-rw-r--r--views/default/widgets/settings.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/views/default/widgets/settings.php b/views/default/widgets/settings.php
index 73166b718..e2db3b5db 100644
--- a/views/default/widgets/settings.php
+++ b/views/default/widgets/settings.php
@@ -11,16 +11,21 @@ $widget = $vars['widget'];
$edit_view = "widgets/$widget->handler/edit";
$custom_form_section = elgg_view($edit_view, array('entity' => $widget));
-$access_text = elgg_echo('access');
+$access_label = elgg_echo('access');
$access = elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $widget->access_id));
+$access_html = "<p><label>$access_label:</label> $access</p>";
+
$hidden = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $widget->guid));
$submit = elgg_view('input/submit', array('value' => elgg_echo('save')));
+// dashboard widgets do not get access controls
+if (elgg_in_context('dashboard')) {
+ $access = '';
+}
+
$body = <<<___END
$custom_form_section
- <p>
- <label>$access_text:</label> $access
- </p>
+ $access
<p>
$hidden
$submit