diff --git a/Model/CoGrouperLite.php b/Model/CoGrouperLite.php index bc99cb2..de11090 100644 --- a/Model/CoGrouperLite.php +++ b/Model/CoGrouperLite.php @@ -90,7 +90,8 @@ class CoGrouperLite extends CoDashboardWidgetBackend { ), 'defaultCollapse' => array( 'rule' => array('minLength', 1), - 'required' => true + 'required' => false, + 'default' => 'collapsed' ), ); diff --git a/View/CoGrouperLites/fields.inc b/View/CoGrouperLites/fields.inc index d886a02..e68374f 100644 --- a/View/CoGrouperLites/fields.inc +++ b/View/CoGrouperLites/fields.inc @@ -270,6 +270,7 @@ print $this->Form->hidden('co_dashboard_widget_id', array('default' => $vv_dwid)
  • +
    Form->label('defaultCollapse', _txt('pl.grouperlite.config.default-collapse')) : _txt('pl.grouperlite.config.default-collapse')); ?> @@ -283,7 +284,7 @@ print $this->Form->hidden('co_dashboard_widget_id', array('default' => $vv_dwid) 'collapsed' => 'True', 'expanded' => 'False' ), array( - 'value' => $co_grouper_lites[0]['CoGrouperLite']['defaultCollapse'] === 'expanded', + 'value' => $co_grouper_lites[0]['CoGrouperLite']['defaultCollapse'], 'legend' => false, 'separator' => '  ' )); @@ -311,9 +312,9 @@ print $this->Form->hidden('co_dashboard_widget_id', array('default' => $vv_dwid)
  • - +

    -
    + \ No newline at end of file diff --git a/View/GrouperGroups/groupmember.ctp b/View/GrouperGroups/groupmember.ctp index 1a98706..70c3d34 100644 --- a/View/GrouperGroups/groupmember.ctp +++ b/View/GrouperGroups/groupmember.ctp @@ -16,7 +16,8 @@ if ($isuserowner !== 'T') { $numColumns = count($columns); -$collapsed = true; +$collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false; + ?> 0 || count($wgmemberships) > 0) : ?>
    @@ -39,7 +40,7 @@ $collapsed = true; @@ -87,7 +88,7 @@ $collapsed = true; diff --git a/View/GrouperGroups/groupoptin.ctp b/View/GrouperGroups/groupoptin.ctp index 217337f..fb9f3bb 100644 --- a/View/GrouperGroups/groupoptin.ctp +++ b/View/GrouperGroups/groupoptin.ctp @@ -16,7 +16,7 @@ if ($isuserowner !== 'T') { $numColumns = count($columns); -$collapsed = $config->defaultCollapse ?? false; +$collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false; ?> 0 || count($wgoptins) > 0) : ?> @@ -40,7 +40,7 @@ $collapsed = $config->defaultCollapse ?? false; @@ -68,7 +68,7 @@ $collapsed = $config->defaultCollapse ?? false; diff --git a/View/GrouperGroups/groupowner.ctp b/View/GrouperGroups/groupowner.ctp index 3ea0426..3ba78bb 100644 --- a/View/GrouperGroups/groupowner.ctp +++ b/View/GrouperGroups/groupowner.ctp @@ -17,7 +17,7 @@ if ($isuserowner !== 'T') { $numColumns = count($columns); -$collapsed = true; +$collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false; ?> 0 || count($wgowners) > 0) : ?>
    @@ -40,7 +40,7 @@ $collapsed = true; @@ -98,7 +98,7 @@ $collapsed = true;