Skip to content

Commit

Permalink
[Form][WebProfiler] Empty form names fix
Browse files Browse the repository at this point in the history
When a Form had no name, the markup was broken in the profiler,
making the form tree ugly.
  • Loading branch information
kix committed Nov 4, 2014
1 parent 3fb5ad4 commit c121dea
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -420,7 +420,7 @@
{% else %}
<div class="toggle-icon empty"></div>
{% endif %}
{{ name }}
{{ name|default('(no name)') }}
{% if data.errors is defined and data.errors|length > 0 %}
<div class="badge-error">{{ data.errors|length }}</div>
{% endif %}
Expand All @@ -437,9 +437,9 @@
{% endmacro %}

{% macro form_tree_details(name, data, forms_by_hash) %}
<div class="tree-details" id="{{ data.id }}-details">
<div class="tree-details" {% if data.id is defined %} id="{{ data.id }}-details"{% endif %}>
<h2>
{{ name }}
{{ name|default('(no name)') }}
{% if data.type_class is defined %}
<span class="form-type">[<abbr title="{{ data.type_class }}">{{ data.type }}</abbr>]</span>
{% endif %}
Expand Down

0 comments on commit c121dea

Please sign in to comment.