Skip to content

Commit bba5a3b

Browse files
author
cfoe
committed
added first revision of theme settings in admin module
1 parent 3735535 commit bba5a3b

17 files changed

+172
-453
lines changed

interface/web/admin/form/system_config.tform.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -252,30 +252,6 @@
252252
)
253253
);
254254

255-
/* TODO_ BEGIN: Branding
256-
257-
$form["tabs"]['domains'] = array (
258-
'title' => "Branding",
259-
'width' => 70,
260-
'template' => "templates/system_config_branding_edit.htm",
261-
'fields' => array (
262-
##################################
263-
# Begin Datatable fields
264-
##################################
265-
'logo' => array (
266-
'datatype' => 'VARCHAR',
267-
'formtype' => 'TEXT',
268-
'default' => 'themes/default/images/header_logo.png',
269-
'value' => ''
270-
),
271-
##################################
272-
# ENDE Datatable fields
273-
##################################
274-
)
275-
);
276-
277-
278-
END: Branding */
279255
$form["tabs"]['misc'] = array (
280256
'title' => "Misc",
281257
'width' => 70,

interface/web/admin/form/tpl_default_admin.tform.php renamed to interface/web/admin/form/tpl_default-v2.tform.php

Lines changed: 22 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
6060
*/
6161

62-
$form["title"] = "tpl_default_admin_head_txt";
63-
$form["description"] = "tpl_default_admin_desc_txt";
64-
$form["name"] = "tpl_default_admin";
65-
$form["action"] = "tpl_default_admin.php";
66-
$form["db_table"] = "server_php";
67-
$form["db_table_idx"] = "server_php_id";
62+
$form["title"] = "tpl_default-v2_head_txt";
63+
$form["description"] = "tpl_default-v2_desc_txt";
64+
$form["name"] = "tpl_default-v2";
65+
$form["action"] = "tpl_default-v2.php";
66+
$form["db_table"] = "default-v2";
67+
$form["db_table_idx"] = "var_id";
6868
$form["db_history"] = "yes";
69-
$form["tab_default"] = "php_name";
70-
$form["list_default"] = "server_php_list.php";
69+
$form["tab_default"] = "basic";
70+
$form["list_default"] = "system_config_edit.php";
7171
$form["auth"] = 'yes';
7272

7373
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
@@ -76,42 +76,28 @@
7676
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
7777
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
7878

79-
$form["tabs"]['php_name'] = array (
80-
'title' => "Name",
79+
$form["tabs"]['basic'] = array (
80+
'title' => "Basic Settings",
8181
'width' => 80,
82-
'template' => "templates/server_php_name_edit.htm",
82+
'template' => "templates/tpl_default-v2_basic.htm",
8383
'fields' => array (
8484
##################################
8585
# Beginn Datenbankfelder
8686
##################################
87-
'server_id' => array (
88-
'datatype' => 'INTEGER',
89-
'formtype' => 'SELECT',
90-
'default' => '',
91-
'datasource' => array ( 'type' => 'SQL',
92-
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
93-
'keyfield'=> 'server_id',
94-
'valuefield'=> 'server_name'
95-
),
96-
'value' => ''
97-
),
98-
'client_id' => array (
99-
'datatype' => 'INTEGER',
100-
'formtype' => 'SELECT',
101-
'default' => '',
102-
'datasource' => array ( 'type' => 'SQL',
103-
'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
104-
'keyfield'=> 'client_id',
105-
'valuefield'=> 'name'
106-
),
107-
'value' => array(0 => ' ')
87+
'username' => array (
88+
'datatype' => 'VARCHAR',
89+
'formtype' => 'TEXT',
90+
'validators' => '',
91+
'default' => 'global',
92+
'value' => 'global',
93+
'separator' => '',
94+
'width' => '40',
95+
'maxlength' => '64'
10896
),
109-
'name' => array (
97+
'logo_url' => array (
11098
'datatype' => 'VARCHAR',
11199
'formtype' => 'TEXT',
112-
'validators' => array(0 => array('type' => 'NOTEMPTY',
113-
'errmsg' => 'server_php_name_error_empty'),
114-
),
100+
'validators' => '',
115101
'default' => '',
116102
'value' => '',
117103
'separator' => '',
@@ -124,71 +110,4 @@
124110
)
125111
);
126112

127-
$form["tabs"]['php_fastcgi'] = array(
128-
'title' => "FastCGI Settings",
129-
'width' => 80,
130-
'template' => "templates/server_php_fastcgi_edit.htm",
131-
'fields' => array(
132-
##################################
133-
# Begin Datatable fields
134-
##################################
135-
'php_fastcgi_binary' => array(
136-
'datatype' => 'VARCHAR',
137-
'formtype' => 'TEXT',
138-
'default' => '',
139-
'value' => '',
140-
'width' => '40',
141-
'maxlength' => '255'
142-
),
143-
'php_fastcgi_ini_dir' => array(
144-
'datatype' => 'VARCHAR',
145-
'formtype' => 'TEXT',
146-
'default' => '',
147-
'value' => '',
148-
'width' => '40',
149-
'maxlength' => '255'
150-
),
151-
##################################
152-
# ENDE Datatable fields
153-
##################################
154-
)
155-
);
156-
157-
$form["tabs"]['php_fpm'] = array(
158-
'title' => "PHP-FPM Settings",
159-
'width' => 80,
160-
'template' => "templates/server_php_fpm_edit.htm",
161-
'fields' => array(
162-
##################################
163-
# Begin Datatable fields
164-
##################################
165-
'php_fpm_init_script' => array(
166-
'datatype' => 'VARCHAR',
167-
'formtype' => 'TEXT',
168-
'default' => '',
169-
'value' => '',
170-
'width' => '40',
171-
'maxlength' => '255'
172-
),
173-
'php_fpm_ini_dir' => array(
174-
'datatype' => 'VARCHAR',
175-
'formtype' => 'TEXT',
176-
'default' => '',
177-
'value' => '',
178-
'width' => '40',
179-
'maxlength' => '255'
180-
),
181-
'php_fpm_pool_dir' => array(
182-
'datatype' => 'VARCHAR',
183-
'formtype' => 'TEXT',
184-
'default' => '',
185-
'value' => '',
186-
'width' => '40',
187-
'maxlength' => '255'
188-
),
189-
##################################
190-
# ENDE Datatable fields
191-
##################################
192-
)
193-
);
194113
?>

interface/web/admin/form/tpl_default-v2_admin.tform.php renamed to interface/web/admin/form/tpl_default.tform.php

Lines changed: 22 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
6060
*/
6161

62-
$form["title"] = "tpl_default-v2_admin_head_txt";
63-
$form["description"] = "tpl_default-v2_admin_desc_txt";
64-
$form["name"] = "tpl_default-v2_admin";
65-
$form["action"] = "tpl_default-v2_admin.php";
66-
$form["db_table"] = "server_php";
67-
$form["db_table_idx"] = "server_php_id";
62+
$form["title"] = "tpl_default_head_txt";
63+
$form["description"] = "tpl_default_desc_txt";
64+
$form["name"] = "tpl_default";
65+
$form["action"] = "tpl_default.php";
66+
$form["db_table"] = "default";
67+
$form["db_table_idx"] = "var_id";
6868
$form["db_history"] = "yes";
69-
$form["tab_default"] = "php_name";
70-
$form["list_default"] = "server_php_list.php";
69+
$form["tab_default"] = "basic";
70+
$form["list_default"] = "system_config_edit.php";
7171
$form["auth"] = 'yes';
7272

7373
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
@@ -76,42 +76,28 @@
7676
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
7777
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
7878

79-
$form["tabs"]['php_name'] = array (
80-
'title' => "Name",
79+
$form["tabs"]['basic'] = array (
80+
'title' => "Basic Settings",
8181
'width' => 80,
82-
'template' => "templates/server_php_name_edit.htm",
82+
'template' => "templates/tpl_default_basic.htm",
8383
'fields' => array (
8484
##################################
8585
# Beginn Datenbankfelder
8686
##################################
87-
'server_id' => array (
88-
'datatype' => 'INTEGER',
89-
'formtype' => 'SELECT',
90-
'default' => '',
91-
'datasource' => array ( 'type' => 'SQL',
92-
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
93-
'keyfield'=> 'server_id',
94-
'valuefield'=> 'server_name'
95-
),
96-
'value' => ''
97-
),
98-
'client_id' => array (
99-
'datatype' => 'INTEGER',
100-
'formtype' => 'SELECT',
101-
'default' => '',
102-
'datasource' => array ( 'type' => 'SQL',
103-
'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
104-
'keyfield'=> 'client_id',
105-
'valuefield'=> 'name'
106-
),
107-
'value' => array(0 => ' ')
87+
'username' => array (
88+
'datatype' => 'VARCHAR',
89+
'formtype' => 'TEXT',
90+
'validators' => '',
91+
'default' => 'global',
92+
'value' => 'global',
93+
'separator' => '',
94+
'width' => '40',
95+
'maxlength' => '64'
10896
),
109-
'name' => array (
97+
'logo_url' => array (
11098
'datatype' => 'VARCHAR',
11199
'formtype' => 'TEXT',
112-
'validators' => array(0 => array('type' => 'NOTEMPTY',
113-
'errmsg' => 'server_php_name_error_empty'),
114-
),
100+
'validators' => '',
115101
'default' => '',
116102
'value' => '',
117103
'separator' => '',
@@ -124,71 +110,4 @@
124110
)
125111
);
126112

127-
$form["tabs"]['php_fastcgi'] = array(
128-
'title' => "FastCGI Settings",
129-
'width' => 80,
130-
'template' => "templates/server_php_fastcgi_edit.htm",
131-
'fields' => array(
132-
##################################
133-
# Begin Datatable fields
134-
##################################
135-
'php_fastcgi_binary' => array(
136-
'datatype' => 'VARCHAR',
137-
'formtype' => 'TEXT',
138-
'default' => '',
139-
'value' => '',
140-
'width' => '40',
141-
'maxlength' => '255'
142-
),
143-
'php_fastcgi_ini_dir' => array(
144-
'datatype' => 'VARCHAR',
145-
'formtype' => 'TEXT',
146-
'default' => '',
147-
'value' => '',
148-
'width' => '40',
149-
'maxlength' => '255'
150-
),
151-
##################################
152-
# ENDE Datatable fields
153-
##################################
154-
)
155-
);
156-
157-
$form["tabs"]['php_fpm'] = array(
158-
'title' => "PHP-FPM Settings",
159-
'width' => 80,
160-
'template' => "templates/server_php_fpm_edit.htm",
161-
'fields' => array(
162-
##################################
163-
# Begin Datatable fields
164-
##################################
165-
'php_fpm_init_script' => array(
166-
'datatype' => 'VARCHAR',
167-
'formtype' => 'TEXT',
168-
'default' => '',
169-
'value' => '',
170-
'width' => '40',
171-
'maxlength' => '255'
172-
),
173-
'php_fpm_ini_dir' => array(
174-
'datatype' => 'VARCHAR',
175-
'formtype' => 'TEXT',
176-
'default' => '',
177-
'value' => '',
178-
'width' => '40',
179-
'maxlength' => '255'
180-
),
181-
'php_fpm_pool_dir' => array(
182-
'datatype' => 'VARCHAR',
183-
'formtype' => 'TEXT',
184-
'default' => '',
185-
'value' => '',
186-
'width' => '40',
187-
'maxlength' => '255'
188-
),
189-
##################################
190-
# ENDE Datatable fields
191-
##################################
192-
)
193-
);
194113
?>

interface/web/admin/lib/interface.d/tpl_default-v2.menu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
$items[] = array( 'title' => 'Default-v2 Theme',
44
'target' => 'content',
5-
'link' => 'admin/tpl_default-v2_admin.php',
6-
'html_id' => 'tpl_default-v2_admin');
5+
'link' => 'admin/tpl_default-v2.php',
6+
'html_id' => 'tpl_default-v2');
77
?>

interface/web/admin/lib/interface.d/tpl_default.menu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
$items[] = array( 'title' => 'Default Theme',
44
'target' => 'content',
5-
'link' => 'admin/tpl_default_admin.php',
6-
'html_id' => 'tpl_default_admin');
5+
'link' => 'admin/tpl_default.php',
6+
'html_id' => 'tpl_default');
77
?>

interface/web/admin/templates/system_config_branding_edit.htm

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)