mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Refactor CLAView to use view in template
This commit is contained in:
parent
4af6162c5c
commit
9de50ac181
2 changed files with 9 additions and 13 deletions
|
@ -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')}
|
||||
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue