Skip to content

Commit

Permalink
Added missing backdropDismiss to AlertControllers.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbachman committed Apr 17, 2020
1 parent 9a9f32d commit 033019e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/core/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class MenuComponent implements OnInit {
const prompt = await this.alertCtrl.create({
header: i18n.changePassword.title,
message: i18n.changePassword.message,
backdropDismiss: false,
inputs: [
{
name: 'passwordOld',
Expand Down Expand Up @@ -74,6 +75,7 @@ export class MenuComponent implements OnInit {
const alert = await this.alertCtrl.create({
header: i18n.changePassword.alertTitle,
subHeader: i18n.changePassword.alertSubTitle,
backdropDismiss: false,
buttons: ['OK']
});
await alert.present();
Expand Down Expand Up @@ -104,6 +106,7 @@ export class MenuComponent implements OnInit {
const prompt = await this.alertCtrl.create({
header: i18n.invite.title,
message: i18n.invite.message,
backdropDismiss: false,
inputs: [
{
name: 'email',
Expand All @@ -123,6 +126,7 @@ export class MenuComponent implements OnInit {
const alert = await this.alertCtrl.create({
header: i18n.forgetPassword.alertInvalidTitle,
subHeader: i18n.forgetPassword.alertInvalid,
backdropDismiss: false,
buttons: ['OK']
});
await alert.present();
Expand All @@ -135,6 +139,7 @@ export class MenuComponent implements OnInit {
header: i18n.invite.alertTitle,
subHeader: i18n.invite.alertSubTitle.replace('%email%', data.email),
translucent: true,
backdropDismiss: false,
buttons: ['OK']
});
await alert.present();
Expand Down
11 changes: 10 additions & 1 deletion src/app/modules/main/components/login/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class LoginPage {
const prompt = await this.alertCtrl.create({
header: i18n.forgetPassword.title,
message: i18n.forgetPassword.message,
backdropDismiss: false,
inputs: [
{
name: 'email',
Expand All @@ -136,11 +137,12 @@ export class LoginPage {
},
{
text: i18n.forgetPassword.send,
handler: async data => {
handler: async data => {
if (this.userService.isMailInvalid(data.email)) {
const alert = await this.alertCtrl.create({
header: i18n.forgetPassword.alertInvalidTitle,
subHeader: i18n.forgetPassword.alertInvalid,
backdropDismiss: false,
buttons: ['OK']
});
await alert.present();
Expand All @@ -153,6 +155,7 @@ export class LoginPage {
const alert = await this.alertCtrl.create({
header: i18n.forgetPassword.alertTitle,
subHeader: i18n.forgetPassword.alertSubTitle,
backdropDismiss: false,
buttons: ['OK']
});
await alert.present();
Expand All @@ -162,6 +165,7 @@ export class LoginPage {
const alert = await this.alertCtrl.create({
header: 'Error',
subHeader: (error.status === 0) ? 'No Connection to the Backend!' : error.error,
backdropDismiss: false,
buttons: ['OK']
});
await alert.present();
Expand All @@ -180,6 +184,7 @@ export class LoginPage {
const prompt = await this.alertCtrl.create({
header: i18n.signup.title,
message: i18n.signup.message,
backdropDismiss: false,
inputs: [
{
name: 'email',
Expand Down Expand Up @@ -209,6 +214,7 @@ export class LoginPage {
const invalidEmailAlert = await this.alertCtrl.create({
header: i18n.forgetPassword.alertInvalidTitle,
subHeader: i18n.forgetPassword.alertInvalid,
backdropDismiss: false,
buttons: ['OK']
});
await invalidEmailAlert.present();
Expand All @@ -221,6 +227,7 @@ export class LoginPage {
const invalidPasswordAlert = await this.alertCtrl.create({
header: i18n.signup.alertInvalidPasswordTitle,
subHeader: i18n.signup.alertInvalidPassword,
backdropDismiss: false,
buttons: ['OK']
});
await invalidPasswordAlert.present();
Expand All @@ -233,6 +240,7 @@ export class LoginPage {
const infoDialog = await this.alertCtrl.create({
header: i18n.signup.alertTitle,
subHeader: i18n.signup.alertSubTitle,
backdropDismiss: false,
buttons: ['OK']
});
await infoDialog.present();
Expand All @@ -242,6 +250,7 @@ export class LoginPage {
const errorDialog = await this.alertCtrl.create({
header: 'Error',
subHeader: (error.status === 0) ? 'No Connection to the Backend!' : error.error,
backdropDismiss: false,
buttons: ['OK']
});
await errorDialog.present();
Expand Down

0 comments on commit 033019e

Please sign in to comment.