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
|
@ -1,6 +1,6 @@
|
|||
#cla
|
||||
|
||||
.alert.alert-info This agreement was generated by
|
||||
|
||||
.alert.alert-info This agreement was generated by
|
||||
a(href="http://selector.harmonyagreements.org/") Harmony
|
||||
| . Sign at the bottom (it's easy).
|
||||
|
||||
|
@ -78,11 +78,11 @@
|
|||
| Harmony (HA-CLA-I-LIST) Version 1.0
|
||||
|
||||
hr
|
||||
|
||||
|
||||
if me.get('anonymous')
|
||||
p
|
||||
strong You must be signed in to sign this agreement.
|
||||
|
||||
|
||||
button.btn.btn-primary.login-button
|
||||
span(data-i18n="login.log_in") Log In
|
||||
span.spr.spl /
|
||||
|
@ -94,15 +94,16 @@
|
|||
.form-group
|
||||
label(for="github-username") Github Username
|
||||
input(name="github-username", type="text")#github-username.form-control
|
||||
span.help-block Please include if contributing to the
|
||||
span.help-block Please include if contributing to the
|
||||
<a href="https://github.com/codecombat/codecombat">Github repository</a>.
|
||||
p
|
||||
| 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