Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Mar 24, 2017
1 parent 0217383 commit 6d7d2dc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 41 deletions.
36 changes: 16 additions & 20 deletions src/opnsense/mvc/app/views/layout_partials/base_dialog.volt
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,6 @@ label : dialog label

#}

{%- macro base_dialog_header(field) %}
</tbody>
</table>
</div>
<div class="table-responsive {% if field['style'] %}{{field['style']}}{% endif %}">
<table class="table table-striped table-condensed">
<colgroup>
<col class="col-md-3"/>
<col class="col-md-{{ 12-3-msgzone_width|default(5) }}"/>
<col class="col-md-{{ msgzone_width|default(5) }}"/>
</colgroup>
<thead>
<tr colspan="3">
<th><h2>{{field['label']}}</h2></th>
</tr>
</thead>
<tbody>
{%- endmacro %}

{# Volt templates in php7 have issues with scope sometimes, copy input values to make them more unique #}
{% set base_dialog_id=id %}
{% set base_dialog_fields=fields %}
Expand Down Expand Up @@ -111,7 +92,22 @@ label : dialog label
{% set allownew=false %}
{% if field['type'] == 'header' %}
{# close table and start new one with header #}
{{ base_dialog_header(field) }}
</tbody>
</table>
</div>
<div class="table-responsive {% if field['style'] %}{{field['style']}}{% endif %}">
<table class="table table-striped table-condensed">
<colgroup>
<col class="col-md-3"/>
<col class="col-md-{{ 12-3-msgzone_width|default(5) }}"/>
<col class="col-md-{{ msgzone_width|default(5) }}"/>
</colgroup>
<thead>
<tr colspan="3">
<th><h2>{{field['label']}}</h2></th>
</tr>
</thead>
<tbody>
{% else %}
{{ partial("layout_partials/form_input_tr",field)}}
{% endif %}
Expand Down
37 changes: 16 additions & 21 deletions src/opnsense/mvc/app/views/layout_partials/base_form.volt
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,6 @@ data_title : data-title to set on form

#}

{# close table and reopen for new header#}
{%- macro base_dialog_header(field) %}
</tbody>
</table>
</div>
<div class="table-responsive {% if field['style'] %}{{field['style']}}{% endif %}">
<table class="table table-striped table-condensed table-responsive">
<colgroup>
<col class="col-md-3"/>
<col class="col-md-4"/>
<col class="col-md-5"/>
</colgroup>
<thead>
<tr colspan="3">
<th><h2>{{field['label']}}</h2></th>
</tr>
</thead>
<tbody>
{%- endmacro %}

{# Find if there are help supported or advanced field on this page #}
{% set base_form_id=id %}
{% set help=false %}
Expand Down Expand Up @@ -97,7 +77,22 @@ data_title : data-title to set on form
{% for field in fields|default({})%}
{% if field['type'] == 'header' %}
{# close table and start new one with header #}
{{ base_dialog_header(field) }}
</tbody>
</table>
</div>
<div class="table-responsive {% if field['style'] %}{{field['style']}}{% endif %}">
<table class="table table-striped table-condensed table-responsive">
<colgroup>
<col class="col-md-3"/>
<col class="col-md-4"/>
<col class="col-md-5"/>
</colgroup>
<thead>
<tr colspan="3">
<th><h2>{{field['label']}}</h2></th>
</tr>
</thead>
<tbody>
{% else %}
{{ partial("layout_partials/form_input_tr",field)}}
{% endif %}
Expand Down

0 comments on commit 6d7d2dc

Please sign in to comment.