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
|
#cla
|
||||||
|
|
||||||
.alert.alert-info This agreement was generated by
|
.alert.alert-info This agreement was generated by
|
||||||
a(href="http://selector.harmonyagreements.org/") Harmony
|
a(href="http://selector.harmonyagreements.org/") Harmony
|
||||||
| . Sign at the bottom (it's easy).
|
| . Sign at the bottom (it's easy).
|
||||||
|
|
||||||
|
@ -78,11 +78,11 @@
|
||||||
| Harmony (HA-CLA-I-LIST) Version 1.0
|
| Harmony (HA-CLA-I-LIST) Version 1.0
|
||||||
|
|
||||||
hr
|
hr
|
||||||
|
|
||||||
if me.get('anonymous')
|
if me.get('anonymous')
|
||||||
p
|
p
|
||||||
strong You must be signed in to sign this agreement.
|
strong You must be signed in to sign this agreement.
|
||||||
|
|
||||||
button.btn.btn-primary.login-button
|
button.btn.btn-primary.login-button
|
||||||
span(data-i18n="login.log_in") Log In
|
span(data-i18n="login.log_in") Log In
|
||||||
span.spr.spl /
|
span.spr.spl /
|
||||||
|
@ -94,15 +94,16 @@
|
||||||
.form-group
|
.form-group
|
||||||
label(for="github-username") Github Username
|
label(for="github-username") Github Username
|
||||||
input(name="github-username", type="text")#github-username.form-control
|
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>.
|
<a href="https://github.com/codecombat/codecombat">Github repository</a>.
|
||||||
p
|
p
|
||||||
| Please press I AGREE below to indicate your agreement.
|
| Please press I AGREE below to indicate your agreement.
|
||||||
button.btn#agreement-button I AGREE
|
button.btn#agreement-button I AGREE
|
||||||
|
|
||||||
if me.get('signedCLA')
|
- var signedCLA = me.get('signedCLA');
|
||||||
|
if signedCLA
|
||||||
hr
|
hr
|
||||||
p
|
p
|
||||||
strong
|
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:
|
events:
|
||||||
'click #agreement-button': 'onAgree'
|
'click #agreement-button': 'onAgree'
|
||||||
|
|
||||||
getRenderData: ->
|
|
||||||
c = super()
|
|
||||||
c.signedOn = moment(me.get('signedCLA')).format('LLLL') if me.get('signedCLA')
|
|
||||||
c
|
|
||||||
|
|
||||||
onAgree: ->
|
onAgree: ->
|
||||||
@$el.find('#agreement-button').prop('disabled', true).text('Saving')
|
@$el.find('#agreement-button').prop('disabled', true).text('Saving')
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
Loading…
Reference in a new issue