From eafbdf2ffcb9f2496d77b697706230f116b12d6a Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 2 Feb 2011 02:59:17 +0000 Subject: more clean up of the group edit form git-svn-id: http://code.elgg.org/elgg/trunk@7987 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/forms/groups/edit.php | 169 ++++++++++++------------- mod/groups/views/default/groups/edit.php | 4 +- 2 files changed, 83 insertions(+), 90 deletions(-) diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index 326ed388f..453e3be2c 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -1,6 +1,6 @@ -
- - - -

- -

+

+
+ 'icon')); ?> +

0) { foreach ($group_profile_fields as $shortname => $valtype) { - if ($shortname == 'description') { -?> -

- $shortname, - 'value' => $vars['entity']->$shortname, - )); ?> -

- -

-'; + if ($valtype == 'longtext') { + $line_break = ''; } + echo '

$line_break"; + echo elgg_view("input/{$valtype}", array( + 'internalname' => $shortname, + 'value' => $vars['entity']->$shortname, + )); + echo '

'; } } ?> -

- -

+

+ +

- - -

- -

+ $current_access = $vars['entity']->access_id ? $vars['entity']->access_id : ACCESS_PUBLIC; +?> + +

+ +

group_tool_options)) { - foreach($vars['config']->group_tool_options as $group_option) { - $group_option_toggle_name = $group_option->name."_enable"; + +$tools = elgg_get_config('group_tool_options'); +if ($tools) { + usort($tools, create_function('$a,$b', 'return strcmp($a->label,$b->label);')); + foreach ($tools as $group_option) { + $group_option_toggle_name = $group_option->name . "_enable"; if ($group_option->default_on) { $group_option_default_value = 'yes'; } else { $group_option_default_value = 'no'; } + $value = $vars['entity']->$group_option_toggle_name ? $vars['entity']->$group_option_toggle_name : $group_option_default_value; ?> -

- -

+

+ +

-
-

- - +

+

'group_guid', + 'value' => $vars['entity']->getGUID(), + )); } echo elgg_view('input/submit', array('value' => elgg_echo('save'))); ?> - -

- -
+

diff --git a/mod/groups/views/default/groups/edit.php b/mod/groups/views/default/groups/edit.php index b18cf1e02..233ef8306 100644 --- a/mod/groups/views/default/groups/edit.php +++ b/mod/groups/views/default/groups/edit.php @@ -5,7 +5,9 @@ $entity = elgg_get_array_value('entity', $vars, null); -echo elgg_view('forms/groups/edit', array('entity' => $entity)); +$form_vars = array('enctype' => 'multipart/form-data'); +$body_vars = array('entity' => $entity); +echo elgg_view_form('groups/edit', $form_vars, $body_vars); if ($entity) { ?> -- cgit v1.2.3