From 2beabf817c3b1a9a7a487e3cd551864579ae9ac3 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 11 Nov 2015 16:53:46 -0700 Subject: [PATCH] DDAU (dropping two-way helpers) --- app/pods/login/login-form/component.js | 8 ++++++++ app/pods/login/login-form/template.hbs | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/pods/login/login-form/component.js b/app/pods/login/login-form/component.js index 22e2cff..638cba4 100644 --- a/app/pods/login/login-form/component.js +++ b/app/pods/login/login-form/component.js @@ -15,5 +15,13 @@ export default Component.extend({ submit: function() { return this.attrs['on-submit'](this.get('identification'), this.get('password')); }, + + identificationDidChange: function(value) { + this.set('identification', value); + }, + + passwordDidChange: function(value) { + this.set('password', value); + }, }, }); diff --git a/app/pods/login/login-form/template.hbs b/app/pods/login/login-form/template.hbs index 65f5adb..45afb9b 100644 --- a/app/pods/login/login-form/template.hbs +++ b/app/pods/login/login-form/template.hbs @@ -1,8 +1,10 @@

Log In

- {{input value=identification type="text" placeholder="Email"}} - {{input value=password type="password" placeholder="Password"}} - {{input class="button-gray" type="submit" value="Log In"}} + {{one-way-input type="text" class="identification" value=identification update=(action "identificationDidChange") placeholder="Email"}} + {{one-way-input type="password" class="password" value=password update=(action "passwordDidChange") placeholder="Password"}} +