From 9a034118d5ec3fc90526ced1b404c6f42b8b85c8 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 27 Sep 2024 11:06:05 +0200 Subject: [PATCH] Filemanager: fix not being able to become superuser also restyled it to be centered and fit its content --- api/src/Etemplate/Widget/Vfs.php | 4 +- filemanager/templates/default/file.xet | 92 ++++++++++++-------------- 2 files changed, 45 insertions(+), 51 deletions(-) diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index e5b5b40cbac..57bc3af185f 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -351,11 +351,11 @@ public static function store_file($path, &$file) public function validate($cname, array $expand, array $content, &$validated=array()) { // do not validate, as it would overwrite preserved values with null! - if (in_array($this->type, array('vfs-size', 'vfs-uid', 'vfs-gid', 'vfs', 'vfs-mime'))) + if (in_array($this->type, array('vfs-size', 'vfs-uid', 'vfs-gid', 'vfs', 'vfs-mime')) || + $this->is_readonly($cname, $form_name = self::form_name($cname, $this->id, $expand))) { return; } - $form_name = self::form_name($cname, $this->id, $expand); $value = $value_in = self::get_array($content, $form_name); $valid =& self::get_array($validated, $form_name, true); diff --git a/filemanager/templates/default/file.xet b/filemanager/templates/default/file.xet index 67160f81e41..3bb1c81190a 100644 --- a/filemanager/templates/default/file.xet +++ b/filemanager/templates/default/file.xet @@ -10,7 +10,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -53,8 +53,7 @@ - - + @@ -83,11 +82,10 @@ - + - - + @@ -95,18 +93,16 @@ - - + + - - + + - + @@ -115,9 +111,8 @@ @@ -190,8 +185,7 @@ - - + @@ -208,7 +202,7 @@ - + @@ -247,12 +241,11 @@ - + - - + @@ -260,24 +253,24 @@ - - + + - - + + - - + + - + @@ -285,13 +278,14 @@ .full-height { height: 100% } .full-height > fieldset { flex-grow: 1; } .superuser { - position: absolute; - top: 130px; - left: 120px; - width: 200px; - background-color: white; - z-index: 1; - display: none; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: 5px; + background-color: white; + z-index: 1; + display: none; }