Clear username and password when detached

This commit is contained in:
Jessica Lord & Kevin Sawicki
2013-08-12 15:46:01 -07:00
parent 6a16ef0cf8
commit 12fbd89e79

View File

@@ -93,12 +93,16 @@ class SignInView extends ScrollView
@signIn.enable()
@password.focus()
detach: ->
@username.setText('')
@username.updateDisplay()
@password.setText('')
@password.updateDisplay()
super
attach: ->
if @signedInUser?
@username.val(@signedInUser)
else
@username.val('')
@password.val('')
@username.setText(@signedInUser) if @signedInUser?
@username.enable()
@password.enable()
@alert.hide()