From 984dadf7e651e6b4e4b54bd07957cf88b81fce7c Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Mon, 30 May 2022 15:04:30 +0200 Subject: [PATCH] Update form buttons for accessibility & nojs behavior --- nummi/main/static/main/css/form.css | 12 +++++++----- nummi/main/templates/main/tag/form_buttons.html | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/nummi/main/static/main/css/form.css b/nummi/main/static/main/css/form.css index f5be716..58c559b 100644 --- a/nummi/main/static/main/css/form.css +++ b/nummi/main/static/main/css/form.css @@ -16,7 +16,8 @@ form ul.errorlist { form input, form select, -form textarea { +form textarea, +form a { padding: 0 var(--gap); } @@ -44,7 +45,7 @@ form > .buttons { grid-column: 1 / -1; text-align: right; } -form > .buttons input, +form > .buttons > *, form select, form input[type="file"] { font-size: inherit; @@ -54,11 +55,12 @@ form input[type="file"] { background: var(--bg-01); cursor: pointer; border-radius: var(--radius); + display: inline-block; } -form > .buttons input { +form > .buttons > * { margin-left: var(--gap); } -form > .buttons input:hover { +form > .buttons > *:hover { text-decoration: underline; } form > .buttons input[type="submit"] { @@ -68,7 +70,7 @@ form > .buttons input[type="submit"] { form > .buttons input[type="reset"] { color: var(--red); } -form > .buttons input.del { +form > .buttons a.del { background: var(--red); color: var(--text-inv); } diff --git a/nummi/main/templates/main/tag/form_buttons.html b/nummi/main/templates/main/tag/form_buttons.html index f6abe8b..95aaefd 100644 --- a/nummi/main/templates/main/tag/form_buttons.html +++ b/nummi/main/templates/main/tag/form_buttons.html @@ -1,10 +1,12 @@
{% if not adding %} - + onclick="return confirm('Supprimer <{{ instance.name}}> ?')" + href="{% url del_url instance.id %}"> + Delete + + {% endif %}