From 20ea017e960a9060f87b4d0fa5c24e3930b08ec7 Mon Sep 17 00:00:00 2001
From: Pierre-antoine Comby <comby@crans.org>
Date: Tue, 24 Mar 2020 23:32:48 +0100
Subject: [PATCH] row color to show if display

---
 apps/note/tables.py | 4 ++--
 apps/note/views.py  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/note/tables.py b/apps/note/tables.py
index 256ebad3..b2326fe3 100644
--- a/apps/note/tables.py
+++ b/apps/note/tables.py
@@ -87,10 +87,10 @@ class ButtonTable(tables.Table):
     class Meta:
         attrs = {
             'class':
-                'table table-bordered condensed table-striped table-hover'
+                'table table-bordered condensed table-hover'
         }
         row_attrs = {
-            'class': 'table-row',
+            'class': lambda record: 'table-row ' + 'table-success' if record.display else 'table-danger',
             'id': lambda record: "row-"+str(record.pk),
             'data-href': lambda record: record.pk
         }
diff --git a/apps/note/views.py b/apps/note/views.py
index 8a7d24fd..6ddc8975 100644
--- a/apps/note/views.py
+++ b/apps/note/views.py
@@ -132,7 +132,7 @@ class TransactionTemplateUpdateView(LoginRequiredMixin, UpdateView):
     """
     model = TransactionTemplate
     form_class = TransactionTemplateForm
-
+    success_url = reverse_lazy('note:template_list')
 
 class ConsoView(LoginRequiredMixin, SingleTableView):
     """
-- 
GitLab