fddf
This commit is contained in:
parent
81a86f882b
commit
74156ffc45
2 changed files with 2 additions and 5 deletions
|
@ -262,9 +262,6 @@
|
||||||
|
|
||||||
submitbutton=document.getElementById("reportPostButton");
|
submitbutton=document.getElementById("reportPostButton");
|
||||||
|
|
||||||
reason=document.getElementById("reason").value;
|
|
||||||
console.log(reason);
|
|
||||||
|
|
||||||
submitbutton.onclick = function() {
|
submitbutton.onclick = function() {
|
||||||
|
|
||||||
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting post';
|
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting post';
|
||||||
|
@ -274,7 +271,7 @@
|
||||||
xhr.open("POST", '/api/flag/post/'+id, true);
|
xhr.open("POST", '/api/flag/post/'+id, true);
|
||||||
var form = new FormData()
|
var form = new FormData()
|
||||||
form.append("formkey", formkey());
|
form.append("formkey", formkey());
|
||||||
form.append("reason", reason);
|
form.append("reason", document.getElementById("reason").value);
|
||||||
|
|
||||||
xhr.withCredentials=true;
|
xhr.withCredentials=true;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="h6">We're sorry something here is wrong.</div>
|
<div class="h6">We're sorry something here is wrong.</div>
|
||||||
<small class="form-text text-muted">Please enter a reason for flagging below.</small>
|
<small class="form-text text-muted">Please enter a reason for flagging below.</small>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<input name="reason" type="text" maxlength="100" id="reason" class="form-control"/>
|
<input maxlength="100" id="reason" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-link text-muted" data-dismiss="modal">Cancel</button>
|
<button type="button" class="btn btn-link text-muted" data-dismiss="modal">Cancel</button>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue