Merge remote-tracking branch 'origin/master' into new-theme
This commit is contained in:
commit
ef347e9c02
|
@ -106,7 +106,8 @@ export class ResultLandingComponent {
|
||||||
public feedbackFields: string [] = [
|
public feedbackFields: string [] = [
|
||||||
'Title', 'Authors', 'Access rights',
|
'Title', 'Authors', 'Access rights',
|
||||||
'Publisher information', 'Funding Information',
|
'Publisher information', 'Funding Information',
|
||||||
'Persistent identifiers', 'Other'];
|
'Persistent identifiers', 'Sustainable Development Goals (SDG)',
|
||||||
|
'Fields of Science and Technology (FOS)', 'Other'];
|
||||||
|
|
||||||
public pidsArrayString: string = "";
|
public pidsArrayString: string = "";
|
||||||
public identifier: Identifier;
|
public identifier: Identifier;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {
|
import {
|
||||||
|
AfterViewInit,
|
||||||
Component,
|
Component,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
|
@ -171,7 +172,7 @@ export interface Option {
|
||||||
`,
|
`,
|
||||||
styleUrls: ['input.component.css']
|
styleUrls: ['input.component.css']
|
||||||
})
|
})
|
||||||
export class InputComponent implements OnInit, OnDestroy, OnChanges {
|
export class InputComponent implements OnDestroy, AfterViewInit, OnChanges {
|
||||||
/** Basic information */
|
/** Basic information */
|
||||||
@Input('formInput') formControl: AbstractControl;
|
@Input('formInput') formControl: AbstractControl;
|
||||||
@Input('type') type: 'text' | 'URL' | 'logoURL' | 'autocomplete' | 'textarea' | 'select' | 'checkbox' | 'chips' = 'text';
|
@Input('type') type: 'text' | 'URL' | 'logoURL' | 'autocomplete' | 'textarea' | 'select' | 'checkbox' | 'chips' = 'text';
|
||||||
|
@ -225,7 +226,7 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
this.focusEmitter.emit(this.focused);
|
this.focusEmitter.emit(this.focused);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngAfterViewInit() {
|
||||||
this.reset();
|
this.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,6 +280,9 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
if (!this.formControl.value) {
|
if (!this.formControl.value) {
|
||||||
this.formControl.setValue((this.type === "checkbox")?false:'');
|
this.formControl.setValue((this.type === "checkbox")?false:'');
|
||||||
}
|
}
|
||||||
|
if(this.input) {
|
||||||
|
this.input.nativeElement.disabled = this.formControl.disabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsubscribe() {
|
unsubscribe() {
|
||||||
|
|
Loading…
Reference in New Issue