From 61ec49fd221ffd993e5265a4cd10453e2cfc52a7 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 28 Jan 2022 00:22:54 +0100 Subject: [PATCH] #89 use HTML5 form validity on PGP Generator popup --- dev/View/Popup/OpenPgpGenerate.js | 11 ++--------- .../templates/Views/User/PopupsOpenPgpGenerate.html | 12 ++++++------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/dev/View/Popup/OpenPgpGenerate.js b/dev/View/Popup/OpenPgpGenerate.js index fd66c7a75..0b7277c3b 100644 --- a/dev/View/Popup/OpenPgpGenerate.js +++ b/dev/View/Popup/OpenPgpGenerate.js @@ -3,7 +3,6 @@ import { PgpUserStore } from 'Stores/User/Pgp'; import { IdentityUserStore } from 'Stores/User/Identity'; -import { decorateKoCommands } from 'Knoin/Knoin'; import { AbstractViewPopup } from 'Knoin/AbstractViews'; import { Capa } from 'Common/Enums'; @@ -33,13 +32,9 @@ export class OpenPgpGeneratePopupView extends AbstractViewPopup { this.canGnuPG = Settings.capa(Capa.GnuPG); this.email.subscribe(() => this.emailError(false)); - - decorateKoCommands(this, { - generateOpenPgpKeyCommand: 1 - }); } - generateOpenPgpKeyCommand() { + submitForm() { const type = this.keyType().toLowerCase(), userId = { name: this.name(), @@ -60,7 +55,7 @@ export class OpenPgpGeneratePopupView extends AbstractViewPopup { */ this.emailError(!this.email().trim()); if (this.emailError()) { - return false; + return; } this.submitRequest(true); @@ -81,8 +76,6 @@ export class OpenPgpGeneratePopupView extends AbstractViewPopup { this.submitRequest(false); this.showError(e); }); - - return true; } showError(e) { diff --git a/snappymail/v/0.0.0/app/templates/Views/User/PopupsOpenPgpGenerate.html b/snappymail/v/0.0.0/app/templates/Views/User/PopupsOpenPgpGenerate.html index d1dac25e2..10fa8b72e 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/PopupsOpenPgpGenerate.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/PopupsOpenPgpGenerate.html @@ -2,14 +2,14 @@ ×
-