WIP allow to place custom-fields in tabs: action to copy cfs

This commit is contained in:
ralf 2024-03-27 18:10:34 +02:00
parent a63aaad8e9
commit 12f15ee121
3 changed files with 29 additions and 7 deletions

View File

@ -459,7 +459,6 @@ class admin_customfields
$readonlys = array(); $readonlys = array();
//echo 'customfields=<pre style="text-align: left;">'; print_r($this->fields); echo "</pre>\n"; //echo 'customfields=<pre style="text-align: left;">'; print_r($this->fields); echo "</pre>\n";
$content['cf_order'] = (count($this->fields)+1) * 10;
$content['use_private'] = $this->use_private; $content['use_private'] = $this->use_private;
$content['use_readonly'] = $this->use_readonly; $content['use_readonly'] = $this->use_readonly;
@ -471,18 +470,32 @@ class admin_customfields
{ {
$content['cf_private'] = explode(',',$content['cf_private']); $content['cf_private'] = explode(',',$content['cf_private']);
} }
if($content['cf_name']) if($content['cf_readonly'])
{ {
$readonlys['cf_name'] = true; $content['cf_readonly'] = explode(',',$content['cf_readonly']);
}
if ($content['cf_type'] === 'serial')
{
$readonlys['cf_values'] = true; // only allow to set start-value, but not change it after
} }
if (!isset($GLOBALS['egw_info']['apps'][$content['cf_type']]) || $content['cf_type'] === 'filemanager') if (!isset($GLOBALS['egw_info']['apps'][$content['cf_type']]) || $content['cf_type'] === 'filemanager')
{ {
$content['cf_values'] = json_decode($content['cf_values'], true); $content['cf_values'] = json_decode($content['cf_values'], true);
} }
if ($_GET['action'] ?? null === 'copy')
{
unset($content['cf_id'], $cf_id);
$content['cf_name'] = lang('Copy of').' '.$content['cf_name'];
$content['cf_order'] += 5; // behind copied field
$readonlys['button[delete]'] = true;
}
else
{
if($content['cf_name'])
{
$readonlys['cf_name'] = true;
}
if ($content['cf_type'] === 'serial')
{
$readonlys['cf_values'] = true; // only allow to set start-value, but not change it after
}
}
} }
else else
{ {
@ -572,6 +585,13 @@ class admin_customfields
'group' => $group=1, 'group' => $group=1,
'disableClass' => 'th', 'disableClass' => 'th',
), ),
'copy' => array(
'caption' => 'Copy',
'allowOnMultiple' => false,
'url' => 'menuaction='.$edit.'&cf_id=$id&use_private='.$this->use_private.'&action=copy',
'popup' => '500x380',
'group' => $group,
),
'add' => array( 'add' => array(
'caption' => 'Add', 'caption' => 'Add',
'url' => 'menuaction='.$edit.'&appname='.$this->appname.'&use_private='.$this->use_private, 'url' => 'menuaction='.$edit.'&appname='.$this->appname.'&use_private='.$this->use_private,

View File

@ -244,6 +244,7 @@ connection is not secure! everyone can read eg. your credentials. admin de Die V
continue admin de Weiter continue admin de Weiter
cookie domain (default empty means use full domain name, for sitemgr eg. ".domain.com" allows to use the same cookie for egw.domain.com and www.domain.com) admin de Cookie Domain<br>(Vorgabe 'leer' bedeutet den kompletten Domainnamen, für SiteMgr erlaubt z.B. ".domain.com" das gleiche Cookie für egw.domain.com und www.domain.com zu verwenden) cookie domain (default empty means use full domain name, for sitemgr eg. ".domain.com" allows to use the same cookie for egw.domain.com and www.domain.com) admin de Cookie Domain<br>(Vorgabe 'leer' bedeutet den kompletten Domainnamen, für SiteMgr erlaubt z.B. ".domain.com" das gleiche Cookie für egw.domain.com und www.domain.com zu verwenden)
cookie path (allows multiple egw sessions with different directories, has problemes with sitemgr!) admin de Cookie Pfad (erlaubt mehrere EGw-Sitzungen mit unterschiedlichen Verzeichnissen, hat Probleme mit SiteMgr!) cookie path (allows multiple egw sessions with different directories, has problemes with sitemgr!) admin de Cookie Pfad (erlaubt mehrere EGw-Sitzungen mit unterschiedlichen Verzeichnissen, hat Probleme mit SiteMgr!)
copy of admin de Kopie von
could not append message: admin de Diese E-Mail lässt sich nicht anzeigen could not append message: admin de Diese E-Mail lässt sich nicht anzeigen
could not complete request. reason given: %s admin de Konnte Anfrage nicht beenden. Grund: %s could not complete request. reason given: %s admin de Konnte Anfrage nicht beenden. Grund: %s
could not extract private key from given p12 file. either the p12 file is broken or password is wrong! admin de Konnte den privaten Schlüssel nicht aus der angegeben p12-Datei extrahieren. Entweder ist die p12-Datei kaputt oder das Passwort ist falsch! could not extract private key from given p12 file. either the p12 file is broken or password is wrong! admin de Konnte den privaten Schlüssel nicht aus der angegeben p12-Datei extrahieren. Entweder ist die p12-Datei kaputt oder das Passwort ist falsch!

View File

@ -244,6 +244,7 @@ connection is not secure! everyone can read eg. your credentials. admin en Conne
continue admin en Continue continue admin en Continue
cookie domain (default empty means use full domain name, for sitemgr eg. ".domain.com" allows to use the same cookie for egw.domain.com and www.domain.com) admin en Cookie domain. Default empty uses full domain name. E.g. in Site Manager ".domain.com" allows to use the same cookie for egw.domain.com and www.domain.com. cookie domain (default empty means use full domain name, for sitemgr eg. ".domain.com" allows to use the same cookie for egw.domain.com and www.domain.com) admin en Cookie domain. Default empty uses full domain name. E.g. in Site Manager ".domain.com" allows to use the same cookie for egw.domain.com and www.domain.com.
cookie path (allows multiple egw sessions with different directories, has problemes with sitemgr!) admin en Cookie path. Allows multiple EGroupware sessions with different directories. cookie path (allows multiple egw sessions with different directories, has problemes with sitemgr!) admin en Cookie path. Allows multiple EGroupware sessions with different directories.
copy of admin en Copy of
could not append message: admin en Could not append Message: could not append message: admin en Could not append Message:
could not complete request. reason given: %s admin en Could not complete request. %s could not complete request. reason given: %s admin en Could not complete request. %s
could not extract private key from given p12 file. either the p12 file is broken or password is wrong! admin en Could not extract private key from given p12 file. Either the p12 file is broken or password is wrong! could not extract private key from given p12 file. either the p12 file is broken or password is wrong! admin en Could not extract private key from given p12 file. Either the p12 file is broken or password is wrong!