Skip to content

Commit

Permalink
Merge pull request #8162 from jeabakker/group-tool-checkbox
Browse files Browse the repository at this point in the history
feature(groups): group tool options are now checkboxes
  • Loading branch information
beck24 committed Apr 10, 2015
2 parents 2a7cb4f + 25532a9 commit 81525ea
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions mod/groups/views/default/groups/edit/tools.php
Expand Up @@ -15,21 +15,13 @@
foreach ($tools as $group_option) {
$group_option_toggle_name = $group_option->name . "_enable";
$value = elgg_extract($group_option_toggle_name, $vars);
?>
<div>
<label>
<?php echo $group_option->label; ?><br />
</label>
<?php echo elgg_view("input/radio", array(
"name" => $group_option_toggle_name,
"value" => $value,
"options" => array(
elgg_echo("option:yes") => "yes",
elgg_echo("option:no") => "no",
),
));
?>
</div>
<?php

echo elgg_format_element('div', null, elgg_view('input/checkbox', array(
'name' => $group_option_toggle_name,
'value' => 'yes',
'default' => 'no',
'checked' => ($value === 'yes') ? true : false,
'label' => $group_option->label
)));
}
}

0 comments on commit 81525ea

Please sign in to comment.