34 lines
711 B
Plaintext
34 lines
711 B
Plaintext
DEFINE usuario, clave STRING
|
|
|
|
MAIN
|
|
|
|
CLOSE WINDOW SCREEN
|
|
OPEN WINDOW w WITH FORM "form"
|
|
|
|
INPUT BY NAME usuario,clave ATTRIBUTES (WITHOUT DEFAULTS)
|
|
ON ACTION show_password
|
|
CALL toggle_password("formonly.clave")
|
|
END INPUT
|
|
|
|
END MAIN
|
|
|
|
FUNCTION toggle_password(f)
|
|
|
|
DEFINE f STRING -- field name
|
|
DEFINE n om.domnode
|
|
DEFINE w ui.window
|
|
|
|
LET w = ui.window.getCurrent()
|
|
LET n = w.findNode ("FormField", f)
|
|
LET n = n.getFirstChild ()
|
|
|
|
CASE n.getAttribute("isPassword")
|
|
|
|
WHEN "0"
|
|
CALL n.setAttribute ("isPassword", "1")
|
|
WHEN "1"
|
|
CALL n.setAttribute ("isPassword", "0")
|
|
END CASE
|
|
|
|
END FUNCTION
|