Skip to content
Snippets Groups Projects
Commit c5d61219 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: url button branch

parent 40a4949f
No related branches found
No related tags found
1 merge request!132feat: add button to navigate to license website in deposit form and org unit website in org unit form
......@@ -62,13 +62,13 @@
[placeholder]="'admin.organizationalUnit.form.url' | translate"
>
<mat-error #errors></mat-error>
<button *ngIf="(fd.disabled || fd.valid) && fd.value!=='' && !(fd.value | isNullOrUndefined)"
<button *ngIf="(fd.disabled || fd.valid) && fd.value !== '' && !(fd.value | isNullOrUndefined)"
matSuffix
mat-button
mat-icon-button
type="button"
aria-label="Clear"
class="clear"
aria-label="Navigate to licence"
class="navigate-to-licence"
(click)="navigateToOrgUnitUrl(fd)"
>
<fa-icon matSuffix
......
......@@ -36,8 +36,8 @@
mat-button
mat-icon-button
type="button"
aria-label="Clear"
class="clear"
aria-label="Navigate to"
class="navigate-to-url"
(click)="navigateToUrl($event)"
>
<fa-icon matSuffix
......
......@@ -101,7 +101,7 @@ export class SharedSearchableSingleSelectPresentational<TStateModel extends Reso
@Input()
urlKey: string;
url: string;
private url: string;
private _readonly: boolean;
@Input()
......@@ -307,7 +307,7 @@ export class SharedSearchableSingleSelectPresentational<TStateModel extends Reso
}
isUrlPresent(): boolean {
return isNonEmptyString(this.formControl.value);
return this.isValuePresent() && !isNullOrUndefined(this.url) && isNonEmptyString(this.url);
}
clearValue($event: MouseEvent): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment