Skip to content

Commit 5076ce9

Browse files
author
Marius Burkard
committed
- removed inline-styling from list files for active/inactive switches
- fixed escaping in lists
1 parent 2e2f1dc commit 5076ce9

Some content is hidden

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

51 files changed

+71
-68
lines changed

interface/lib/classes/listform_actions.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ public function prepareDataRow($rec)
180180
$rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png';
181181
}
182182
//* substitute value for select field
183-
$rec[$key] = $app->functions->htmlentities(@$field['value'][$rec[$key]]);
183+
if(isset($field['datasource']) && $field['datasource']) $rec[$key] = $app->functions->htmlentities(@$field['value'][$rec[$key]]);
184+
else $rec[$key] = @$field['value'][$rec[$key]];
184185
}
185186
}
186187
}

interface/web/admin/list/directive_snippets.list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'prefix' => "",
5555
'suffix' => "",
5656
'width' => "",
57-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
57+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
5858

5959

6060
$liste["item"][] = array( 'field' => "name",
@@ -82,7 +82,7 @@
8282
'prefix' => "",
8383
'suffix' => "",
8484
'width' => "",
85-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
85+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
8686

8787
$liste["item"][] = array( 'field' => "master_directive_snippets_id",
8888
'datatype' => "BOOLEAN",

interface/web/admin/list/firewall.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'prefix' => "",
5555
'suffix' => "",
5656
'width' => "",
57-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
57+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
5858

5959
$liste["item"][] = array( 'field' => "server_id",
6060
'datatype' => "VARCHAR",

interface/web/admin/list/iptables.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'prefix' => "",
1919
'suffix' => "",
2020
'width' => "",
21-
'value' => array("y" => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", "n" => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
21+
'value' => array("y" => $app->lng('yes_txt'), "n" => $app->lng('no_txt')));
2222

2323
$liste["item"][] = array( 'field' => "server_id",
2424
'datatype' => "INTEGER",

interface/web/admin/list/server.list.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
'prefix' => '%',
6464
'suffix' => '%',
6565
'width' => '',
66-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
66+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
6767

6868
$liste['item'][] = array( 'field' => 'web_server',
6969
'datatype' => 'VARCHAR',
@@ -72,7 +72,7 @@
7272
'prefix' => '%',
7373
'suffix' => '%',
7474
'width' => '',
75-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
75+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
7676

7777
$liste['item'][] = array( 'field' => 'dns_server',
7878
'datatype' => 'VARCHAR',
@@ -81,7 +81,7 @@
8181
'prefix' => '%',
8282
'suffix' => '%',
8383
'width' => '',
84-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
84+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
8585

8686
$liste['item'][] = array( 'field' => 'file_server',
8787
'datatype' => 'VARCHAR',
@@ -90,7 +90,7 @@
9090
'prefix' => '%',
9191
'suffix' => '%',
9292
'width' => '',
93-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
93+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
9494

9595
$liste['item'][] = array( 'field' => 'db_server',
9696
'datatype' => 'VARCHAR',
@@ -99,7 +99,7 @@
9999
'prefix' => '%',
100100
'suffix' => '%',
101101
'width' => '',
102-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
102+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
103103

104104
$liste['item'][] = array( 'field' => 'vserver_server',
105105
'datatype' => 'VARCHAR',
@@ -108,7 +108,7 @@
108108
'prefix' => '%',
109109
'suffix' => '%',
110110
'width' => '',
111-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
111+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
112112

113113
$liste['item'][] = array( 'field' => 'xmpp_server',
114114
'datatype' => 'VARCHAR',
@@ -117,6 +117,6 @@
117117
'prefix' => '%',
118118
'suffix' => '%',
119119
'width' => '',
120-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
120+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
121121

122122
?>

interface/web/admin/list/server_ip.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
'prefix' => "",
9696
'suffix' => "",
9797
'width' => "",
98-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
98+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
9999

100100

101101
$liste['item'][] = array( 'field' => 'virtualhost_port',

interface/web/admin/list/server_ip_map.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'prefix' => "",
1919
'suffix' => "",
2020
'width' => "",
21-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
21+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
2222

2323
$liste['item'][] = array( 'field' => 'server_id',
2424
'datatype' => 'INTEGER',

interface/web/admin/list/software_repo.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'prefix' => "",
5555
'suffix' => "",
5656
'width' => "",
57-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
57+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
5858

5959
$liste["item"][] = array( 'field' => "repo_name",
6060
'datatype' => "VARCHAR",

interface/web/admin/list/users.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
'prefix' => "",
6161
'suffix' => "",
6262
'width' => "",
63-
'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
63+
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
6464

6565
$liste['item'][] = array( 'field' => 'username',
6666
'datatype' => 'VARCHAR',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
'prefix' => "",
6464
'suffix' => "",
6565
'width' => "",
66-
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
66+
'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt')));
6767

6868
$liste["item"][] = array( 'field' => "circle_name",
6969
'datatype' => "VARCHAR",

0 commit comments

Comments
 (0)