Add special input widgets for markdown fields (#1577)

* Add markdown text input widgets

* Update src/pretix/static/pretixcontrol/scss/_forms.scss

* Improvements

---------

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Martin Gross
2024-04-23 14:40:30 +02:00
committed by GitHub
parent 64d6a34039
commit 5c833cd493
14 changed files with 155 additions and 77 deletions

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 128"><path d="M193 128H15a15 15 0 0 1-15-15V15A15 15 0 0 1 15 0h178a15 15 0 0 1 15 15v98a15 15 0 0 1-15 15zM50 98V59l20 25 20-25v39h20V30H90L70 55 50 30H30v68zm134-34h-20V30h-20v34h-20l30 35z"/></svg>

After

Width:  |  Height:  |  Size: 257 B

View File

@@ -147,8 +147,27 @@ div[data-formset-body], div[data-formset-form], div[data-nested-formset-form], d
padding: 5px 0;
}
.i18n-form-group .i18n-field-markdown-note {
border: 1px solid $input-border;
color: $text-muted;
font-size: 0.8em;
padding: 0.2em;
&::before {
display: inline-block;
height: 0.6em;
width: 1.5em;
position: relative;
top: 0.1em;
left: 0.1em;
opacity: 50%;
margin-right: 0.5em;
content: url(static('pretixcontrol/img/icons/markdown-mark-solid.svg'));
}
}
.i18n-form-group input,
.i18n-form-group textarea {
.i18n-form-group textarea,
.i18n-form-group .i18n-field-markdown-note {
@include border-top-radius(0px);
@include border-bottom-radius(0px);
border-top-width: 0;