summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/inc
diff options
context:
space:
mode:
authorSimon Rettberg2023-05-12 14:21:28 +0200
committerSimon Rettberg2023-05-12 14:21:28 +0200
commitdf5fd48da3a0163375e4567485b882f14baf6ead (patch)
tree35e423b91fd8a6524e06416d5092d1f716b6a364 /modules-available/locations/inc
parent[eventlog] Remove stray line (c&p error) (diff)
downloadslx-admin-df5fd48da3a0163375e4567485b882f14baf6ead.tar.gz
slx-admin-df5fd48da3a0163375e4567485b882f14baf6ead.tar.xz
slx-admin-df5fd48da3a0163375e4567485b882f14baf6ead.zip
[locations] cleanup: Hide/disable move button if action not available
Hide the button entirely if there are no movable machines in the displayed list. Disable the button as long as the user selected at least one unmovable machine.
Diffstat (limited to 'modules-available/locations/inc')
-rw-r--r--modules-available/locations/inc/locationutil.inc.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules-available/locations/inc/locationutil.inc.php b/modules-available/locations/inc/locationutil.inc.php
index 960eefa8..acdaed2f 100644
--- a/modules-available/locations/inc/locationutil.inc.php
+++ b/modules-available/locations/inc/locationutil.inc.php
@@ -70,12 +70,9 @@ class LocationUtil
* grouped by the location the client was assigned to via roomplanner.
* Otherwise, just return an assoc array with the requested locationid, name
* and a list of all clients that are wrongfully assigned to that room.
- * @param int $locationId
- * @return array
*/
- public static function getMachinesWithLocationMismatch($locationId = 0, $checkPerms = false)
+ public static function getMachinesWithLocationMismatch(int $locationId = 0, bool $checkPerms = false): array
{
- $locationId = (int)$locationId;
if ($checkPerms) {
if ($locationId !== 0) {
// Query details for specific location -- use assert and fake array