From fad1e62684f3d87ddc6a5e182f4ad6b21e09b48a Mon Sep 17 00:00:00 2001 From: Kasper Brandt Date: Wed, 30 Mar 2016 18:14:53 +0200 Subject: [PATCH] [#2011] Only display internal comments on editing --- akvo/rsr/static/scripts-src/my-results.js | 3 +-- akvo/rsr/static/scripts-src/my-results.jsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/akvo/rsr/static/scripts-src/my-results.js b/akvo/rsr/static/scripts-src/my-results.js index 5831c46340..bdfcf4b90d 100644 --- a/akvo/rsr/static/scripts-src/my-results.js +++ b/akvo/rsr/static/scripts-src/my-results.js @@ -724,10 +724,9 @@ function initReact() { } var inputId = "new-comment-" + this.props.update.id; - var addComments = this.props.update.status !== 'A'; var addCommentInput; - if (addComments) { + if (this.props.update.status !== 'A' && this.editing()) { // Adding comments is only possible when the update has not yet been // approved (status 'A'). addCommentInput = React.DOM.div(null, diff --git a/akvo/rsr/static/scripts-src/my-results.jsx b/akvo/rsr/static/scripts-src/my-results.jsx index 2ce636bdb8..99abc075f7 100644 --- a/akvo/rsr/static/scripts-src/my-results.jsx +++ b/akvo/rsr/static/scripts-src/my-results.jsx @@ -724,10 +724,9 @@ function initReact() { } var inputId = "new-comment-" + this.props.update.id; - var addComments = this.props.update.status !== 'A'; var addCommentInput; - if (addComments) { + if (this.props.update.status !== 'A' && this.editing()) { // Adding comments is only possible when the update has not yet been // approved (status 'A'). addCommentInput =