diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html
index a973591a..a39d5598 100644
--- a/searchPages/searchUtils/advancedSearchForm.component.html
+++ b/searchPages/searchUtils/advancedSearchForm.component.html
@@ -132,60 +132,47 @@
-
-
+
@@ -169,6 +169,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
@Input('type') type: InputType = 'text';
@Input() validators: ValidatorFn[] | ValidatorFn;
@Input() disabled: boolean = false;
+ @Input() disabledIcon: string = 'lock';
@Input() value: any | any[];
@Output() valueChange = new EventEmitter();
@Input('hint') hint: string;
@@ -304,6 +305,13 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
if (changes.formControl || changes.validators || changes.options) {
this.reset();
}
+ if(changes.disabled) {
+ if(this.disabled) {
+ this.formControl.disable();
+ } else {
+ this.formControl.enable();
+ }
+ }
}
}
@@ -359,23 +367,27 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
this.required = (validator && validator.required);
}
this.subscriptions.push(this.formControl.valueChanges.subscribe(value => {
- value = (value === '') ? null : value;
- if (this.type === 'logoURL') {
- this.secure = (!value || value.includes('https://'));
- }
- if (this.initValue === value || (this.initValue === '' && value === null)) {
- this.formControl.markAsPristine();
- } else {
- this.formControl.markAsDirty();
- }
- if(this.type === 'autocomplete_soft') {
- this.filteredOptions = this.filter(value);
- this.cdr.detectChanges();
- if (this.focused) {
- this.open(true);
+ if(this.formControl.enabled) {
+ value = (value === '') ? null : value;
+ if (this.type === 'logoURL') {
+ this.secure = (!value || value.includes('https://'));
+ }
+ if (this.initValue === value || (this.initValue === '' && value === null)) {
+ this.formControl.markAsPristine();
+ } else {
+ this.formControl.markAsDirty();
+ }
+ if (this.type === 'autocomplete_soft') {
+ this.filteredOptions = this.filter(value);
+ this.cdr.detectChanges();
+ if (this.focused) {
+ this.open(true);
+ }
+ }
+ if((this.value && value && this.value !== value) || (!this.value && value) || this.value && !value) {
+ this.valueChange.emit(this.formControl.value);
}
}
- this.valueChange.emit(this.formControl.value);
}));
if (this.input) {
this.input.nativeElement.disabled = this.formControl.disabled;
diff --git a/sharedComponents/search-input/search-input.component.ts b/sharedComponents/search-input/search-input.component.ts
index df1ad9f8..1baa238c 100644
--- a/sharedComponents/search-input/search-input.component.ts
+++ b/sharedComponents/search-input/search-input.component.ts
@@ -20,17 +20,17 @@ import {InputComponent} from "../input/input.component";