StringInput masking

- Add a feature to define a mask character for StringInput
  which help when there's a need to as something sensitive.
- This masks both input and result value.
This commit is contained in:
Janne Valkealahti
2022-02-08 10:26:17 +00:00
parent e3604a5bc5
commit 2f4209785e
4 changed files with 132 additions and 10 deletions

View File

@@ -1,9 +1,17 @@
// info section after '? xxx'
info(model) ::= <%
<if(model.input)>
<model.input>
<if(model.hasMaskCharacter)>
<if(model.maskedInput)>
<model.maskedInput>
<else>
<("[Default "); format="value"><model.defaultValue; format="value"><("]"); format="value">
<endif>
<else>
<("[Default "); format="value"><model.defaultValue; format="value"><("]"); format="value">
<if(model.input)>
<model.input>
<else>
<("[Default "); format="value"><model.defaultValue; format="value"><("]"); format="value">
<endif>
<endif>
%>
@@ -14,7 +22,7 @@ question_name(model) ::= <<
// component result
result(model) ::= <<
<question_name(model)> <model.resultValue; format="value">
<question_name(model)> <model.maskedResultValue; format="value">
>>
// component is running