diff --git a/.env.sample b/.env.sample index 42db9fd..bac955c 100644 --- a/.env.sample +++ b/.env.sample @@ -1,6 +1,8 @@ NODE_ENV='development' SERVER_URL='http://localhost' SERVER_PORT=5000 +MEMBER_CLIENT_PATH='/member-client' +USER_CLIENT_PATH='/user-client' HTTP_PORT=5000 HTTPS_PORT=5443 POSTGRES_HOST='localhost' diff --git a/README.md b/README.md index 4a6f4c9..7930df1 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,12 @@ git clone https://github.com/sitcomlab/Ethics-app.git node npm install ``` +* Alternatively you can also use **yarn** for that (run the command with `sudo`, if you don't have permission): + +``` +yarn install +``` + ##### 2.4. Bower * Install Bower via **npm** (run the command with `sudo`, if you don't have permission): @@ -255,6 +261,8 @@ node server.js * `NODE_ENV`: server environment (default: `development`, option: `production`, which uses https with a certificate) * `SERVER_URL`: url/domain of the host-server (default: `http://ethics-app.uni-muenster.de`) * `SERVER_PORT`: port number of the host-server (default: `80`) + * `MEMBER_CLIENT_PATH`: path to the member-client on the host-server (default: `/member-client`) + * `USER_CLIENT_PATH`: path to the user-client on the host-server (default: `/user-client`) * `HTTP_PORT`: port number of the nodejs-server: (default: `5000`) * `HTTPS_PORT`: secure port number of the nodejs-server: (default: `HTTP_PORT + 443`) * `POSTGRES_HOST`: Postgres host address (default: `localhost`) diff --git a/controllers/documents/change_status.js b/controllers/documents/change_status.js index 5d3416f..c223b70 100644 --- a/controllers/documents/change_status.js +++ b/controllers/documents/change_status.js @@ -5,10 +5,10 @@ var types = require('pg').types; types.setTypeParser(1700, 'text', parseFloat); var _ = require('underscore'); var jwt = require('jsonwebtoken'); -var jwtSecret = require('../../server.js').jwtSecret; var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var user_client_path = process.env.USER_CLIENT_PATH; var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -380,6 +380,7 @@ exports.request = function(req, res) { status_description_1: status_description_1, status_description_2: status_description_2, domain: domain, + user_client_path: user_client_path, year: moment().format("YYYY") }); diff --git a/controllers/documents/post.js b/controllers/documents/post.js index d87c5d3..77ba2e8 100644 --- a/controllers/documents/post.js +++ b/controllers/documents/post.js @@ -8,6 +8,7 @@ var uuid = require('uuid'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var user_client_path = process.env.USER_CLIENT_PATH; var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -211,6 +212,7 @@ exports.request = function(req, res) { user: user, document: document, domain: domain, + user_client_path: user_client_path, year: moment().format("YYYY") }); diff --git a/controllers/documents/submit.js b/controllers/documents/submit.js index 74525c3..228e387 100644 --- a/controllers/documents/submit.js +++ b/controllers/documents/submit.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var member_client_path = process.env.MEMBER_CLIENT_PATH; var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -373,9 +374,6 @@ exports.request = function(req, res) { concern.q13_sign = "no"; } - // Formatting - document.link = domain + "/committee/documents/" + document.document_id + "/login"; - // Notify each committee member async.eachOfSeries(members, function (member, key, callback) { @@ -389,6 +387,7 @@ exports.request = function(req, res) { concern: concern, course: course, domain: domain, + member_client_path: member_client_path, year: moment().format("YYYY") }); diff --git a/controllers/members/post.js b/controllers/members/post.js index 77f8f95..33332c9 100644 --- a/controllers/members/post.js +++ b/controllers/members/post.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var member_client_path = process.env.MEMBER_CLIENT_PATH; var jwt = require('jsonwebtoken'); var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -38,7 +39,7 @@ exports.request = function(req, res) { var token = req.headers.authorization.substring(7); // Verify token - jwt.verify(token, jwtSecret, function(err, decoded) { + jwt.verify(token, process.env.JWTSECRET, function(err, decoded) { if(err){ callback(new Error("Authorization failed"), 401); } else { @@ -89,6 +90,7 @@ exports.request = function(req, res) { var output = mustache.render(template_member_account_created, { member: member, domain: domain, + member_client_path: member_client_path, year: moment().format("YYYY") }); diff --git a/controllers/members/put.js b/controllers/members/put.js index 60e3434..38f563f 100644 --- a/controllers/members/put.js +++ b/controllers/members/put.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var member_client_path = process.env.MEMBER_CLIENT_PATH; var jwt = require('jsonwebtoken'); var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -224,6 +225,7 @@ exports.request = function(req, res) { member: member, updated_member: updated_member, domain: domain, + member_client_path: member_client_path, year: moment().format("YYYY") }); } else { @@ -233,6 +235,7 @@ exports.request = function(req, res) { member: member, updated_member: updated_member, domain: domain, + member_client_path: member_client_path, year: moment().format("YYYY") }); } diff --git a/controllers/recovery/find_member_by_email.js b/controllers/recovery/find_member_by_email.js index 782cc7b..33aeb7c 100644 --- a/controllers/recovery/find_member_by_email.js +++ b/controllers/recovery/find_member_by_email.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var member_client_path = process.env.MEMBER_CLIENT_PATH; var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; var jwt = require('jsonwebtoken'); @@ -78,6 +79,7 @@ exports.request = function(req, res) { var output = mustache.render(template_member_recovery, { member: member, domain: domain, + member_client_path: member_client_path, year: moment().format("YYYY") }); diff --git a/controllers/recovery/find_user_by_email.js b/controllers/recovery/find_user_by_email.js index 61c308a..46d71e3 100644 --- a/controllers/recovery/find_user_by_email.js +++ b/controllers/recovery/find_user_by_email.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var user_client_path = process.env.USER_CLIENT_PATH; var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -142,6 +143,7 @@ exports.request = function(req, res) { amount: amount, amount_description: amount_description, domain: domain, + user_client_path: user_client_path, year: moment().format("YYYY") }); diff --git a/controllers/recovery/reset_password.js b/controllers/recovery/reset_password.js index 0e1a510..c10ac5a 100644 --- a/controllers/recovery/reset_password.js +++ b/controllers/recovery/reset_password.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var member_client_path = process.env.MEMBER_CLIENT_PATH; var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; var jwt = require('jsonwebtoken'); diff --git a/controllers/users/post.js b/controllers/users/post.js index b645acb..a3c2964 100644 --- a/controllers/users/post.js +++ b/controllers/users/post.js @@ -7,6 +7,7 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var user_client_path = process.env.USER_CLIENT_PATH; var jwt = require('jsonwebtoken'); var pool = require('../../server.js').pool; var transporter = require('../../server.js').transporter; @@ -57,6 +58,7 @@ exports.request = function(req, res) { var output = mustache.render(template_user_account_created, { user: user, domain: domain, + user_client_path: user_client_path, year: moment().format("YYYY") }); diff --git a/controllers/users/put.js b/controllers/users/put.js index 8baaf69..ce2e0e6 100644 --- a/controllers/users/put.js +++ b/controllers/users/put.js @@ -7,9 +7,9 @@ var _ = require('underscore'); var mustache = require('mustache'); var moment = require('moment'); var domain = process.env.SERVER_URL + ":" + process.env.SERVER_PORT; +var user_client_path = process.env.USER_CLIENT_PATH; var jwt = require('jsonwebtoken'); var pool = require('../../server.js').pool; -var jwtSecret = require('../../server.js').jwtSecret; var transporter = require('../../server.js').transporter; var fs = require("fs"); @@ -141,6 +141,8 @@ exports.request = function(req, res) { output = mustache.render(template_user_account_blocked, { user: user, updated_user: updated_user, + domain: domain, + user_client_path: user_client_path, year: moment().format("YYYY") }); } else { @@ -149,6 +151,8 @@ exports.request = function(req, res) { output = mustache.render(template_user_account_reactivated, { user: user, updated_user: updated_user, + domain: domain, + user_client_path: user_client_path, year: moment().format("YYYY") }); } diff --git a/public/member-client/js/controllers/account/editController.js b/public/member-client/js/controllers/account/editController.js index 9831603..8e6bfa1 100644 --- a/public/member-client/js/controllers/account/editController.js +++ b/public/member-client/js/controllers/account/editController.js @@ -2,7 +2,7 @@ var app = angular.module("ethics-app"); // Account edit controller -app.controller("accountEditController", function($scope, $rootScope, $routeParams, $filter, $translate, $location, config, $window, $authenticationService, $memberService, $universityService, $instituteService, $workingGroupService) { +app.controller("accountEditController", function($scope, $rootScope, $routeParams, $filter, $translate, $location, config, $window, $timeout, $authenticationService, $memberService, $universityService, $instituteService, $workingGroupService) { /************************************************* FUNCTIONS @@ -82,36 +82,40 @@ app.controller("accountEditController", function($scope, $rootScope, $routeParam // Cache token var token = $authenticationService.getToken(); - // Check if passwords are equal, if it has been changed + // Check if has been changed if($scope.updated_member.new_password){ + // Check if new passwords are equal if($scope.updated_member.password === $scope.repeated_password){ - $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_MEMBER') }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_ACCOUNT_SETTINGS') }; // Update member $memberService.edit($scope.authenticated_member.member_id, $scope.updated_member) .then(function onSuccess(response) { - var authenticated_member = response.data; - authenticated_member.token = token; - $authenticationService.set(authenticated_member); + response.data.token = token; + $authenticationService.set(response.data); + + // Reset navbar + $scope.$parent.authenticated_member = $authenticationService.get(); + $scope.$parent.loading = { status: false, message: "" }; // Redirect $scope.redirect("/members/" + $scope.authenticated_member.member_id); + }) .catch(function onError(response) { $window.alert(response.data); }); } else { - $window.alert("Your passwords are not equal!"); + $window.alert($filter('translate')('ALERT_PASSWORD_NOT_EQUAL')); } } else { - $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_MEMBER') }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_ACCOUNT_SETTINGS') }; // Update member $memberService.edit($scope.authenticated_member.member_id, $scope.updated_member) .then(function onSuccess(response) { - var authenticated_member = response.data; - authenticated_member.token = token; - $authenticationService.set(authenticated_member); + response.data.token = token; + $authenticationService.set(response.data); // Reset navbar $scope.$parent.authenticated_member = $authenticationService.get(); @@ -136,7 +140,7 @@ app.controller("accountEditController", function($scope, $rootScope, $routeParam // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -156,7 +160,7 @@ app.controller("accountEditController", function($scope, $rootScope, $routeParam case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -189,7 +193,7 @@ app.controller("accountEditController", function($scope, $rootScope, $routeParam case 'working_groups': { if($scope.institute_id){ if($scope.institute_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading working groups" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUPS') }; // Load related working groups $workingGroupService.listByInstitute($scope.institute_id, { @@ -225,6 +229,7 @@ app.controller("accountEditController", function($scope, $rootScope, $routeParam /************************************************* INIT *************************************************/ + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_ACCOUNT_SETTINGS') }; $scope.authenticated_member = $authenticationService.get(); $scope.repeated_password = ""; diff --git a/public/member-client/js/controllers/course/createController.js b/public/member-client/js/controllers/course/createController.js index 4d6e360..d9effc2 100644 --- a/public/member-client/js/controllers/course/createController.js +++ b/public/member-client/js/controllers/course/createController.js @@ -44,7 +44,7 @@ app.controller("courseCreateController", function($scope, $rootScope, $routePara $scope.createCourseForm.lecturer.$pristine = false; $scope.createCourseForm.institute_id.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Creating new course" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('CREATING_NEW_COURSE') }; // Create new course $courseService.create($scope.new_course) @@ -111,7 +111,7 @@ app.controller("courseCreateController", function($scope, $rootScope, $routePara // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -131,7 +131,7 @@ app.controller("courseCreateController", function($scope, $rootScope, $routePara case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -172,7 +172,7 @@ app.controller("courseCreateController", function($scope, $rootScope, $routePara case 'members': { if($scope.new_course.institute_id){ if($scope.new_course.institute_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_MEMBERS') }; // Load related members $memberService.listByInstitute($scope.new_course.institute_id, { diff --git a/public/member-client/js/controllers/course/deleteController.js b/public/member-client/js/controllers/course/deleteController.js index 4726172..770be5d 100644 --- a/public/member-client/js/controllers/course/deleteController.js +++ b/public/member-client/js/controllers/course/deleteController.js @@ -22,7 +22,7 @@ app.controller("courseDeleteController", function($scope, $rootScope, $routePara * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting course" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_COURSE') }; // Delete course $courseService.remove($scope.course.course_id) @@ -37,7 +37,7 @@ app.controller("courseDeleteController", function($scope, $rootScope, $routePara /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading course" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_COURSE') }; $scope.input = ""; // Load course diff --git a/public/member-client/js/controllers/course/detailsController.js b/public/member-client/js/controllers/course/detailsController.js index 3fe4252..d4bfdcf 100644 --- a/public/member-client/js/controllers/course/detailsController.js +++ b/public/member-client/js/controllers/course/detailsController.js @@ -57,7 +57,7 @@ app.controller("courseDetailsController", function($scope, $rootScope, $routePar // Check which kind of related data needs to be requested switch (related_data) { case 'documents': { - $scope.$parent.loading = { status: true, message: "Loading related documents" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_DOCUMENTS') }; // Load related documents $documentsService.listByCourse($scope.course.course_id, $scope.filter) @@ -93,7 +93,7 @@ app.controller("courseDetailsController", function($scope, $rootScope, $routePar break; } case 'members': { - $scope.$parent.loading = { status: true, message: "Loading related members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_MEMBERS') }; // Load related members $memberService.listByCourse($scope.course.course_id, $scope.filter) @@ -146,7 +146,7 @@ app.controller("courseDetailsController", function($scope, $rootScope, $routePar /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading course" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_COURSE') }; $scope.authenticated_member = $authenticationService.get(); // Filter diff --git a/public/member-client/js/controllers/course/editController.js b/public/member-client/js/controllers/course/editController.js index 0ef21d2..c14c603 100644 --- a/public/member-client/js/controllers/course/editController.js +++ b/public/member-client/js/controllers/course/editController.js @@ -44,7 +44,7 @@ app.controller("courseEditController", function($scope, $rootScope, $routeParams $scope.editCourseForm.lecturer.$pristine = false; $scope.editCourseForm.institute_id.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Saving course" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_COURSE') }; // Updating course $courseService.edit($routeParams.course_id, $scope.updated_course) @@ -110,7 +110,7 @@ app.controller("courseEditController", function($scope, $rootScope, $routeParams // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -130,7 +130,7 @@ app.controller("courseEditController", function($scope, $rootScope, $routeParams case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -171,7 +171,7 @@ app.controller("courseEditController", function($scope, $rootScope, $routeParams case 'members': { if($scope.updated_course.institute_id){ if($scope.updated_course.institute_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_MEMBERS') }; // Load related members $memberService.listByInstitute($scope.updated_course.institute_id, { @@ -209,7 +209,7 @@ app.controller("courseEditController", function($scope, $rootScope, $routeParams /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading course" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_COURSE') }; $scope.selectedMember = {}; $scope.responsible_members = []; diff --git a/public/member-client/js/controllers/course/listController.js b/public/member-client/js/controllers/course/listController.js index e380248..e529542 100644 --- a/public/member-client/js/controllers/course/listController.js +++ b/public/member-client/js/controllers/course/listController.js @@ -128,7 +128,7 @@ app.controller("courseListController", function($scope, $rootScope, $filter, $tr /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading courses" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_COURSES') }; // Load courses $scope.filter = $courseService.getCachedFilter(); diff --git a/public/member-client/js/controllers/document/deleteController.js b/public/member-client/js/controllers/document/deleteController.js index ec11d75..362618c 100644 --- a/public/member-client/js/controllers/document/deleteController.js +++ b/public/member-client/js/controllers/document/deleteController.js @@ -22,7 +22,7 @@ app.controller("documentDeleteController", function($scope, $rootScope, $routePa * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_DOCUMENT') }; // Delete document $documentService.remove($scope.document.document_id) @@ -48,7 +48,7 @@ app.controller("documentDeleteController", function($scope, $rootScope, $routePa /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENT') }; $scope.input = ""; // Update navbar diff --git a/public/member-client/js/controllers/document/detailsController.js b/public/member-client/js/controllers/document/detailsController.js index ccb656e..9edafd1 100644 --- a/public/member-client/js/controllers/document/detailsController.js +++ b/public/member-client/js/controllers/document/detailsController.js @@ -21,7 +21,7 @@ app.controller("documentDetailsController", function($scope, $rootScope, $routeP /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENT') }; // Reset $documentService.set(); @@ -34,7 +34,7 @@ app.controller("documentDetailsController", function($scope, $rootScope, $routeP $documentService.retrieve($routeParams.document_id) .then(function onSuccess(response) { $documentService.set(response.data); - $scope.$parent.loading = { status: true, message: "Loading revisions" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_REVISIONS') }; $timeout(function(){ // Load revisions diff --git a/public/member-client/js/controllers/document/editSettingsController.js b/public/member-client/js/controllers/document/editSettingsController.js index f651284..fd8b0bd 100644 --- a/public/member-client/js/controllers/document/editSettingsController.js +++ b/public/member-client/js/controllers/document/editSettingsController.js @@ -30,7 +30,7 @@ app.controller("documentEditSettingsController", function($scope, $rootScope, $r $scope.editDocumentForm.status.$pristine = false; $scope.editDocumentForm.course_id.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Saving document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_DOCUMENT') }; // Save document $documentService.edit($routeParams.document_id, $scope.updated_document) @@ -85,7 +85,7 @@ app.controller("documentEditSettingsController", function($scope, $rootScope, $r // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -105,7 +105,7 @@ app.controller("documentEditSettingsController", function($scope, $rootScope, $r case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -138,7 +138,7 @@ app.controller("documentEditSettingsController", function($scope, $rootScope, $r case 'courses': { if($scope.institute_id){ if($scope.institute_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading courses" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_COURSES') }; // Load related courses $courseService.listByInstitute($scope.institute_id, { @@ -184,7 +184,7 @@ app.controller("documentEditSettingsController", function($scope, $rootScope, $r /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENT') }; $scope.document = $documentService.get(); $scope.updated_document = $documentService.copy($scope.document); $scope.authenticated_member = $authenticationService.get(); diff --git a/public/member-client/js/controllers/document/listController.js b/public/member-client/js/controllers/document/listController.js index 0f9c763..60f0bb3 100644 --- a/public/member-client/js/controllers/document/listController.js +++ b/public/member-client/js/controllers/document/listController.js @@ -158,7 +158,7 @@ app.controller("documentListController", function($scope, $rootScope, $filter, $ /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading documents" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENTS') }; $scope.authenticated_member = $authenticationService.get(); // Load documents with applied filter (default: documents, which need to be reviewed) and start the interval diff --git a/public/member-client/js/controllers/document/overviewController.js b/public/member-client/js/controllers/document/overviewController.js index f637fea..ed82c9c 100644 --- a/public/member-client/js/controllers/document/overviewController.js +++ b/public/member-client/js/controllers/document/overviewController.js @@ -22,7 +22,7 @@ app.controller("documentOverviewController", function($scope, $rootScope, $route * @return {[type]} [description] */ $scope.closeOverview = function(){ - $scope.$parent.loading = { status: true, message: "Saving notes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_NOTES') }; // Save notes $noteService.save($scope.document.note_id, { "note": $scope.document.note }) @@ -168,7 +168,7 @@ app.controller("documentOverviewController", function($scope, $rootScope, $route * @return {[type]} [description] */ $scope.reviewDocument = function(){ - $scope.$parent.loading = { status: true, message: "Updating reviewer" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('UPDATING_REVIEWER') }; // Update reviewer var revision = $documentService.getLatestRevision(); @@ -182,21 +182,21 @@ app.controller("documentOverviewController", function($scope, $rootScope, $route status: 4 }) .then(function onSuccess(response) { - $scope.$parent.loading = { status: true, message: "Saving notes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_NOTES') }; $timeout(function(){ // Save notes $noteService.save($scope.document.note_id, { "note": $scope.document.note }) .then(function onSuccess(response) { - $scope.$parent.loading = { status: true, message: "Loading document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENT') }; $timeout(function(){ // Load document $documentService.retrieve($routeParams.document_id) .then(function onSuccess(response) { $documentService.set(response.data); - $scope.$parent.loading = { status: true, message: "Loading revisions" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_REVISIONS') }; $timeout(function(){ @@ -346,7 +346,7 @@ app.controller("documentOverviewController", function($scope, $rootScope, $route /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading document overview" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_OVERVIEW') }; $scope.document = $documentService.get(); $scope.latest_revision = $documentService.getLatestRevision(); $scope.authenticated_member = $authenticationService.get(); diff --git a/public/member-client/js/controllers/document/reviewController.js b/public/member-client/js/controllers/document/reviewController.js index e352a5d..32e7161 100644 --- a/public/member-client/js/controllers/document/reviewController.js +++ b/public/member-client/js/controllers/document/reviewController.js @@ -147,7 +147,7 @@ app.controller("documentReviewController", function($scope, $rootScope, $routePa * @return {[type]} [description] */ $scope.saveReview = function(){ - $scope.$parent.loading = { status: true, message: "Saving review" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_REVIEW') }; // Save notes $noteService.save($scope.document.note_id, { "note": $scope.document.note }) @@ -195,7 +195,7 @@ app.controller("documentReviewController", function($scope, $rootScope, $routePa .then(function onSuccess(response) { if($scope.review_status !== null){ - $scope.$parent.loading = { status: true, message: "Saving review" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_REVIEW') }; // Publish comments for user $scope.latest_revision.comments.published = true; @@ -203,7 +203,7 @@ app.controller("documentReviewController", function($scope, $rootScope, $routePa // Save comments $commentService.edit($scope.latest_revision.comments.comment_id, $scope.latest_revision.comments) .then(function onSuccess(response) { - $scope.$parent.loading = { status: true, message: "Publishing review" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('PUBLISHING_REVIEW') }; // Change status of document $documentService.changeStatus($routeParams.document_id, { @@ -261,7 +261,7 @@ app.controller("documentReviewController", function($scope, $rootScope, $routePa /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading review" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_REVIEW') }; $scope.review_status = null; $scope.authenticated_member = $authenticationService.get(); $scope.document = $documentService.get(); diff --git a/public/member-client/js/controllers/document/showFilesController.js b/public/member-client/js/controllers/document/showFilesController.js index 32284fa..7f7d71b 100644 --- a/public/member-client/js/controllers/document/showFilesController.js +++ b/public/member-client/js/controllers/document/showFilesController.js @@ -31,14 +31,14 @@ app.controller("documentShowFilesController", function($scope, $rootScope, $rout /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENT') }; // Update navbar $scope.$parent.document = $documentService.get(); // Check status of document to generate files if($documentService.getStatus()===2 || $documentService.getStatus()===6){ - $scope.$parent.loading = { status: true, message: "Generating files" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('GENERATING_FILES') }; // Generate files on server $documentService.generateFiles($routeParams.document_id) @@ -55,7 +55,7 @@ app.controller("documentShowFilesController", function($scope, $rootScope, $rout $scope.redirect("/documents/" + $routeParams.document_id + "/overview"); }); } else { - $window.alert("Files can only be generated, if the document has been accepted"); + $window.alert($filter('translate')('ALERT_FILE_GENERATION_FAILED')); // Redirect $scope.redirect("/documents/" + $routeParams.document_id + "/overview"); diff --git a/public/member-client/js/controllers/document/showIdController.js b/public/member-client/js/controllers/document/showIdController.js index 7e4615d..a2fed82 100644 --- a/public/member-client/js/controllers/document/showIdController.js +++ b/public/member-client/js/controllers/document/showIdController.js @@ -50,7 +50,7 @@ app.controller("documentShowIdController", function($scope, $rootScope, $filter, /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading document" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_DOCUMENT') }; $scope.document = $documentService.get(); // Update navbar diff --git a/public/member-client/js/controllers/institute/createController.js b/public/member-client/js/controllers/institute/createController.js index 60ddcdc..790b622 100644 --- a/public/member-client/js/controllers/institute/createController.js +++ b/public/member-client/js/controllers/institute/createController.js @@ -28,7 +28,7 @@ app.controller("instituteCreateController", function($scope, $rootScope, $routeP $scope.createInstituteForm.institute_name.$pristine = false; $scope.createInstituteForm.university_id.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Creating new institute" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('CREATING_NEW_INSTITUTE') }; // Create new Institute $instituteService.create($scope.new_institute) @@ -54,7 +54,7 @@ app.controller("instituteCreateController", function($scope, $rootScope, $routeP // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ diff --git a/public/member-client/js/controllers/institute/deleteController.js b/public/member-client/js/controllers/institute/deleteController.js index cc7c73a..db3ab31 100644 --- a/public/member-client/js/controllers/institute/deleteController.js +++ b/public/member-client/js/controllers/institute/deleteController.js @@ -22,7 +22,7 @@ app.controller("instituteDeleteController", function($scope, $rootScope, $routeP * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting institute" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_INSTITUTE') }; // Delete institute $instituteService.remove($scope.institute.institute_id) @@ -37,7 +37,7 @@ app.controller("instituteDeleteController", function($scope, $rootScope, $routeP /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading institute" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTE') }; $scope.input = ""; // Load institute diff --git a/public/member-client/js/controllers/institute/detailsController.js b/public/member-client/js/controllers/institute/detailsController.js index b47e971..38474c2 100644 --- a/public/member-client/js/controllers/institute/detailsController.js +++ b/public/member-client/js/controllers/institute/detailsController.js @@ -70,7 +70,7 @@ app.controller("instituteDetailsController", function($scope, $rootScope, $route // Check which kind of related data needs to be requested switch (related_data) { case 'working_groups': { - $scope.$parent.loading = { status: true, message: "Loading related working groups" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_WORKING_GROUPS') }; // Load related working groups $workingGroupService.listByInstitute($scope.institute.institute_id, $scope.filter) @@ -106,7 +106,7 @@ app.controller("instituteDetailsController", function($scope, $rootScope, $route break; } case 'members': { - $scope.$parent.loading = { status: true, message: "Loading related members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_MEMBERS') }; // Load related members $memberService.listByInstitute($scope.institute.institute_id, $scope.filter) @@ -142,7 +142,7 @@ app.controller("instituteDetailsController", function($scope, $rootScope, $route break; } case 'users': { - $scope.$parent.loading = { status: true, message: "Loading related users" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_USERS') }; // Load related users $userService.listByInstitute($scope.institute.institute_id, $scope.filter) @@ -178,7 +178,7 @@ app.controller("instituteDetailsController", function($scope, $rootScope, $route break; } case 'courses': { - $scope.$parent.loading = { status: true, message: "Loading related courses" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_COURSES') }; // Load related courses $courseService.listByInstitute($scope.institute.institute_id, $scope.filter) @@ -231,7 +231,7 @@ app.controller("instituteDetailsController", function($scope, $rootScope, $route /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading institute" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTE') }; // Filter $scope.filter = { diff --git a/public/member-client/js/controllers/institute/editController.js b/public/member-client/js/controllers/institute/editController.js index 71d2bff..a8a9a98 100644 --- a/public/member-client/js/controllers/institute/editController.js +++ b/public/member-client/js/controllers/institute/editController.js @@ -27,7 +27,7 @@ app.controller("instituteEditController", function($scope, $rootScope, $routePar // Update UI $scope.editInstituteForm.institute_name.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Saving institute" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_INSTITUTE') }; // Updating Institute $instituteService.edit($routeParams.institute_id, $scope.updated_institute) @@ -51,7 +51,7 @@ app.controller("instituteEditController", function($scope, $rootScope, $routePar // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -76,7 +76,7 @@ app.controller("instituteEditController", function($scope, $rootScope, $routePar /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading institute" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTE') }; // Load Institute $instituteService.retrieve($routeParams.institute_id) diff --git a/public/member-client/js/controllers/institute/listController.js b/public/member-client/js/controllers/institute/listController.js index b79a2bf..2036668 100644 --- a/public/member-client/js/controllers/institute/listController.js +++ b/public/member-client/js/controllers/institute/listController.js @@ -138,7 +138,7 @@ app.controller("instituteListController", function($scope, $rootScope, $filter, /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load institutes $scope.filter = $instituteService.getCachedFilter(); diff --git a/public/member-client/js/controllers/loginByDocumentController.js b/public/member-client/js/controllers/loginByDocumentController.js index 0ca5452..744ec94 100644 --- a/public/member-client/js/controllers/loginByDocumentController.js +++ b/public/member-client/js/controllers/loginByDocumentController.js @@ -27,7 +27,7 @@ app.controller("loginByDocumentController", function($scope, $rootScope, $routeP $scope.loginForm.username.$pristine = false; $scope.loginForm.password.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Logging in" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOGGING_IN') }; $authenticationService.login($scope.login_member) .then(function onSuccess(response) { @@ -53,7 +53,7 @@ app.controller("loginByDocumentController", function($scope, $rootScope, $routeP /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading application" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_APPLICATION') }; // Reset all services $authenticationService.set(); diff --git a/public/member-client/js/controllers/loginController.js b/public/member-client/js/controllers/loginController.js index 791a1cc..8dff53f 100644 --- a/public/member-client/js/controllers/loginController.js +++ b/public/member-client/js/controllers/loginController.js @@ -27,7 +27,7 @@ app.controller("loginController", function($scope, $rootScope, $filter, $transla $scope.loginForm.username.$pristine = false; $scope.loginForm.password.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Logging in" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOGGING_IN') }; $authenticationService.login($scope.login_member) .then(function onSuccess(response) { @@ -53,7 +53,7 @@ app.controller("loginController", function($scope, $rootScope, $filter, $transla /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading application" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_APPLICATION') }; // Reset all services $authenticationService.set(); diff --git a/public/member-client/js/controllers/mainController.js b/public/member-client/js/controllers/mainController.js index bb9d221..29977e8 100644 --- a/public/member-client/js/controllers/mainController.js +++ b/public/member-client/js/controllers/mainController.js @@ -1,7 +1,7 @@ var app = angular.module("ethics-app"); // Main controller -app.controller("mainController", function($scope, $rootScope, $location, config, $authenticationService, $documentService) { +app.controller("mainController", function($scope, $rootScope, $filter, $translate, $location, config, $authenticationService, $documentService) { /************************************************* FUNCTIONS *************************************************/ @@ -33,6 +33,14 @@ app.controller("mainController", function($scope, $rootScope, $location, config, $location.url(path); }; + /************************************************* + LISTENERS + *************************************************/ + $rootScope.$on('updateAccount', function (event, data) { + $scope.authenticated_member = $authenticationService.get(); + $scope.loading = { status: false, message: "" }; + }); + /************************************************* INIT @@ -40,9 +48,6 @@ app.controller("mainController", function($scope, $rootScope, $location, config, $scope.config = config; $scope.authenticated_member = $authenticationService.get(); $scope.document = $documentService.get(); - $scope.loading = { - status: false, - message: "" - }; + $scope.loading = { status: false, message: "" }; }); diff --git a/public/member-client/js/controllers/member/createController.js b/public/member-client/js/controllers/member/createController.js index 1994f2a..0a02cb6 100644 --- a/public/member-client/js/controllers/member/createController.js +++ b/public/member-client/js/controllers/member/createController.js @@ -55,7 +55,7 @@ app.controller("memberCreateController", function($scope, $rootScope, $routePara $scope.createMemberForm.subscribed.$pristine = false; } else { if($scope.new_member.password === $scope.repeated_password){ - $scope.$parent.loading = { status: true, message: "Creating new member" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('CREATING_NEW_MEMBER') }; // Create new member $memberService.create($scope.new_member) @@ -69,7 +69,7 @@ app.controller("memberCreateController", function($scope, $rootScope, $routePara $window.alert(response.data); }); } else { - $window.alert("Your passwords are not equal!"); + $window.alert($filter('translate')('ALERT_PASSWORD_NOT_EQUAL')); } } }; @@ -83,7 +83,7 @@ app.controller("memberCreateController", function($scope, $rootScope, $routePara // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -103,7 +103,7 @@ app.controller("memberCreateController", function($scope, $rootScope, $routePara case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -136,7 +136,7 @@ app.controller("memberCreateController", function($scope, $rootScope, $routePara case 'working_groups': { if($scope.institute_id){ if($scope.institute_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading working groups" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUPS') }; // Load related working groups $workingGroupService.listByInstitute($scope.institute_id, { diff --git a/public/member-client/js/controllers/member/deleteController.js b/public/member-client/js/controllers/member/deleteController.js index a75c45b..7df9529 100644 --- a/public/member-client/js/controllers/member/deleteController.js +++ b/public/member-client/js/controllers/member/deleteController.js @@ -22,7 +22,7 @@ app.controller("memberDeleteController", function($scope, $rootScope, $routePara * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting committee member" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_MEMBER') }; // Delete member $memberService.remove($scope.member.member_id) @@ -37,7 +37,7 @@ app.controller("memberDeleteController", function($scope, $rootScope, $routePara /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading committee member" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_MEMBER') }; $scope.input = ""; // Load member diff --git a/public/member-client/js/controllers/member/detailsController.js b/public/member-client/js/controllers/member/detailsController.js index ff26063..7519a86 100644 --- a/public/member-client/js/controllers/member/detailsController.js +++ b/public/member-client/js/controllers/member/detailsController.js @@ -32,7 +32,7 @@ app.controller("memberDetailsController", function($scope, $rootScope, $routePar /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading committee member" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_MEMBER') }; $scope.authenticated_member = $authenticationService.get(); // Load member diff --git a/public/member-client/js/controllers/member/editController.js b/public/member-client/js/controllers/member/editController.js index 3a4dc52..3124236 100644 --- a/public/member-client/js/controllers/member/editController.js +++ b/public/member-client/js/controllers/member/editController.js @@ -95,7 +95,7 @@ app.controller("memberEditController", function($scope, $rootScope, $routeParams // Check if passwords are equal, if it has been changed if($scope.updated_member.new_password){ if($scope.updated_member.password === $scope.repeated_password){ - $scope.$parent.loading = { status: true, message: "Saving member" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_MEMBER') }; // Update member $memberService.edit($routeParams.member_id, $scope.updated_member) @@ -107,10 +107,10 @@ app.controller("memberEditController", function($scope, $rootScope, $routeParams $window.alert(response.data); }); } else { - $window.alert("Your passwords are not equal!"); + $window.alert($filter('translate')('ALERT_PASSWORD_NOT_EQUAL')); } } else { - $scope.$parent.loading = { status: true, message: "Saving member" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_MEMBER') }; // Update member $memberService.edit($routeParams.member_id, $scope.updated_member) @@ -134,7 +134,7 @@ app.controller("memberEditController", function($scope, $rootScope, $routeParams // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -154,7 +154,7 @@ app.controller("memberEditController", function($scope, $rootScope, $routeParams case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -187,7 +187,7 @@ app.controller("memberEditController", function($scope, $rootScope, $routeParams case 'working_groups': { if($scope.institute_id){ if($scope.institute_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading working groups" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUPS') }; // Load related working groups $workingGroupService.listByInstitute($scope.institute_id, { diff --git a/public/member-client/js/controllers/member/listController.js b/public/member-client/js/controllers/member/listController.js index c401698..2f88712 100644 --- a/public/member-client/js/controllers/member/listController.js +++ b/public/member-client/js/controllers/member/listController.js @@ -138,7 +138,7 @@ app.controller("memberListController", function($scope, $rootScope, $filter, $tr /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading committee members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_MEMBERS') }; $scope.authenticated_member = $authenticationService.get(); // Load members diff --git a/public/member-client/js/controllers/recoveryController.js b/public/member-client/js/controllers/recoveryController.js index e949874..1f6ab1f 100644 --- a/public/member-client/js/controllers/recoveryController.js +++ b/public/member-client/js/controllers/recoveryController.js @@ -26,7 +26,7 @@ app.controller("recoveryController", function($scope, $rootScope, $filter, $tran // Update UI $scope.recoveryForm.email_address.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Searching for Email-address" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SEARCHING_FOR_EMAIL_ADDRESS') }; $recoveryService.findByEmail($scope.recovery.email_address) .then(function onSuccess(response) { @@ -34,13 +34,13 @@ app.controller("recoveryController", function($scope, $rootScope, $filter, $tran $scope.recovery.email_address = ""; // Show info - $window.alert("An email to reset your password was sent to you!"); + $window.alert($filter('translate')('ALERT_RESET_EMAIL_SENT')); // Redirect $scope.redirect("/"); }) .catch(function onError(response) { - $window.alert("The email-address could not be found!"); + $window.alert($filter('translate')('ALERT_EMAIL_ADDRESS_NOT_FOUND')); // Reset $scope.recoveryForm.email_address.$pristine = false; diff --git a/public/member-client/js/controllers/university/createController.js b/public/member-client/js/controllers/university/createController.js index 12ee6a4..80ad844 100644 --- a/public/member-client/js/controllers/university/createController.js +++ b/public/member-client/js/controllers/university/createController.js @@ -27,7 +27,7 @@ app.controller("universityCreateController", function($scope, $rootScope, $route // Update UI $scope.createCourseForm.university_name.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Creating new university" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('CREATING_NEW_UNIVERSITY') }; // Create new University $universityService.create($scope.new_university) diff --git a/public/member-client/js/controllers/university/deleteController.js b/public/member-client/js/controllers/university/deleteController.js index f479ddf..4b6bc16 100644 --- a/public/member-client/js/controllers/university/deleteController.js +++ b/public/member-client/js/controllers/university/deleteController.js @@ -22,7 +22,7 @@ app.controller("universityDeleteController", function($scope, $rootScope, $route * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting university" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_UNIVERSITY') }; // Delete university $universityService.remove($scope.university.university_id) @@ -37,7 +37,7 @@ app.controller("universityDeleteController", function($scope, $rootScope, $route /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading university" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITY') }; $scope.input = ""; // Load university diff --git a/public/member-client/js/controllers/university/detailsController.js b/public/member-client/js/controllers/university/detailsController.js index 3c5e65c..45a416a 100644 --- a/public/member-client/js/controllers/university/detailsController.js +++ b/public/member-client/js/controllers/university/detailsController.js @@ -64,7 +64,7 @@ app.controller("universityDetailsController", function($scope, $rootScope, $rout // Check which kind of related data needs to be requested switch (related_data) { case 'institutes': { - $scope.$parent.loading = { status: true, message: "Loading related institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university.university_id, $scope.filter) @@ -100,7 +100,7 @@ app.controller("universityDetailsController", function($scope, $rootScope, $rout break; } case 'members': { - $scope.$parent.loading = { status: true, message: "Loading related members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_MEMBERS') }; // Load related members $memberService.listByInstitute($scope.university.university_id, $scope.filter) @@ -136,7 +136,7 @@ app.controller("universityDetailsController", function($scope, $rootScope, $rout break; } case 'users': { - $scope.$parent.loading = { status: true, message: "Loading related users" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_USERS') }; // Load related users $userService.listByInstitute($scope.university.university_id, $scope.filter) @@ -189,7 +189,7 @@ app.controller("universityDetailsController", function($scope, $rootScope, $rout /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading university" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITY') }; // Filter $scope.filter = { diff --git a/public/member-client/js/controllers/university/editController.js b/public/member-client/js/controllers/university/editController.js index a98e914..c425819 100644 --- a/public/member-client/js/controllers/university/editController.js +++ b/public/member-client/js/controllers/university/editController.js @@ -27,7 +27,7 @@ app.controller("universityEditController", function($scope, $rootScope, $routePa // Update UI $scope.editUniversityForm.university_name.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Saving university" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_UNIVERSITY') }; // Updating University $universityService.edit($routeParams.university_id, $scope.updated_university) @@ -44,7 +44,7 @@ app.controller("universityEditController", function($scope, $rootScope, $routePa /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading university" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITY') }; // Load University $universityService.retrieve($routeParams.university_id) diff --git a/public/member-client/js/controllers/university/listController.js b/public/member-client/js/controllers/university/listController.js index d526492..66c054c 100644 --- a/public/member-client/js/controllers/university/listController.js +++ b/public/member-client/js/controllers/university/listController.js @@ -128,7 +128,7 @@ app.controller("universityListController", function($scope, $rootScope, $filter, /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $scope.filter = $universityService.getCachedFilter(); diff --git a/public/member-client/js/controllers/user/createController.js b/public/member-client/js/controllers/user/createController.js index 87950d2..25eea2c 100644 --- a/public/member-client/js/controllers/user/createController.js +++ b/public/member-client/js/controllers/user/createController.js @@ -45,7 +45,7 @@ app.controller("userCreateController", function($scope, $rootScope, $routeParams $scope.createUserForm.institute_id.$pristine = false; $scope.createUserForm.blocked.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Creating new user" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('CREATING_NEW_USER') }; // Create new user $userService.create($scope.new_user) @@ -70,7 +70,7 @@ app.controller("userCreateController", function($scope, $rootScope, $routeParams // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -90,7 +90,7 @@ app.controller("userCreateController", function($scope, $rootScope, $routeParams case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { diff --git a/public/member-client/js/controllers/user/deleteController.js b/public/member-client/js/controllers/user/deleteController.js index 8f24516..e17b33b 100644 --- a/public/member-client/js/controllers/user/deleteController.js +++ b/public/member-client/js/controllers/user/deleteController.js @@ -22,7 +22,7 @@ app.controller("userDeleteController", function($scope, $rootScope, $routeParams * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting user" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_USER') }; // Delete user $userService.remove($scope.user.user_id) @@ -37,7 +37,7 @@ app.controller("userDeleteController", function($scope, $rootScope, $routeParams /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading user" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_USER') }; $scope.input = ""; // Load user diff --git a/public/member-client/js/controllers/user/detailsController.js b/public/member-client/js/controllers/user/detailsController.js index 6702f45..1124733 100644 --- a/public/member-client/js/controllers/user/detailsController.js +++ b/public/member-client/js/controllers/user/detailsController.js @@ -50,7 +50,7 @@ app.controller("userDetailsController", function($scope, $rootScope, $routeParam // Check which kind of related data needs to be requested switch (related_data) { case 'documents': { - $scope.$parent.loading = { status: true, message: "Loading related documents" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_DOCUMENTS') }; // Load related documents $documentsService.listByUser($scope.user.user_id, $scope.filter) @@ -101,7 +101,7 @@ app.controller("userDetailsController", function($scope, $rootScope, $routeParam /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading user" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_USER') }; // Filter $scope.filter = { diff --git a/public/member-client/js/controllers/user/editController.js b/public/member-client/js/controllers/user/editController.js index 112327a..539af55 100644 --- a/public/member-client/js/controllers/user/editController.js +++ b/public/member-client/js/controllers/user/editController.js @@ -45,7 +45,7 @@ app.controller("userEditController", function($scope, $rootScope, $routeParams, $scope.editUserForm.institute_id.$pristine = false; $scope.editUserForm.blocked.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Saving user" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_USER') }; // Updating user $userService.edit($routeParams.user_id, $scope.updated_user) @@ -69,7 +69,7 @@ app.controller("userEditController", function($scope, $rootScope, $routeParams, // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -89,7 +89,7 @@ app.controller("userEditController", function($scope, $rootScope, $routeParams, case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -125,7 +125,7 @@ app.controller("userEditController", function($scope, $rootScope, $routeParams, /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading user" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_USER') }; // Load user $userService.retrieve($routeParams.user_id) diff --git a/public/member-client/js/controllers/user/listController.js b/public/member-client/js/controllers/user/listController.js index 864b914..acbc081 100644 --- a/public/member-client/js/controllers/user/listController.js +++ b/public/member-client/js/controllers/user/listController.js @@ -138,7 +138,7 @@ app.controller("userListController", function($scope, $rootScope, $filter, $tran /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading users" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_USERS') }; // Load users $scope.filter = $userService.getCachedFilter(); diff --git a/public/member-client/js/controllers/working_group/createController.js b/public/member-client/js/controllers/working_group/createController.js index 3182ce3..c42d00e 100644 --- a/public/member-client/js/controllers/working_group/createController.js +++ b/public/member-client/js/controllers/working_group/createController.js @@ -29,7 +29,7 @@ app.controller("workingGroupCreateController", function($scope, $rootScope, $rou $scope.createWorkingGroupForm.institute_id.$pristine = false; $scope.createWorkingGroupForm.university_id.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Creating new working group" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('CREATING_NEW_WORKING_GROUP') }; // Create new working group $workingGroupService.create($scope.new_working_group) @@ -54,7 +54,7 @@ app.controller("workingGroupCreateController", function($scope, $rootScope, $rou // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -74,7 +74,7 @@ app.controller("workingGroupCreateController", function($scope, $rootScope, $rou case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { diff --git a/public/member-client/js/controllers/working_group/deleteController.js b/public/member-client/js/controllers/working_group/deleteController.js index 343a573..bf6717a 100644 --- a/public/member-client/js/controllers/working_group/deleteController.js +++ b/public/member-client/js/controllers/working_group/deleteController.js @@ -22,7 +22,7 @@ app.controller("workingGroupDeleteController", function($scope, $rootScope, $rou * @return {[type]} [description] */ $scope.delete = function(){ - $scope.$parent.loading = { status: true, message: "Deleting working group" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('DELETING_WORKING_GROUP') }; // Delete working group $workingGroupService.remove($scope.working_group.working_group_id) @@ -38,7 +38,7 @@ app.controller("workingGroupDeleteController", function($scope, $rootScope, $rou /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading working group" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUP') }; $scope.input = ""; // Load university diff --git a/public/member-client/js/controllers/working_group/detailsController.js b/public/member-client/js/controllers/working_group/detailsController.js index 654beeb..c70ccb3 100644 --- a/public/member-client/js/controllers/working_group/detailsController.js +++ b/public/member-client/js/controllers/working_group/detailsController.js @@ -52,7 +52,7 @@ app.controller("workingGroupDetailsController", function($scope, $rootScope, $ro // Check which kind of related data needs to be requested switch (related_data) { case 'members': { - $scope.$parent.loading = { status: true, message: "Loading related members" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_RELATED_MEMBERS') }; // Load related members $memberService.listByWorkingGroup($scope.working_group.working_group_id, $scope.filter) @@ -104,7 +104,7 @@ app.controller("workingGroupDetailsController", function($scope, $rootScope, $ro /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading working group" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUP') }; // Filter $scope.filter = { diff --git a/public/member-client/js/controllers/working_group/editController.js b/public/member-client/js/controllers/working_group/editController.js index c8d2c3f..61d5769 100644 --- a/public/member-client/js/controllers/working_group/editController.js +++ b/public/member-client/js/controllers/working_group/editController.js @@ -39,7 +39,7 @@ app.controller("workingGroupEditController", function($scope, $rootScope, $route // Check which kind of related data needs to be requested switch (related_data) { case 'universities': { - $scope.$parent.loading = { status: true, message: "Loading universities" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_UNIVERSITIES') }; // Load universities $universityService.list({ @@ -59,7 +59,7 @@ app.controller("workingGroupEditController", function($scope, $rootScope, $route case 'institutes': { if($scope.university_id){ if($scope.university_id !== null){ - $scope.$parent.loading = { status: true, message: "Loading institutes" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_INSTITUTES') }; // Load related institutes $instituteService.listByUniversity($scope.university_id, { @@ -102,7 +102,7 @@ app.controller("workingGroupEditController", function($scope, $rootScope, $route // Update UI $scope.editWorkingGroupForm.working_group_name.$pristine = false; } else { - $scope.$parent.loading = { status: true, message: "Saving working group" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('SAVING_WORKING_GROUP') }; // Updating working group $workingGroupService.edit($routeParams.working_group_id, $scope.updated_working_group) @@ -119,7 +119,7 @@ app.controller("workingGroupEditController", function($scope, $rootScope, $route /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading working group" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUP') }; // Load working group $workingGroupService.retrieve($routeParams.working_group_id) diff --git a/public/member-client/js/controllers/working_group/listController.js b/public/member-client/js/controllers/working_group/listController.js index a0757a7..a0639ce 100644 --- a/public/member-client/js/controllers/working_group/listController.js +++ b/public/member-client/js/controllers/working_group/listController.js @@ -137,7 +137,7 @@ app.controller("workingGroupListController", function($scope, $rootScope, $filte /************************************************* INIT *************************************************/ - $scope.$parent.loading = { status: true, message: "Loading working groups" }; + $scope.$parent.loading = { status: true, message: $filter('translate')('LOADING_WORKING_GROUPS') }; // Load working groups $scope.filter = $workingGroupService.getCachedFilter(); diff --git a/public/member-client/js/modules/languages.js b/public/member-client/js/modules/languages.js index 6fb1b16..252dfc6 100644 --- a/public/member-client/js/modules/languages.js +++ b/public/member-client/js/modules/languages.js @@ -75,7 +75,6 @@ app.config(function ($translateProvider) { YEAR_ASC: 'Year ascending', YEAR_DESC: 'Year descending', - DELETE_THIS_DOCUMENT: 'Do you really want to delete this document', EXPLANATION_OF_DELETING_A_DOCUMENT: 'Deleting a document also deletes ALL ASSOCIATED data. PLEASE PROCEED WITH CAUTION!', PLEASE_TYPE_IN_THE_TITLE_OF_THE_DOCUMENT_TO_CONFIRM: 'Please type in the title of the document to confirm', @@ -163,7 +162,7 @@ app.config(function ($translateProvider) { CURRENT_STATUS: 'Current status', CHANGE_STATUS: 'Change status', NEW_STATUS: 'New status', - + PROVIDED_TO_PARTICIPANTS_AFTER_STUDY:'(provided to participants after the study)', TO_BE_FILLED_OUT_BY_PARTICIPANT:'(to be filled out by each participant)', SIGN_BY_YOURSELF:'(sign by yourself and add to archive)', @@ -248,8 +247,8 @@ app.config(function ($translateProvider) { SUBMIT_WARNING: 'You are about to finally submit your Proposal for review by the Ethics-Committee. Please be aware that after this step the Study cannot be changed or modified anymore, until a revised version is requested by the Ethics-Committee.', DOCUMENT_FILES: 'Download the associated Files', - - + + YES: 'yes', NO: 'no', EXPLANATION: 'Explanation', @@ -441,6 +440,86 @@ app.config(function ($translateProvider) { CHANGE_PASSWORD: 'Change password', DO_NOT_CHANGE_PASSWORD: 'Do not change password', + CREATING_NEW_MEMBER: 'Creating new committee member', + SAVING_MEMBER: 'Saving committee member', + DELETING_MEMBER: 'Deleting committee member', + + CREATING_NEW_USER: 'Creating new user', + SAVING_USER: 'Saving user', + DELETING_USER: 'Deleting user', + + CREATING_NEW_DOCUMENT: 'Creating new document', + SAVING_DOCUMENT: 'Saving document', + DELETING_DOCUMENT: 'Deleting document', + + CREATING_NEW_COURSE: 'Creating new course', + SAVING_COURSE: 'Saving course', + DELETING_COURSE: 'Deleting course', + + CREATING_NEW_UNIVERSITY: 'Creating new university', + SAVING_UNIVERSITY: 'Saving university', + DELETING_UNIVERSITY: 'Deleting university', + + CREATING_NEW_INSTITUTE: 'Creating new institute', + SAVING_INSTITUTE: 'Saving institute', + DELETING_INSTITUTE: 'Deleting institute', + + CREATING_NEW_WORKING_GROUP: 'Creating new working group', + SAVING_WORKING_GROUP: 'Saving working group', + DELETING_WORKING_GROUP: 'Deleting working group', + + LOADING_APPLICATION: 'Loading application', + LOGGING_IN: 'Logging in', + AUTO_SAVING: 'Auto saving', + + LOADING_DOCUMENT: 'Loading document', + LOADING_DOCUMENTS: 'Loading documents', + LOADING_RELATED_DOCUMENTS: 'Loading related documents', + LOADING_MEMBER: 'Loading committe member', + LOADING_MEMBERS: 'Loading committe members', + LOADING_RELATED_MEMBERS: 'Loading related committe members', + LOADING_USER: 'Loading user', + LOADING_USERS: 'Loading users', + LOADING_RELATED_USERS: 'Loading related users', + LOADING_COURSE: 'Loading course', + LOADING_COURSES: 'Loading courses', + LOADING_RELATED_COURSES: 'Loading related courses', + LOADING_UNIVERSITY: 'Loading university', + LOADING_UNIVERSITIES: 'Loading universities', + LOADING_INSTITUTE: 'Loading institute', + LOADING_INSTITUTES: 'Loading institutes', + LOADING_RELATED_INSTITUTES: 'Loading related institutes', + LOADING_WORKING_GROUP: 'Loading working group', + LOADING_WORKING_GROUPS: 'Loading working groups', + LOADING_RELATED_WORKING_GROUPS: 'Loading related working groups', + LOADING_REVISIONS: 'Loading revisions', + LOADING_SUBMISSION: 'Loading submission', + LOADING_OVERVIEW: 'Loading overview', + LOADING_REVIEW: 'Loading review', + LOADING_ACCOUNT_SETTINGS: 'Loading account settings', + + INITIALISING_NEW_DOCUMENT: 'Initialising new document', + CHECKING_AUTHENTICATION: 'Checking authentication', + + SAVING_ACCOUNT_SETTINGS: 'Saving account settings', + SAVING_NOTES: 'Saving notes', + SAVING_REVIEW: 'Saving review', + PUBLISHING_REVIEW: 'Publishing review', + UPDATING_REVIEWER: 'Updating reviewer', + SEARCHING_FOR_EMAIL_ADDRESS: 'Searching for Email-address', + SEARCHING_FOR_USER: 'Searching for user', + GENERATING_FILES: 'Generating files', + SUBMITTING_DOCUMENT: 'Submitting document', + + ALERT_SIGN_UP_SUCCESSFULL: 'You have successfully signed up, you can now create your document!', + ALERT_PASSWORD_NOT_EQUAL: 'Your passwords are not equal!', + ALERT_RESET_EMAIL_SENT: 'An email to reset your password was sent to you!', + ALERT_RECOVERY_EMAIL_SENT: 'An email with your document-IDs was sent to you!', + ALERT_EMAIL_ADDRESS_NOT_FOUND: 'The email-address could not be found!', + ALERT_DOCUMENT_CREATED: 'Your new document has been created and an email with the document-ID has been sent to you!', + ALERT_SUBMIT_DOCUMENT_FAILED: 'Your document can not be submitted, please fill out all required fields!', + ALERT_FILE_GENERATION_FAILED: 'Files can only be generated, if the document has been accepted!', + }); // Default Language (English) diff --git a/public/member-client/js/templates/help.html b/public/member-client/js/templates/help.html index 992df72..92c4d23 100644 --- a/public/member-client/js/templates/help.html +++ b/public/member-client/js/templates/help.html @@ -12,9 +12,16 @@ -