mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
Filemanager: fix not being able to become superuser
also restyled it to be centered and fit its content
This commit is contained in:
parent
e239125fc4
commit
9a034118d5
@ -351,11 +351,11 @@ class Vfs extends 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);
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<rows>
|
||||
<row height="30">
|
||||
<et2-vfs-mime align="center" id="mime"></et2-vfs-mime>
|
||||
<et2-vfs-name id="name" required="true" class="fileName et2_fullWidth"/>
|
||||
<et2-vfs-name id="name" required="true" class="fileName"/>
|
||||
</row>
|
||||
<row>
|
||||
<hrule span="all"/>
|
||||
@ -29,7 +29,7 @@
|
||||
</row>
|
||||
<row disabled="@is_link">
|
||||
<et2-description value="Size"></et2-description>
|
||||
<vfs-size id="size" options="1"/>
|
||||
<vfs-size id="size"/>
|
||||
</row>
|
||||
<row>
|
||||
<et2-description value="Created"></et2-description>
|
||||
@ -53,8 +53,7 @@
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="Accessrights"/>
|
||||
<et2-groupbox summary="Accessrights">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="80"/>
|
||||
@ -83,11 +82,10 @@
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</et2-groupbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="Owner"/>
|
||||
<et2-groupbox summary="Owner">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="80"/>
|
||||
@ -96,17 +94,15 @@
|
||||
<rows>
|
||||
<row>
|
||||
<et2-description value="User"></et2-description>
|
||||
<et2-select-account label="@ro_uid_root" id="uid"
|
||||
accountType="accounts"></et2-select-account>
|
||||
<et2-select-account label="@ro_uid_root" id="uid" accountType="accounts"></et2-select-account>
|
||||
</row>
|
||||
<row>
|
||||
<et2-description value="Group"></et2-description>
|
||||
<et2-select-account label="@ro_gid_root" id="gid"
|
||||
accountType="groups"></et2-select-account>
|
||||
<et2-select-account label="@ro_gid_root" id="gid" accountType="groups"></et2-select-account>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</et2-groupbox>
|
||||
</row>
|
||||
<row disabled="!@is_dir">
|
||||
<et2-checkbox label="Modify all Subdirectories and their content" id="modify_subs"></et2-checkbox>
|
||||
@ -116,8 +112,7 @@
|
||||
</template>
|
||||
<template id="filemanager.file.eacl" template="" lang="" group="0" version="1.9.001">
|
||||
<et2-vbox class="full-height">
|
||||
<groupbox style="flex-grow: 1">
|
||||
<caption label="Extended access control list"/>
|
||||
<et2-groupbox style="flex-grow: 1" summary="Extended access control list">
|
||||
<grid width="100%" overflow="auto" id="eacl">
|
||||
<columns>
|
||||
<column width="80"/>
|
||||
@ -140,8 +135,8 @@
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
<et2-hbox valign="bottom" disabled="!@is_owner">
|
||||
</et2-groupbox>
|
||||
<et2-hbox disabled="!@is_owner">
|
||||
<et2-select-account class="filemanager-file_filemanager-file-eaclowner eaclAccount" label="Owner" id="eacl_owner" emptyLabel="select one" accountType="both" placement="top"></et2-select-account>
|
||||
<et2-select class="eaclRights" statustext="You can only grant additional rights, you can NOT take rights away!" label="Rights" id="eacl[rights]"></et2-select>
|
||||
<et2-button label="Add" id="button[eacl]" image="add"></et2-button>
|
||||
@ -190,8 +185,7 @@
|
||||
</et2-hbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="Merge settings"/>
|
||||
<et2-groupbox summary="Merge settings">
|
||||
<grid>
|
||||
<columns>
|
||||
<column />
|
||||
@ -208,7 +202,7 @@
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</et2-groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -247,12 +241,11 @@
|
||||
<et2-button label="Apply" id="button[apply]" image="apply"></et2-button>
|
||||
<et2-button label="Cancel" id="button[cancel]" onclick="window.close();" image="cancel" noSubmit="true"></et2-button>
|
||||
</et2-hbox>
|
||||
<et2-button align="right" statustext="Enter setup user and password to get root rights" label="Superuser" id="sudouser" onclick="jQuery('.superuser').css('display','inline'); document.getElementById(form::name('sudo[user]')).focus();" image="superuser" noSubmit="true"></et2-button>
|
||||
<et2-button align="right" statustext="Enter setup user and password to get root rights" label="Superuser" id="sudouser" onclick="jQuery('.superuser').css('display','inline'); document.getElementById(form::name('sudo[user]')).focus();" image="lock" noSubmit="true"></et2-button>
|
||||
</et2-hbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox class="superuser">
|
||||
<caption label="Enter setup user and password"/>
|
||||
<et2-groupbox class="superuser" summary="Enter setup user and password">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
@ -270,14 +263,14 @@
|
||||
<row>
|
||||
<et2-description></et2-description>
|
||||
<et2-hbox>
|
||||
<et2-button label="Submit" id="button[setup]"></et2-button>
|
||||
<et2-button label="Cancel" onclick="jQuery('.superuser').hide();" noSubmit="true"></et2-button>
|
||||
<et2-button label="Submit" id="button[setup]" image="check"></et2-button>
|
||||
<et2-button label="Cancel" onclick="jQuery('.superuser').hide();" noSubmit="true" image="cancel"></et2-button>
|
||||
</et2-hbox>
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</et2-groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -286,9 +279,10 @@
|
||||
.full-height > fieldset { flex-grow: 1; }
|
||||
.superuser {
|
||||
position: absolute;
|
||||
top: 130px;
|
||||
left: 120px;
|
||||
width: 200px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 5px;
|
||||
background-color: white;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
|
Loading…
Reference in New Issue
Block a user