diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 2b79a7c..21e8a16 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -99,7 +99,7 @@ public function groupMember() { } catch (Exception $e) { CakeLog::write('error', 'GrouperLite Controller - groupMember: ' . var_export($e->getMessage(), true)); - $this->Flash->error("Your Membership Groups cannot be found currently, please try again later."); + $this->Flash->set("Your Membership Groups cannot be found currently, please try again later.", array('key' => 'error')); $this->set('groupergroupmemberships', array()); } } @@ -118,7 +118,7 @@ public function groupOptin() { try { $optin = $this->GrouperGroup->optinGroups($this->userId); if (isset($optin['errorMessage'])){ - $this->Flash->error('Some error'); + $this->Flash->set('Some error', array('key' => 'error')); $this->set('groupergroupoptin', array()); } else { $this->set('groupergroupoptin', $optin); @@ -126,7 +126,7 @@ public function groupOptin() { } catch (Exception $e) { CakeLog::write('error', 'GrouperLite Controller: Seeing is believing'); - $this->Flash->error($e->getMessage()); + $this->Flash->set($e->getMessage(), array('key' => 'error')); $this->set('groupergroupoptin', array()); } } @@ -156,13 +156,13 @@ public function joinGroup() { $name = $this->request->data['GroupName']; if($this->GrouperGroup->joinGroup($this->userId, $name)) { - $this->Flash->success(_txt('pl.grouperlite.message.flash.join-group-success')); + $this->Flash->set(_txt('pl.grouperlite.message.flash.join-group-success'), array('key' => 'success')); } else { - $this->Flash->error(_txt('pl.grouperlite.message.flash.join-group-failed')); + $this->Flash->set(_txt('pl.grouperlite.message.flash.join-group-failed'), array('key' => 'error')); } } else { - $this->Flash->error(_txt('pl.grouperlite.message.flash.join-group-error')); + $this->Flash->set(_txt('pl.grouperlite.message.flash.join-group-error')); } return $this->redirect(array('action' => 'groupoptin')); @@ -178,12 +178,12 @@ public function leaveGroup() { $name = $this->request->data['GroupName']; if($this->GrouperGroup->leaveGroup($this->userId, $name)) { - $this->Flash->success(_txt('pl.grouperlite.message.flash.leave-group-success')); + $this->Flash->set(_txt('pl.grouperlite.message.flash.leave-group-success'), array('key' => 'success')); } else { - $this->Flash->error(_txt('pl.grouperlite.message.flash.leave-group-failed')); + $this->Flash->set(_txt('pl.grouperlite.message.flash.leave-group-failed'), array('key' => 'error')); } } else { - $this->Flash->error(_txt('pl.grouperlite.message.flash.leave-group-error')); + $this->Flash->set(_txt('pl.grouperlite.message.flash.leave-group-error'), array('key' => 'error')); } return $this->redirect(array('action' => 'groupmember')); diff --git a/View/CoGrouperLites/display.ctp b/View/CoGrouperLites/display.ctp index 3d3c010..b35721b 100644 --- a/View/CoGrouperLites/display.ctp +++ b/View/CoGrouperLites/display.ctp @@ -40,8 +40,8 @@ $divid = $vv_config['CoGrouperLite']['co_dashboard_widget_id'];