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'] ?? '', 'tabs2' => $_content['tabs2'] ?: $_GET['tab'] ?? '',
'template' => $appname.'.config', 'template' => $appname.'.config',
'newsettings' => array(), '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" // $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__; $method = (get_called_class() == __CLASS__) ? 'admin.admin_config.index' : "$appname.".get_called_class().'.'.__FUNCTION__;
$tmpl->exec($method, $content, $sel_options, $readonlys, array('appname' => $appname)); $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"> <!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
<overlay> <overlay>
<template id="admin.site-config" template="" lang="" group="0" version="16.1"> <template id="admin.site-config" template="" lang="" group="0" version="16.1">
<et2-description value="Site configuration" class="subHeader"></et2-description> <grid width="100%">
<et2-tabbox id="tabs2" width="100%"> <columns>
<tabs> <column/>
<tab id="config" label="Configuration"/> </columns>
</tabs> <rows>
<tabpanels> <row>
<template template="@template" width="99%"/> <et2-description value="Site configuration" class="subHeader"></et2-description>
</tabpanels> </row>
</et2-tabbox> <row disabled="@need_tab">
<et2-hbox class="dialogFooterToolbar"> <template template="@template" width="99%"/>
<et2-button id="save" label="Save"></et2-button> </row>
<et2-button id="apply" label="Apply"></et2-button> <row disabled="!@need_tab">
<et2-button id="cancel" label="Cancel"></et2-button> <et2-tabbox id="tabs2" width="100%">
</et2-hbox> <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> </template>
</overlay> </overlay>