allow to require custom fields to be filled out by users

This commit is contained in:
Ralf Becker 2011-05-18 10:25:39 +00:00
parent 3b90f44c89
commit fe62956a96
6 changed files with 86 additions and 80 deletions

View File

@ -65,13 +65,11 @@ class customfields
*/
function edit($content = null)
{
$GLOBALS['egw']->translation->add_app('infolog'); // til we move the translations
// determine appname
$this->appname = $_GET['appname'] ? $_GET['appname'] : ($content['appname'] ? $content['appname'] : false);
if(!$this->appname) die(lang('Error! No appname found'));
$GLOBALS['egw']->translation->add_app('infolog'); // til we move the translations
translation::add_app('infolog'); // til we move the translations
$this->tmpl = new etemplate();
// do we manage content-types?
if($this->tmpl->read($this->appname.'.admin.types')) $this->manage_content_types = true;
@ -79,10 +77,10 @@ class customfields
$this->fields = config::get_customfields($this->appname,true);
$this->tmpl->read('admin.customfields');
if($this->manage_content_types)
if($this->manage_content_types)
{
$this->content_types = config::get_content_types($this->appname);
if (count($this->content_types)==0)
if (count($this->content_types)==0)
{
// if you define your default types of your app with the search_link hook, they are available here, if no types were found
$this->content_types = (array)egw_link::get_registry($this->appname,'default_types');
@ -205,7 +203,7 @@ class customfields
$sel_options = array(
'type2' => $this->types2 + array('tmpl' => 'template'),
);
// do NOT allow to delete original contact content-type for addressbook,
// do NOT allow to delete original contact content-type for addressbook,
// as it only creates support problems as users incidently delete it
if ($this->appname == 'addressbook' && $this->content_type == 'n')
{
@ -267,6 +265,7 @@ class customfields
'rows' => (int)$field['rows'],
'order' => (int)$field['order'],
'private' => $field['private'],
'needed' => $field['needed'],
);
if(!$this->fields[$name]['type2'] && $this->manage_content_types)
{

View File

@ -1,14 +1,14 @@
<?php
/**
* eGroupWare - eTemplates for Application admin
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2011-04-13 15:34
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package admin
* @subpackage setup
* @version $Id$
*/
* EGroupware - eTemplates for Application admin
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2011-05-18 11:27
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package admin
* @subpackage setup
* @version $Id$
*/
$templ_version=1;
@ -49,7 +49,7 @@ $templ_data[] = array('name' => 'admin.cmds.rows','template' => '','lang' => '',
$templ_data[] = array('name' => 'admin.customfields','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:1:{s:1:"G";s:3:"80%";}i:1;a:7:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:9:"error_msg";s:5:"align";s:6:"center";s:7:"no_lang";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}i:2;a:7:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:13:"content_types";s:4:"span";s:3:"all";s:4:"name";s:24:"admin.customfields.types";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}s:1:"G";a:1:{s:4:"type";s:5:"label";}}i:3;a:7:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}s:1:"G";a:1:{s:4:"type";s:5:"label";}}i:4;a:7:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:6:"fields";s:4:"span";s:3:"all";s:4:"name";s:25:"admin.customfields.fields";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}s:1:"G";a:1:{s:4:"type";s:5:"label";}}i:5;a:7:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:33:"saves the changes made and leaves";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:4:"help";s:19:"applies the changes";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:4:"help";s:22:"leaves without saveing";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}s:1:"G";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:7;}}','size' => '','style' => '.redItalic { color: red; font-style: italics; }','modified' => '1295986974',);
$templ_data[] = array('name' => 'admin.customfields.fields','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"C";s:8:",!@type2";s:1:"E";s:14:",!@use_private";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Label";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Subtype";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Options";s:4:"help";s:40:"each value is a line like <id>[=<label>]";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Length<br>Rows";}s:1:"H";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Order";}s:1:"I";a:4:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:5:"align";s:6:"center";s:4:"help";s:18:"deletes this field";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:4:"size";s:5:"20,32";s:4:"name";s:12:"${row}[name]";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:",255";s:4:"name";s:13:"${row}[label]";s:4:"help";s:30:"the text displayed to the user";}i:2;a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}s:1:"C";a:4:{s:4:"type";s:6:"select";s:4:"size";s:3:"All";s:4:"name";s:13:"${row}[type2]";s:7:"no_lang";s:1:"1";}s:1:"D";a:3:{s:4:"type";s:18:"customfields-types";s:4:"name";s:12:"{$row}[type]";s:4:"help";s:19:"Type of customfield";}s:1:"E";a:5:{s:4:"type";s:14:"select-account";s:4:"name";s:15:"${row}[private]";s:4:"help";s:60:"Select accounts for which the custom field should be visible";s:5:"align";s:6:"center";s:4:"size";s:6:"3,both";}s:1:"F";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"2,30";s:4:"name";s:14:"${row}[values]";s:4:"help";s:36:"each value is a line like id[=label]";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:11:"${row}[len]";s:4:"help";s:63:"max length of the input [, length of the inputfield (optional)]";}i:2;a:5:{s:4:"type";s:3:"int";s:4:"size";s:6:"0,10,2";s:4:"name";s:12:"${row}[rows]";s:4:"help";s:70:"number of row for a multiline inputfield or line of a multi-select-box";s:4:"blur";s:1:"1";}}s:1:"H";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:13:"${row}[order]";s:4:"help";s:45:"determines the order the fields are displayed";}s:1:"I";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:23:"delete[$row_cont[name]]";s:4:"help";s:18:"deletes this field";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:21:"create$row_cont[name]";s:4:"help";s:19:"creates a new field";}}}}s:4:"rows";i:2;s:4:"cols";i:9;s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1131454776',);
$templ_data[] = array('name' => 'admin.customfields.fields','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:4:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"C";s:8:",!@type2";s:1:"E";s:14:",!@use_private";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Label";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Subtype";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Options";s:4:"help";s:40:"each value is a line like <id>[=<label>]";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Length<br>Rows";}s:1:"H";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Order";}s:1:"I";a:4:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:5:"align";s:6:"center";s:4:"help";s:18:"deletes this field";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:4:"size";s:5:"20,32";s:4:"name";s:12:"${row}[name]";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:",255";s:4:"name";s:13:"${row}[label]";s:4:"help";s:30:"the text displayed to the user";}i:2;a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}s:1:"C";a:4:{s:4:"type";s:6:"select";s:4:"size";s:3:"All";s:4:"name";s:13:"${row}[type2]";s:7:"no_lang";s:1:"1";}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:18:"customfields-types";s:4:"name";s:12:"{$row}[type]";s:4:"help";s:19:"Type of customfield";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"${row}[needed]";s:5:"label";s:8:"required";}}s:1:"E";a:5:{s:4:"type";s:14:"select-account";s:4:"name";s:15:"${row}[private]";s:4:"help";s:60:"Select accounts for which the custom field should be visible";s:5:"align";s:6:"center";s:4:"size";s:6:"3,both";}s:1:"F";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"2,30";s:4:"name";s:14:"${row}[values]";s:4:"help";s:36:"each value is a line like id[=label]";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:11:"${row}[len]";s:4:"help";s:63:"max length of the input [, length of the inputfield (optional)]";}i:2;a:5:{s:4:"type";s:3:"int";s:4:"size";s:6:"0,10,2";s:4:"name";s:12:"${row}[rows]";s:4:"help";s:70:"number of row for a multiline inputfield or line of a multi-select-box";s:4:"blur";s:1:"1";}}s:1:"H";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:13:"${row}[order]";s:4:"help";s:45:"determines the order the fields are displayed";}s:1:"I";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:23:"delete[$row_cont[name]]";s:4:"help";s:18:"deletes this field";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:21:"create$row_cont[name]";s:4:"help";s:19:"creates a new field";}}}}s:4:"rows";i:2;s:4:"cols";i:9;s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1131454776',);
$templ_data[] = array('name' => 'admin.customfields.types','template' => '','lang' => '','group' => '0','version' => '1.2','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:4:{s:1:"D";s:15:",@non_deletable";s:1:"E";s:8:",@no_add";s:1:"F";s:8:",@no_add";s:2:"h1";s:15:",@no_edit_types";}i:1;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:8:"app-name";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"- type";}s:1:"C";a:4:{s:4:"type";s:6:"select";s:4:"name";s:5:"types";s:8:"onchange";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:7:"onclick";s:110:"return confirm(\'WARNING: You are about to delete this type. Entries of this type won\\\'t be accessable then.\');";}s:1:"E";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"blur";s:8:"new name";}s:1:"F";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:6:"create";}}}s:4:"rows";i:1;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1139823458',);

View File

@ -8,24 +8,24 @@
<column/>
<column/>
<column disabled="@non_deletable"/>
<column/>
<column/>
<column disabled="@no_add"/>
<column disabled="@no_add"/>
</columns>
<rows>
<row>
<row disabled="@no_edit_types">
<description id="app-name"/>
<description value="- type"/>
<menulist>
<menupopup id="types" onchange="1" no_lang="1"/>
<menupopup id="types" no_lang="1" onchange="1"/>
</menulist>
<button label="Delete" id="delete" onclick="return confirm('WARNING: You are about to delete this type. Entries of this type won\'t be accessable then.');"/>
<textbox id="name" blur="new name"/>
<textbox blur="new name" id="name"/>
<button label="Create" id="create"/>
</row>
</rows>
</grid>
</template>
<template id="admin.customfields.fields" template="" lang="" group="0" version="1.5.001">
<template id="admin.customfields.fields" template="" lang="" group="0" version="1.9.001">
<grid>
<columns>
<column/>
@ -40,42 +40,45 @@
</columns>
<rows>
<row class="th">
<description value="Name" statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible"/>
<description statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible" value="Name"/>
<description value="Label"/>
<description value="Subtype"/>
<description value="Type"/>
<description value="Private"/>
<description value="Options" statustext="each value is a line like &lt;id&gt;[=&lt;label&gt;]"/>
<description statustext="each value is a line like &lt;id&gt;[=&lt;label&gt;]" value="Options"/>
<description value="Length&lt;br&gt;Rows"/>
<description value="Order"/>
<description value="Action" align="center" statustext="deletes this field"/>
<description align="center" statustext="deletes this field" value="Action"/>
</row>
<row class="row" valign="top">
<textbox size="20" maxlength="32" id="${row}[name]" statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible"/>
<textbox statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible" id="${row}[name]" size="20" maxlength="32"/>
<vbox>
<textbox maxlength="255" id="${row}[label]" statustext="the text displayed to the user"/>
<textbox statustext="the text displayed to the user" id="${row}[label]" maxlength="255"/>
<description id="${row}[label]"/>
</vbox>
<menulist>
<menupopup options="All" id="${row}[type2]" no_lang="1"/>
<menupopup id="${row}[type2]" no_lang="1" options="All"/>
</menulist>
<customfields-types id="{$row}[type]" statustext="Type of customfield"/>
<listbox type="select-account" id="${row}[private]" statustext="Select accounts for which the custom field should be visible" align="center" rows="3" options="both"/>
<textbox multiline="true" rows="2" cols="30" id="${row}[values]" statustext="each value is a line like id[=label]"/>
<vbox>
<textbox size="5" id="${row}[len]" statustext="max length of the input [, length of the inputfield (optional)]"/>
<int options="0,10,2" id="${row}[rows]" statustext="number of row for a multiline inputfield or line of a multi-select-box" blur="1"/>
<vbox options="0,0">
<customfields-types statustext="Type of customfield" id="{$row}[type]"/>
<checkbox label="required" id="${row}[needed]"/>
</vbox>
<int options="1,,3" id="${row}[order]" statustext="determines the order the fields are displayed"/>
<listbox type="select-account" align="center" statustext="Select accounts for which the custom field should be visible" id="${row}[private]" rows="3" options="both"/>
<textbox multiline="true" statustext="each value is a line like id[=label]" id="${row}[values]" rows="2" cols="30"/>
<vbox>
<textbox statustext="max length of the input [, length of the inputfield (optional)]" id="${row}[len]" size="5"/>
<int blur="1" statustext="number of row for a multiline inputfield or line of a multi-select-box" id="${row}[rows]" options="0,10,2"/>
</vbox>
<int statustext="determines the order the fields are displayed" id="${row}[order]" options="1,,3"/>
<hbox>
<button label="Delete" id="delete[$row_cont[name]]" statustext="deletes this field"/>
<button label="Create" id="create$row_cont[name]" statustext="creates a new field"/>
<button statustext="deletes this field" label="Delete" id="delete[$row_cont[name]]"/>
<button statustext="creates a new field" label="Create" id="create$row_cont[name]"/>
</hbox>
</row>
</rows>
</grid>
</template>
<template id="admin.customfields" template="" lang="" group="0" version="1.2">
<template id="admin.customfields" template="" lang="" group="0" version="1.9.001">
<grid>
<columns>
<column/>
@ -88,7 +91,7 @@
</columns>
<rows>
<row>
<description span="all" class="redItalic" id="error_msg" align="center" no_lang="1"/>
<description align="center" id="error_msg" no_lang="1" span="all" class="redItalic"/>
<description/>
<description/>
<description/>
@ -97,19 +100,19 @@
<description no_lang="1"/>
</row>
<row>
<template content="content_types" span="all" id="admin.customfields.types"/>
<template id="admin.customfields.types" content="content_types" span="all"/>
</row>
<row>
<template span="all"/>
</row>
<row>
<template content="fields" span="all" id="admin.customfields.fields"/>
<template id="admin.customfields.fields" content="fields" span="all"/>
</row>
<row>
<hbox span="all">
<button label="Save" id="button[save]" statustext="saves the changes made and leaves"/>
<button label="Apply" id="button[apply]" statustext="applies the changes"/>
<button label="Cancel" id="button[cancel]" statustext="leaves without saveing"/>
<button statustext="saves the changes made and leaves" label="Save" id="button[save]"/>
<button statustext="applies the changes" label="Apply" id="button[apply]"/>
<button statustext="leaves without saveing" label="Cancel" id="button[cancel]"/>
</hbox>
</row>
</rows>

View File

@ -223,6 +223,7 @@ class infolog_customfields
'len' => $field['len'],
'rows' => (int)$field['rows'],
'order' => (int)$field['order'],
'needed' => $field['needed'],
);
}
if (!function_exists('sort_by_order'))

View File

@ -2,7 +2,7 @@
/**
* EGroupware - eTemplates for Application infolog
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2011-05-07 09:58
* generated by soetemplate::dump4setup() 2011-05-18 12:24
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package infolog
@ -17,7 +17,7 @@ $templ_data[] = array('name' => 'infolog.close','template' => '','lang' => '','g
$templ_data[] = array('name' => 'infolog.customfields','template' => '','lang' => '','group' => '0','version' => '1.3.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:3:{s:2:"c2";s:6:"header";s:2:"c4";s:6:"header";s:1:"F";s:3:"80%";}i:1;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Typ";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:5:"type2";s:8:"onchange";i:1;s:4:"help";s:52:"select a typ to edit it\'s status-values or delete it";s:7:"no_lang";s:1:"1";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:14:"button[delete]";s:4:"help";s:24:"deletes the selected typ";}s:1:"D";a:5:{s:4:"type";s:4:"text";s:4:"size";s:5:"10,40";s:4:"name";s:8:"new_name";s:4:"help";s:26:"name of new type to create";s:4:"blur";s:8:"new name";}s:1:"E";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:14:"button[create]";s:4:"help";s:37:"creates a new typ with the given name";}s:1:"F";a:5:{s:4:"type";s:5:"label";s:4:"span";s:10:",error_msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";s:4:"name";s:9:"error_msg";}}i:2;a:6:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:21:"Custom status for typ";s:4:"name";s:3:"typ";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:3;a:6:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:6:"status";s:4:"span";s:3:"all";s:4:"name";s:6:"status";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:4;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:13:"Custom fields";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:5;a:6:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:6:"fields";s:4:"span";s:3:"all";s:4:"name";s:6:"fields";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:6;a:6:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:7:",header";s:5:"label";s:15:"Group owner for";s:4:"name";s:5:"type2";}i:2;a:5:{s:4:"type";s:14:"select-account";s:4:"size";s:11:"None,groups";s:4:"name";s:11:"group_owner";s:4:"help";s:119:"If a type has a group owner, all entries of that type will be owned by the given group and NOT the user who created it!";s:4:"span";s:10:",lpadding5";}s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:7;a:6:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:33:"saves the changes made and leaves";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:4:"help";s:17:"apply the changes";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:4:"help";s:22:"leaves without saveing";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:6;}}','size' => '','style' => '.header { font-weight: bold; font-size: 120%; }
.error_msg { color: red; font-style: italics; }','modified' => '1173687088',);
$templ_data[] = array('name' => 'infolog.customfields.fields','template' => '','lang' => '','group' => '0','version' => '1.4.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:8:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Typ";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Values for selectbox";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Length<br>Rows";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Order";}s:1:"H";a:4:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:5:"align";s:6:"center";s:4:"help";s:18:"deletes this field";}}i:2;a:8:{s:1:"A";a:5:{s:4:"type";s:6:"select";s:4:"size";s:1:"3";s:4:"name";s:13:"${row}[type2]";s:4:"help";s:41:"for which types should this field be used";s:7:"no_lang";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:5:"20,32";s:4:"name";s:12:"${row}[name]";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:",255";s:4:"name";s:13:"${row}[label]";s:4:"help";s:30:"the text displayed to the user";}i:2;a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}s:1:"D";a:3:{s:4:"type";s:18:"customfields-types";s:4:"name";s:12:"${row}[type]";s:4:"help";s:19:"Type of customfield";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"2,30";s:4:"name";s:14:"${row}[values]";s:4:"help";s:40:"each value is a line like <id>[=<label>]";}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:11:"${row}[len]";s:4:"help";s:63:"max length of the input [, length of the inputfield (optional)]";}i:2;a:5:{s:4:"type";s:3:"int";s:4:"size";s:6:"0,10,2";s:4:"name";s:12:"${row}[rows]";s:4:"help";s:70:"number of row for a multiline inputfield or line of a multi-select-box";s:4:"blur";s:1:"1";}}s:1:"G";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:13:"${row}[order]";s:4:"help";s:45:"determines the order the fields are displayed";}s:1:"H";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:23:"delete[$row_cont[name]]";s:4:"help";s:18:"deletes this field";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:21:"create$row_cont[name]";s:4:"help";s:19:"creates a new field";}}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1061734964',);
$templ_data[] = array('name' => 'infolog.customfields.fields','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:8:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Typ";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Values for selectbox";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Length<br>Rows";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Order";}s:1:"H";a:4:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:5:"align";s:6:"center";s:4:"help";s:18:"deletes this field";}}i:2;a:8:{s:1:"A";a:5:{s:4:"type";s:6:"select";s:4:"size";s:1:"3";s:4:"name";s:13:"${row}[type2]";s:4:"help";s:41:"for which types should this field be used";s:7:"no_lang";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:5:"20,32";s:4:"name";s:12:"${row}[name]";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:",255";s:4:"name";s:13:"${row}[label]";s:4:"help";s:30:"the text displayed to the user";}i:2;a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:18:"customfields-types";s:4:"name";s:12:"${row}[type]";s:4:"help";s:19:"Type of customfield";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"${row}[needed]";s:5:"label";s:8:"required";}}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"2,30";s:4:"name";s:14:"${row}[values]";s:4:"help";s:40:"each value is a line like <id>[=<label>]";}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:11:"${row}[len]";s:4:"help";s:63:"max length of the input [, length of the inputfield (optional)]";}i:2;a:5:{s:4:"type";s:3:"int";s:4:"size";s:6:"0,10,2";s:4:"name";s:12:"${row}[rows]";s:4:"help";s:70:"number of row for a multiline inputfield or line of a multi-select-box";s:4:"blur";s:1:"1";}}s:1:"G";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:13:"${row}[order]";s:4:"help";s:45:"determines the order the fields are displayed";}s:1:"H";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:23:"delete[$row_cont[name]]";s:4:"help";s:18:"deletes this field";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:21:"create$row_cont[name]";s:4:"help";s:19:"creates a new field";}}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1061734964',);
$templ_data[] = array('name' => 'infolog.customfields.status','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:1:"E";s:2:",1";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Label";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Translation";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Default";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Disabled";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:5:"align";s:6:"center";}}i:2;a:6:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:4:"size";s:5:"10,40";s:4:"name";s:12:"${row}[name]";s:4:"help";s:83:"the name used internaly (<= 10 chars), changeing it makes existing data unavailible";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"40";s:4:"name";s:13:"${row}[label]";s:4:"help";s:30:"the text displayed to the user";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}s:1:"D";a:5:{s:4:"type";s:5:"radio";s:4:"size";s:15:"$row_cont[name]";s:5:"align";s:6:"center";s:4:"name";s:7:"default";s:4:"help";s:34:"default status for a new log entry";}s:1:"E";a:4:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:16:"${row}[disabled]";s:4:"help";s:37:"disables a status without deleting it";}s:1:"F";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:23:"delete[$row_cont[name]]";s:4:"help";s:19:"deletes this status";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:21:"create$row_cont[name]";s:4:"help";s:42:"creates a new status with the given values";}}}}s:4:"rows";i:2;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1061730032',);

View File

@ -18,23 +18,23 @@
<description value="Translation"/>
<description value="Default"/>
<description value="Disabled"/>
<description value="Action" align="center"/>
<description align="center" value="Action"/>
</row>
<row class="row">
<textbox size="10" maxlength="40" id="${row}[name]" statustext="the name used internaly (&lt;= 10 chars), changeing it makes existing data unavailible"/>
<textbox size="40" id="${row}[label]" statustext="the text displayed to the user"/>
<textbox statustext="the name used internaly (&lt;= 10 chars), changeing it makes existing data unavailible" id="${row}[name]" size="10" maxlength="40"/>
<textbox statustext="the text displayed to the user" id="${row}[label]" size="40"/>
<description id="${row}[label]"/>
<radio options="$row_cont[name]" align="center" id="default" statustext="default status for a new log entry"/>
<checkbox align="center" id="${row}[disabled]" statustext="disables a status without deleting it"/>
<radio align="center" statustext="default status for a new log entry" id="default" options="$row_cont[name]"/>
<checkbox align="center" statustext="disables a status without deleting it" id="${row}[disabled]"/>
<hbox>
<button label="Delete" id="delete[$row_cont[name]]" statustext="deletes this status"/>
<button label="Create" id="create$row_cont[name]" statustext="creates a new status with the given values"/>
<button statustext="deletes this status" label="Delete" id="delete[$row_cont[name]]"/>
<button statustext="creates a new status with the given values" label="Create" id="create$row_cont[name]"/>
</hbox>
</row>
</rows>
</grid>
</template>
<template id="infolog.customfields.fields" template="" lang="" group="0" version="1.4.001">
<template id="infolog.customfields.fields" template="" lang="" group="0" version="1.9.001">
<grid>
<columns>
<column/>
@ -55,25 +55,28 @@
<description value="Values for selectbox"/>
<description value="Length&lt;br&gt;Rows"/>
<description value="Order"/>
<description value="Action" align="center" statustext="deletes this field"/>
<description align="center" statustext="deletes this field" value="Action"/>
</row>
<row class="row" valign="top">
<listbox rows="3" id="${row}[type2]" statustext="for which types should this field be used" no_lang="1"/>
<textbox size="20" maxlength="32" id="${row}[name]" statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible"/>
<listbox statustext="for which types should this field be used" id="${row}[type2]" no_lang="1" rows="3"/>
<textbox statustext="the name used internaly (&lt;= 20 chars), changeing it makes existing data unavailible" id="${row}[name]" size="20" maxlength="32"/>
<vbox options="0,0">
<textbox maxlength="255" id="${row}[label]" statustext="the text displayed to the user"/>
<textbox statustext="the text displayed to the user" id="${row}[label]" maxlength="255"/>
<description id="${row}[label]"/>
</vbox>
<customfields-types id="${row}[type]" statustext="Type of customfield"/>
<textbox multiline="true" rows="2" cols="30" id="${row}[values]" statustext="each value is a line like &lt;id&gt;[=&lt;label&gt;]"/>
<vbox options="0,0">
<textbox size="5" id="${row}[len]" statustext="max length of the input [, length of the inputfield (optional)]"/>
<int options="0,10,2" id="${row}[rows]" statustext="number of row for a multiline inputfield or line of a multi-select-box" blur="1"/>
<customfields-types statustext="Type of customfield" id="${row}[type]"/>
<checkbox label="required" id="${row}[needed]"/>
</vbox>
<int options="1,,3" id="${row}[order]" statustext="determines the order the fields are displayed"/>
<textbox multiline="true" statustext="each value is a line like &lt;id&gt;[=&lt;label&gt;]" id="${row}[values]" rows="2" cols="30"/>
<vbox options="0,0">
<textbox statustext="max length of the input [, length of the inputfield (optional)]" id="${row}[len]" size="5"/>
<int blur="1" statustext="number of row for a multiline inputfield or line of a multi-select-box" id="${row}[rows]" options="0,10,2"/>
</vbox>
<int statustext="determines the order the fields are displayed" id="${row}[order]" options="1,,3"/>
<hbox>
<button label="Delete" id="delete[$row_cont[name]]" statustext="deletes this field"/>
<button label="Create" id="create$row_cont[name]" statustext="creates a new field"/>
<button statustext="deletes this field" label="Delete" id="delete[$row_cont[name]]"/>
<button statustext="creates a new field" label="Create" id="create$row_cont[name]"/>
</hbox>
</row>
</rows>
@ -93,38 +96,38 @@
<row>
<description value="Typ"/>
<menulist>
<menupopup id="type2" onchange="1" statustext="select a typ to edit it's status-values or delete it" no_lang="1"/>
<menupopup statustext="select a typ to edit it's status-values or delete it" id="type2" no_lang="1" onchange="1"/>
</menulist>
<button label="Delete" id="button[delete]" statustext="deletes the selected typ"/>
<textbox size="10" maxlength="40" id="new_name" statustext="name of new type to create" blur="new name"/>
<button label="Create" id="button[create]" statustext="creates a new typ with the given name"/>
<description class="error_msg" no_lang="1" align="center" id="error_msg"/>
<button statustext="deletes the selected typ" label="Delete" id="button[delete]"/>
<textbox blur="new name" statustext="name of new type to create" id="new_name" size="10" maxlength="40"/>
<button statustext="creates a new typ with the given name" label="Create" id="button[create]"/>
<description align="center" id="error_msg" no_lang="1" class="error_msg"/>
</row>
<row class="header">
<description span="all" value="Custom status for typ" id="typ"/>
<description value="Custom status for typ" id="typ" span="all"/>
</row>
<row>
<template content="status" span="all" id="status"/>
<template content="status" id="status" span="all"/>
</row>
<row class="header">
<description span="all" value="Custom fields"/>
<description value="Custom fields" span="all"/>
</row>
<row>
<template content="fields" span="all" id="fields"/>
<template content="fields" id="fields" span="all"/>
</row>
<row>
<hbox options="0,0" span="all">
<description class="header" value="Group owner for" id="type2"/>
<menulist class="lpadding5">
<menupopup type="select-account" options="None,groups" id="group_owner" statustext="If a type has a group owner, all entries of that type will be owned by the given group and NOT the user who created it!"/>
<description value="Group owner for" id="type2" class="header"/>
<menulist>
<menupopup type="select-account" class="lpadding5" statustext="If a type has a group owner, all entries of that type will be owned by the given group and NOT the user who created it!" id="group_owner" options="None,groups"/>
</menulist>
</hbox>
</row>
<row>
<hbox span="all">
<button label="Save" id="button[save]" statustext="saves the changes made and leaves"/>
<button label="Apply" id="button[apply]" statustext="apply the changes"/>
<button label="Cancel" id="button[cancel]" statustext="leaves without saveing"/>
<button statustext="saves the changes made and leaves" label="Save" id="button[save]"/>
<button statustext="apply the changes" label="Apply" id="button[apply]"/>
<button statustext="leaves without saveing" label="Cancel" id="button[cancel]"/>
</hbox>
</row>
</rows>