small fixes

This commit is contained in:
teldra 2022-04-11 22:38:32 +02:00
parent 0a82012df8
commit 56838439bc
4 changed files with 19 additions and 12 deletions

View File

@ -21,9 +21,9 @@ forms:
placeholder: "Einfach losschreiben. Der erste Absatz wird die Zusammenfassung in Artikelübersichten. Denke an die Formatierungshilfe hinter dem Link oben."
- title: categories
input_type: mc
name: "Kategorien"
name: "Kategorie"
expanded: true
new: "Neue Kategorien"
new: "Neue Kategorie"
help: "gerne Plural, möglichst wenige"
placeholder: "Pressemitteilungen"
- title: when
@ -44,7 +44,7 @@ forms:
- title: events
group: events
input_type: mc
name: "Eventkategorien"
name: "Eventkategorie"
expanded: false
new: "Neue Events"
help: "gerne Plural, möglichst wenige"
@ -58,14 +58,17 @@ forms:
group: misc
input_type: checkbox
name: "Featured"
help: "Damit erscheint der Artikel für 2 Wochen auf der Startseite"
- title: about
group: misc
input_type: checkbox
name: "Über uns"
help: "Falls der Artikel eine Gruppe des Hauses beschreibt"
- title: lastmod
group: misc
input_type: date
name: "Zurueckdatieren"
help: "falls ein Artikel nachgetragen werden muss"
- title: tags
group: misc
input_type: mc

View File

@ -2,7 +2,7 @@ fieldset {
display: flex; flex-direction: row; padding: 0; border: none; margin: 0 0 .3rem .5rem;
}
#display {
#result {
-webkit-user-select: all;
user-select: all;
@ -13,6 +13,10 @@ input, textarea {
color: var(--text-link)
}
#display {
white-space: pre; display: none; background: var(--background-body); padding: 1rem 0 1rem 1rem; margin-top: 1rem;
#result {
white-space: pre; display: none; background: var(--background-body);
padding: 1rem 0 1rem 1rem;
margin-top: 1rem;
-webkit-user-select: all;
user-select: all;
}

View File

@ -32,10 +32,10 @@
</div>
{{ else if eq .input_type "checkbox" }}
<div class="checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="checkbox" name="{{ .title }}" id="{{ .title }}" value="{{ .name }}" {{ .Scratch.Get "requiredtext" }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<label><input type="checkbox" name="{{ .title }}" id="{{ .title }}" value="{{ .name }}">{{- $name -}}{{- if .help }} ({{ .help }}){{ end }}</label>
</div>
{{ else if eq .input_type "results" }}
<div id='display'></div>
<div id='result'></div>
{{ else if eq .input_type "submit" }}
<div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<input type="{{ .input_type }}" value="{{- $name -}}" onclick="showInput(event);" />
@ -141,7 +141,7 @@
{{ else }}
<div class="margin_top_1rem {{ if .group }} visibleIf stretch margin_left_1rem" data-visibleif-rule=" {{ .group }}group == 'true' {{ end }}">
<div class="column">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="{{ .title }}">{{ .name }}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="{{ .title }}">{{ .name }}{{- if .required -}}{{- " *" -}}{{- end -}}{{- if .help }} ({{ .help }}){{ end }}</label>
<input type="{{ .input_type }}" name="{{ .title }}" id="{{ .title }}" placeholder="{{ .placeholder }}">
</div>
</div>

View File

@ -24,11 +24,11 @@ function testor(input) {
}
function showInput(e) {
document.getElementById("display").innerHTML = '';
document.getElementById("result").innerHTML = '';
e.preventDefault();
document.getElementById("display").style.display = "flex";
document.getElementById("result").style.display = "flex";
var output_info = document.getElementById("myform");
var display = document.getElementById("display");
var display = document.getElementById("result");