Warn non-Ethereum users when trying to add contributor
This commit is contained in:
@@ -39,9 +39,16 @@ export default Ember.Component.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|
||||||
save() {
|
save() {
|
||||||
|
if (!this.get('contractInteractionEnabled')) {
|
||||||
|
alert('Only core team members can add new contributors. Please ask someone to set you up.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.get('isValid')) {
|
if (this.get('isValid')) {
|
||||||
this.set('inProgress', true);
|
this.set('inProgress', true);
|
||||||
|
|
||||||
this.get('kredits').addContributor(
|
this.get('kredits').addContributor(
|
||||||
this.get('address'),
|
this.get('address'),
|
||||||
this.get('realName'),
|
this.get('realName'),
|
||||||
@@ -54,9 +61,10 @@ export default Ember.Component.extend({
|
|||||||
window.scroll(0,0);
|
window.scroll(0,0);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
alert('invalid data. please review');
|
alert('Invalid data. Please review and try again.');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{add-contributor kredits=kredits contributors=model.contributors}}
|
{{add-contributor kredits=kredits
|
||||||
|
contributors=model.contributors
|
||||||
|
contractInteractionEnabled=contractInteractionEnabled}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user