mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 18:44:44 +00:00
mvc: work around Phalcon volt scoping issue
PR: https://forum.opnsense.org/index.php?topic=4860 See: https://github.com/phalcon/cphalcon/issues/12648
This commit is contained in:
parent
b6c6eec21e
commit
465cd35a9e
@ -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 %}
|
||||
@ -111,7 +92,26 @@ label : dialog label
|
||||
{% set allownew=false %}
|
||||
{% if field['type'] == 'header' %}
|
||||
{# close table and start new one with header #}
|
||||
{{ base_dialog_header(field) }}
|
||||
|
||||
{#- 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 #}
|
||||
|
||||
{% else %}
|
||||
{{ partial("layout_partials/form_input_tr",field)}}
|
||||
{% endif %}
|
||||
|
||||
@ -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 %}
|
||||
@ -97,7 +77,26 @@ 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) }}
|
||||
|
||||
{#- 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 #}
|
||||
|
||||
{% else %}
|
||||
{{ partial("layout_partials/form_input_tr",field)}}
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user