diff --git a/Web/Presenters/templates/components/textArea.xml b/Web/Presenters/templates/components/textArea.xml index 2e012bfe..e0a111eb 100644 --- a/Web/Presenters/templates/components/textArea.xml +++ b/Web/Presenters/templates/components/textArea.xml @@ -27,19 +27,6 @@ - - {/if} {if !is_null($thisUser) && !is_null($club ?? NULL) && $owner < 0} diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index bb349c14..123d2e87 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -262,4 +262,18 @@ async function showArticle(note_id) { u("#articleText").html(`

${note.title}

` + note.html); u("body").removeClass("dimmed"); u("body").addClass("article"); -} \ No newline at end of file +} + +if(document.querySelector("input[name='set_source']") != null) { + document.querySelector("input[name='set_source']").checked = false +} + +$(document).on("change", "input[name='set_source']", (e) => { + if(e.currentTarget.checked) { + document.getElementById("sourceSet").style.display = "block" + e.currentTarget.parentNode.querySelector("span").innerHTML = tr("source") + ":" + } else { + document.getElementById("sourceSet").style.display = "none" + e.currentTarget.parentNode.querySelector("span").innerHTML = tr("set_source") + } +}) \ No newline at end of file