Merge pull request #1936 from dpalou/MOBILE-2856

MOBILE-2856 database: Let user leave edit page if error
main
Juan Leyva 2019-05-23 17:03:43 +02:00 committed by GitHub
commit 04b45ffaff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<ion-navbar core-back-button> <ion-navbar core-back-button>
<ion-title><core-format-text [text]="title"></core-format-text></ion-title> <ion-title><core-format-text [text]="title"></core-format-text></ion-title>
<ion-buttons end> <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 }} {{ 'core.save' | translate }}
</button> </button>
</ion-buttons> </ion-buttons>

View File

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