Warn non-Ethereum users when trying to add contributor

This commit is contained in:
2017-02-08 13:58:36 +08:00
parent 0f9664410b
commit ad76fb2369
2 changed files with 13 additions and 3 deletions
+10 -2
View File
@@ -39,9 +39,16 @@ export default Ember.Component.extend({
},
actions: {
save() {
if(this.get('isValid')) {
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')) {
this.set('inProgress', true);
this.get('kredits').addContributor(
this.get('address'),
this.get('realName'),
@@ -54,9 +61,10 @@ export default Ember.Component.extend({
window.scroll(0,0);
});
} else {
alert('invalid data. please review');
alert('Invalid data. Please review and try again.');
}
}
}
});
+3 -1
View File
@@ -42,6 +42,8 @@
</header>
<div class="content">
{{add-contributor kredits=kredits contributors=model.contributors}}
{{add-contributor kredits=kredits
contributors=model.contributors
contractInteractionEnabled=contractInteractionEnabled}}
</div>
</section>