diff --git a/__implementation_example/layouts/partials/comments.html b/__implementation_example/layouts/partials/comments.html index 6af2386..e6acc53 100644 --- a/__implementation_example/layouts/partials/comments.html +++ b/__implementation_example/layouts/partials/comments.html @@ -2,7 +2,7 @@

comments

-
+
+
+

Characters: 0/1000

diff --git a/__implementation_example/static/js/mysite.js b/__implementation_example/static/js/mysite.js index adc082d..9ce5c19 100644 --- a/__implementation_example/static/js/mysite.js +++ b/__implementation_example/static/js/mysite.js @@ -49,6 +49,7 @@ function labertasche_modal_hide() modal.classList.remove('is-active'); } } + window.location.reload(true); } function labertasche_comment_not_found() @@ -93,7 +94,12 @@ function labertasche_post_callback(state) } if (state === "post-success"){ button.classList.remove("is-loading"); - modal_text.innerText = "Your comment was entered, but you need to confirm it, before it becomes active. Please check your mail!" + if (state['sendotp']) { + modal_text.innerText = "Your comment was entered, but you need to confirm it, before it becomes active. Please check your mail!" + } + else{ + modal_text.innerText = "Your comment was successfully entered." + } modal.classList.add('is-active'); } if (state === "post-fetch-exception" || state === "post-internal-server-error"){ @@ -101,6 +107,11 @@ function labertasche_post_callback(state) modal_text.innerText = "Your comment was not entered because there was an error, which was recorded and reported automatically."; modal.classList.add('is-active'); } + if (state === "post-duplicate"){ + button.classList.remove("is-loading"); + modal_text.innerText = "This comment was already made."; + modal.classList.add('is-active'); + } if (state === "post-invalid-email"){ button.classList.remove("is-loading"); modal_text.innerText = "The email you have entered appears to be invalid. Please contact me if you think this was in error.";