Skip to content
This repository
Browse code

[WebProfilerBundle] Improve the logger panel

  • Loading branch information...
commit a52c675a467853c88cd1d0e52ea92d846340690d 1 parent 06da573
Victor Berchet authored January 27, 2012
19  src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
@@ -33,18 +33,17 @@
33 33
         <tr>
34 34
             <th>Filter</th>
35 35
             <td>
36  
-                <form action="" method="get" style="display: inline">
  36
+                <form id="priority-form" action="" method="get" style="display: inline">
37 37
                     <input type="hidden" name="panel" value="logger" />
38 38
                     <label for="priority">Priority</label>
39  
-                    <select name="priority">
40  
-                        <option value="100"{{ 100 == priority ? ' selected="selected"' : '' }}>DEBUG</option>
41  
-                        <option value="200"{{ 200 == priority ? ' selected="selected"' : '' }}>INFO</option>
42  
-                        <option value="300"{{ 300 == priority ? ' selected="selected"' : '' }}>WARNING</option>
43  
-                        <option value="400"{{ 400 == priority ? ' selected="selected"' : '' }}>ERROR</option>
44  
-                        <option value="500"{{ 500 == priority ? ' selected="selected"' : '' }}>CRITICAL</option>
45  
-                        <option value="550"{{ 550 == priority ? ' selected="selected"' : '' }}>ALERT</option>
  39
+                    <select name="priority" onchange="document.getElementById('priority-form').submit(); ">
  40
+                        {% for value, text in { 100: 'DEBUG', 200: 'INFO', 300: 'WARNING', 400: 'ERROR', 500: 'CRITICAL', 550: 'ALERT' } %}
  41
+                        <option value="{{ value }}"{{ value == priority ? ' selected' : '' }}>{{ text }}</option>
  42
+                        {% endfor %}
46 43
                     </select>
47  
-                    <input type="submit" value="refresh" />
  44
+                    <noscript>
  45
+                        <input type="submit" value="refresh" />
  46
+                    </noscript>
48 47
                 </form>
49 48
             </td>
50 49
         </tr>
@@ -69,4 +68,4 @@
69 68
             <em>No logs available.</em>
70 69
         </p>
71 70
     {% endif %}
72  
-{% endblock %}
  71
+{% endblock %}

0 notes on commit a52c675

Please sign in to comment.
Something went wrong with that request. Please try again.