aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/widget/elements/settings.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-16 12:33:57 -0400
committerCash Costello <cash.costello@gmail.com>2012-06-16 12:33:57 -0400
commit7d8064039f17059c4d87112dd107f828cf6c661a (patch)
treecf0ef85cd66ecf710455dc23390b07435ef3e1fa /views/default/object/widget/elements/settings.php
parentc58102ebcf60334f6902ba1df1aaee7104f6ba0d (diff)
downloadelgg-7d8064039f17059c4d87112dd107f828cf6c661a.tar.gz
elgg-7d8064039f17059c4d87112dd107f828cf6c661a.tar.bz2
Fixes #3463 not showing edit icon for widgets when nothing to edit
Diffstat (limited to 'views/default/object/widget/elements/settings.php')
-rw-r--r--views/default/object/widget/elements/settings.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/views/default/object/widget/elements/settings.php b/views/default/object/widget/elements/settings.php
index 5afe56ed8..25cda58c9 100644
--- a/views/default/object/widget/elements/settings.php
+++ b/views/default/object/widget/elements/settings.php
@@ -6,8 +6,20 @@
*/
$widget = elgg_extract('widget', $vars);
+
+// not using elgg_view_form() so that we can detect if the form is empty
+$form_body = elgg_view('forms/widgets/save', $vars);
+if (!$form_body) {
+ return true;
+}
+
+$form = elgg_view('input/form', array(
+ 'action' => 'action/widgets/save',
+ 'body' => $form_body,
+ 'class' => 'elgg-form-widgets-save',
+));
?>
<div class="elgg-widget-edit" id="widget-edit-<?php echo $widget->guid; ?>">
- <?php echo elgg_view_form('widgets/save', array(), $vars); ?>
+ <?php echo $form; ?>
</div>