Marius Cramer
2014-08-13 42539643c396f9d8865dcf9a51b13dc869709d16
commit | author | age
d1018a 1 <?php
T 2
3 /*
4     Form Definition
5
6     Tabledefinition
7
8     Datatypes:
9     - INTEGER (Forces the input to Int)
10     - DOUBLE
11     - CURRENCY (Formats the values to currency notation)
12     - VARCHAR (no format check, maxlength: 255)
13     - TEXT (no format check)
14     - DATE (Dateformat, automatic conversion to timestamps)
15
16     Formtype:
17     - TEXT (Textfield)
18     - TEXTAREA (Textarea)
19     - PASSWORD (Password textfield, input is not shown when edited)
20     - SELECT (Select option field)
21     - RADIO
22     - CHECKBOX
23     - CHECKBOXARRAY
24     - FILE
25
26     VALUE:
27     - Wert oder Array
28
29     Hint:
30     The ID field of the database table is not part of the datafield definition.
31     The ID field must be always auto incement (int or bigint).
32
33
34 */
65ea2e 35 global $app;
d1018a 36
7fe908 37 $form["title"]    = "Email filter";
MC 38 $form["description"]  = "";
39 $form["name"]    = "mail_user_filter";
40 $form["action"]   = "mail_user_filter_edit.php";
41 $form["db_table"]  = "mail_user_filter";
42 $form["db_table_idx"] = "filter_id";
43 $form["db_history"]  = "no";
44 $form["tab_default"] = "filter";
45 $form["list_default"] = "mail_user_filter_list.php";
46 $form["auth"]   = 'yes'; // yes / no
d1018a 47
T 48 $form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
49 $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
50 $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
51 $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
04620b 52 $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
d1018a 53
T 54 $form["tabs"]['filter'] = array (
7fe908 55     'title'  => "Filter",
MC 56     'width'  => 100,
57     'template'  => "templates/mail_user_filter_edit.htm",
58     'fields'  => array (
59         //#################################
60         // Begin Datatable fields
61         //#################################
d1018a 62         'mailuser_id' => array (
7fe908 63             'datatype' => 'INTEGER',
MC 64             'formtype' => 'TEXT',
65             'default' => @$app->functions->intval($_REQUEST["mailuser_id"]),
66             'value'  => '',
67             'width'  => '30',
68             'maxlength' => '255'
d1018a 69         ),
T 70         'rulename' => array (
7fe908 71             'datatype' => 'VARCHAR',
MC 72             'formtype' => 'TEXT',
73             'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
74                     'errmsg'=> 'rulename_error_empty'),
75             ),
76             'default' => '',
77             'value'  => '',
78             'width'  => '30',
79             'maxlength' => '255'
d1018a 80         ),
T 81         'source' => array (
7fe908 82             'datatype' => 'VARCHAR',
MC 83             'formtype' => 'SELECT',
84             'default' => '',
85             'value'  => array('Subject' => 'subject_txt', 'From'=>'from_txt', 'To'=>'to_txt')
d1018a 86         ),
T 87         'op' => array (
7fe908 88             'datatype' => 'VARCHAR',
MC 89             'formtype' => 'SELECT',
90             'default' => '',
91             //'value'  => array('contains'=>'contains_txt','is' => 'Is','begins'=>'Begins with','ends'=>'Ends with')
92             'value'  => array('contains'=>'contains_txt', 'is' => 'is_txt', 'begins'=>'begins_with_txt', 'ends'=>'ends_with_txt')
d1018a 93         ),
T 94         'searchterm' => array (
7fe908 95             'datatype' => 'VARCHAR',
MC 96             'formtype' => 'TEXT',
97             'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
98                     'errmsg'=> 'searchterm_is_empty'),
99             ),
100             'default' => '',
101             'value'  => '',
102             'width'  => '30',
103             'maxlength' => '255'
d1018a 104         ),
T 105         'action' => array (
7fe908 106             'datatype' => 'VARCHAR',
MC 107             'formtype' => 'SELECT',
108             'default' => '',
109             'value'  => array('move' => 'move_to_txt', 'delete'=>'delete_txt')
d1018a 110         ),
T 111         'target' => array (
7fe908 112             'datatype' => 'VARCHAR',
MC 113             'formtype' => 'TEXT',
114             'validators' => array (  0 => array ( 'type' => 'REGEX',
95ae83 115                     'regex' => '/^[\p{Latin}0-9\.\-\_\ \&]{0,100}$/u',
7fe908 116                     'errmsg'=> 'target_error_regex'),
MC 117             ),
118             'default' => '',
119             'value'  => '',
120             'width'  => '30',
121             'maxlength' => '255'
d1018a 122         ),
T 123         'active' => array (
7fe908 124             'datatype' => 'VARCHAR',
MC 125             'formtype' => 'CHECKBOX',
126             'default' => 'y',
127             'value'  => array(0 => 'n', 1 => 'y')
d1018a 128         ),
7fe908 129         //#################################
MC 130         // ENDE Datatable fields
131         //#################################
d1018a 132     )
T 133 );
134
135
136
f49e51 137 ?>