From 706fb3543d11ef3f4eb4fee34b9ee76a6cb4685a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 10 Nov 2023 10:22:48 +0100 Subject: [PATCH] form styling --- invoices.css | 61 +++++++++++++++++++++++++++++++++++++--------------- invoices.sh | 23 +++++++++++--------- 2 files changed, 57 insertions(+), 27 deletions(-) diff --git a/invoices.css b/invoices.css index 4a0edaa..de229a3 100755 --- a/invoices.css +++ b/invoices.css @@ -167,29 +167,31 @@ form input[type=number] { content: ''; } -.invoice form label[for=vatsb], -.invoice form label[for=vatyw], -.invoice form label[for=vatrate] { +.invoice form label[for=number]::after, +.invoice form label[for=date]::after{ + white-space: pre; + content: '\0A'; +} + +.invoice form label[for=number], +.invoice form input[name=number] { display: block; text-align: left; } -.invoice form label[for=vatnett], -.invoice form label[for=vatgross] { - display: inline-block; - float: left; margin-right: 1em; - line-height: 1em; -} -.invoice form input[type=radio] { display: none; } -.invoice form input[type=radio] + label::before { - content: '( ) '; -} -.invoice form input:checked + label[for^=vat]::before { - content: '(x) '; + +.invoice form label[for=date], +.invoice form input#date { + position: relative; + top: -5.75em; + text-align: center; + margin-right: 0; + width: 7em; } .invoice form table { - width: 30em; - margin-top: 1em; + min-width: 30em; + width: 100%; + margin-top: -3em; border-spacing: 0; } .invoice form table tr > th { @@ -220,3 +222,28 @@ form input[type=number] { width: 100%; height: 100%; height: 4.625em; } + +.invoice form label[for=vatsb], +.invoice form label[for=vatyw] { + display: block; + text-align: left; + margin-top: 2em; +} +.invoice form label[for=vatrate] { + display: block; + text-align: left; + margin-bottom: 1.5em; +} +.invoice form label[for=vatnett], +.invoice form label[for=vatgross] { + display: inline-block; + float: left; margin-right: 1em; + line-height: 1em; +} +.invoice form input[type=radio] { display: none; } +.invoice form input[type=radio] + label::before { + content: '( ) '; +} +.invoice form input:checked + label[for^=vat]::before { + content: '(x) '; +} diff --git a/invoices.sh b/invoices.sh index 49e54c0..b0d1539 100755 --- a/invoices.sh +++ b/invoices.sh @@ -155,17 +155,7 @@ edit_invoice(){ - [radio "vat" "youthwork" #vatyw $([ "${vat#vat=}" = youthwork ] && printf checked) ] - [label for=vatyw Umsatzsteuerbefreiung für Jugendhilfe, §4 Abs. 25 UStG.] - [radio "vat" "nett" #vatnett $([ "${vat#vat=}" = nett ] && printf checked)] - [label for=vatnett Netto] - [radio "vat" "gross" #vatgross $([ "${vat#vat=}" = gross ] && printf checked)] - [label for=vatgross Brutto] - [label for=vatrate USt.: [input type=number name="vatrate" value="${vatrate}"]% ] [table [tr [th Stück] [th Leistung] [th Stückpreis] [th Summe] ] @@ -195,6 +185,18 @@ $({ sed 1d "invoices/$id"; printf 'time= work= hours=\n'; } \ esac) ]] ] + + + [radio "vat" "youthwork" #vatyw $([ "${vat#vat=}" = youthwork ] && printf checked) ] + [label for=vatyw Umsatzsteuerbefreiung für Jugendhilfe, §4 Abs. 25 UStG.] + [radio "vat" "nett" #vatnett $([ "${vat#vat=}" = nett ] && printf checked)] + [label for=vatnett Netto] + [radio "vat" "gross" #vatgross $([ "${vat#vat=}" = gross ] && printf checked)] + [label for=vatgross Brutto] + [label for=vatrate USt.: [input type=number name="vatrate" value="${vatrate}"]% ] [select name=status [option value=open $( [ $status = open ] && printf selected=selected ) Offen] [option value=sent $( [ $status = sent ] && printf selected=selected ) Verschickt] @@ -202,6 +204,7 @@ $({ sed 1d "invoices/$id"; printf 'time= work= hours=\n'; } \ [option value=paid $( [ $status = paid ] && printf selected=selected ) Bezahlt] [option value=cancelled $( [ $status = cancelled ] && printf selected=selected ) Storniert] ] + [submit "genpdf" "$tid" PDF Exportieren] [submit "update" "$tid" Aktualisieren] ] -- 2.39.5