mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 22:48: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)
|
-macro new_checkbox(name, checked)
|
||||||
-if checked
|
-if checked
|
||||||
%input(id="{{name}}" name="{{name}}" type="checkbox" checked)
|
%input(id="{{name}}" type="checkbox" checked)
|
||||||
|
|
||||||
-else
|
-else
|
||||||
%input(id="{{name}}" name="{{name}}" type="checkbox")
|
%input(id="{{name}}" type="checkbox")
|
||||||
|
|
||||||
|
|
||||||
-macro new_select(name, selected, items)
|
-macro new_select(name, selected, items)
|
||||||
%select(id="{{name}}" name="{{name}}")
|
%select(id="{{name}}")
|
||||||
-for item in items
|
-for item in items
|
||||||
-if item == selected
|
-if item == selected
|
||||||
%option(value="{{item}}" selected) -> =item.title()
|
%option(value="{{item}}" selected) -> =item.title()
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
|
|
||||||
.grid-2col
|
.grid-2col
|
||||||
%label(for="name") << Name
|
%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
|
%label(for="note") << Description
|
||||||
%textarea(id="description" name="note" value="{{config.note or ''}}") << {{config.note}}
|
%textarea(id="note" value="{{config.note or ''}}") << {{config.note}}
|
||||||
|
|
||||||
%label(for="theme") << Color Theme
|
%label(for="theme") << Color Theme
|
||||||
=func.new_select("theme", config.theme, themes)
|
=func.new_select("theme", config.theme, themes)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const elems = [
|
const elems = [
|
||||||
document.querySelector("#name"),
|
document.querySelector("#name"),
|
||||||
document.querySelector("#description"),
|
document.querySelector("#note"),
|
||||||
document.querySelector("#theme"),
|
document.querySelector("#theme"),
|
||||||
document.querySelector("#log-level"),
|
document.querySelector("#log-level"),
|
||||||
document.querySelector("#whitelist-enabled"),
|
document.querySelector("#whitelist-enabled"),
|
||||||
|
|
Loading…
Reference in a new issue