File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed
src/Moryx.Runtime.Maintenance.Web.UI/src/modules Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 55
66import * as React from "react" ;
77import { Input } from "reactstrap" ;
8+ import { EntryUnitType } from "../../models/EntryUnitType" ;
89import { InputEditorBasePropModel } from "./InputEditorBase" ;
910import SelectionEditorBase from "./SelectionEditorBase" ;
1011
@@ -14,7 +15,7 @@ export default class StringEditor extends SelectionEditorBase {
1415 }
1516
1617 private preRenderInput ( ) : React . ReactNode {
17- return ( < Input type = { this . props . Entry . Validation . IsPassword ? "password" : "text" }
18+ return ( < Input type = { this . props . Entry . Value . UnitType === EntryUnitType . Password ? "password" : "text" }
1819 onChange = { ( e : React . FormEvent < HTMLInputElement > ) => this . onValueChange ( e , this . props . Entry ) }
1920 placeholder = { "Please enter a string ..." }
2021 disabled = { this . props . Entry . Value . IsReadOnly || this . props . IsReadOnly }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2020, Phoenix Contact GmbH & Co. KG
3+ * Licensed under the Apache License, Version 2.0
4+ */
5+ export enum EntryUnitType {
6+ None ,
7+ Password ,
8+ File ,
9+ Directory
10+ }
Original file line number Diff line number Diff line change 22 * Copyright (c) 2020, Phoenix Contact GmbH & Co. KG
33 * Licensed under the Apache License, Version 2.0
44*/
5+ import { EntryUnitType } from "./EntryUnitType" ;
56
67export default class EntryValidation {
78 public Minimum : number ;
89 public Maximum : number ;
910 public Regex : string ;
1011 public IsRequired : boolean ;
1112 public IsPassword : boolean ;
13+
14+ public static IsItPassword ( UntiType : EntryUnitType ) : boolean {
15+ return UntiType === EntryUnitType . Password ;
16+ }
1217}
Original file line number Diff line number Diff line change 33 * Licensed under the Apache License, Version 2.0
44*/
55
6+ import { EntryUnitType } from "./EntryUnitType" ;
67import { EntryValueType } from "./EntryValueType" ;
78
89export default class EntryValue {
910 public Type : EntryValueType ;
11+ public UnitType : EntryUnitType ;
1012 public Current : string ;
1113 public Default : string ;
1214 public Possible : string [ ] ;
You can’t perform that action at this time.
0 commit comments