diff --git a/src/app/dashboard/dao-param-page/dao-param-page.component.html b/src/app/dashboard/dao-param-page/dao-param-page.component.html
index 6a60fb6..3451f0a 100644
--- a/src/app/dashboard/dao-param-page/dao-param-page.component.html
+++ b/src/app/dashboard/dao-param-page/dao-param-page.component.html
@@ -20,7 +20,7 @@
Settings
-
+
@@ -36,7 +36,7 @@ Settings
-
+
@@ -52,7 +52,7 @@ Settings
-
+
@@ -68,7 +68,7 @@ Settings
-
+
@@ -84,7 +84,7 @@ Settings
-
+
@@ -100,7 +100,7 @@ Settings
-
+
@@ -116,7 +116,7 @@ Settings
-
+
@@ -132,7 +132,7 @@ Settings
-
+
diff --git a/src/app/dashboard/dao-param-page/dao-param-page.component.ts b/src/app/dashboard/dao-param-page/dao-param-page.component.ts
index 0b3e197..4577013 100644
--- a/src/app/dashboard/dao-param-page/dao-param-page.component.ts
+++ b/src/app/dashboard/dao-param-page/dao-param-page.component.ts
@@ -13,7 +13,6 @@ import { DevzendaoService, Web3Service } from '../../shared';
export class DaoParamPageComponent implements OnInit {
formDaoParams: FormGroup;
- isTeamMember = false;
constructor(
public devZenDaoService: DevzendaoService,
@@ -51,8 +50,8 @@ export class DaoParamPageComponent implements OnInit {
this.formDaoParams.controls[key].setValue(value);
}
});
- // assign isTeamMember
- this.isTeamMember = isTeamMember;
+ // enable form if team member
+ if(isTeamMember) this.formDaoParams.enable();
},
(err) => { console.error(err); }
);
@@ -72,6 +71,7 @@ export class DaoParamPageComponent implements OnInit {
repTokensRewardGuest: ['', [Validators.required, Validators.min(1 / (10 ** 18))]],
repTokensRewardTeamMembers: ['', [Validators.required, Validators.min(1 / (10 ** 18))]]
});
+ this.formDaoParams.disable();
}
/**
diff --git a/src/app/dashboard/team-page/team-page.component.html b/src/app/dashboard/team-page/team-page.component.html
index 85b2ca5..699458f 100644
--- a/src/app/dashboard/team-page/team-page.component.html
+++ b/src/app/dashboard/team-page/team-page.component.html
@@ -20,7 +20,7 @@ Team
-
+
@@ -40,7 +40,7 @@ Team
-
+
@@ -66,7 +66,7 @@ Team
placeholder="Address">
-
+
@@ -92,7 +92,7 @@ Team
placeholder="Address">
-
+
@@ -116,7 +116,7 @@ Team
Mint DZTREP to guest?
-
+
diff --git a/src/app/dashboard/team-page/team-page.component.ts b/src/app/dashboard/team-page/team-page.component.ts
index d088c8c..fabf281 100644
--- a/src/app/dashboard/team-page/team-page.component.ts
+++ b/src/app/dashboard/team-page/team-page.component.ts
@@ -17,7 +17,6 @@ export class TeamPageComponent implements OnInit {
formMoveToNextEpisode: FormGroup;
formSelectNextHost: FormGroup;
formWithdrawEther: FormGroup;
- isTeamMember = false;
constructor(
public devZenDaoService: DevzendaoService,
@@ -36,7 +35,7 @@ export class TeamPageComponent implements OnInit {
}
sub.subscribe(
- (isTeamMember) => { this.isTeamMember = isTeamMember; },
+ (isTeamMember) => { if(isTeamMember) this.enableAllForms(); },
(err) => {
this.messageService.add({severity:'error', summary:'Error', detail:'Error on getting team member status'});
console.error(err);
@@ -44,6 +43,29 @@ export class TeamPageComponent implements OnInit {
);
this.initForms();
+ this.disableAllForms();
+ }
+
+ /**
+ * Disables all forms
+ */
+ disableAllForms() {
+ this.formWithdrawEther.disable();
+ this.formSelectNextHost.disable();
+ this.formChangeTheGuest.disable();
+ this.formEmergencyChangeTheGuest.disable();
+ this.formMoveToNextEpisode.disable();
+ }
+
+ /**
+ * Enables all forms
+ */
+ enableAllForms() {
+ this.formWithdrawEther.enable();
+ this.formSelectNextHost.enable();
+ this.formChangeTheGuest.enable();
+ this.formEmergencyChangeTheGuest.enable();
+ this.formMoveToNextEpisode.enable();
}
/**