extends layout block content div.column-header__wrapper h1.button.column-header Publier un message if message p.alert.alert-error=message //form(action="/add-to-queue",method="post") form(action="/direct-post",method="post") span.account span="Choix du compte parmi les " span=accounts_to_select.length br 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 div.compose-form__autosuggest-wrapper .autosuggest-textarea label span Content warning (optionnel) input.autosuggest-textarea__textarea(name="cw", type="text", width="500") span Qu’avez-vous en tête ? textarea.autosuggest-textarea__textarea(name="message", width="500", lines="20",autofocus="autofocus") br label span Fichier à joindre (optionnel) textarea.autosuggest-textarea__textarea(name="fichier", width="500", lines="1",value="default_picture.jpg") 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) br div.composer--publisher //input.button.primary(type="submit", value="ajouter à la file d'attente") input.button.primary(type="submit", value="poster tout de suite") script. function selectAccount(somePseudo) { console.log('account selected', document.querySelector('#author_select').value) let selector=document.querySelector('#author_select'); selector.value = somePseudo selector.classList.add("changed") setTimeout(()=>{ selector.classList.remove("changed") },500) console.log('account changed', somePseudo) } console.log('script loaded')