Merge pull request #1936 from dpalou/MOBILE-2856
MOBILE-2856 database: Let user leave edit page if errormain
commit
04b45ffaff
|
@ -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>
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue