picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit e9dfb6e0d1e5f5bdd277d485e9c41d2de388266a
parent f3fb7affb5904d34a3fb1d08b35ce96336bfa3aa
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 20 Feb 2013 20:12:53 +0100

'loginForm' in "lib/adm.l"
Diffstat:
Mapp/gui.l | 18++----------------
Mlib/adm.l | 20+++++++++++++++++++-
2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/app/gui.l b/app/gui.l @@ -1,4 +1,4 @@ -# 09may11abu +# 20feb13abu # (c) Software Lab. Alexander Burger ### GUI ### @@ -40,21 +40,7 @@ (gui '(+Button) ',"Change" '(let V (val> (field -1)) (locale (car V) (cdr V) "app/loc/") ) ) ) - (form NIL - (<grid> 2 - ,"Name" (gui 'nm '(+Focus +Able +TextField) '(not *Login) 20) - ,"Password" (gui 'pw '(+Able +PwField) '(not *Login) 20) ) - (--) - (gui '(+Button) '(if *Login ,"logout" ,"login") - '(cond - (*Login (logout)) - ((login (val> (: home nm)) (val> (: home pw))) - (clr> (: home pw)) ) - (T (error ,"Permission denied")) ) ) - (when *Login - (<nbsp> 4) - (<span> "bold green" - (<big> (ht:Prin "'" (; *Login nm) ,"' logged in")) ) ) ) ) ) + (loginForm) ) ) (de stop () (logout) diff --git a/lib/adm.l b/lib/adm.l @@ -1,4 +1,4 @@ -# 22jan13abu +# 20feb13abu # (c) Software Lab. Alexander Burger # *Salt *Login *Users *Perms @@ -98,4 +98,22 @@ (msg *Pid " No permission: " (car Args)) (forbidden) ) ) +### GUI ### +(de loginForm () + (form NIL + (<grid> 2 + ,"Name" (gui 'nm '(+Focus +Able +TextField) '(not *Login) 20) + ,"Password" (gui 'pw '(+Able +PwField) '(not *Login) 20) ) + (--) + (gui '(+Button) '(if *Login ,"logout" ,"login") + '(cond + (*Login (logout)) + ((login (val> (: home nm)) (val> (: home pw))) + (clr> (: home pw)) ) + (T (error ,"Permission denied")) ) ) + (when *Login + (<nbsp> 4) + (<span> "bold green" + (<big> (ht:Prin "'" (; *Login nm) ,"' logged in")) ) ) ) ) + # vi:et:ts=3:sw=3