From 54514756367c12a8e788e713d2d1c9a4b0b80241 Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Mon, 30 Oct 2017 11:41:34 -0700 Subject: [PATCH] added translations for email notification panel --- app/controllers/forms.server.controller.js | 4 +- public/dist/form_populate_template_cache.js | 18 +- .../forms/admin/config/i18n/english.js | 3 + .../modules/forms/admin/config/i18n/french.js | 5 + .../modules/forms/admin/config/i18n/german.js | 5 + .../forms/admin/config/i18n/italian.js | 5 + .../forms/admin/config/i18n/spanish.js | 5 + .../form/configure-form.client.view.html | 312 +++++++++--------- 8 files changed, 195 insertions(+), 162 deletions(-) diff --git a/app/controllers/forms.server.controller.js b/app/controllers/forms.server.controller.js index ef02dabf..0472e613 100644 --- a/app/controllers/forms.server.controller.js +++ b/app/controllers/forms.server.controller.js @@ -118,19 +118,17 @@ exports.listSubmissions = function(req, res) { * Create a new form */ exports.create = function(req, res) { - debugger; if(!req.body.form){ return res.status(401).send({ message: 'Invalid Input' }); } + var form = new Form(req.body.form); - form.admin = req.user._id; form.save(function(err) { - debugger; if (err) { return res.status(500).send({ message: errorHandler.getErrorMessage(err) diff --git a/public/dist/form_populate_template_cache.js b/public/dist/form_populate_template_cache.js index e89e3c03..3e094dc7 100644 --- a/public/dist/form_populate_template_cache.js +++ b/public/dist/form_populate_template_cache.js @@ -1,4 +1,4 @@ -angular.module('TellForm-Form.form_templates', []).run(['$templateCache', function($templateCache) { +angular.module('TellForm-Form.form_templates', []).run(['$templateCache', function ($templateCache) { "use strict"; $templateCache.put("form_modules/forms/base/views/form-not-found.client.view.html", "

{{ 'FORM_404_HEADER' | translate }}

{{ 'FORM_404_BODY' | translate }}
"); @@ -10,26 +10,26 @@ angular.module('TellForm-Form.form_templates', []).run(['$templateCache', functi $templateCache.put("form_modules/forms/base/views/directiveViews/entryPage/startPage.html", "

{{pageData.introTitle}}

{{pageData.introParagraph}}

"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/date.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); + "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/dropdown.html", - "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); + "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/hidden.html", ""); $templateCache.put("form_modules/forms/base/views/directiveViews/field/legal.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}


{{field.description}}


"); + "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}


{{field.description}}


"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/radio.html", - "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); + "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/rating.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); + "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/statement.html", "

{{field.title}}

{{field.description}}

{{field.description}}


"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/textarea.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{ 'NEWLINE' | translate }}

{{field.description}}

{{ 'ADD_NEW_LINE_INSTR' | translate }}
{{ 'ENTER' | translate }}
"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/textfield.html", - "

{{index+1}} {{field.title}} ({{ 'OPTIONAL' | translate }})

{{field.description}}

{{ 'ENTER' | translate }}
"); + "

{{index+1}} {{field.title}} ({{ 'OPTIONAL' | translate }})

{{field.description}}

{{ 'ENTER' | translate }}
"); $templateCache.put("form_modules/forms/base/views/directiveViews/field/yes_no.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); + "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); $templateCache.put("form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html", "

{{myform.startPage.introTitle}}

{{myform.startPage.introParagraph}}

{{ 'COMPLETING_NEEDED' | translate:translateAdvancementData }}
{{ 'ENTER' | translate }}

{{ 'ADVANCEMENT' | translate:translateAdvancementData }}

{{ 'FORM_SUCCESS' | translate }}

{{myform.endPage.title}}

{{myform.endPage.paragraph}}

"); }]); diff --git a/public/modules/forms/admin/config/i18n/english.js b/public/modules/forms/admin/config/i18n/english.js index a2d83837..c6189d9f 100644 --- a/public/modules/forms/admin/config/i18n/english.js +++ b/public/modules/forms/admin/config/i18n/english.js @@ -18,6 +18,9 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid DISPLAY_END_PAGE: 'Display Custom End Page?', ENABLE_EMAIL_NOTIFICATIONS: 'Enable Email Notifications', EMAIL_NOTIFICATION_RECIPIENTS: 'Email Notification Recipients', + GENERAL_TAB: 'General', + SELF_NOTIFICATIONS_TAB: 'Self notifications', + RESPONDANT_NOTIFICATIONS_TAB: 'Respondent notifications', //List Forms View CREATE_A_NEW_FORM: 'Create a new form', diff --git a/public/modules/forms/admin/config/i18n/french.js b/public/modules/forms/admin/config/i18n/french.js index cc2187e8..ba63001d 100644 --- a/public/modules/forms/admin/config/i18n/french.js +++ b/public/modules/forms/admin/config/i18n/french.js @@ -15,6 +15,11 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid CANCEL: 'Annuler', DISPLAY_START_PAGE: "Afficher la page de démarrage?", DISPLAY_END_PAGE: "Afficher la page de fin personnalisée?", + ENABLE_EMAIL_NOTIFICATIONS: 'Enable Email Notifications', + EMAIL_NOTIFICATION_RECIPIENTS: 'Email Notification Recipients', + GENERAL_TAB: 'General', + SELF_NOTIFICATIONS_TAB: 'Self notifications', + RESPONDANT_NOTIFICATIONS_TAB: 'Respondent notifications', // Afficher les formulaires CREATE_A_NEW_FORM: "Créer un nouveau formulaire", diff --git a/public/modules/forms/admin/config/i18n/german.js b/public/modules/forms/admin/config/i18n/german.js index 0ea8d351..79bf7ee9 100644 --- a/public/modules/forms/admin/config/i18n/german.js +++ b/public/modules/forms/admin/config/i18n/german.js @@ -15,6 +15,11 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid CANCEL: 'Abbrechen', DISPLAY_START_PAGE: 'Startseite anzeigen?', DISPLAY_END_PAGE: 'Benutzerdefinierte Endseite anzeigen?', + ENABLE_EMAIL_NOTIFICATIONS: 'E-Mail-Benachrichtigungen aktivieren', + EMAIL_NOTIFICATION_RECIPIENTS: 'E-Mail-Benachrichtigungsempfänger', + GENERAL_TAB: 'Allgemein', + SELF_NOTIFICATIONS_TAB: 'Selbstbenachrichtigungen', + RESPONDANT_NOTIFICATIONS_TAB: 'Beantwortungsbenachrichtigungen', // Listenformularansicht CREATE_A_NEW_FORM: 'Erstelle ein neues Formular', diff --git a/public/modules/forms/admin/config/i18n/italian.js b/public/modules/forms/admin/config/i18n/italian.js index 17665625..f696c0f7 100644 --- a/public/modules/forms/admin/config/i18n/italian.js +++ b/public/modules/forms/admin/config/i18n/italian.js @@ -15,6 +15,11 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid CANCEL: 'Annulla', DISPLAY_START_PAGE: 'Visualizza pagina iniziale?', DISPLAY_END_PAGE: 'Mostra pagina finale personalizzata?', + ENABLE_EMAIL_NOTIFICATIONS: 'Attiva notifiche e-mail', + EMAIL_NOTIFICATION_RECIPIENTS: 'Destinatari di notifica e-mail', + GENERAL_TAB: 'Generale', + SELF_NOTIFICATIONS_TAB: 'Autodiagnosi', + RESPONDANT_NOTIFICATIONS_TAB: 'Notifiche rispondenti', // Visualizzazione dei moduli di elenco CREATE_A_NEW_FORM: 'Crea un nuovo modulo', diff --git a/public/modules/forms/admin/config/i18n/spanish.js b/public/modules/forms/admin/config/i18n/spanish.js index 8e0985ed..29b55c97 100644 --- a/public/modules/forms/admin/config/i18n/spanish.js +++ b/public/modules/forms/admin/config/i18n/spanish.js @@ -16,6 +16,11 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid CANCEL: 'Cancelar', DISPLAY_START_PAGE: '¿Mostrar página de inicio?', DISPLAY_END_PAGE: '¿Mostrar paǵina de fin?', + ENABLE_EMAIL_NOTIFICATIONS: 'Habilitar notificaciones por correo electrónico', + EMAIL_NOTIFICATION_RECIPIENTS: 'Destinatarios de notificación de correo electrónico', + GENERAL_TAB: 'General', + SELF_NOTIFICATIONS_TAB: 'Auto notificaciones', + RESPONDANT_NOTIFICATIONS_TAB: 'Notificaciones de los demandados', //List Forms View CREATE_A_NEW_FORM: 'Crear formulario', diff --git a/public/modules/forms/admin/views/directiveViews/form/configure-form.client.view.html b/public/modules/forms/admin/views/directiveViews/form/configure-form.client.view.html index 54f8b964..a85814f4 100644 --- a/public/modules/forms/admin/views/directiveViews/form/configure-form.client.view.html +++ b/public/modules/forms/admin/views/directiveViews/form/configure-form.client.view.html @@ -1,169 +1,181 @@
- -
-
-
-
-
{{ 'FORM_NAME' | translate }}
-
-
- -
-
+ + + +
+
+
+
+
{{ 'FORM_NAME' | translate }}
+
-
-
-
{{ 'FORM_STATUS' | translate }}
-
+
+ +
+
-
+
+
+
{{ 'FORM_STATUS' | translate }}
+
- +
- + -
-
+ -
-
-
{{ 'ENABLE_EMAIL_NOTIFICATIONS' | translate }}
-
+
+
-
+
+
+
{{ 'ENABLE_EMAIL_NOTIFICATIONS' | translate }}
+
- +
- - -
-
+ -
-
-
{{ 'EMAIL_NOTIFICATION_RECIPIENTS' | translate }}
+ + +
+
+ +
+
+
{{ 'EMAIL_NOTIFICATION_RECIPIENTS' | translate }}
+
+ +
+ +
+
+ + +
+
{{ 'LANGUAGE' | translate }}
+
+ + * {{ 'REQUIRED_FIELD' | translate }} +
+
+
+
+
+
+
{{ 'GA_TRACKING_CODE' | translate }}
+
+ +
+ +
+
+
+
+
{{ 'DISPLAY_FOOTER' | translate }}
+
+ +
+ + + +
+
+ +
+
+
{{ 'DISPLAY_START_PAGE' | translate }}
+
+ +
+ + + + + +
+
+ +
+
+
{{ 'DISPLAY_END_PAGE' | translate }}
+
+ +
+ + + + + +
+
+
+ -
- -
-
+ + + + + -
-
{{ 'LANGUAGE' | translate }}
-
- - * {{ 'REQUIRED_FIELD' | translate }} -
-
-
-
-
-
-
{{ 'GA_TRACKING_CODE' | translate }}
-
- -
- -
-
-
-
-
{{ 'DISPLAY_FOOTER' | translate }}
-
- -
- - - -
-
- -
-
-
{{ 'DISPLAY_START_PAGE' | translate }}
-
- -
- - - - - -
-
- -
-
-
{{ 'DISPLAY_END_PAGE' | translate }}
-
- -
- - - - - -
-
-
-