From 2d27a491c36b17112c6054b25956771cb3aa5e6c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Jun 2018 20:40:47 +0200 Subject: [PATCH] use formField() --- views/bootstrap/class.FolderNotify.php | 86 +++++++++++++------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php index f15a71be6..d737d85a7 100644 --- a/views/bootstrap/class.FolderNotify.php +++ b/views/bootstrap/class.FolderNotify.php @@ -130,50 +130,50 @@ $(document).ready(function() { ?>
-
+ - - - - - - - - - - - - - - - -
: - -
: - -
">
+ + +isAdmin()) { + $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())); + } + } elseif (!$user->isGuest() && !in_array($user->getID(), $userNotifyIDs)) { + $options[] = array($user->getID(), htmlspecialchars($user->getLogin() . " - " .$user->getFullName())); + } + $this->formField( + getMLText("user"), + array( + 'element'=>'select', + 'id'=>'userid', + 'name'=>'userid', + 'options'=>$options + ) + ); + $options = array(); + $options[] = array('-1', getMLText("select_one")); + $allGroups = $dms->getAllGroups(); + foreach ($allGroups as $groupObj) { + if (($user->isAdmin() || $groupObj->isMember($user,true)) && $folder->getGroupAccessMode($groupObj) >= M_READ && !in_array($groupObj->getID(), $groupNotifyIDs)) { + $options[] = array($groupObj->getID(), htmlspecialchars($groupObj->getName())); + } + } + $this->formField( + getMLText("group"), + array( + 'element'=>'select', + 'id'=>'groupid', + 'name'=>'groupid', + 'options'=>$options + ) + ); + $this->formSubmit(getMLText('add')); +?>