Skip to content

Commit 11b3daf

Browse files
committed
Fixed: FS#822 - Main tabs at top not applying translations.
1 parent 94ffe9d commit 11b3daf

File tree

493 files changed

+7087
-6426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

493 files changed

+7087
-6426
lines changed

interface/lib/classes/listform_actions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function onShow()
143143
include($lng_file);
144144
$app->tpl->setVar($wb);
145145

146-
146+
$app->tpl->setVar('toolsarea_head_txt',$app->lng('toolsarea_head_txt'));
147147
$app->tpl->setVar($app->listform->wordbook);
148148
$app->tpl->setVar('form_action', $app->listform->listDef['file']);
149149

Lines changed: 138 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,139 @@
1-
<?php
2-
3-
/*
4-
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
5-
All rights reserved.
6-
7-
Redistribution and use in source and binary forms, with or without modification,
8-
are permitted provided that the following conditions are met:
9-
10-
* Redistributions of source code must retain the above copyright notice,
11-
this list of conditions and the following disclaimer.
12-
* Redistributions in binary form must reproduce the above copyright notice,
13-
this list of conditions and the following disclaimer in the documentation
14-
and/or other materials provided with the distribution.
15-
* Neither the name of ISPConfig nor the names of its contributors
16-
may be used to endorse or promote products derived from this software without
17-
specific prior written permission.
18-
19-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22-
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26-
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28-
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
*/
30-
31-
class listform_tpl_generator {
32-
33-
function buildHTML($listDef,$module = '') {
34-
35-
global $app;
36-
37-
if($module == '') $module = $_SESSION["s"]["module"]["name"];
38-
39-
$lang = array();
40-
$html = '<h2><tmpl_var name="list_head_txt"></h2>
41-
42-
<div class="panel panel_list_'.$listDef["name"].'">
43-
44-
<div class="pnl_toolsarea">
45-
<fieldset><legend>Tools</legend>
46-
<div class="buttons">
47-
<button class="iconstxt icoAdd" type="button" onClick="'."loadContent('".$module."/".$listDef["edit_file"]."');".'">
48-
<span>{tmpl_var name="add_new_record_txt"}</span>
49-
</button>
50-
</div>
51-
</fieldset>
52-
</div>
53-
54-
<div class="pnl_listarea">
55-
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
56-
<table class="list">
57-
<thead>
58-
<tr>
59-
';
60-
61-
$lang["list_head_txt"] = $listDef["name"];
62-
foreach($listDef["item"] as $field) {
63-
$key = $field["field"];
64-
$html .= " <th class=\"tbl_col_".$key."\" scope=\"col\"><tmpl_var name=\"".$key."_txt\"></th>\r\n";
65-
$lang[$key."_txt"] = $key;
66-
}
67-
68-
$html .= ' <th class="tbl_col_buttons" scope="col">&nbsp;</th>
69-
</tr>
70-
<tr>
71-
';
72-
73-
foreach($listDef["item"] as $field) {
74-
$key = $field["field"];
75-
if($field["formtype"] == 'SELECT') {
76-
$html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\r\n";
77-
} else {
78-
$html .= " <td class=\"tbl_col_".$key."\"><input type=\"text\" name=\"".$listDef["search_prefix"].$key."\" value=\"{tmpl_var name='".$listDef["search_prefix"].$key."'}\" /></td>\r\n";
79-
}
80-
}
81-
82-
$html .= ' <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="'."submitForm('pageForm','".$module."/".$listDef["file"]."');".'"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
83-
</tr>
84-
</thead>
85-
<tbody>
86-
<tmpl_loop name="records">
87-
<tr class="tbl_row_<tmpl_if name=\'__EVEN__\'}even<tmpl_else>uneven</tmpl_if>">
88-
';
89-
90-
foreach($listDef["item"] as $field) {
91-
$key = $field["field"];
92-
$html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" onClick=\"loadContent('".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}');\">{tmpl_var name=\"".$key."\"}</a></td>\r\n";
93-
}
94-
95-
$html .= " <td class=\"tbl_col_buttons\">
96-
<div class=\"buttons icons16\">
97-
<a class=\"icons16 icoDelete\" href=\"javascript: del_record('".$module."/".$listDef["delete_file"]."?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');\"><span>{tmpl_var name='delete_txt'}</span></a>
98-
</div>
99-
</td>
100-
</tr>
101-
</tmpl_loop>
102-
</tbody>";
103-
$html .= '
104-
<tfoot>
105-
<tr>
106-
<td class="tbl_footer tbl_paging" colspan="'.(count($listDef["item"])+1).'"><tmpl_var name="paging"></td>
107-
</tr>
108-
</tfoot>
109-
</table>
110-
</fieldset>
111-
</div>
112-
113-
</div>
114-
';
115-
116-
if($module == '') {
117-
$filename = 'templates/'.$listDef["name"].'_list.htm';
118-
} else {
119-
$filename = '../'.$module.'/templates/'.$listDef["name"].'_list.htm';
120-
}
121-
122-
123-
// save template
124-
if (!$handle = fopen($filename, 'w')) {
125-
print "Cannot open file ($filename)";
126-
exit;
127-
}
128-
129-
if (!fwrite($handle, $html)) {
130-
print "Cannot write to file ($filename)";
131-
exit;
132-
}
133-
fclose($handle);
134-
135-
}
136-
137-
}
138-
1+
<?php
2+
3+
/*
4+
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
class listform_tpl_generator {
32+
33+
function buildHTML($listDef,$module = '') {
34+
35+
global $app;
36+
37+
if($module == '') $module = $_SESSION["s"]["module"]["name"];
38+
39+
$lang = array();
40+
$html = '<h2><tmpl_var name="list_head_txt"></h2>
41+
42+
<div class="panel panel_list_'.$listDef["name"].'">
43+
44+
<div class="pnl_toolsarea">
45+
<fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend>
46+
<div class="buttons">
47+
<button class="iconstxt icoAdd" type="button" onClick="'."loadContent('".$module."/".$listDef["edit_file"]."');".'">
48+
<span>{tmpl_var name="add_new_record_txt"}</span>
49+
</button>
50+
</div>
51+
</fieldset>
52+
</div>
53+
54+
<div class="pnl_listarea">
55+
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
56+
<table class="list">
57+
<thead>
58+
<tr>
59+
';
60+
61+
$lang["list_head_txt"] = $listDef["name"];
62+
foreach($listDef["item"] as $field) {
63+
$key = $field["field"];
64+
$html .= " <th class=\"tbl_col_".$key."\" scope=\"col\"><tmpl_var name=\"".$key."_txt\"></th>\r\n";
65+
$lang[$key."_txt"] = $key;
66+
}
67+
68+
$html .= ' <th class="tbl_col_buttons" scope="col">&nbsp;</th>
69+
</tr>
70+
<tr>
71+
';
72+
73+
foreach($listDef["item"] as $field) {
74+
$key = $field["field"];
75+
if($field["formtype"] == 'SELECT') {
76+
$html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\r\n";
77+
} else {
78+
$html .= " <td class=\"tbl_col_".$key."\"><input type=\"text\" name=\"".$listDef["search_prefix"].$key."\" value=\"{tmpl_var name='".$listDef["search_prefix"].$key."'}\" /></td>\r\n";
79+
}
80+
}
81+
82+
$html .= ' <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="'."submitForm('pageForm','".$module."/".$listDef["file"]."');".'"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
83+
</tr>
84+
</thead>
85+
<tbody>
86+
<tmpl_loop name="records">
87+
<tr class="tbl_row_<tmpl_if name=\'__EVEN__\'}even<tmpl_else>uneven</tmpl_if>">
88+
';
89+
90+
foreach($listDef["item"] as $field) {
91+
$key = $field["field"];
92+
$html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" onClick=\"loadContent('".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}');\">{tmpl_var name=\"".$key."\"}</a></td>\r\n";
93+
}
94+
95+
$html .= " <td class=\"tbl_col_buttons\">
96+
<div class=\"buttons icons16\">
97+
<a class=\"icons16 icoDelete\" href=\"javascript: del_record('".$module."/".$listDef["delete_file"]."?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');\"><span>{tmpl_var name='delete_txt'}</span></a>
98+
</div>
99+
</td>
100+
</tr>
101+
</tmpl_loop>
102+
</tbody>";
103+
$html .= '
104+
<tfoot>
105+
<tr>
106+
<td class="tbl_footer tbl_paging" colspan="'.(count($listDef["item"])+1).'"><tmpl_var name="paging"></td>
107+
</tr>
108+
</tfoot>
109+
</table>
110+
</fieldset>
111+
</div>
112+
113+
</div>
114+
';
115+
116+
if($module == '') {
117+
$filename = 'templates/'.$listDef["name"].'_list.htm';
118+
} else {
119+
$filename = '../'.$module.'/templates/'.$listDef["name"].'_list.htm';
120+
}
121+
122+
123+
// save template
124+
if (!$handle = fopen($filename, 'w')) {
125+
print "Cannot open file ($filename)";
126+
exit;
127+
}
128+
129+
if (!fwrite($handle, $html)) {
130+
print "Cannot write to file ($filename)";
131+
exit;
132+
}
133+
fclose($handle);
134+
135+
}
136+
137+
}
138+
139139
?>

interface/lib/classes/tform.inc.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,30 @@ function checkResellerLimit($limit_name,$sql_where = '') {
12321232

12331233
return $check_passed;
12341234
}
1235+
1236+
//* get the difference record of two arrays
1237+
function getDiffRecord($record_old,$record_new) {
1238+
1239+
if(is_array($record_new) && count($record_new) > 0) {
1240+
foreach($record_new as $key => $val) {
1241+
if(@$record_old[$key] != $val) {
1242+
// Record has changed
1243+
$diffrec[$key] = array( 'old' => @$record_old[$key],
1244+
'new' => $val);
1245+
}
1246+
}
1247+
} elseif(is_array($record_old)) {
1248+
foreach($record_old as $key => $val) {
1249+
if($record_new[$key] != $val) {
1250+
// Record has changed
1251+
$diffrec[$key] = array( 'new' => $record_new[$key],
1252+
'old' => $val);
1253+
}
1254+
}
1255+
}
1256+
return $diffrec;
1257+
1258+
}
12351259

12361260
}
12371261

interface/lib/lang/bg.lng

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,13 @@ $wb['filter_txt'] = 'Filter';
2121
$wb['add_new_record_txt'] = 'Add new record';
2222
$wb['btn_save_txt'] = 'Save';
2323
$wb['btn_cancel_txt'] = 'Cancel';
24+
$wb['System'] = 'System';
25+
$wb['Client'] = 'Client';
26+
$wb['Email'] = 'Email';
27+
$wb['Monitor'] = 'Monitor';
28+
$wb['Sites'] = 'Sites';
29+
$wb['DNS'] = 'DNS';
30+
$wb['Tools'] = 'Tools';
31+
$wb['Help'] = 'Help';
32+
$wb['toolsarea_head_txt'] = 'Tools';
2433
?>

interface/lib/lang/br.lng

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,13 @@ $wb['filter_txt'] = 'Filtrar';
2121
$wb['add_new_record_txt'] = 'Adcionar novo registro';
2222
$wb['btn_save_txt'] = 'Salvar';
2323
$wb['btn_cancel_txt'] = 'Voltar';
24+
$wb['System'] = 'System';
25+
$wb['Client'] = 'Client';
26+
$wb['Email'] = 'Email';
27+
$wb['Monitor'] = 'Monitor';
28+
$wb['Sites'] = 'Sites';
29+
$wb['DNS'] = 'DNS';
30+
$wb['Tools'] = 'Tools';
31+
$wb['Help'] = 'Help';
32+
$wb['toolsarea_head_txt'] = 'Tools';
2433
?>
25-

0 commit comments

Comments
 (0)