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" msgid "Built-in"
msgstr "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." 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." 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" msgid "Certificate-Key Pairs"
msgstr "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." 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." 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/groups/GroupForm.ts:127
#: src/pages/outposts/OutpostForm.ts:74 #: src/pages/outposts/OutpostForm.ts:74
#: src/pages/outposts/OutpostForm.ts:96 #: src/pages/outposts/OutpostForm.ts:96
#: src/pages/outposts/ServiceConnectionDockerForm.ts:87 #: src/pages/outposts/ServiceConnectionDockerForm.ts:86
#: src/pages/outposts/ServiceConnectionDockerForm.ts:104 #: src/pages/outposts/ServiceConnectionDockerForm.ts:102
#: src/pages/policies/PolicyBindingForm.ts:157 #: src/pages/policies/PolicyBindingForm.ts:157
#: src/pages/policies/PolicyBindingForm.ts:173 #: src/pages/policies/PolicyBindingForm.ts:173
#: src/pages/policies/PolicyBindingForm.ts:189 #: src/pages/policies/PolicyBindingForm.ts:189
@ -3254,7 +3254,7 @@ msgstr "System Overview"
msgid "System Tasks" msgid "System Tasks"
msgstr "System Tasks" msgstr "System Tasks"
#: src/pages/outposts/ServiceConnectionDockerForm.ts:92 #: src/pages/outposts/ServiceConnectionDockerForm.ts:91
msgid "TLS Authentication Certificate" msgid "TLS Authentication Certificate"
msgstr "TLS Authentication Certificate" msgstr "TLS Authentication Certificate"

View File

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

View File

@ -4,9 +4,9 @@ import { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html"; import { html, TemplateResult } from "lit-html";
import { DEFAULT_CONFIG } from "../../../api/Config"; import { DEFAULT_CONFIG } from "../../../api/Config";
import { Form } from "../../../elements/forms/Form"; import { Form } from "../../../elements/forms/Form";
import { ifDefined } from "lit-html/directives/if-defined";
import "../../../elements/forms/HorizontalFormElement"; import "../../../elements/forms/HorizontalFormElement";
import "../../../elements/forms/FormGroup"; import "../../../elements/forms/FormGroup";
import { first } from "../../../utils";
@customElement("ak-stage-user-login-form") @customElement("ak-stage-user-login-form")
export class UserLoginStageForm extends Form<UserLoginStage> { export class UserLoginStageForm extends Form<UserLoginStage> {
@ -52,7 +52,7 @@ export class UserLoginStageForm extends Form<UserLoginStage> {
label=${t`Name`} label=${t`Name`}
?required=${true} ?required=${true}
name="name"> 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-element-horizontal>
<ak-form-group .expanded=${true}> <ak-form-group .expanded=${true}>
<span slot="header"> <span slot="header">
@ -62,8 +62,8 @@ export class UserLoginStageForm extends Form<UserLoginStage> {
<ak-form-element-horizontal <ak-form-element-horizontal
label=${t`Session duration`} label=${t`Session duration`}
?required=${true} ?required=${true}
name="privateKey"> name="sessionDuration">
<input type="text" value="${ifDefined(this.stage?.sessionDuration || "seconds=0")}" class="pf-c-form-control" required> <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> <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> </ak-form-element-horizontal>
</div> </div>