diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 0f5c775..e8b72b2 100755
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -21,8 +21,7 @@
-
-
+
@@ -33,7 +32,7 @@
-
+
@@ -78,7 +77,7 @@
1601618466935
-
+
1601618764031
@@ -164,7 +163,14 @@
1601751093352
-
+
+ 1601810048772
+
+
+
+ 1601810048772
+
+
@@ -193,7 +199,8 @@
-
+
+
@@ -232,10 +239,10 @@
-
+
-
+
diff --git a/vendor/js/faq.js b/vendor/js/faq.js
index 76a4300..7bb0837 100644
--- a/vendor/js/faq.js
+++ b/vendor/js/faq.js
@@ -100,9 +100,18 @@ function openReadMoreModal( id )
readMoreModalTitle.html( 'Question from: Anonymous' );
request( 'getQuestion', {"question_id":id}, function( result )
{
+ let _answer = '';
+ if( result.data.answer === null || result.data.answer.length < 5 )
+ {
+ _answer = 'So far there is no answer to this question.';
+ }
+ else
+ {
+ _answer = result.data.answer;
+ }
readMoreModalTitle.html( 'Question from: ' + result.data.created_by );
readMoreModalText.html( 'Question
' + result.data.question +
- '
Answer
' + result.data.answer
+ '
Answer
' + _answer
);
}, function() {
readMoreModalText.html( 'An error occurred, please try again later!' );
@@ -120,6 +129,10 @@ function openAnswerModal( id )
request( 'getQuestion', {"question_id":id}, function( result )
{
readMoreModalTitle.html( 'Answer ' + result.data.created_by + " question" );
+ if( result.data.answer !== null && result.data.answer.length > 5 )
+ {
+ answerText.val( result.data.answer );
+ }
answer_id = result.data.id;
}, function() {
answerErrorMsg.html( 'An error occurred, please try again!' );