Api: User selection = none fixes

- Fix display was 'false' instead of blank
- Fix widget type check was not preserving original value
This commit is contained in:
nathan 2023-06-26 10:49:25 -06:00
parent faa1e17460
commit 325fdcb02c
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ export const SelectAccountMixin = <T extends Constructor<LitElement>>(superclass
// Not already cached, need to fetch it
this.egw().link_title('api-accounts', id, true).then(title =>
{
option.label = title;
option.label = title || '';
this.requestUpdate('select_options');
});
}

View File

@ -362,7 +362,7 @@ class Select extends Etemplate\Widget
{
// Check selection preference, we may be able to skip reading some data
$select_pref = $GLOBALS['egw_info']['user']['preferences']['common']['account_selection'];
if(!empty($this->attrs['type']) && $this->attrs['type'] === 'select-account' &&
if($type === 'et2-select-account' &&
empty($GLOBALS['egw_info']['user']['apps']['admin']) && $select_pref === 'none')
{
// Preserve but do not send the value if preference is 'none'