From d0447e0c8eb956de6d23620667c316b2ab33af0f Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 18 Apr 2023 12:15:48 +0200 Subject: [PATCH] Update form style --- nummi/main/locale/fr/LC_MESSAGES/django.mo | Bin 2798 -> 2843 bytes nummi/main/locale/fr/LC_MESSAGES/django.po | 18 ++-- nummi/main/static/main/css/form.css | 95 +++++---------------- nummi/main/templates/main/form/base.html | 44 +++++++--- nummi/main/templates/main/search.html | 3 + 5 files changed, 67 insertions(+), 93 deletions(-) diff --git a/nummi/main/locale/fr/LC_MESSAGES/django.mo b/nummi/main/locale/fr/LC_MESSAGES/django.mo index 54df9d0ed2ddcc99c0588c858c0ee148773f89a8..4e8449a291932bd1162ad060b6c873d93cc56c02 100644 GIT binary patch delta 1214 zcmYk+OGs2v9LMqhbsmXdEkwQoiBZ$p~e;X?kn zwez8lC$J2&sE&Q8jsdQ~Ac_DLCvhb{MNKe`ns5e__ztV_3m)OP{&@MJlCUsf7u%o}_uyLW!=rc}X=~5C z{v}2`fm-MsYT@&!iNB-9`QhciQSDK^7%m+h9<-$NbI6Rf~lti|vn9~=1ig&H`;>>9Wp)vy`0@`K1@ z9lW&AZdChTRJ(rEgo9px$?LD6`sdv{sK1&A$ULFF@rw7TUp$XG)32z8OURK$WjfQ% z#J{9Jv;R}GXS5*g!hX*;xr^&ADjzDg8nnXaBk>kS?R)G;G|uU delta 1185 zcmXZcOKeP07{KvUGg=+>YE6}Di)u^jHEku@L{cghDiH+`vMqLS1MAyQ0Gz-GLH4R{A#UJfFnO4iBlg z@DnuCmuTj1(1kys{br;66WafK_&c0Kcd(AZjxTa?Tn9RD51Lqiv=7y@|903#17p)Z z^o5o%bJ_cmvs(P>cI-0-fC1 zu@9YS5M5{#eSRpOA44Y?56_~%n#))@s%W1=-?WS#ug)boDE4wNk#9 Qe^65%t^Jw1F;w{WA3K*$=>Px# diff --git a/nummi/main/locale/fr/LC_MESSAGES/django.po b/nummi/main/locale/fr/LC_MESSAGES/django.po index d4bc5b8..d1e39fd 100644 --- a/nummi/main/locale/fr/LC_MESSAGES/django.po +++ b/nummi/main/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:13+0200\n" +"POT-Creation-Date: 2023-04-18 12:10+0200\n" "PO-Revision-Date: 2022-12-21 17:30+0100\n" "Last-Translator: edpibu \n" "Language-Team: edpibu \n" @@ -188,18 +188,22 @@ msgstr "Annuler" msgid "Confirm" msgstr "Confirmer" -#: .\main\templates\main\form\base.html:17 +#: .\main\templates\main\form\base.html:27 +msgid "Reset" +msgstr "Réinitialiser" + +#: .\main\templates\main\form\base.html:28 +#: .\main\templates\main\tag\form_buttons.html:8 +msgid "Save" +msgstr "Enregistrer" + +#: .\main\templates\main\form\base.html:37 #: .\main\templates\main\table\invoice.html:11 #: .\main\templates\main\table\invoice.html:24 #: .\main\templates\main\tag\form_buttons.html:4 msgid "Delete" msgstr "Supprimer" -#: .\main\templates\main\form\base.html:20 -#: .\main\templates\main\tag\form_buttons.html:8 -msgid "Save" -msgstr "Enregistrer" - #: .\main\templates\main\index.html:31 msgid "History" msgstr "Historique" diff --git a/nummi/main/static/main/css/form.css b/nummi/main/static/main/css/form.css index dff01e4..90b8aa4 100644 --- a/nummi/main/static/main/css/form.css +++ b/nummi/main/static/main/css/form.css @@ -1,92 +1,43 @@ -form { - display: grid; - grid-template-columns: auto 1fr; - grid-gap: var(--gap); - margin: var(--gap) 0; - line-height: 2rem; -} - form ul.errorlist { - grid-column: 1 / -1; color: var(--red); font-weight: 550; list-style-type: "! "; margin: 0; } -form input, -form select, -form a { - padding: 0 var(--gap); -} -form textarea { - padding: var(--gap); -} - -form input { - color: inherit; -} - -form > label, -form > div > input[type="text"], -form > div > input[type="number"], -form > div > input[type="password"], -form > div > input[type="file"], -form > div > select, -form > div > textarea, -form > div > select { - font-size: inherit; - line-height: inherit; - font-family: inherit; - /*height: 100%;*/ - width: 100%; -} -form > div > select { - height: 100%; -} -form > div > textarea { - line-height: initial; -} -form > div > input[type="text"], -form > div > input[type="number"], -form > div > input[type="password"], -form > div > input[type="file"], -form > div > textarea, -form > div > select { +form tbody input, +form tbody select, +form tbody textarea { + font: inherit; border: none; - border-radius: var(--radius); - background: var(--bg-01); + background: var(--bg); + width: 100%; + height: 100%; + line-height: 1.5; } -form > .buttons { - grid-column: 1 / -1; +form tfoot { text-align: right; } -form > .buttons > * { - font-size: inherit; - line-height: inherit; - font-family: inherit; - border: 0; - background: var(--bg-01); - cursor: pointer; - border-radius: var(--radius); - display: inline-block; -} -form > .buttons > * { +form tfoot input { + font: inherit; + line-height: 1.5; margin-left: var(--gap); + border-radius: var(--radius); + padding: 0 var(--gap); + cursor: pointer; } -form > .buttons > *:hover { +form tfoot input:hover { text-decoration: underline; } -form > .buttons input[type="submit"] { +form tfoot input[type="submit"] { + border: .1rem solid var(--green); background: var(--green-1); } -form > .buttons a.del, -form > .buttons input.del { - background: var(--red); - color: var(--text-inv); +form tfoot input[type="reset"] { + border: .1rem solid var(--red); + background: var(--red-1); } - -form input[hidden] { - display: none; +form tfoot a.del { + color: var(--red); } diff --git a/nummi/main/templates/main/form/base.html b/nummi/main/templates/main/form/base.html index 540693a..a4ed413 100644 --- a/nummi/main/templates/main/form/base.html +++ b/nummi/main/templates/main/form/base.html @@ -5,18 +5,34 @@ {% for error in form.non_field_errors %}
  • {{ error }}
  • {% endfor %} {% endif %} - {% for field in form %} - {{ field.errors }} - -
    {{ field }}
    - {% endfor %} -{% endblock %} -{% block buttons %} -
    - {% if not form.instance.adding %} - {% translate "Delete" %} - {% endif %} - - -
    + + + {% for field in form %} + {% if field.errors %} + + + + {% endif %} + + + + + {% endfor %} + + + + + + +
    {{ field.errors }}
    + + {{ field }}
    + {% block buttons %} + {% if not form.instance.adding %} + {% translate "Delete" %} + {% endif %} + + + {% endblock %} +
    {% endblock %} diff --git a/nummi/main/templates/main/search.html b/nummi/main/templates/main/search.html index cf8af21..2baf470 100644 --- a/nummi/main/templates/main/search.html +++ b/nummi/main/templates/main/search.html @@ -10,6 +10,9 @@ + {% endblock %} {% block body %}

    {% translate "Search" %}