diff options
author | Sem <sembrestels@riseup.net> | 2012-07-01 23:20:47 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-01 23:20:47 +0200 |
commit | 671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2 (patch) | |
tree | 436b0de846650bce13436b51a2d5214224f8898c /views/default/object/widget/elements | |
parent | 3da3f2aa28a42c23bdc9d661e7e13fd6f2bd2b10 (diff) | |
parent | b91d8bb0fea5cef9fafea72181a0007cfaa54725 (diff) | |
download | elgg-671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2.tar.gz elgg-671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2.tar.bz2 |
Upgraded to Elgg 1.8.6.
Merge tag '1.8.6' of git://github.com/Elgg/Elgg into lorea-preprod
Elgg 1.8.6 release
Diffstat (limited to 'views/default/object/widget/elements')
-rw-r--r-- | views/default/object/widget/elements/controls.php | 4 | ||||
-rw-r--r-- | views/default/object/widget/elements/settings.php | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php index d1d630c4f..57a935f62 100644 --- a/views/default/object/widget/elements/controls.php +++ b/views/default/object/widget/elements/controls.php @@ -8,9 +8,7 @@ echo elgg_view_menu('widget', array( 'entity' => elgg_extract('widget', $vars), - 'params' => array( - 'show_edit' => elgg_extract('show_edit', $vars, true) - ), + 'show_edit' => elgg_extract('show_edit', $vars, true), 'sort_by' => 'priority', 'class' => 'elgg-menu-hz', )); 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> |