2022-07-07 18:23:44 +02:00
|
|
|
|
extends layout
|
|
|
|
|
|
|
|
|
|
block content
|
2022-07-10 22:20:12 +02:00
|
|
|
|
div.column-header__wrapper
|
|
|
|
|
h1.button.column-header Publier un message
|
2022-07-07 18:23:44 +02:00
|
|
|
|
|
2022-07-10 22:38:47 +02:00
|
|
|
|
if message
|
|
|
|
|
p.alert.alert-error=message
|
2022-07-11 17:04:46 +02:00
|
|
|
|
//form(action="/add-to-queue",method="post")
|
|
|
|
|
form(action="/direct-post",method="post")
|
2022-07-10 22:20:12 +02:00
|
|
|
|
span.account
|
2022-09-07 09:57:38 +02:00
|
|
|
|
span="Choix du compte parmi les "
|
|
|
|
|
span=accounts_to_select.length
|
2022-07-11 17:04:46 +02:00
|
|
|
|
|
2022-07-10 22:20:12 +02:00
|
|
|
|
br
|
2022-09-07 09:57:38 +02:00
|
|
|
|
div.images
|
|
|
|
|
each val, index in accounts_to_select
|
|
|
|
|
div.clickable(onclick=`selectAccount('${val.value}')`)
|
|
|
|
|
img.account__avatar-overlay(src=`${val.src}`)
|
|
|
|
|
br
|
|
|
|
|
span=val.label
|
|
|
|
|
br
|
|
|
|
|
select(method="post", name="author", value=bodyReq ? bodyReq.author : "", id="author_select")
|
|
|
|
|
each val, index in accounts_to_select
|
|
|
|
|
option(value=val.value)
|
|
|
|
|
span=val.label
|
2022-07-10 22:20:12 +02:00
|
|
|
|
div.compose-form__autosuggest-wrapper
|
|
|
|
|
.autosuggest-textarea
|
|
|
|
|
label
|
2022-07-11 17:04:46 +02:00
|
|
|
|
span Content warning (optionnel)
|
2022-09-07 10:04:24 +02:00
|
|
|
|
input.cw-input.autosuggest-textarea__textarea(name="cw", type="text", width="500", height="2em")
|
2022-07-10 22:20:12 +02:00
|
|
|
|
span Qu’avez-vous en tête ?
|
2022-09-07 10:04:24 +02:00
|
|
|
|
textarea.main-input.autosuggest-textarea__textarea(name="message", width="500", lines="20",autofocus="autofocus")
|
2022-07-10 22:20:12 +02:00
|
|
|
|
br
|
|
|
|
|
label
|
2022-07-11 17:04:46 +02:00
|
|
|
|
span Fichier à joindre (optionnel)
|
2022-09-07 10:04:24 +02:00
|
|
|
|
textarea.file-input.autosuggest-textarea__textarea(name="fichier", width="500", lines="1",value="default_picture.jpg")
|
2022-07-11 17:04:46 +02:00
|
|
|
|
fieldset.wip
|
|
|
|
|
label Schedule in time (work in progress, not working by now)
|
|
|
|
|
input.input.checkbox(type="checkbox", value=false, name="scheduled_at_bool")
|
|
|
|
|
input.input.checkbox(type="date", name="scheduled_at")
|
|
|
|
|
input.input.checkbox(type="text", name="scheduled_at_time",value=schedule_time)
|
|
|
|
|
//div(id=flatpickr)
|
2022-07-10 22:20:12 +02:00
|
|
|
|
br
|
|
|
|
|
div.composer--publisher
|
2022-07-11 17:04:46 +02:00
|
|
|
|
//input.button.primary(type="submit", value="ajouter à la file d'attente")
|
|
|
|
|
input.button.primary(type="submit", value="poster tout de suite")
|
2022-07-11 17:45:28 +02:00
|
|
|
|
|
|
|
|
|
script.
|
|
|
|
|
function selectAccount(somePseudo) {
|
|
|
|
|
console.log('account selected', document.querySelector('#author_select').value)
|
2022-09-07 09:57:38 +02:00
|
|
|
|
let selector=document.querySelector('#author_select');
|
|
|
|
|
selector.value = somePseudo
|
|
|
|
|
selector.classList.add("changed")
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
selector.classList.remove("changed")
|
|
|
|
|
},500)
|
2022-07-11 17:45:28 +02:00
|
|
|
|
console.log('account changed', somePseudo)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log('script loaded')
|