- correct links on client-settings page
- added new server_id parameter to buildFormEx, so getFormGroupOutput will use the correct template (with correct links)
This commit is contained in:
@@ -214,7 +214,7 @@ if((int)$settings['multiserver']['enabled'] == 1)
|
||||
* @TODO this has to get the client-id so the
|
||||
* links "configuration" have the ID
|
||||
*/
|
||||
$fields = buildFormEx($settings_data, $_part);
|
||||
$fields = buildFormEx($settings_data, $_part, $id);
|
||||
|
||||
$settings_page = '';
|
||||
if($_part == '')
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* @version $Id $
|
||||
*/
|
||||
|
||||
function buildFormEx($form, $part = '')
|
||||
function buildFormEx($form, $part = '', $server_id = 0)
|
||||
{
|
||||
$fields = '';
|
||||
|
||||
@@ -28,7 +28,7 @@ function buildFormEx($form, $part = '')
|
||||
{
|
||||
if(isset($groupdetails['title']) && $groupdetails['title'] != '')
|
||||
{
|
||||
$fields .= getFormOverviewGroupOutput($groupname, $groupdetails);
|
||||
$fields .= getFormOverviewGroupOutput($groupname, $groupdetails, $server_id);
|
||||
}
|
||||
}
|
||||
// only show one section
|
||||
|
||||
@@ -24,7 +24,7 @@ function getFormGroupOutput($groupname, $groupdetails)
|
||||
return $group;
|
||||
}
|
||||
|
||||
function getFormOverviewGroupOutput($groupname, $groupdetails)
|
||||
function getFormOverviewGroupOutput($groupname, $groupdetails, $server_id = 0)
|
||||
{
|
||||
global $lng, $settings, $filename, $s;
|
||||
|
||||
@@ -81,6 +81,16 @@ function getFormOverviewGroupOutput($groupname, $groupdetails)
|
||||
}
|
||||
}
|
||||
|
||||
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
|
||||
// if the server_id is > 0 then
|
||||
// this is a client-settings page
|
||||
// and we need another template
|
||||
if($server_id > 0)
|
||||
{
|
||||
eval("\$group = \"" . getTemplate("froxlorclients/froxlorclient_settingsoverviewgroup") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
|
||||
}
|
||||
return $group;
|
||||
}
|
||||
|
||||
@@ -82,10 +82,11 @@ function loadConfigArrayDir()
|
||||
&& is_array($selection)
|
||||
&& isset($selection[0])
|
||||
) {
|
||||
$_data['groups'] = array();
|
||||
foreach($data['groups'] as $group => $data)
|
||||
{
|
||||
if(in_array($group, $selection)) {
|
||||
$_data[$group] = $data;
|
||||
$_data['groups'][$group] = $data;
|
||||
}
|
||||
}
|
||||
$data = $_data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['admin']['froxlorclient_settings']} "{$client->Get('name')}</b>
|
||||
[<a href="$filename?page=settings&part=&s=$s&id={$id}">{$lng['admin']['configfiles']['compactoverview']}</a>]</td>
|
||||
[<a href="$filename?page=clients&action=settings&part=&s=$s&id={$id}">{$lng['admin']['configfiles']['compactoverview']}</a>]</td>
|
||||
</tr>
|
||||
$fields
|
||||
<tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<tr>
|
||||
<td class="maintitle" align="center" colspan="3">
|
||||
<b><img src="images/title.gif" alt="" /> {$lng['admin']['configfiles']['serverconfiguration']}</b>
|
||||
[<a href="$filename?page=settings&part=all&s=$s&id={$id}">{$lng['admin']['configfiles']['overview']}</a>]
|
||||
[<a href="$filename?page=clients&action=settings&part=all&s=$s&id={$id}">{$lng['admin']['configfiles']['overview']}</a>]
|
||||
</td>
|
||||
</tr>
|
||||
$fields
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<tr>
|
||||
<td class="maintitle_apply_left">
|
||||
<b><img src="images/title.gif" alt="" /> {$title}</b>
|
||||
</td>
|
||||
<td class="main_field_display_small" nowrap="nowrap">{$option}</td>
|
||||
<td class="main_field_display_small" nowrap="nowrap">
|
||||
<if $activated == 1>
|
||||
<a href="$filename?page=clients&action=settings&part=$part&s=$s&id={$server_id}">{$lng['admin']['configfiles']['serverconfiguration']}</a>
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user