Fixed the error with password (#155)
* Fixed the error with password * Changed to old style
This commit is contained in:
parent
0813a7adf9
commit
f0dd16ebfe
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ const
|
||||||
proc validateNotEmpty(field: kstring): proc () =
|
proc validateNotEmpty(field: kstring): proc () =
|
||||||
result = proc () =
|
result = proc () =
|
||||||
let x = getVNodeById(field)
|
let x = getVNodeById(field)
|
||||||
if x.text.isNil or x.text == "":
|
if x.text == "":
|
||||||
errors.setError(field, field & " must not be empty")
|
errors.setError(field, field & " must not be empty")
|
||||||
else:
|
else:
|
||||||
errors.setError(field, "")
|
errors.setError(field, "")
|
||||||
|
|
@ -27,7 +27,7 @@ var loggedIn: bool
|
||||||
proc loginDialog(): VNode =
|
proc loginDialog(): VNode =
|
||||||
result = buildHtml(tdiv):
|
result = buildHtml(tdiv):
|
||||||
if not loggedIn:
|
if not loggedIn:
|
||||||
loginField("Name :", username, "input", validateNotEmpty)
|
loginField("Name: ", username, "input", validateNotEmpty)
|
||||||
loginField("Password: ", password, "password", validateNotEmpty)
|
loginField("Password: ", password, "password", validateNotEmpty)
|
||||||
button(onclick = () => (loggedIn = true), disabled = errors.disableOnError()):
|
button(onclick = () => (loggedIn = true), disabled = errors.disableOnError()):
|
||||||
text "Login"
|
text "Login"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue