diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index 9d727019c..89ae367c4 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -142,7 +142,7 @@ function post_reply(id){ document.getElementById('reply-form-body-'+id).value = '' document.getElementById('message-reply-'+id).innerHTML = '' - toggleReplyBox('reply-to-c_'+id) + toggleReplyBox('reply-message-c_'+id) const fileupload = document.getElementById('file-upload') if (fileupload) { fileupload.value = null; diff --git a/files/templates/comments.html b/files/templates/comments.html index 8945f12ad..feb95402a 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -539,10 +539,10 @@ {% endif %} - + {# TODO: swap to comment_reply_box macro #} -
+
- +
diff --git a/files/templates/submission.html b/files/templates/submission.html index b4467678a..3a7ff04ff 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -328,7 +328,7 @@
{% if not p.deleted_utc %} - {{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, '', 'mb-3', '', true, '/comments/')}} + {{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, subwrapper_css_classes='mb-3', enable_cancel_button=false)}} {% endif %} {% if comment_info %} diff --git a/files/templates/userpage/wall.html b/files/templates/userpage/wall.html index bdc97c0b7..1bf1fd68c 100644 --- a/files/templates/userpage/wall.html +++ b/files/templates/userpage/wall.html @@ -1,7 +1,7 @@ {% extends "userpage/userpage.html" %} {% block userpage_content %}
- {{macros.comment_reply_box(u.fullname, 'replying-to-' + u.fullname, '', 'mb-3 mt-4', '', true, '/comments/')}} + {{macros.comment_reply_box(u.fullname, 'replying-to-' + u.fullname, '', 'mb-3 mt-4', '', enable_cancel_button=false)}}
diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index 2e4c04f87..f475d677d 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -110,7 +110,7 @@ {{p.views}} thread views {% endmacro %} -{% macro comment_reply_box(target_fullname, html_id, wrapper_css_classes="", subwrapper_css_classes="", hide="", allow_file_upload=true, action="/comments/") %} +{% macro comment_reply_box(target_fullname, html_id, wrapper_css_classes="", subwrapper_css_classes="", hide="", allow_file_upload=true, action="/comments/", enable_cancel_button=true) %}
{% if v %}
@@ -136,7 +136,7 @@ {% endif %}
- {% if target_fullname.startswith('c_') %} + {% if enable_cancel_button %} {% endif %}