Fix actions, etc.

This commit is contained in:
2020-05-11 10:06:12 +02:00
parent 018132034d
commit 22300c2980
11 changed files with 30 additions and 24 deletions
+9 -3
View File
@@ -7,8 +7,8 @@ import { isAddress } from 'web3-utils';
export default Component.extend({
kredits: service(),
router: service(),
kredits: service(),
attributes: null,
@@ -60,9 +60,15 @@ export default Component.extend({
actions: {
submit () {
submit (evt) {
evt.preventDefault();
if (!this.kredits.currentUserIsCore) {
window.alert('Only core team members can edit profiles. Please ask someone to set you up.');
return;
}
if (!this.isValid) {
alert('Invalid data. Please review and try again.');
window.alert('Invalid data. Please review and try again.');
return;
}
+1 -1
View File
@@ -1,4 +1,4 @@
<form {{on "submit" this.submit}}>
<form onsubmit={{action "submit"}}>
<p>
<label for="c-account">Ethereum account</label>
<Input @name="account" @id="c-account"