From 10d55be10380262928968bf6835b010f9b552a6b Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Fri, 12 Feb 2021 13:29:07 +0100
Subject: [PATCH] simplification: don't use table for layout

---
 resources/css/style.css                        | 15 ++++-----------
 templates/web/edugain/create_accounts.tt2.html | 11 +++++------
 templates/web/renater/create_accounts.tt2.html | 11 +++++------
 3 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/resources/css/style.css b/resources/css/style.css
index 4f83d16..8992c89 100644
--- a/resources/css/style.css
+++ b/resources/css/style.css
@@ -175,25 +175,18 @@ div.account h3 {
 div.account table {
     table-layout: fixed;
     word-wrap: break-word;
-    margin-bottom: 0;
 }
 div.account table tbody {
     border:1px solid #f1893b;
 }
-div.account .comment {
-    /*display: flex;*/
-    margin: 0;
-    padding: 0;
-    height: 7em;
+div.account .description {
+    height: 4em;
     overflow-y: auto;
-    font-size: 0.875rem;
-    line-height: 1.3;
-    text-align: left;
 }
+/*
 div.account button {
-    margin-bottom: 0;
     padding: 0.5rem 1rem;
-}
+} */
 
 .scrollable {
     overflow-y: scroll;
diff --git a/templates/web/edugain/create_accounts.tt2.html b/templates/web/edugain/create_accounts.tt2.html
index e43d631..29b6559 100644
--- a/templates/web/edugain/create_accounts.tt2.html
+++ b/templates/web/edugain/create_accounts.tt2.html
@@ -21,6 +21,9 @@
         [% PROCESS $template scope=account.scope() id=account.id() | trim %]
     <div class="account small-12 medium-6 large-4 columns">
         <h3>[% lh.maketext("Account profile: [_1]", account.profile()) %]</h3>
+
+        <div class="description">[% description.${lh.language_tag()} %].</div>
+
         <table>
             <tr>
                 <td><strong>[% lh.maketext("user name:") %]</strong></td>
@@ -30,13 +33,8 @@
                 <td><strong>[% lh.maketext("password:") %]</strong></td>
                 <td>[% account.password() %]</td>
             </tr>
-            <tr>
-                <td colspan="2">
-                    <strong>[% lh.maketext("comment:") %]</strong>
-                    <div class="comment">[% description.${lh.language_tag()} %]</div>
-                </td>
-            </tr>
         </table>
+
         <div class="text-center" >
             <button data-open="account_details_[% account.id() %]" id="show_account_details_[% account.id() %]">[% lh.maketext("show details") %]</button>
         </div>
@@ -46,6 +44,7 @@
             <span aria-hidden="true">&times;</span>
         </button>
         <h3>[% lh.maketext("User attributes list") %]</h3>
+
         <table>
     [% FOREACH pair IN attributes.pairs %]
             <tr>
diff --git a/templates/web/renater/create_accounts.tt2.html b/templates/web/renater/create_accounts.tt2.html
index d455c72..7b0ae09 100644
--- a/templates/web/renater/create_accounts.tt2.html
+++ b/templates/web/renater/create_accounts.tt2.html
@@ -23,6 +23,9 @@
         [% PROCESS $template scope=account.scope() id=account.id() | trim %]
     <div class="account small-12 medium-6 large-4 columns">
         <h3>[% lh.maketext("Account profile: [_1]", account.profile()) %]</h3>
+
+        <div class="description">[% description.${lh.language_tag()} %].</div>
+
         <table>
             <tr>
                 <td><strong>[% lh.maketext("user name:") %]</strong></td>
@@ -32,13 +35,8 @@
                 <td><strong>[% lh.maketext("password:") %]</strong></td>
                 <td>[% account.password() %]</td>
             </tr>
-            <tr>
-                <td colspan="2">
-                    <strong>[% lh.maketext("comment:") %]</strong>
-                    <div class="comment">[% description.${lh.language_tag()} %]</div>
-                </td>
-            </tr>
         </table>
+
         <div class="text-center">
             <button data-open="account_details_[% account.id() %]" id="show_account_details_[% account.id() %]">[% lh.maketext("show details") %]</button>
         </div>
@@ -48,6 +46,7 @@
             <span aria-hidden="true">&times;</span>
         </button>
         <h3>[% lh.maketext("User attributes list") %]</h3>
+
         <table>
     [% FOREACH pair IN attributes.pairs %]
             <tr>
-- 
GitLab