From e371761078e741773ccaa3d160c554c46f1ea01f Mon Sep 17 00:00:00 2001
From: Lukas Holecek <hluk@email.cz>
Date: Mar 24 2022 14:58:45 +0000
Subject: Fix HTML issues reported by SonarQube scan


---

diff --git a/resultsdb/templates/_formhelpers.html b/resultsdb/templates/_formhelpers.html
deleted file mode 100644
index ce7660b..0000000
--- a/resultsdb/templates/_formhelpers.html
+++ /dev/null
@@ -1,66 +0,0 @@
-{% macro render_field(field) %}
-  <th>{{ field.label }}</th>
-  <td>{{ field(**kwargs)|safe }}</td>
-  <td>
-    {% for error in field.errors %}
-       <span style="color: red;">{{error}}</span>
-    {% endfor %}
-  </td>
-{% endmacro %}
-
-<!-- inspired by https://gist.github.com/maximebf/3986659 -->
-{% macro form_field(field) %}
-    {% set with_label = kwargs.pop('with_label', False) %}
-
-    {% set inline_ = '' %}
-    {% if field.type  == 'BooleanField' %}
-        <div class="checkbox">
-          <label>
-            {{ field(**kwargs) }}
-            {{ field.label.text|safe }}
-          </label>
-        </div>
-
-
-    {% elif field.type == 'RadioField' %}
-      {% for subfield in field %}
-        <div class="radio">
-          <label>
-            {{ subfield(**kwargs) }}
-            {{ subfield.label.text|safe }}
-          </label>
-        </div>
-      {% endfor %}
-    {% else %}
-        <div class="form-group {% if field.errors %}has-error{% endif %}">
-            {% set placeholder = '' %}
-            {% if not with_label %}
-                {% set placeholder = field.label.text %}
-            {% endif %}
-
-            {% if with_label %}
-                <label for="{{ field.id }}">
-                    {{ field.label.text }}{% if field.flags.required %} *{% endif %}:
-                </label>
-            {% endif %}
-
-            {% set class_ = 'form-control' %}
-            {% if field.type == 'FileField' %}
-                {% set class_ = class_ + ' input-file' %}
-            {% endif %}
-
-            {{ field(class_=class_, placeholder=placeholder, **kwargs) }}
-
-            {% if field.errors %}
-                <span class="help-block">{{ field.errors|join(', ') }}</span>
-            {% endif %}
-
-            {% if field.description %}
-                <p class="help-block">{{ field.description|safe }}</p>
-            {% endif %}
-        </div>
-    {% endif %}
-{% endmacro %}
-
-
-
diff --git a/resultsdb/templates/layout.html b/resultsdb/templates/layout.html
index 92855fd..4fae952 100644
--- a/resultsdb/templates/layout.html
+++ b/resultsdb/templates/layout.html
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
   <head>
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
     <title>{{ title|default('ResultsDB') }}</title>
-      <meta name="viewport" content="width=device-width, initial-scale=1.0">
-      <!-- Bootstrap -->
-      <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
-      <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
+
+    <!-- Bootstrap -->
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
+    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
   </head>
 
   <body>
@@ -18,7 +20,7 @@
             <span class="icon-bar"></span>
             <span class="icon-bar"></span>
           </button>
-          <span class="navbar-brand"><b>ResultsDB</b></span>
+          <span class="navbar-brand"><strong>ResultsDB</strong></span>
         </div>
         <div class="navbar-collapse collapse">
 
@@ -28,10 +30,6 @@
               <li><a href="{{ url_for('api_v2.get_testcases') }}">Testcases</a></li>
           </ul>
 
-<!--         <div class="navbar-right">
-             <input type="button" class="btn btn-default navbar-btn" value="Search" onclick="location.href='';">
-         </div> -->
-
         </div><!--/.nav-collapse -->
       </div><!--/.container -->
     </div><!--/.navbar -->
@@ -58,11 +56,10 @@
       </footer>
     {% endblock %}
 
-
     <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
-    <script src="//code.jquery.com/jquery.js"></script>
-    <!-- Include all compiled plugins -->
-    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
+    <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
+    <!-- Include all compiled plugins (below), or include individual files as needed -->
+    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
 
     {% if config['FEDMENU_URL'] is defined %}
     <script src="{{ config['FEDMENU_URL'] }}/js/fedmenu.js"></script>

