From 81b99ef414dc77eaa81395177bf23a5893ae3ba1 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Mon, 5 May 2025 21:14:23 +0200 Subject: [PATCH] [TASK] edit form on logbook fixes #635 --- frontend/scss/components/_links.scss | 4 ++ templates/includes/forms/log.html.tera | 55 ++++++++++++++++++-------- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/frontend/scss/components/_links.scss b/frontend/scss/components/_links.scss index ccf00a0..2643d63 100644 --- a/frontend/scss/components/_links.scss +++ b/frontend/scss/components/_links.scss @@ -11,6 +11,10 @@ @apply text-white hover:text-primary-100 underline; } + &-black { + @apply text-black hover:text-primary-950 dark:text-white hover:dark:text-primary-300 underline; + } + &-no-underline { @apply no-underline; } diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 04a3b6e..66e6f50 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -183,8 +183,6 @@
-
- {% if log.logtype and not hide_type %}
{% if log.logtype == 1 %} @@ -199,7 +197,15 @@
{% endif %}
- {{ log.boat.name }} + {% if allowed_to_edit %} + {{ log.boat.name }} + {% else %} + + {{ log.boat.name }} + + {% endif %} ({{ log.shipmaster_user.name -}} {% if log.shipmaster_only_steering %} - handgesteuert @@ -252,35 +258,52 @@ {% endif %} {% endif %}
-
- {% if allowed_to_edit %} -
+ {% if allowed_to_edit %} + +
+ +
+

Eintrag '{{ log.boat.name }}' ändern

+

{{ log.id }}

+ - Handgesteuert: - - - + {{ macros::checkbox(label='Handgesteuert', name='shipmaster_only_steering', id=log.shipmaster_only_steering,checked=log.shipmaster_only_steering) }} + + - + {% include "includes/delete-icon" %} Löschen - {% endif %} -
+
+ + + {% endif %} {% endmacro show_old %} {% macro home(log) %}