Skip to content

Commit 222ea21

Browse files
author
cfoe
committed
standard sorting by main characteristic for most lists
1 parent 14b91f5 commit 222ea21

23 files changed

+226
-236
lines changed

interface/web/client/client_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function onShowEnd() {
101101

102102
global $app;
103103

104-
$sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a'";
104+
$sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a' ORDER BY template_name ASC";
105105
$tpls = $app->db->queryAllRecords($sql);
106106
$option = '';
107107
$tpl = array();

interface/web/client/client_template_list.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
4545

4646
$app->uses('listform_actions');
47+
$app->listform_actions->SQLOrderBy = 'ORDER BY template_name';
4748
$app->listform_actions->onLoad();
4849
?>

interface/web/client/form/client.tform.php

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
3939
*/
4040

41-
$form["title"] = "Client";
42-
$form["description"] = "";
43-
$form["name"] = "client";
44-
$form["action"] = "client_edit.php";
45-
$form["db_table"] = "client";
41+
$form["title"] = "Client";
42+
$form["description"] = "";
43+
$form["name"] = "client";
44+
$form["action"] = "client_edit.php";
45+
$form["db_table"] = "client";
4646
$form["db_table_idx"] = "client_id";
47-
$form["db_history"] = "yes";
47+
$form["db_history"] = "yes";
4848
$form["tab_default"] = "address";
4949
$form["list_default"] = "client_list.php";
50-
$form["auth"] = 'yes';
50+
$form["auth"] = 'yes';
5151

5252
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
5353
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
@@ -101,9 +101,9 @@
101101
'contact_name' => array (
102102
'datatype' => 'VARCHAR',
103103
'formtype' => 'TEXT',
104-
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
105-
'errmsg'=> 'contact_error_empty'),
106-
),
104+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
105+
'errmsg'=> 'contact_error_empty'),
106+
),
107107
'default' => '',
108108
'value' => '',
109109
'separator' => '',
@@ -129,19 +129,19 @@
129129
'datatype' => 'VARCHAR',
130130
'formtype' => 'TEXT',
131131
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
132-
'errmsg'=> 'username_error_empty'),
133-
1 => array ( 'type' => 'CUSTOM',
134-
'class' => 'validate_client',
135-
'function' => 'username_unique',
136-
'errmsg'=> 'username_error_unique'),
137-
2 => array ( 'type' => 'CUSTOM',
138-
'class' => 'validate_client',
139-
'function' => 'username_collision',
140-
'errmsg'=> 'username_error_collision'),
141-
3 => array ( 'type' => 'REGEX',
142-
'regex' => '/^[\w\.\-\_]{0,64}$/',
143-
'errmsg'=> 'username_error_regex'),
144-
),
132+
'errmsg'=> 'username_error_empty'),
133+
1 => array ( 'type' => 'CUSTOM',
134+
'class' => 'validate_client',
135+
'function' => 'username_unique',
136+
'errmsg'=> 'username_error_unique'),
137+
2 => array ( 'type' => 'CUSTOM',
138+
'class' => 'validate_client',
139+
'function' => 'username_collision',
140+
'errmsg'=> 'username_error_collision'),
141+
3 => array ( 'type' => 'REGEX',
142+
'regex' => '/^[\w\.\-\_]{0,64}$/',
143+
'errmsg'=> 'username_error_regex'),
144+
),
145145
'default' => '',
146146
'value' => '',
147147
'separator' => '',
@@ -235,14 +235,13 @@
235235
),
236236
'country' => array (
237237
'datatype' => 'VARCHAR',
238-
239238
'formtype' => 'SELECT',
240239
'default' => (isset($conf['language']) ? strtoupper($conf['language']) : ''),
241-
'datasource' => array ( 'type' => 'SQL',
242-
'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
243-
'keyfield'=> 'iso',
244-
'valuefield'=> 'printable_name'
245-
),
240+
'datasource' => array ( 'type' => 'SQL',
241+
'querystring' => 'SELECT iso,printable_name FROM country ORDER BY iso ASC',
242+
'keyfield' => 'iso',
243+
'valuefield' => 'printable_name'
244+
),
246245
'value' => ''
247246
),
248247
'telephone' => array (

interface/web/client/list/client.list.php

Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414

1515
// Name of the list
16-
$liste["name"] = "clients";
16+
$liste["name"] = "clients";
1717

1818
// Database table
19-
$liste["table"] = "client";
19+
$liste["table"] = "client";
2020

2121
// Index index field of the database table
22-
$liste["table_idx"] = "client_id";
22+
$liste["table_idx"] = "client_id";
2323

2424
// Search Field Prefix
2525
$liste["search_prefix"] = "search_";
@@ -28,10 +28,10 @@
2828
$liste["records_per_page"] = "15";
2929

3030
// Script File of the list
31-
$liste["file"] = "client_list.php";
31+
$liste["file"] = "client_list.php";
3232

3333
// Script file of the edit form
34-
$liste["edit_file"] = "client_edit.php";
34+
$liste["edit_file"] = "client_edit.php";
3535

3636
// Script File of the delete script
3737
$liste["delete_file"] = "client_del.php";
@@ -40,66 +40,65 @@
4040
$liste["paging_tpl"] = "templates/paging.tpl.htm";
4141

4242
// Enable authe
43-
$liste["auth"] = "yes";
43+
$liste["auth"] = "yes";
4444

4545

4646
/*****************************************************
4747
* Suchfelder
4848
*****************************************************/
4949

50-
$liste["item"][] = array( 'field' => "client_id",
51-
'datatype' => "INTEGER",
52-
'formtype' => "TEXT",
53-
'op' => "=",
54-
'prefix' => "",
55-
'suffix' => "",
56-
'width' => "",
57-
'value' => "");
58-
59-
$liste["item"][] = array( 'field' => "company_name",
60-
'datatype' => "VARCHAR",
61-
'formtype' => "TEXT",
62-
'op' => "like",
63-
'prefix' => "%",
64-
'suffix' => "%",
65-
'width' => "",
66-
'value' => "");
67-
68-
$liste["item"][] = array( 'field' => "contact_name",
69-
'datatype' => "VARCHAR",
70-
'formtype' => "TEXT",
71-
'op' => "like",
72-
'prefix' => "%",
73-
'suffix' => "%",
74-
'width' => "",
75-
'value' => "");
76-
77-
$liste["item"][] = array( 'field' => "username",
78-
'datatype' => "VARCHAR",
79-
'formtype' => "TEXT",
80-
'op' => "like",
81-
'prefix' => "%",
82-
'suffix' => "%",
83-
'width' => "",
84-
'value' => "");
85-
86-
$liste["item"][] = array( 'field' => "city",
87-
'datatype' => "VARCHAR",
88-
'formtype' => "TEXT",
89-
'op' => "like",
90-
'prefix' => "%",
91-
'suffix' => "%",
92-
'width' => "",
93-
'value' => "");
94-
95-
$liste["item"][] = array( 'field' => "country",
96-
'datatype' => "VARCHAR",
97-
'formtype' => "TEXT",
98-
'op' => "like",
99-
'prefix' => "%",
100-
'suffix' => "%",
101-
'width' => "",
102-
'value' => "");
103-
50+
$liste["item"][] = array( 'field' => "client_id",
51+
'datatype' => "INTEGER",
52+
'formtype' => "TEXT",
53+
'op' => "=",
54+
'prefix' => "",
55+
'suffix' => "",
56+
'width' => "",
57+
'value' => "");
58+
59+
$liste["item"][] = array( 'field' => "company_name",
60+
'datatype' => "VARCHAR",
61+
'formtype' => "TEXT",
62+
'op' => "like",
63+
'prefix' => "%",
64+
'suffix' => "%",
65+
'width' => "",
66+
'value' => "");
67+
68+
$liste["item"][] = array( 'field' => "contact_name",
69+
'datatype' => "VARCHAR",
70+
'formtype' => "TEXT",
71+
'op' => "like",
72+
'prefix' => "%",
73+
'suffix' => "%",
74+
'width' => "",
75+
'value' => "");
76+
77+
$liste["item"][] = array( 'field' => "username",
78+
'datatype' => "VARCHAR",
79+
'formtype' => "TEXT",
80+
'op' => "like",
81+
'prefix' => "%",
82+
'suffix' => "%",
83+
'width' => "",
84+
'value' => "");
85+
86+
$liste["item"][] = array( 'field' => "city",
87+
'datatype' => "VARCHAR",
88+
'formtype' => "TEXT",
89+
'op' => "like",
90+
'prefix' => "%",
91+
'suffix' => "%",
92+
'width' => "",
93+
'value' => "");
94+
95+
$liste["item"][] = array( 'field' => "country",
96+
'datatype' => "VARCHAR",
97+
'formtype' => "SELECT",
98+
'op' => "=",
99+
'prefix' => "",
100+
'suffix' => "",
101+
'width' => "",
102+
'value' => "");
104103

105104
?>

interface/web/client/list/reseller.list.php

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414

1515
// Name of the list
16-
$liste["name"] = "resellers";
16+
$liste["name"] = "resellers";
1717

1818
// Database table
19-
$liste["table"] = "client";
19+
$liste["table"] = "client";
2020

2121
// Index index field of the database table
22-
$liste["table_idx"] = "client_id";
22+
$liste["table_idx"] = "client_id";
2323

2424
// Search Field Prefix
2525
$liste["search_prefix"] = "search_";
@@ -28,10 +28,10 @@
2828
$liste["records_per_page"] = "15";
2929

3030
// Script File of the list
31-
$liste["file"] = "reseller_list.php";
31+
$liste["file"] = "reseller_list.php";
3232

3333
// Script file of the edit form
34-
$liste["edit_file"] = "reseller_edit.php";
34+
$liste["edit_file"] = "reseller_edit.php";
3535

3636
// Script File of the delete script
3737
$liste["delete_file"] = "reseller_del.php";
@@ -40,57 +40,56 @@
4040
$liste["paging_tpl"] = "templates/paging.tpl.htm";
4141

4242
// Enable authe
43-
$liste["auth"] = "yes";
43+
$liste["auth"] = "yes";
4444

4545

4646
/*****************************************************
4747
* Suchfelder
4848
*****************************************************/
4949

50-
$liste["item"][] = array( 'field' => "client_id",
51-
'datatype' => "INTEGER",
52-
'formtype' => "TEXT",
53-
'op' => "=",
54-
'prefix' => "",
55-
'suffix' => "",
56-
'width' => "",
57-
'value' => "");
58-
59-
$liste["item"][] = array( 'field' => "company_name",
60-
'datatype' => "VARCHAR",
61-
'formtype' => "TEXT",
62-
'op' => "like",
63-
'prefix' => "%",
64-
'suffix' => "%",
65-
'width' => "",
66-
'value' => "");
67-
68-
$liste["item"][] = array( 'field' => "contact_name",
69-
'datatype' => "VARCHAR",
70-
'formtype' => "TEXT",
71-
'op' => "like",
72-
'prefix' => "%",
73-
'suffix' => "%",
74-
'width' => "",
75-
'value' => "");
76-
77-
$liste["item"][] = array( 'field' => "city",
78-
'datatype' => "VARCHAR",
79-
'formtype' => "TEXT",
80-
'op' => "like",
81-
'prefix' => "%",
82-
'suffix' => "%",
83-
'width' => "",
84-
'value' => "");
85-
86-
$liste["item"][] = array( 'field' => "country",
87-
'datatype' => "VARCHAR",
88-
'formtype' => "TEXT",
89-
'op' => "like",
90-
'prefix' => "%",
91-
'suffix' => "%",
92-
'width' => "",
93-
'value' => "");
94-
50+
$liste["item"][] = array( 'field' => "client_id",
51+
'datatype' => "INTEGER",
52+
'formtype' => "TEXT",
53+
'op' => "=",
54+
'prefix' => "",
55+
'suffix' => "",
56+
'width' => "",
57+
'value' => "");
58+
59+
$liste["item"][] = array( 'field' => "company_name",
60+
'datatype' => "VARCHAR",
61+
'formtype' => "TEXT",
62+
'op' => "like",
63+
'prefix' => "%",
64+
'suffix' => "%",
65+
'width' => "",
66+
'value' => "");
67+
68+
$liste["item"][] = array( 'field' => "contact_name",
69+
'datatype' => "VARCHAR",
70+
'formtype' => "TEXT",
71+
'op' => "like",
72+
'prefix' => "%",
73+
'suffix' => "%",
74+
'width' => "",
75+
'value' => "");
76+
77+
$liste["item"][] = array( 'field' => "city",
78+
'datatype' => "VARCHAR",
79+
'formtype' => "TEXT",
80+
'op' => "like",
81+
'prefix' => "%",
82+
'suffix' => "%",
83+
'width' => "",
84+
'value' => "");
85+
86+
$liste["item"][] = array( 'field' => "country",
87+
'datatype' => "VARCHAR",
88+
'formtype' => "SELECT",
89+
'op' => "=",
90+
'prefix' => "",
91+
'suffix' => "",
92+
'width' => "",
93+
'value' => "");
9594

9695
?>

0 commit comments

Comments
 (0)