From ad4362a29096b30b4fe4fe8db818affc81720481 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 2 May 2019 10:47:53 +0200 Subject: [locations] subnet inputs: disabled -> readonly; disable save button There was unfinished code to disable the save button if there are no actions allowed to perform in the location detail box, which is now working. Also make the text inputs readonly instead of diabled if we're not allowed to edit them, so copy & paste still works. --- inc/permission.inc.php | 5 ++++- modules-available/locations/templates/location-subnets.html | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/inc/permission.inc.php b/inc/permission.inc.php index aaef6ba6..3a7bdc36 100644 --- a/inc/permission.inc.php +++ b/inc/permission.inc.php @@ -40,7 +40,10 @@ class Permission $temp = ['disabled' => 'disabled', 'readonly' => 'readonly']; } if (!$one && !is_null($noneAvailDisabled)) { - $array[$noneAvailDisabled]['disabled'] = true; + $array[$noneAvailDisabled] = [ + 'disabled' => 'disabled', + 'readonly' => 'readonly', + ]; } } diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index 897f84b0..78ef99a0 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -40,8 +40,8 @@ {{#list}} {{subnetid}} - - + +
@@ -122,7 +122,7 @@
-- cgit v1.2.3-55-g7522