From be4f2d4113c10e33f61d589f35450e13251e3283 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Mar 2021 07:31:23 +0100 Subject: [PATCH] use chzn-select for groups and users --- views/bootstrap/class.DocumentNotify.php | 4 +++- views/bootstrap/class.FolderNotify.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index b727835b6..d9d2f14d4 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.php @@ -106,7 +106,7 @@ $(document).ready( function() { $allUsers = $dms->getAllUsers($sortusersinlist); foreach ($allUsers as $userObj) { if (!$userObj->isGuest() && !$userObj->isDisabled() && ($document->getAccessMode($userObj) >= M_READ) && !in_array($userObj->getID(), $userNotifyIDs)) - $options[] = array($userObj->getID(), htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName())); + $options[] = array($userObj->getID(), htmlspecialchars($userObj->getLogin().' - '.$userObj->getFullName()), false, array(array('data-subtitle', htmlspecialchars($userObj->getEmail())))); } } elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) { $options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName())); @@ -117,6 +117,7 @@ $(document).ready( function() { 'element'=>'select', 'id'=>'userid', 'name'=>'userid', + 'class'=>'chzn-select', 'options'=>$options ) ); @@ -134,6 +135,7 @@ $(document).ready( function() { 'element'=>'select', 'id'=>'groupid', 'name'=>'groupid', + 'class'=>'chzn-select', 'options'=>$options ) ); diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php index 60bca87a2..6d19bb0a5 100644 --- a/views/bootstrap/class.FolderNotify.php +++ b/views/bootstrap/class.FolderNotify.php @@ -106,7 +106,7 @@ $(document).ready(function() { $allUsers = $dms->getAllUsers($sortusersinlist); foreach ($allUsers as $userObj) { if (!$userObj->isGuest() && !$userObj->isDisabled() && ($folder->getAccessMode($userObj) >= M_READ) && !in_array($userObj->getID(), $userNotifyIDs)) - $options[] = array($userObj->getID(), htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName())); + $options[] = array($userObj->getID(), htmlspecialchars($userObj->getLogin().' - '.$userObj->getFullName()), false, array(array('data-subtitle', htmlspecialchars($userObj->getEmail())))); } } elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) { $options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName())); @@ -117,6 +117,7 @@ $(document).ready(function() { 'element'=>'select', 'id'=>'userid', 'name'=>'userid', + 'class'=>'chzn-select', 'options'=>$options ) ); @@ -134,6 +135,7 @@ $(document).ready(function() { 'element'=>'select', 'id'=>'groupid', 'name'=>'groupid', + 'class'=>'chzn-select', 'options'=>$options ) );