Commit 22321835db6de949474ca9520684c9bc07fbbf65
1 parent
c7b2c934
added variable
Showing
2 changed files
with
12 additions
and
7 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
... | ... | @@ -1328,6 +1328,11 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
1328 | 1328 | |
1329 | 1329 | } |
1330 | 1330 | $scope.reportCopyStatus = false; |
1331 | + $scope.reportEmailTitle = "Email Your Performance Report"; | |
1332 | + $scope.notificationMsgWithCopy = "Your report has been sent. A copy has been emailed to you for your records."; | |
1333 | + $scope.sentReportMsg = "Your report has been sent."; | |
1334 | + $scope.invalidEmailId = "Invalid email Id"; | |
1335 | + $scope.invalidEmailTitle = "Alert"; | |
1331 | 1336 | $scope.SendLabEXMailToUser = function (User) { |
1332 | 1337 | |
1333 | 1338 | var reportHtml = ''; |
... | ... | @@ -1360,7 +1365,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
1360 | 1365 | $scope.senderEmails = $("#emailTo").val(); |
1361 | 1366 | |
1362 | 1367 | |
1363 | - LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails).then( | |
1368 | + LabExerciseService.LabExerciseReport(User, $scope.reportImage, $scope.reportTitle, $scope.reportCopyStatus, $scope.senderEmails, $scope.reportEmailTitle, $scope.notificationMsgWithCopy, $scope.sentReportMsg, $scope.invalidEmailId, $scope.invalidEmailTitle).then( | |
1364 | 1369 | |
1365 | 1370 | function (result) { |
1366 | 1371 | console.log(result); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | }, |
52 | 52 | |
53 | 53 | // code of email report |
54 | - LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail) { | |
54 | + LabExerciseReport: function (User, reportImage, reportTitle, reportCopyStatus, senderEmail, emailReportTitle, notiMsgWithCopy, sendMessage, invalidId, invalidIdTitle) { | |
55 | 55 | User.reportImage = reportImage; |
56 | 56 | User.reportTitle = reportTitle; |
57 | 57 | User.ReportCheck = reportCopyStatus; |
... | ... | @@ -70,19 +70,19 @@ |
70 | 70 | |
71 | 71 | console.log('success'); |
72 | 72 | |
73 | - document.getElementById('notificationTitle').innerText = "Email Your Performance Report"; | |
73 | + document.getElementById('notificationTitle').innerText = emailReportTitle; | |
74 | 74 | if (reportCopyStatus == true) { |
75 | - document.getElementById('notificationMessage').innerText = "Your report has been sent. A copy has been emailed to you for your records."; | |
75 | + document.getElementById('notificationMessage').innerText = notiMsgWithCopy; | |
76 | 76 | } |
77 | 77 | else { |
78 | - document.getElementById('notificationMessage').innerText = "Your report has been sent."; | |
78 | + document.getElementById('notificationMessage').innerText = sendMessage; | |
79 | 79 | } |
80 | 80 | document.getElementById('labExEmailSentModalID').style.display = "block"; |
81 | 81 | deferred.resolve(data); |
82 | 82 | }).error(function (data, status, headers, config) { |
83 | 83 | console.log('error'); |
84 | - document.getElementById('notificationTitle').innerText = "Alert"; | |
85 | - document.getElementById('notificationMessage').innerText = "Invalid email Id"; | |
84 | + document.getElementById('notificationTitle').innerText = invalidIdTitle; | |
85 | + document.getElementById('notificationMessage').innerText = invalidId; | |
86 | 86 | document.getElementById('labExEmailSentModalID').style.display = "block"; |
87 | 87 | deferred.reject(data); |
88 | 88 | }); | ... | ... |