diff --git a/public/modules/forms/base/config/i18n/english.js b/public/modules/forms/base/config/i18n/english.js index dc83635e..0b24dee8 100644 --- a/public/modules/forms/base/config/i18n/english.js +++ b/public/modules/forms/base/config/i18n/english.js @@ -4,25 +4,30 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid $translateProvider.translations('english', { FORM_SUCCESS: 'Form entry successfully submitted!', + SUBMIT: 'Submit', + REVIEW: 'Review', BACK_TO_FORM: 'Go back to Form', EDIT_FORM: 'Edit this TellForm', CREATE_FORM: 'Create this TellForm', ADVANCEMENT: '{{done}} out of {{total}} answered', CONTINUE_FORM: 'Continue to Form', REQUIRED: 'required', + COMPLETING_NEEDED: '{{answers_not_completed}} answer(s) need completing', OPTIONAL: 'optional', ERROR_EMAIL_INVALID: 'Please enter a valid email address', ERROR_NOT_A_NUMBER: 'Please enter valid numbers only', ERROR_URL_INVALID: 'Please a valid url', OK: 'OK', ENTER: 'press ENTER', + YES: 'Yes', + NO: 'No', + NEWLINE: 'press SHIFT+ENTER to create a newline', CONTINUE: 'Continue', LEGAL_ACCEPT: 'I accept', LEGAL_NO_ACCEPT: 'I don’t accept', DELETE: 'Delete', CANCEL: 'Cancel', UPLOAD_FILE: 'Upload your File', - SUBMIT: 'Submit' }); $translateProvider.preferredLanguage('english') diff --git a/public/modules/forms/base/config/i18n/french.js b/public/modules/forms/base/config/i18n/french.js index 3eaa31c7..0b980232 100644 --- a/public/modules/forms/base/config/i18n/french.js +++ b/public/modules/forms/base/config/i18n/french.js @@ -4,25 +4,30 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid $translateProvider.translations('french', { FORM_SUCCESS: 'Votre formulaire a été enregistré!', + REVIEW: 'Review', BACK_TO_FORM: 'Retourner au formulaire', EDIT_FORM: 'Éditer le Tellform', CREATE_FORM: 'Créer un TellForm', ADVANCEMENT: '{{done}} complétés sur {{total}}', CONTINUE_FORM: 'Aller au formulaire', REQUIRED: 'obligatoire', + COMPLETING_NEEDED: '{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)', OPTIONAL: 'facultatif', ERROR_EMAIL_INVALID: 'Merci de rentrer une adresse mail valide', ERROR_NOT_A_NUMBER: 'Merce de ne rentrer que des nombres', ERROR_URL_INVALID: 'Merci de rentrer une url valide', OK: 'OK', ENTER: 'presser ENTRÉE', + YES: 'Oui', + NO: 'Non', + NEWLINE: 'presser SHIFT+ENTER pour créer une nouvelle ligne', CONTINUE: 'Continuer', LEGAL_ACCEPT: 'J’accepte', - LEGAL_NO_ACCEPT: 'Jen n’accepte pas', + LEGAL_NO_ACCEPT: 'Je n’accepte pas', DELETE: 'Supprimer', CANCEL: 'Réinitialiser', - UPLOAD_FILE: 'Envoyer des fichier', - SUBMIT: 'Enregistrer' + SUBMIT: 'Enregistrer', + UPLOAD_FILE: 'Envoyer un fichier', }); }]); diff --git a/public/modules/forms/base/demo/boot.js b/public/modules/forms/base/demo/boot.js index a9534c34..5d808911 100644 --- a/public/modules/forms/base/demo/boot.js +++ b/public/modules/forms/base/demo/boot.js @@ -8,7 +8,7 @@ angular.module('forms', [ angular.module('NodeForm', [ 'ui.select', 'cgBusy', 'ngSanitize', 'vButton', 'ngResource', 'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven', 'forms', - 'ui.select' + 'ui.select' ]); angular.module('forms').factory('Auth', [ diff --git a/public/modules/forms/base/demo/index.html b/public/modules/forms/base/demo/index.html index 648b496a..61083082 100644 --- a/public/modules/forms/base/demo/index.html +++ b/public/modules/forms/base/demo/index.html @@ -39,7 +39,34 @@ diff --git a/public/modules/forms/base/directives/submit-form.client.directive.js b/public/modules/forms/base/directives/submit-form.client.directive.js index 440fc997..043ee96d 100644 --- a/public/modules/forms/base/directives/submit-form.client.directive.js +++ b/public/modules/forms/base/directives/submit-form.client.directive.js @@ -18,9 +18,12 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter' } return true; }).length; + + var nb_valid = $filter('formValidity')($scope.myform); $scope.translateAdvancementData = { - done: $filter('formValidity')($scope.myform), - total: form_fields_count + done: nb_valid, + total: form_fields_count, + answers_not_completed: form_fields_count - nb_valid }; $scope.reloadForm = function(){ @@ -114,9 +117,11 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter' $scope.selected._id = field_id; $scope.selected.index = field_index; + var nb_valid = $filter('formValidity')($scope.myform); $scope.translateAdvancementData = { - done: $filter('formValidity')($scope.myform), - total: form_fields_count + done: nb_valid, + total: form_fields_count, + answers_not_completed: form_fields_count - nb_valid }; if(animateScroll){ diff --git a/public/modules/forms/base/views/directiveViews/field/legal.html b/public/modules/forms/base/views/directiveViews/field/legal.html index 04fff652..0ee6e101 100644 --- a/public/modules/forms/base/views/directiveViews/field/legal.html +++ b/public/modules/forms/base/views/directiveViews/field/legal.html @@ -31,7 +31,7 @@
Y
- {{ 'LEGAL_ACCEPT' | translate }} + {{ 'LEGAL_ACCEPT' | translate }} diff --git a/public/modules/forms/base/views/directiveViews/field/textarea.html b/public/modules/forms/base/views/directiveViews/field/textarea.html index 5280d88a..6214fea7 100755 --- a/public/modules/forms/base/views/directiveViews/field/textarea.html +++ b/public/modules/forms/base/views/directiveViews/field/textarea.html @@ -6,11 +6,9 @@ {{field.title}} - optional + {{ 'OPTIONAL' | translate }} -

- {{field.description}} -

+ {{ 'NEWLINE' | translate }}
Press SHIFT+ENTER to add a newline diff --git a/public/modules/forms/base/views/directiveViews/field/yes_no.html b/public/modules/forms/base/views/directiveViews/field/yes_no.html index 244d8d4b..4ebfe0dc 100644 --- a/public/modules/forms/base/views/directiveViews/field/yes_no.html +++ b/public/modules/forms/base/views/directiveViews/field/yes_no.html @@ -34,7 +34,7 @@
Y
- Yes + {{ 'YES' | translate }}
@@ -61,7 +61,7 @@
N
- No + {{ 'NO' | translate }} diff --git a/public/modules/forms/base/views/directiveViews/form/submit-form.client.view.html b/public/modules/forms/base/views/directiveViews/form/submit-form.client.view.html index 53495188..c2f44b26 100755 --- a/public/modules/forms/base/views/directiveViews/form/submit-form.client.view.html +++ b/public/modules/forms/base/views/directiveViews/form/submit-form.client.view.html @@ -71,6 +71,7 @@ ng-style="{'color':button.color}">
+ {{ 'COMPLETING_NEEDED' | translate:translateAdvancementData }} {{form_fields_count - (myform | formValidity)}} answer(s) need completing
@@ -93,7 +94,7 @@ ng-style="{'color':button.color}"> on-enter-key="goToInvalid()" on-enter-key-disabled="!forms.myForm.$invalid" style="font-size: 1.6em; margin-left: 1em; margin-top: 1em; background-color:#990000; color:white"> - Review + {{ 'REVIEW' | translate }}