From 9fb6ce7c2f2a8a3643817c4c00b70f15c5814f3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Thu, 26 Aug 2021 09:20:48 +0200
Subject: [PATCH] :ambulance: fix(code) Remove useless type on script tags

issue #6187
---
 html/main.php                        |  2 +-
 html/setup.php                       |  2 +-
 ihtml/themes/breezy/baseselector.tpl |  2 +-
 ihtml/themes/breezy/framework.tpl    |  2 +-
 ihtml/themes/breezy/headers.tpl      | 20 ++++++++++----------
 ihtml/themes/breezy/login.tpl        |  4 ++--
 ihtml/themes/breezy/msg_dialog.tpl   |  2 +-
 ihtml/themes/breezy/recovery.tpl     |  2 +-
 ihtml/themes/breezy/secondfactor.tpl |  2 +-
 ihtml/themes/breezy/simpleplugin.tpl |  2 +-
 ihtml/themes/legacy/login.tpl        |  4 ++--
 ihtml/themes/legacy/recovery.tpl     |  2 +-
 include/class_divSelectBox.inc       |  2 +-
 setup/setup_migrate_adminAccount.tpl |  2 +-
 14 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/html/main.php b/html/main.php
index f0c5ac8b9..63bfb3ef7 100644
--- a/html/main.php
+++ b/html/main.php
@@ -249,7 +249,7 @@ if ($error_collector != "") {
   $smarty->assign("php_errors", "");
 }
 
-$focus = '<script type="text/javascript">';
+$focus = '<script>';
 $focus .= 'next_msg_dialog();';
 $focus .= '</script>';
 $smarty->assign('focus',      $focus);
diff --git a/html/setup.php b/html/setup.php
index 093ba5a36..305a076c6 100644
--- a/html/setup.php
+++ b/html/setup.php
@@ -116,7 +116,7 @@ setup::mainInc();
  * @var string $display filled by setup::mainInc
  */
 
-$focus = '<script type="text/javascript">';
+$focus = '<script>';
 $focus .= 'next_msg_dialog();';
 $focus .= '</script>';
 
diff --git a/ihtml/themes/breezy/baseselector.tpl b/ihtml/themes/breezy/baseselector.tpl
index 1e5a45cae..27365dbd9 100644
--- a/ihtml/themes/breezy/baseselector.tpl
+++ b/ihtml/themes/breezy/baseselector.tpl
@@ -10,7 +10,7 @@
   value="{$currentValue|escape}"/>
 
 <div id="autocomplete_{$pid}" class="autocomplete"></div>
-<script type="text/javascript">
+<script>
   new Ajax.Autocompleter('{$htmlid}', 'autocomplete_{$pid}', 'autocomplete.php?type=base', { minChars: 3, frequency: 0.5 });
   {if $submitButton}
     $('{$htmlid}').observe(
diff --git a/ihtml/themes/breezy/framework.tpl b/ihtml/themes/breezy/framework.tpl
index 9b039f798..7549810bb 100644
--- a/ihtml/themes/breezy/framework.tpl
+++ b/ihtml/themes/breezy/framework.tpl
@@ -57,7 +57,7 @@
 
 
   <!-- Automatic logout when session is expired -->
-  <script type="text/javascript">
+  <script>
   {literal}
    function logout()
    {
diff --git a/ihtml/themes/breezy/headers.tpl b/ihtml/themes/breezy/headers.tpl
index 4c19b263a..979c619fc 100644
--- a/ihtml/themes/breezy/headers.tpl
+++ b/ihtml/themes/breezy/headers.tpl
@@ -15,19 +15,19 @@
 
   <link rel="shortcut icon" href="favicon.ico"/>
 
-  <script src="include/prototype.js" type="text/javascript"></script>
-  <script src="include/fusiondirectory.js" type="text/javascript"></script>
+  <script src="include/prototype.js"></script>
+  <script src="include/fusiondirectory.js"></script>
 {if $usePrototype == 'true'}
-  <script src="include/scriptaculous.js" type="text/javascript"></script>
-  <script src="include/builder.js" type="text/javascript"></script>
-  <script src="include/effects.js" type="text/javascript"></script>
-  <script src="include/dragdrop.js" type="text/javascript"></script>
-  <script src="include/controls.js" type="text/javascript"></script>
-  <script src="include/pulldown.js" type="text/javascript"></script>
+  <script src="include/scriptaculous.js"></script>
+  <script src="include/builder.js"></script>
+  <script src="include/effects.js"></script>
+  <script src="include/dragdrop.js"></script>
+  <script src="include/controls.js"></script>
+  <script src="include/pulldown.js"></script>
 {/if}
-  <script src="include/tsorter.js" type="text/javascript"></script>
+  <script src="include/tsorter.js"></script>
 {foreach from=$js_files item=file}
-  <script src="{$file}" type="text/javascript"></script>
+  <script src="{$file}"></script>
 {/foreach}
 </head>
 
diff --git a/ihtml/themes/breezy/login.tpl b/ihtml/themes/breezy/login.tpl
index 754d858fe..9c44fac25 100644
--- a/ihtml/themes/breezy/login.tpl
+++ b/ihtml/themes/breezy/login.tpl
@@ -47,7 +47,7 @@
 
       <!-- check, if cookies are enabled -->
       <p class="fusiondirectoryLoginWarning">
-       <script type="text/javascript">
+       <script>
         <!--
         document.cookie = "fdtest=empty;path=/";
         if (document.cookie.indexOf( "fdtest=") > -1 )
@@ -76,7 +76,7 @@
 
 {include file={filePath file="copynotice.tpl"}}
 
-<script type="text/javascript">
+<script>
 <!--
   enable_keyPress = false;
   focus_field("{$focusfield|escape}");
diff --git a/ihtml/themes/breezy/msg_dialog.tpl b/ihtml/themes/breezy/msg_dialog.tpl
index 9f2d7d614..843b55345 100644
--- a/ihtml/themes/breezy/msg_dialog.tpl
+++ b/ihtml/themes/breezy/msg_dialog.tpl
@@ -45,7 +45,7 @@
         {/if}
       </div>
     </div>
-    <script type="text/javascript">
+    <script>
       focus_field('MSG_OK{$dialog.id}');
     </script>
   {/foreach}
diff --git a/ihtml/themes/breezy/recovery.tpl b/ihtml/themes/breezy/recovery.tpl
index 6e29c287f..5b33713f0 100644
--- a/ihtml/themes/breezy/recovery.tpl
+++ b/ihtml/themes/breezy/recovery.tpl
@@ -128,7 +128,7 @@
 {include file={filePath file="copynotice.tpl"}}
 
   <!-- Place cursor in email field -->
-  <script type="text/javascript">
+  <script>
     <!-- // First input field on page
     focus_field('error_accept','login','directory','username','current_password','email_address');
     next_msg_dialog();
diff --git a/ihtml/themes/breezy/secondfactor.tpl b/ihtml/themes/breezy/secondfactor.tpl
index ad537562c..c75fee9f6 100644
--- a/ihtml/themes/breezy/secondfactor.tpl
+++ b/ihtml/themes/breezy/secondfactor.tpl
@@ -41,7 +41,7 @@
 
 {include file={filePath file="copynotice.tpl"}}
 
-<script type="text/javascript">
+<script>
 <!--
   next_msg_dialog();
 -->
diff --git a/ihtml/themes/breezy/simpleplugin.tpl b/ihtml/themes/breezy/simpleplugin.tpl
index f5eeedaa2..cec63d08e 100644
--- a/ihtml/themes/breezy/simpleplugin.tpl
+++ b/ihtml/themes/breezy/simpleplugin.tpl
@@ -14,7 +14,7 @@
 
 {if isset($focusedField)}
   <!-- Place cursor -->
-  <script type="text/javascript">
+  <script>
     <!-- // First input field on page
       focus_field('{$focusedField|escape}');
     -->
diff --git a/ihtml/themes/legacy/login.tpl b/ihtml/themes/legacy/login.tpl
index 3cf3a9f54..b660661b4 100644
--- a/ihtml/themes/legacy/login.tpl
+++ b/ihtml/themes/legacy/login.tpl
@@ -47,7 +47,7 @@
 
       <!-- check, if cookies are enabled -->
       <p class="fusiondirectoryLoginWarning">
-       <script type="text/javascript">
+       <script>
         <!--
         document.cookie = "fdtest=empty;path=/";
         if (document.cookie.indexOf( "fdtest=") > -1 )
@@ -76,7 +76,7 @@
 
 {include file={filePath file="copynotice.tpl"}}
 
-<script type="text/javascript">
+<script>
 <!--
   enable_keyPress = false;
   focus_field("{$focusfield}");
diff --git a/ihtml/themes/legacy/recovery.tpl b/ihtml/themes/legacy/recovery.tpl
index bf9873709..a8858d139 100644
--- a/ihtml/themes/legacy/recovery.tpl
+++ b/ihtml/themes/legacy/recovery.tpl
@@ -129,7 +129,7 @@
 {include file={filePath file="copynotice.tpl"}}
 
   <!-- Place cursor in email field -->
-  <script type="text/javascript">
+  <script>
     <!-- // First input field on page
     focus_field('error_accept','login','directory','username','current_password','email_address');
     next_msg_dialog();
diff --git a/include/class_divSelectBox.inc b/include/class_divSelectBox.inc
index fb6290a23..b3ecb0adc 100644
--- a/include/class_divSelectBox.inc
+++ b/include/class_divSelectBox.inc
@@ -105,7 +105,7 @@ class divSelectBox
     $s_return .= '</table></div></div>';
     if ($this->headers !== FALSE) {
       $s_return .=
-        '<script type="text/javascript">
+        '<script>
           var sorter'.$this->id.' = tsorter.create(\''.$this->id.'\');
         </script>';
     }
diff --git a/setup/setup_migrate_adminAccount.tpl b/setup/setup_migrate_adminAccount.tpl
index a7cd35fff..8cdf83296 100644
--- a/setup/setup_migrate_adminAccount.tpl
+++ b/setup/setup_migrate_adminAccount.tpl
@@ -42,7 +42,7 @@
     </table>
 
     <!-- Place cursor -->
-    <script type="text/javascript">
+    <script>
       <!-- // First input field on page
       focus_field('new_user_password');
       -->
-- 
GitLab