web/admin: fix flow execute button

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-31 15:00:54 +02:00
parent e66c46ff59
commit 0395c84270
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@ from rest_framework.fields import (
DateTimeField, DateTimeField,
EmailField, EmailField,
IntegerField, IntegerField,
HiddenField
) )
from rest_framework.serializers import BaseSerializer from rest_framework.serializers import BaseSerializer
@ -89,8 +90,8 @@ class Prompt(SerializerModel):
field_class = EmailField field_class = EmailField
if self.type == FieldTypes.NUMBER: if self.type == FieldTypes.NUMBER:
field_class = IntegerField field_class = IntegerField
# TODO: Hidden?
if self.type == FieldTypes.HIDDEN: if self.type == FieldTypes.HIDDEN:
field_class = HiddenField
kwargs["required"] = False kwargs["required"] = False
kwargs["initial"] = self.placeholder kwargs["initial"] = self.placeholder
if self.type == FieldTypes.CHECKBOX: if self.type == FieldTypes.CHECKBOX:

View File

@ -11,6 +11,7 @@ import "./FlowDiagram";
import { Flow, FlowsApi } from "authentik-api"; import { Flow, FlowsApi } from "authentik-api";
import { DEFAULT_CONFIG } from "../../api/Config"; import { DEFAULT_CONFIG } from "../../api/Config";
import PFButton from "@patternfly/patternfly/components/Button/button.css";
import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css";
@ -33,7 +34,7 @@ export class FlowViewPage extends LitElement {
flow!: Flow; flow!: Flow;
static get styles(): CSSResult[] { static get styles(): CSSResult[] {
return [PFBase, PFPage, PFCard, PFContent, PFGallery, AKGlobal].concat( return [PFBase, PFPage, PFButton, PFCard, PFContent, PFGallery, AKGlobal].concat(
css` css`
img.pf-icon { img.pf-icon {
max-height: 24px; max-height: 24px;