master
Aevann1 2021-08-31 19:07:27 +02:00
parent d088f3908a
commit 16aa3805a5
2 changed files with 4 additions and 4 deletions

View File

@ -188,10 +188,10 @@
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{c.id}}').innerHTML='image';" hidden>
</label>
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-message-{{c.id}}').classList.add('d-none')" class="d-none d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a id="save-reply-to-message-{{c.fullname}}" class="d-none d-md-block btn btn-primary text-white ml-2" onclick="post_reply('{{c.fullname}}');" href="javascript:void(0)">Reply</a>
<a id="save-reply-to-message-{{c.id}}" class="d-none d-md-block btn btn-primary text-white ml-2" onclick="post_reply('{{c.id}}');" href="javascript:void(0)">Reply</a>
</div>
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-message-{{c.id}}').classList.add('d-none')" class="d-block d-md-none btn btn-link text-muted ml-auto cancel-form">Cancel</a>
<a id="save-reply-to-message-{{c.fullname}}" class="d-block d-md-none btn btn-primary text-white ml-2" onclick="post_reply('{{c.fullname}}');" href="javascript:void(0)">Reply</a>
<a id="save-reply-to-message-{{c.id}}" class="d-block d-md-none btn btn-primary text-white ml-2" onclick="post_reply('{{c.id}}');" href="javascript:void(0)">Reply</a>
</form>
{% endif %}
</div>

View File

@ -519,12 +519,12 @@
}
post_reply=function(fullname){
post_reply=function(id){
var form = new FormData();
form.append('formkey', formkey());
form.append('parent_fullname', fullname);
form.append('parent_id', id);
form.append('body', document.getElementById('reply-form-body-'+fullname).value);
form.append('file', document.getElementById('file-upload-reply-'+fullname).files[0]);
var xhr = new XMLHttpRequest();