website/admin: fix sessionDuration not updated on UserLoginStageForm

closes #793

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-28 09:15:14 +02:00
parent 26f60b3e85
commit 5769eb277c
3 changed files with 14 additions and 14 deletions

View file

@ -393,7 +393,7 @@ msgstr "Build hash: {0}"
msgid "Built-in"
msgstr "Built-in"
#: src/pages/outposts/ServiceConnectionDockerForm.ts:89
#: src/pages/outposts/ServiceConnectionDockerForm.ts:88
msgid "CA which the endpoint's Certificate is verified against. Can be left empty for no validation."
msgstr "CA which the endpoint's Certificate is verified against. Can be left empty for no validation."
@ -450,7 +450,7 @@ msgstr "Certificate-Key Pair"
msgid "Certificate-Key Pairs"
msgstr "Certificate-Key Pairs"
#: src/pages/outposts/ServiceConnectionDockerForm.ts:106
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104
msgid "Certificate/Key used for authentication. Can be left empty for no authentication."
msgstr "Certificate/Key used for authentication. Can be left empty for no authentication."
@ -1697,8 +1697,8 @@ msgstr "Loading"
#: src/pages/groups/GroupForm.ts:127
#: src/pages/outposts/OutpostForm.ts:74
#: src/pages/outposts/OutpostForm.ts:96
#: src/pages/outposts/ServiceConnectionDockerForm.ts:87
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104
#: src/pages/outposts/ServiceConnectionDockerForm.ts:86
#: src/pages/outposts/ServiceConnectionDockerForm.ts:102
#: src/pages/policies/PolicyBindingForm.ts:157
#: src/pages/policies/PolicyBindingForm.ts:173
#: src/pages/policies/PolicyBindingForm.ts:189
@ -3254,7 +3254,7 @@ msgstr "System Overview"
msgid "System Tasks"
msgstr "System Tasks"
#: src/pages/outposts/ServiceConnectionDockerForm.ts:92
#: src/pages/outposts/ServiceConnectionDockerForm.ts:91
msgid "TLS Authentication Certificate"
msgstr "TLS Authentication Certificate"

View file

@ -389,7 +389,7 @@ msgstr ""
msgid "Built-in"
msgstr ""
#: src/pages/outposts/ServiceConnectionDockerForm.ts:89
#: src/pages/outposts/ServiceConnectionDockerForm.ts:88
msgid "CA which the endpoint's Certificate is verified against. Can be left empty for no validation."
msgstr ""
@ -446,7 +446,7 @@ msgstr ""
msgid "Certificate-Key Pairs"
msgstr ""
#: src/pages/outposts/ServiceConnectionDockerForm.ts:106
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104
msgid "Certificate/Key used for authentication. Can be left empty for no authentication."
msgstr ""
@ -1689,8 +1689,8 @@ msgstr ""
#: src/pages/groups/GroupForm.ts:127
#: src/pages/outposts/OutpostForm.ts:74
#: src/pages/outposts/OutpostForm.ts:96
#: src/pages/outposts/ServiceConnectionDockerForm.ts:87
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104
#: src/pages/outposts/ServiceConnectionDockerForm.ts:86
#: src/pages/outposts/ServiceConnectionDockerForm.ts:102
#: src/pages/policies/PolicyBindingForm.ts:157
#: src/pages/policies/PolicyBindingForm.ts:173
#: src/pages/policies/PolicyBindingForm.ts:189
@ -3246,7 +3246,7 @@ msgstr ""
msgid "System Tasks"
msgstr ""
#: src/pages/outposts/ServiceConnectionDockerForm.ts:92
#: src/pages/outposts/ServiceConnectionDockerForm.ts:91
msgid "TLS Authentication Certificate"
msgstr ""

View file

@ -4,9 +4,9 @@ import { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { Form } from "../../../elements/forms/Form";
import { ifDefined } from "lit-html/directives/if-defined";
import "../../../elements/forms/HorizontalFormElement";
import "../../../elements/forms/FormGroup";
import { first } from "../../../utils";
@customElement("ak-stage-user-login-form")
export class UserLoginStageForm extends Form<UserLoginStage> {
@ -52,7 +52,7 @@ export class UserLoginStageForm extends Form<UserLoginStage> {
label=${t`Name`}
?required=${true}
name="name">
<input type="text" value="${ifDefined(this.stage?.name || "")}" class="pf-c-form-control" required>
<input type="text" value="${first(this.stage?.name, "")}" class="pf-c-form-control" required>
</ak-form-element-horizontal>
<ak-form-group .expanded=${true}>
<span slot="header">
@ -62,8 +62,8 @@ export class UserLoginStageForm extends Form<UserLoginStage> {
<ak-form-element-horizontal
label=${t`Session duration`}
?required=${true}
name="privateKey">
<input type="text" value="${ifDefined(this.stage?.sessionDuration || "seconds=0")}" class="pf-c-form-control" required>
name="sessionDuration">
<input type="text" value="${first(this.stage?.sessionDuration, "seconds=0")}" class="pf-c-form-control" required>
<p class="pf-c-form__helper-text">${t`Determines how long a session lasts. Default of 0 seconds means that the sessions lasts until the browser is closed. (Format: hours=-1;minutes=-2;seconds=-3).`}</p>
</ak-form-element-horizontal>
</div>