reinit modal to add img link after validation of popup

Signed-off-by: tykayn <15d65f2f-0b14-4f70-bf34-e130180ed62b@users.tedomum.net>
This commit is contained in:
tykayn 2022-02-09 15:55:16 +01:00
parent a14ccb3ddd
commit 8f850d1c3e
2 changed files with 9 additions and 2 deletions

View File

@ -12,9 +12,14 @@
<div class="href-preview" *ngIf="choice.url_href"> <div class="href-preview" *ngIf="choice.url_href">
{{ choice.url_href }} {{ choice.url_href }}
</div> </div>
<button (click)="openLinkModal(choice)" class="has-no-outline" *ngIf="!choice.url_href || !choice.url_display"> <button (click)="openLinkModal(choice)" class="has-no-outline">
<img class="icon" src="assets/icons/link.svg" /> <img class="icon" src="assets/icons/link.svg" />
{{ 'choices.add_link' | translate }} <span *ngIf="!choice.url_href || !choice.url_display">
{{ 'choices.add_link' | translate }}
</span>
<span *ngIf="choice.url_href || choice.url_display">
{{ 'SENTENCES.Edit' | translate }}
</span>
</button> </button>
<button class="button delete-date is-block" (click)="StorageService.choicesText.splice(ii, 1)"> <button class="button delete-date is-block" (click)="StorageService.choicesText.splice(ii, 1)">
<img class="icon" src="assets/icons/trash.svg" /> <img class="icon" src="assets/icons/trash.svg" />

View File

@ -30,6 +30,8 @@ export class OptionLinkComponent implements OnInit {
this.choice_for_modal.url_href = '' + this.url_href; this.choice_for_modal.url_href = '' + this.url_href;
this.choice_for_modal.url_display = '' + this.url_display; this.choice_for_modal.url_display = '' + this.url_display;
this.display_option_dialog = false; this.display_option_dialog = false;
this.url_href = '';
this.url_display = '';
} }
closeModal() { closeModal() {