From 5ec9a2ac5d47a341e424fb539781ed2ff3829959 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 18 Oct 2015 11:38:09 +0200 Subject: [PATCH] Issue #14 add missing field validation (router name / email) if IPs should be registered automatically and the VPN files should be generated automatically the router name and user email are required. --- src/index.html | 44 +++++++++++++++++++++++++++++++++++------- src/nls/locale-de.json | 4 +++- src/nls/locale-en.json | 2 ++ 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/src/index.html b/src/index.html index bd41440..826f801 100644 --- a/src/index.html +++ b/src/index.html @@ -71,10 +71,27 @@

-
- +
+
- + + +
+
+ .routerName.error.required +
+
@@ -97,7 +114,7 @@

.error.required -
+
.error.minLength
@@ -156,12 +173,25 @@

-
+
- + data-ng-model="wizard.contact.email" + data-ng-required="(wizard.internet.share && wizard.internet.vpn03.enabled && state.internet.vpn03.generate) || state.ip.register"> + +
+
+ .email.error.required +
+
diff --git a/src/nls/locale-de.json b/src/nls/locale-de.json index 1cdd7f0..300288c 100644 --- a/src/nls/locale-de.json +++ b/src/nls/locale-de.json @@ -3,7 +3,8 @@ "basicRouterSetup": { "headline":"Grundlegende Routereinstellungen", "routerName": { - "label": "Router name", + "label": "Router Name", + "error.required": "Der Router Name wird benötigt um IPs und VPN Dateien automatisch zu registrieren.", "placeholder": "Name des Routers" }, "password": { @@ -26,6 +27,7 @@ }, "email": { "label":"Email", + "error.required": "Deine EMail Addresse wird zur Bestätigung der automatisch generierten IPs und / oder VPN Dateien benötigt.", "placeholder": "funki@fine.net" } }, diff --git a/src/nls/locale-en.json b/src/nls/locale-en.json index 233d8c1..0aba6b1 100644 --- a/src/nls/locale-en.json +++ b/src/nls/locale-en.json @@ -4,6 +4,7 @@ "headline":"Basic router setup", "routerName": { "label": "Router name", + "error.required": "In order to register IPs or generate VPN connection files the router name is required.", "placeholder": "name of the router" }, "password": { @@ -26,6 +27,7 @@ }, "email": { "label":"Email", + "error.required": "In order to confirm IPs or generate VPN connections files your email address is required", "placeholder": "funki@fine.net" } },