From 61984b93ba26e69c2c97750a064fb93df2117823 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Fri, 23 Feb 2018 15:00:07 +0100
Subject: [PATCH] move <div> container in error template

---
 templates/web/en/errors.tt2.html | 44 ++++++++++++++++---------------
 templates/web/en/index.tt2.html  |  8 ++----
 templates/web/fr/errors.tt2.html | 45 ++++++++++++++++----------------
 templates/web/fr/index.tt2.html  |  9 ++-----
 4 files changed, 50 insertions(+), 56 deletions(-)

diff --git a/templates/web/en/errors.tt2.html b/templates/web/en/errors.tt2.html
index bb4d257..b315a47 100644
--- a/templates/web/en/errors.tt2.html
+++ b/templates/web/en/errors.tt2.html
@@ -1,32 +1,34 @@
-[% FOREACH err IN errors %]
+<div class="ui-widget">
+    [% FOREACH err IN errors %]
 
-<p class="ui-state-error ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
-    Error:
+    <p class="ui-state-error ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
+        Error:
 
-    [% IF err == 'unknown_action' %]
-    unknown action
+        [% IF err == 'unknown_action' %]
+        unknown action
 
-    [% ELSIF err == 'internal' %]
-    internal error; administrators of the federation registry have been notified.
+        [% ELSIF err == 'internal' %]
+        internal error; administrators of the federation registry have been notified.
 
-    [% ELSIF err == 'wrong_token' %]
-    the validation token you provided is incorrect or it has already been used
+        [% ELSIF err == 'wrong_token' %]
+        the validation token you provided is incorrect or it has already been used
 
-    [% ELSIF err == 'wrong_token_for_sp' %]
-    the validation token you provided cannot be used to obtain test accounts for this service provider ([% entityid %])
+        [% ELSIF err == 'wrong_token_for_sp' %]
+        the validation token you provided cannot be used to obtain test accounts for this service provider ([% entityid %])
 
-    [% ELSIF err == 'accounts_creation_failed' %]
-    failed to create your test accounts
+        [% ELSIF err == 'accounts_creation_failed' %]
+        failed to create your test accounts
 
-    [% ELSIF (matches = err.match('missing_(\w+)')) %]
-    missing parameter '[% matches.0 %]'
+        [% ELSIF (matches = err.match('missing_(\w+)')) %]
+        missing parameter '[% matches.0 %]'
 
-    [% ELSE %]
-    [% err %]
+        [% ELSE %]
+        [% err %]
 
+        [% END %]
+    </p>
+    <br/>
     [% END %]
-</p>
-<br/>
-[% END %]
 
-You can report the issue to the administrators (<a href="mailto:[% app.support_email %]>">[% app.support_email %]</a>).
+    You can report the issue to the administrators (<a href="mailto:[% app.support_email %]>">[% app.support_email %]</a>).
+</div>
diff --git a/templates/web/en/index.tt2.html b/templates/web/en/index.tt2.html
index 062c902..9e47400 100644
--- a/templates/web/en/index.tt2.html
+++ b/templates/web/en/index.tt2.html
@@ -36,13 +36,9 @@
         <main>
 
             [% IF errors %]
-            <div class="ui-widget">
-            [% PROCESS 'errors.tt2.html' %]
-            </div>
+                [% PROCESS 'errors.tt2.html' %]
             [% ELSE %]
-
-            [% PROCESS 'content.tt2.html' %]
-
+                [% PROCESS 'content.tt2.html' %]
             [% END %]
         </main>
 
diff --git a/templates/web/fr/errors.tt2.html b/templates/web/fr/errors.tt2.html
index bb4d257..e3dea74 100644
--- a/templates/web/fr/errors.tt2.html
+++ b/templates/web/fr/errors.tt2.html
@@ -1,32 +1,33 @@
-[% FOREACH err IN errors %]
+<div class="ui-widget">
+    [% FOREACH err IN errors %]
+    <p class="ui-state-error ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
+        Error:
 
-<p class="ui-state-error ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
-    Error:
+        [% IF err == 'unknown_action' %]
+        unknown action
 
-    [% IF err == 'unknown_action' %]
-    unknown action
+        [% ELSIF err == 'internal' %]
+        internal error; administrators of the federation registry have been notified.
 
-    [% ELSIF err == 'internal' %]
-    internal error; administrators of the federation registry have been notified.
+        [% ELSIF err == 'wrong_token' %]
+        the validation token you provided is incorrect or it has already been used
 
-    [% ELSIF err == 'wrong_token' %]
-    the validation token you provided is incorrect or it has already been used
+        [% ELSIF err == 'wrong_token_for_sp' %]
+        the validation token you provided cannot be used to obtain test accounts for this service provider ([% entityid %])
 
-    [% ELSIF err == 'wrong_token_for_sp' %]
-    the validation token you provided cannot be used to obtain test accounts for this service provider ([% entityid %])
+        [% ELSIF err == 'accounts_creation_failed' %]
+        failed to create your test accounts
 
-    [% ELSIF err == 'accounts_creation_failed' %]
-    failed to create your test accounts
+        [% ELSIF (matches = err.match('missing_(\w+)')) %]
+        missing parameter '[% matches.0 %]'
 
-    [% ELSIF (matches = err.match('missing_(\w+)')) %]
-    missing parameter '[% matches.0 %]'
-
-    [% ELSE %]
-    [% err %]
+        [% ELSE %]
+        [% err %]
 
+        [% END %]
+    </p>
+    <br/>
     [% END %]
-</p>
-<br/>
-[% END %]
 
-You can report the issue to the administrators (<a href="mailto:[% app.support_email %]>">[% app.support_email %]</a>).
+    You can report the issue to the administrators (<a href="mailto:[% app.support_email %]>">[% app.support_email %]</a>).
+</div>
diff --git a/templates/web/fr/index.tt2.html b/templates/web/fr/index.tt2.html
index 4953638..ebfd655 100644
--- a/templates/web/fr/index.tt2.html
+++ b/templates/web/fr/index.tt2.html
@@ -34,15 +34,10 @@
         </header>
 
         <main>
-
             [% IF errors %]
-            <div class="ui-widget">
-            [% PROCESS 'errors.tt2.html' %]
-            </div>
+                [% PROCESS 'errors.tt2.html' %]
             [% ELSE %]
-
-            [% PROCESS 'content.tt2.html' %]
-
+                [% PROCESS 'content.tt2.html' %]
             [% END %]
         </main>
 
-- 
GitLab