MOBILE-2856 database: Let user leave edit page if error

main
Dani Palou 2019-05-23 17:02:06 +02:00
parent 8d59445509
commit a4dce22c9c
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title"></core-format-text></ion-title>
<ion-buttons end>
<button ion-button clear (click)="save($event)" [attr.aria-label]="'core.save' | translate">
<button *ngIf="entry" ion-button clear (click)="save($event)" [attr.aria-label]="'core.save' | translate">
{{ 'core.save' | translate }}
</button>
</ion-buttons>

View File

@ -94,7 +94,7 @@ export class AddonModDataEditPage {
* @return {boolean | Promise<void>} Resolved if we can leave it, rejected if not.
*/
ionViewCanLeave(): boolean | Promise<void> {
if (this.forceLeave) {
if (this.forceLeave || !this.entry) {
return true;
}