From d462d1573c0280754b7babbc4d42b1e572e1285f Mon Sep 17 00:00:00 2001 From: Ushanth Loganathan Date: Fri, 14 Apr 2017 00:44:28 -0700 Subject: [PATCH 1/2] EPIC-868 PCP empty comments additional logic added --- .../client/directives/comment-directives.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/project-comments/client/directives/comment-directives.js b/modules/project-comments/client/directives/comment-directives.js index 07b89bf9f..beba0ad24 100644 --- a/modules/project-comments/client/directives/comment-directives.js +++ b/modules/project-comments/client/directives/comment-directives.js @@ -451,6 +451,10 @@ angular.module ('comment') comment.isAnonymous = !comment.makeVisible; var docCount = s.fileList.length; + if (!comment.author) { + comment.isAnonymous = true; // if the author is empty make it anonymous + } + if (docCount === 0 ) { // We don't need to do anything but add the comment. // console.log("s.comment:", s.comment); @@ -484,6 +488,11 @@ angular.module ('comment') _.each( uploadedDocs, function(d) { s.comment.documents.push(d); }); + + if (!s.comment.comment) { + s.comment.comment = "Please see the Attachment"; //if the comment is empty and has attachment + } + CommentModel.add (s.comment) .then (function (comment) { s.step = 3; From 0670f880c7f87f8aa080d7b69e07329be3223e6f Mon Sep 17 00:00:00 2001 From: Ushanth Loganathan Date: Fri, 14 Apr 2017 15:48:38 -0700 Subject: [PATCH 2/2] EPIC-939-Add-on: Restrict user from entering invalid latitude and longitute in PROJECT DETAILS --- .../projects/client/views/project-partials/project.entry.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/projects/client/views/project-partials/project.entry.html b/modules/projects/client/views/project-partials/project.entry.html index 7b89c5674..b76490dab 100755 --- a/modules/projects/client/views/project-partials/project.entry.html +++ b/modules/projects/client/views/project-partials/project.entry.html @@ -95,12 +95,12 @@

Edit Project  ›  {{project.name}}
-
-