Revision 50290
Added by Myrto Koukouli over 6 years ago
update-datasource-interface-form.component.ts | ||
---|---|---|
10 | 10 |
export class UpdateDatasourceInterfaceFormComponent extends MyGroup { |
11 | 11 |
successMessage: string; |
12 | 12 |
errorMessage: string; |
13 |
existingValSet: boolean; |
|
13 | 14 |
|
14 | 15 |
readonly groupDefinition = { |
15 | 16 |
baseUrl: ['', Validators.required], |
16 | 17 |
selectValidationSet: [''], |
17 |
customValidationSet: [''] |
|
18 |
customValidationSet: [''], |
|
19 |
compatibilityLevel: ['', Validators.required] |
|
18 | 20 |
}; |
19 | 21 |
|
20 | 22 |
|
21 | 23 |
ngOnInit(){ |
22 | 24 |
super.ngOnInit(); |
23 | 25 |
console.log(this.group,this.parentGroup); |
26 |
|
|
27 |
this.existingValSet = true; |
|
24 | 28 |
this.getMyControl('customValidationSet').disable(); |
25 | 29 |
} |
26 | 30 |
|
27 | 31 |
|
28 | 32 |
chooseValSet(existingValSet: boolean) { |
29 | 33 |
if(existingValSet) { |
34 |
this.existingValSet = true; |
|
30 | 35 |
this.getMyControl('selectValidationSet').enable(); |
31 | 36 |
this.getMyControl('customValidationSet').disable(); |
32 | 37 |
} else { |
38 |
this.existingValSet = false; |
|
33 | 39 |
this.getMyControl('selectValidationSet').disable(); |
34 | 40 |
this.getMyControl('customValidationSet').enable(); |
35 | 41 |
} |
... | ... | |
37 | 43 |
|
38 | 44 |
saveInterface(){ |
39 | 45 |
console.log("saved something!"); |
46 |
if (this.existingValSet){ |
|
47 |
console.log(this.getMyControl('selectValidationSet').value); |
|
48 |
} else { |
|
49 |
console.log(this.getMyControl('customValidationSet').value); |
|
50 |
} |
|
40 | 51 |
} |
41 |
|
|
42 |
removeInterface(){ |
|
43 |
console.log("removed something!"); |
|
44 |
} |
|
45 | 52 |
} |
Also available in: Unified diff
forms array view works!