From 911121e2234fad10633cfb0e830b3af17c01d369 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Fri, 18 Dec 2020 17:29:22 +0100
Subject: [PATCH] cosmetics: use multi-columns for checkboxes

---
 resources/css/style.css                           | 10 ++++++++++
 templates/web/edugain/complete_challenge.tt2.html |  8 ++++++--
 templates/web/renater/complete_challenge.tt2.html |  8 ++++++--
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/resources/css/style.css b/resources/css/style.css
index cc8c963..2794283 100644
--- a/resources/css/style.css
+++ b/resources/css/style.css
@@ -203,6 +203,16 @@ main form {
     float:none !important;
 }
 
+ul.columns4 {
+    column-count: 4;
+    list-style-type: none;
+}
+
+ul.columns3 {
+    column-count: 3;
+    list-style-type: none;
+}
+
 .nocursor{
     cursor: default!important;
     opacity:0.6;
diff --git a/templates/web/edugain/complete_challenge.tt2.html b/templates/web/edugain/complete_challenge.tt2.html
index 880e675..b2116b6 100644
--- a/templates/web/edugain/complete_challenge.tt2.html
+++ b/templates/web/edugain/complete_challenge.tt2.html
@@ -24,12 +24,16 @@
         </fieldset>
         <fieldset>
             <legend>[% lh.maketext("Account profiles:") %]</legend>
+            <ul class="columns4">
 [% FOREACH profile IN profiles %]
     [% template = profile _ '.tt2' %]
     [% PROCESS $template scope=account.scope() id=account.id() | trim %]
-            <input type="checkbox" id="[% profile %]" name="profiles" value="[% profile %]" checked/>
-            <label for="[% profile %]">[% profile %] <span class="fa fa-question-circle" title="[% description.${lh.language_tag()} %]"></span></label>
+                <li>
+                    <input type="checkbox" id="[% profile %]" name="profiles" value="[% profile %]" checked/>
+                    <label for="[% profile %]">[% profile %] <span class="fa fa-question-circle" title="[% description.${lh.language_tag()} %]"></span></label>
+                </li>
 [% END %]
+            </ul>
 
         </fieldset>
         <input type="hidden" name="federation" value="[% federation %]"/>
diff --git a/templates/web/renater/complete_challenge.tt2.html b/templates/web/renater/complete_challenge.tt2.html
index 880e675..b2116b6 100644
--- a/templates/web/renater/complete_challenge.tt2.html
+++ b/templates/web/renater/complete_challenge.tt2.html
@@ -24,12 +24,16 @@
         </fieldset>
         <fieldset>
             <legend>[% lh.maketext("Account profiles:") %]</legend>
+            <ul class="columns4">
 [% FOREACH profile IN profiles %]
     [% template = profile _ '.tt2' %]
     [% PROCESS $template scope=account.scope() id=account.id() | trim %]
-            <input type="checkbox" id="[% profile %]" name="profiles" value="[% profile %]" checked/>
-            <label for="[% profile %]">[% profile %] <span class="fa fa-question-circle" title="[% description.${lh.language_tag()} %]"></span></label>
+                <li>
+                    <input type="checkbox" id="[% profile %]" name="profiles" value="[% profile %]" checked/>
+                    <label for="[% profile %]">[% profile %] <span class="fa fa-question-circle" title="[% description.${lh.language_tag()} %]"></span></label>
+                </li>
 [% END %]
+            </ul>
 
         </fieldset>
         <input type="hidden" name="federation" value="[% federation %]"/>
-- 
GitLab