diff --git a/role-verification/role-verification.component.ts b/role-verification/role-verification.component.ts
index 1883662f..9cf0e22c 100644
--- a/role-verification/role-verification.component.ts
+++ b/role-verification/role-verification.component.ts
@@ -21,8 +21,8 @@ import {Composer} from "../utils/email/composer";
email, to accept the invitation request.
-
-
{{error}}
+
+ {{error}}
@@ -46,8 +46,8 @@ import {Composer} from "../utils/email/composer";
email, to accept the invitation request.
-
-
{{error}}
+
+ {{error}}>
diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts
index ffd4c6c9..495f5677 100644
--- a/sharedComponents/input/input.component.ts
+++ b/sharedComponents/input/input.component.ts
@@ -45,7 +45,7 @@ export interface Option {
-
+
@@ -112,10 +112,22 @@ export interface Option {
- {{formControl.errors.error}}
- {{warning}}
- {{note}}
+
+ {{formControl.errors.error}}
+ Please provide a valid URL (e.g. https://example.com)
+
+
+
+
+
+ Note: Prefer urls like "https://example.com/my-secure-image.png"
+ instead of "http://example.com/my-image.png".
+ Browsers may not load non secure content.
+
+
+
+
+
{{label}}
@@ -125,8 +137,9 @@ export interface Option {
export class InputComponent implements OnInit, OnDestroy, OnChanges {
/** Basic information */
@Input('formInput') formControl: AbstractControl;
- @Input('type') type: 'text' | 'textarea' | 'select' | 'checkbox' | 'chips' = 'text';
+ @Input('type') type: 'text' | 'URL' | 'logoURL' | 'textarea' | 'select' | 'checkbox' | 'chips' = 'text';
@Input('label') label: string;
+ /** Textarea options */
@Input('rows') rows: number = 3;
/** Select | chips available options */
@Input('options') options: Option[];
@@ -152,6 +165,8 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
@Input() panelClass: string = null;
@Input() showOptionsOnEmpty: boolean = true;
@Output() focusEmitter: EventEmitter
= new EventEmitter();
+ /** LogoUrl information */
+ public secure: boolean = true;
/** Internal basic information */
public required: boolean = false;
private initValue: any;
@@ -187,8 +202,12 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
}
reset() {
+ this.secure = true;
this.unsubscribe();
this.initValue = HelperFunctions.copy(this.formControl.value);
+ if(this.type === 'logoURL') {
+ this.secure = (!this.initValue || this.initValue.includes('https://'));
+ }
if (this.options && this.type === 'chips') {
this.filteredOptions = of(this.options);
this.searchControl = new FormControl('');
@@ -201,6 +220,9 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
}
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();
}
diff --git a/sharedComponents/input/input.module.ts b/sharedComponents/input/input.module.ts
index fdd702d4..5b5f62a5 100644
--- a/sharedComponents/input/input.module.ts
+++ b/sharedComponents/input/input.module.ts
@@ -11,6 +11,7 @@ import {lock, remove_circle} from "../../utils/icons/icons";
import {MatChipsModule} from "@angular/material/chips";
import {MatAutocompleteModule} from "@angular/material/autocomplete";
import {MatIconModule} from "@angular/material/icon";
+import {SafeHtmlPipeModule} from "../../utils/pipes/safeHTMLPipe.module";
@NgModule({
imports: [
@@ -22,7 +23,8 @@ import {MatIconModule} from "@angular/material/icon";
IconsModule,
MatChipsModule,
MatAutocompleteModule,
- MatIconModule
+ MatIconModule,
+ SafeHtmlPipeModule
],
exports: [
InputComponent
diff --git a/sharedComponents/subscriber-invite/subscriber-invite.component.ts b/sharedComponents/subscriber-invite/subscriber-invite.component.ts
index a2a20f3d..b8cc764d 100644
--- a/sharedComponents/subscriber-invite/subscriber-invite.component.ts
+++ b/sharedComponents/subscriber-invite/subscriber-invite.component.ts
@@ -22,10 +22,11 @@ declare var UIkit;
From:
-