From c92a2ecbf58279885e5d57e6f10ca1de211fec7b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 31 Mar 2021 16:35:20 +0200 Subject: [PATCH] web/admin: fix hideManaged toggle for propertymapping list Signed-off-by: Jens Langhammer --- authentik/stages/prompt/models.py | 2 +- web/src/pages/property-mappings/PropertyMappingListPage.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/authentik/stages/prompt/models.py b/authentik/stages/prompt/models.py index 9fa5644d9..c5a00095f 100644 --- a/authentik/stages/prompt/models.py +++ b/authentik/stages/prompt/models.py @@ -93,7 +93,7 @@ class Prompt(SerializerModel): if self.type == FieldTypes.HIDDEN: field_class = HiddenField kwargs["required"] = False - kwargs["initial"] = self.placeholder + kwargs["default"] = self.placeholder if self.type == FieldTypes.CHECKBOX: field_class = BooleanField kwargs["required"] = False diff --git a/web/src/pages/property-mappings/PropertyMappingListPage.ts b/web/src/pages/property-mappings/PropertyMappingListPage.ts index 5c3e8738e..2ebc9f37d 100644 --- a/web/src/pages/property-mappings/PropertyMappingListPage.ts +++ b/web/src/pages/property-mappings/PropertyMappingListPage.ts @@ -43,7 +43,7 @@ export class PropertyMappingListPage extends TablePage { page: page, pageSize: PAGE_SIZE, search: this.search || "", - managedIsnull: this.hideManaged.toString(), + managedIsnull: this.hideManaged ? "true" : undefined, }); } @@ -126,6 +126,7 @@ export class PropertyMappingListPage extends TablePage {
{ this.hideManaged = !this.hideManaged; + this.page = 1; this.fetch(); }} />