diff --git a/kfet/static/kfet/css/index.css b/kfet/static/kfet/css/index.css index 50d2cae8..4fc02014 100644 --- a/kfet/static/kfet/css/index.css +++ b/kfet/static/kfet/css/index.css @@ -595,3 +595,16 @@ thead .tooltip { width: 50px; margin: 0 auto; } + +/* Multiple select customizations */ + +.ms-choice { + height: 34px !important; + line-height: 34px !important; + border: 1px solid #ccc !important; + box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !important; +} + +.ms-choice > div { + top: 4px !important; +} diff --git a/kfet/templates/kfet/account_group_form.html b/kfet/templates/kfet/account_group_form.html index e37bdd89..00e7809b 100644 --- a/kfet/templates/kfet/account_group_form.html +++ b/kfet/templates/kfet/account_group_form.html @@ -1,37 +1,62 @@ {% extends 'kfet/base.html' %} {% load staticfiles %} +{% load widget_tweaks %} {% block extra_head %} {% endblock %} +{% block title %}Permissions - Édition{% endblock %} +{% block content-header-title %}Modification des permissions{% endblock %} + {% block content %} -
- {% csrf_token %} -
- {{ form.name.errors }} - {{ form.name.label_tag }} -
- K-Fêt - {{ form.name }} +{% include "kfet/base_messages.html" %} + +
+
+
+ + {% csrf_token %} +
+ +
+
+ K-Fêt + {{ form.name|add_class:"form-control" }} +
+ {% if form.name.errors %}{{ form.name.errors }}{% endif %} + {% if form.name.help_text %}{{ form.name.help_text }}{% endif %} +
+
+ {% include "kfet/form_field_snippet.html" with field=form.permissions %} + {% if not perms.kfet.manage_perms %} + {% include "kfet/form_authentication_snippet.html" %} + {% endif %} + {% include "kfet/form_submit_snippet.html" with value="Enregistrer" %} +
-
- {{ form.permissions.errors }} - {{ form.permissions.label_tag }} - {{ form.permissions }} -
- - +
diff --git a/kfet/templates/kfet/base_form.html b/kfet/templates/kfet/base_form.html index b83e888a..ba6a84ac 100644 --- a/kfet/templates/kfet/base_form.html +++ b/kfet/templates/kfet/base_form.html @@ -3,7 +3,7 @@
-
+ {% csrf_token %} {% include "kfet/form_snippet.html" %} {% if not authz %} diff --git a/kfet/templates/kfet/history.html b/kfet/templates/kfet/history.html index 9e983079..add461ab 100644 --- a/kfet/templates/kfet/history.html +++ b/kfet/templates/kfet/history.html @@ -128,6 +128,9 @@ $(document).ready(function() { $("select").multipleSelect({ width: '100%', filter: true, + allSelected: " ", + selectAllText: "Tout-te-s", + countSelected: "# sur %" }); $("input").on('dp.change change', function() { diff --git a/kfet/views.py b/kfet/views.py index fa94bb35..0cce165e 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -539,7 +539,7 @@ class AccountGroupCreate(SuccessMessageMixin, CreateView): success_message = 'Nouveau groupe : %(name)s' success_url = reverse_lazy('kfet.account.group') -class AccountGroupUpdate(UpdateView): +class AccountGroupUpdate(SuccessMessageMixin, UpdateView): queryset = Group.objects.filter(name__icontains='K-Fêt') template_name = 'kfet/account_group_form.html' form_class = GroupForm