Skip to content

Commit

Permalink
Merge pull request Gizra#137 from amitaibu/fix-description-for-new-bu…
Browse files Browse the repository at this point in the history
…ndles

Fix the description for the group type checkbox when creating a new bundle
  • Loading branch information
amitaibu committed Jan 20, 2016
2 parents 5a1d784 + 5ec4398 commit c3bf79f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions og_ui/src/BundleFormAlter.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,19 @@ protected function prepare(array &$form, $form_state) {
* Adds the "is group?" checkbox.
*/
protected function addGroupType(array &$form, $form_state) {
if ($this->entity->isNew()) {
$description = t('Every entity in this bundle is a group which can contain entities and can have members.');
}
else {
$description = t('Every "%bundle" is a group which can contain entities and can have members.', [
'%bundle' => Unicode::lcfirst($this->bundleLabel),
]);
}
$form['og']['og_is_group'] = array(
'#type' => 'checkbox',
'#title' => t('Group'),
'#default_value' => Og::isGroup($this->entityTypeId, $this->bundle),
'#description' => t('Every "%bundle" is a group which can contain entities and can have members.', [
'%bundle' => Unicode::lcfirst($this->bundleLabel),
]),
'#description' => $description,
);
}

Expand Down

0 comments on commit c3bf79f

Please sign in to comment.