mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 14:38:00 +00:00
fix editing note in config admin page
This commit is contained in:
parent
d579ec634d
commit
98b7e33288
|
@ -1,13 +1,13 @@
|
|||
-macro new_checkbox(name, checked)
|
||||
-if checked
|
||||
%input(id="{{name}}" name="{{name}}" type="checkbox" checked)
|
||||
%input(id="{{name}}" type="checkbox" checked)
|
||||
|
||||
-else
|
||||
%input(id="{{name}}" name="{{name}}" type="checkbox")
|
||||
%input(id="{{name}}" type="checkbox")
|
||||
|
||||
|
||||
-macro new_select(name, selected, items)
|
||||
%select(id="{{name}}" name="{{name}}")
|
||||
%select(id="{{name}}")
|
||||
-for item in items
|
||||
-if item == selected
|
||||
%option(value="{{item}}" selected) -> =item.title()
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
.grid-2col
|
||||
%label(for="name") << Name
|
||||
%input(id = "name" name="name" placeholder="Relay Name" value="{{config.name or ''}}")
|
||||
%input(id = "name" placeholder="Relay Name" value="{{config.name or ''}}")
|
||||
|
||||
%label(for="description") << Description
|
||||
%textarea(id="description" name="note" value="{{config.note or ''}}") << {{config.note}}
|
||||
%label(for="note") << Description
|
||||
%textarea(id="note" value="{{config.note or ''}}") << {{config.note}}
|
||||
|
||||
%label(for="theme") << Color Theme
|
||||
=func.new_select("theme", config.theme, themes)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const elems = [
|
||||
document.querySelector("#name"),
|
||||
document.querySelector("#description"),
|
||||
document.querySelector("#note"),
|
||||
document.querySelector("#theme"),
|
||||
document.querySelector("#log-level"),
|
||||
document.querySelector("#whitelist-enabled"),
|
||||
|
|
Loading…
Reference in a new issue