Refactor CLAView to use view in template

This commit is contained in:
Scott Erickson 2015-10-22 15:16:32 -07:00
parent 4af6162c5c
commit 9de50ac181
2 changed files with 9 additions and 13 deletions

View file

@ -100,9 +100,10 @@
| Please press I AGREE below to indicate your agreement.
button.btn#agreement-button I AGREE
if me.get('signedCLA')
- var signedCLA = me.get('signedCLA');
if signedCLA
hr
p
strong
em This agreement was previously signed on #{signedOn}
em This agreement was previously signed on #{moment(signedCLA).format('LLLL')}

View file

@ -9,11 +9,6 @@ module.exports = class CLAView extends RootView
events:
'click #agreement-button': 'onAgree'
getRenderData: ->
c = super()
c.signedOn = moment(me.get('signedCLA')).format('LLLL') if me.get('signedCLA')
c
onAgree: ->
@$el.find('#agreement-button').prop('disabled', true).text('Saving')
$.ajax({