rename "submitFormAjax()" to "sendMessage()"

master
Aevann1 2022-11-05 04:08:27 +02:00
parent ab9c0288fb
commit c5c6db70e4
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ function transferBux(t, mobile=false) {
setTimeout(_ => this.disabled = false, 2000);
}
function submitFormAjax(e) {
function sendMessage(e) {
document.getElementById('message').classList.add('d-none');
document.getElementById('message-mobile').classList.add('d-none');
document.getElementById('message-preview').classList.add('d-none');

View File

@ -180,7 +180,7 @@
<button type="button" class="btn btn-primary" onclick="postToastReload(this,'/settings/block?username={{u.username}}')">Block</button>
</div>
</div>
<form class="d-none toggleable" id="message" action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
<form class="d-none toggleable" id="message" action="/@{{u.username}}/message" onsubmit="sendMessage(event)">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" minlength="1" maxlength="10000" class="form-control b2 mt-1" data-preview="message-preview" oninput="markdown(this)" required></textarea>
<pre class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('input-message')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></pre>
@ -433,7 +433,7 @@
</div>
{% if v and v.id != u.id %}
<form class="d-none toggleable" id='message-mobile' action="/@{{u.username}}/message" onsubmit="submitFormAjax(event)">
<form class="d-none toggleable" id='message-mobile' action="/@{{u.username}}/message" onsubmit="sendMessage(event)">
<input class="mt-1" type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" minlength="1" maxlength="10000" class="form-control" data-preview="message-preview-mobile" oninput="markdown(this)" required></textarea>
<pre class="mt-1 btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('input-message-mobile')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></pre>