mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Add save & cancel buttons, they re-direct to selected app's index
This commit is contained in:
parent
7e2b648590
commit
b4703be700
@ -63,12 +63,12 @@ class preferences_settings
|
||||
if ($content['button'])
|
||||
{
|
||||
list($button) = each($content['button']);
|
||||
$appname = $content['old_appname'] ? $content['old_appname'] : 'common';
|
||||
switch($button)
|
||||
{
|
||||
case 'save':
|
||||
case 'apply':
|
||||
// ToDo: save preferences
|
||||
$appname = $content['old_appname'] ? $content['old_appname'] : 'common';
|
||||
list($type,$account_id) = explode(':', $content['old_type']);
|
||||
// merge prefs of all tabs together again
|
||||
$prefs = array();
|
||||
@ -92,6 +92,21 @@ class preferences_settings
|
||||
$msg = lang('Preferences saved.');
|
||||
}
|
||||
}
|
||||
if(in_array($button, array('save','cancel')))
|
||||
{
|
||||
if($appname != 'common')
|
||||
{
|
||||
egw_framework::redirect_link(
|
||||
egw_framework::link('/index.php'),
|
||||
egw_link::get_registry($appname, 'index')
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
egw_framework::window_close();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
$appname = $content['appname'] ? $content['appname'] : 'common';
|
||||
list($type,$account_id) = explode(':', $content['type']);
|
||||
|
@ -36,6 +36,8 @@
|
||||
<template id="preferences.settings.tab1" content="tab1"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
<button label="Save" id="button[save]"/>
|
||||
<button label="Apply" id="button[apply]"/>
|
||||
<button label="Cancel" id="button[cancel]"/>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user