forked from extern/egroupware
Home: Fix birthdays lost range option
This commit is contained in:
parent
10fc2390f6
commit
0f1866eb19
@ -417,10 +417,10 @@ export class Et2Portlet extends Et2Widget(SlCard)
|
||||
{
|
||||
let content = this.portletProperties;
|
||||
|
||||
// Add values, but skip any lingering properties
|
||||
// Add values, but skip any duplicate properties
|
||||
Object.keys(this.settings).forEach(k =>
|
||||
{
|
||||
if(typeof k == "string" && isNaN(parseInt(k)))
|
||||
if(typeof k == "string" && isNaN(parseInt(k)) || content.filter(v => v.name == this.settings[k].name).length == 0)
|
||||
{
|
||||
content[k] = this.settings[k];
|
||||
}
|
||||
|
@ -177,8 +177,8 @@ use EGroupware\Api\Etemplate;
|
||||
|
||||
$properties[] = array(
|
||||
'name' => 'days',
|
||||
'type' => 'et2-selectbox',
|
||||
'label' => '',
|
||||
'type' => 'et2-select',
|
||||
'label' => 'Birthdays',
|
||||
'default' => 3,
|
||||
'select_options' => array(
|
||||
1 => lang('Yes, for today and tomorrow'),
|
||||
|
@ -189,35 +189,6 @@ class home_link_portlet extends home_portlet
|
||||
$etemplate->exec('home.home_link_portlet.exec',$content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of settings to customize the portlet.
|
||||
*
|
||||
* Settings should be in the same style as for preferences. It is OK to return an empty array
|
||||
* for no customizable settings.
|
||||
*
|
||||
* These should be already translated, no further Api\Translation will be done.
|
||||
*
|
||||
* @see preferences/inc/class.preferences_settings.inc.php
|
||||
* @return Array of settings. Each setting should have the following keys:
|
||||
* - name: Internal reference
|
||||
* - type: Widget type for editing
|
||||
* - label: Human name
|
||||
* - help: Description of the setting, and what it does
|
||||
* - default: Default value, for when it's not set yet
|
||||
*/
|
||||
public function get_properties()
|
||||
{
|
||||
$properties = parent::get_properties();
|
||||
|
||||
$properties[] = array(
|
||||
'name' => 'entry',
|
||||
'type' => 'link-entry',
|
||||
'label' => lang('Entry'),
|
||||
'size' => ''
|
||||
);
|
||||
return $properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of allowable actions for the portlet.
|
||||
*
|
||||
|
@ -200,7 +200,7 @@ class home_ui
|
||||
$settings = $portlet->get_properties();
|
||||
foreach($settings as $key => $setting)
|
||||
{
|
||||
if(is_array($setting) && !array_key_exists('type', $setting) || is_numeric($key))
|
||||
if(is_array($setting) && !array_key_exists('type', $setting))
|
||||
{
|
||||
unset($settings[$key]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user