From 4b3959787e2cdfe493655b2d40ae8c40425a2496 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 30 Nov 2018 15:50:45 +0100 Subject: [PATCH] admin: update list templates to show buttons in one column --- .../admin/templates/administration/application/list.html | 7 ++++--- .../admin/templates/administration/provider/list.html | 7 ++++--- passbook/admin/templates/administration/rule/list.html | 8 +++++--- passbook/admin/templates/administration/source/list.html | 9 +++++---- passbook/ldap/forms.py | 3 ++- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/passbook/admin/templates/administration/application/list.html b/passbook/admin/templates/administration/application/list.html index fe90d8e2dc..8c75c505bf 100644 --- a/passbook/admin/templates/administration/application/list.html +++ b/passbook/admin/templates/administration/application/list.html @@ -20,7 +20,6 @@ {% trans 'Name' %} {% trans 'Provider' %} - @@ -28,8 +27,10 @@ {{ application.name }} {{ application.provider }} - {% trans 'Edit' %} - {% trans 'Delete' %} + + {% trans 'Edit' %} + {% trans 'Delete' %} + {% endfor %} diff --git a/passbook/admin/templates/administration/provider/list.html b/passbook/admin/templates/administration/provider/list.html index d31d3ed3a6..fcbb5f647e 100644 --- a/passbook/admin/templates/administration/provider/list.html +++ b/passbook/admin/templates/administration/provider/list.html @@ -28,7 +28,6 @@ {% trans 'Name' %} {% trans 'Class' %} - @@ -36,8 +35,10 @@ {{ provider.name }} {{ provider|fieldtype }} - {% trans 'Edit' %} - {% trans 'Delete' %} + + {% trans 'Edit' %} + {% trans 'Delete' %} + {% endfor %} diff --git a/passbook/admin/templates/administration/rule/list.html b/passbook/admin/templates/administration/rule/list.html index 9e9b65cd3d..d0a324ffe2 100644 --- a/passbook/admin/templates/administration/rule/list.html +++ b/passbook/admin/templates/administration/rule/list.html @@ -28,7 +28,6 @@ {% trans 'Name' %} {% trans 'Class' %} - @@ -36,8 +35,11 @@ {{ rule.name }} {{ rule|fieldtype }} - {% trans 'Edit' %} - {% trans 'Delete' %} + + {% trans 'Edit' %} + {% trans 'Test' %} + {% trans 'Delete' %} + {% endfor %} diff --git a/passbook/admin/templates/administration/source/list.html b/passbook/admin/templates/administration/source/list.html index 444f0b8731..fe2a08ab92 100644 --- a/passbook/admin/templates/administration/source/list.html +++ b/passbook/admin/templates/administration/source/list.html @@ -24,16 +24,17 @@ {% trans 'Name' %} {% trans 'Class' %} - {% for source in object_list %} {{ source.name }} - {{ source.cast|fieldtype }} - {% trans 'Edit' %} - {% trans 'Delete' %} + {{ source|fieldtype }} + + {% trans 'Edit' %} + {% trans 'Delete' %} + {% endfor %} diff --git a/passbook/ldap/forms.py b/passbook/ldap/forms.py index 4bd2f88c02..c963ae024a 100644 --- a/passbook/ldap/forms.py +++ b/passbook/ldap/forms.py @@ -13,7 +13,8 @@ class LDAPSourceForm(forms.ModelForm): model = LDAPSource fields = SOURCE_FORM_FIELDS + ['server_uri', 'bind_cn', 'bind_password', - 'type', 'domain', 'base_dn', 'create_user', 'reset_password'] + 'type', 'domain', 'base_dn', 'create_user', + 'reset_password', 'rules'] widgets = { 'name': forms.TextInput(), 'server_uri': forms.TextInput(),