Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

EPIC-939 #76

Merged
merged 2 commits into from
Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ <h1>Edit Project &nbsp;&rsaquo;&nbsp; {{project.name}}<span class="placeholder-v
<div class="row">
<div class="lat-input col-sm-3 col-md-2 form-group" x-show-errors>
<label class="control-label">Latitude<em class="required">(Required)</em></label>
<input class="form-control" id="latitude" name="latitude" type="number" min="-90" max="90"
<input class="form-control" id="latitude" name="latitude" type="number" min="47" max="61"
ng-model="project.lat" required />
</div>
<div class="long-input col-sm-3 col-md-2 form-group" x-show-errors>
<label class="control-label">Longitude<em class="required">(Required)</em></label>
<input class="form-control" id="longitude" name="longitude" type="number" min="-180" max="180"
<input class="form-control" id="longitude" name="longitude" type="number" min="-141" max="-113"
ng-model="project.lon" required />
</div>
</div>
Expand Down