fix not resized tabs in site-config, if app's config.xet already had a tab-widget

This commit is contained in:
ralf 2024-08-08 19:52:27 +02:00
parent f7bf94404e
commit 09153c0074
2 changed files with 32 additions and 15 deletions

View File

@ -270,6 +270,7 @@ class admin_config
'tabs2' => $_content['tabs2'] ?: $_GET['tab'] ?? '',
'template' => $appname.'.config',
'newsettings' => array(),
'need_tab' => strpos(file_get_contents(EGW_SERVER_ROOT.'/'.$appname.'/templates/default/config.xet'), '<tabpanels>') === false,
);
// $app.config is looping eg. <select onchange="1"
@ -299,4 +300,4 @@ class admin_config
$method = (get_called_class() == __CLASS__) ? 'admin.admin_config.index' : "$appname.".get_called_class().'.'.__FUNCTION__;
$tmpl->exec($method, $content, $sel_options, $readonlys, array('appname' => $appname));
}
}
}

View File

@ -2,19 +2,35 @@
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
<overlay>
<template id="admin.site-config" template="" lang="" group="0" version="16.1">
<et2-description value="Site configuration" class="subHeader"></et2-description>
<et2-tabbox id="tabs2" width="100%">
<tabs>
<tab id="config" label="Configuration"/>
</tabs>
<tabpanels>
<template template="@template" width="99%"/>
</tabpanels>
</et2-tabbox>
<et2-hbox class="dialogFooterToolbar">
<et2-button id="save" label="Save"></et2-button>
<et2-button id="apply" label="Apply"></et2-button>
<et2-button id="cancel" label="Cancel"></et2-button>
</et2-hbox>
<grid width="100%">
<columns>
<column/>
</columns>
<rows>
<row>
<et2-description value="Site configuration" class="subHeader"></et2-description>
</row>
<row disabled="@need_tab">
<template template="@template" width="99%"/>
</row>
<row disabled="!@need_tab">
<et2-tabbox id="tabs2" width="100%">
<tabs>
<tab id="config" label="Configuration"/>
</tabs>
<tabpanels>
<template template="@template" width="99%"/>
</tabpanels>
</et2-tabbox>
</row>
<row class="dialogFooterToolbar">
<et2-hbox>
<et2-button id="save" label="Save"></et2-button>
<et2-button id="apply" label="Apply"></et2-button>
<et2-button id="cancel" label="Cancel"></et2-button>
</et2-hbox>
</row>
</rows>
</grid>
</template>
</overlay>