Commit 2e4ecd3b authored by Ad Schellevis's avatar Ad Schellevis

(php7/phalcon) volt template issues in php7

parent 5ba5a918
...@@ -34,32 +34,37 @@ label : dialog label ...@@ -34,32 +34,37 @@ label : dialog label
#} #}
{# 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 %}
{% set base_dialog_label=label %}
{# Find if there are help supported or advanced field on this page #} {# Find if there are help supported or advanced field on this page #}
{% set help=false %} {% set base_dialog_help=false %}
{% set advanced=false %} {% set base_dialog_advanced=false %}
{% for field in fields|default({})%} {% for field in base_dialog_fields|default({})%}
{% for name,element in field %} {% for name,element in field %}
{% if name=='help' %} {% if name=='help' %}
{% set help=true %} {% set base_dialog_help=true %}
{% endif %} {% endif %}
{% if name=='advanced' %} {% if name=='advanced' %}
{% set advanced=true %} {% set base_dialog_advanced=true %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if help|default(false) and advanced|default(false) %} {% if base_dialog_help|default(false) and base_dialog_advanced|default(false) %}
{% break %} {% break %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<div class="modal fade" id="{{id}}" tabindex="-1" role="dialog" aria-labelledby="{{id}}Label" aria-hidden="true"> <div class="modal fade" id="{{base_dialog_id}}" tabindex="-1" role="dialog" aria-labelledby="{{base_dialog_id}}Label" aria-hidden="true">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="{{id}}Label">{{label}}</h4> <h4 class="modal-title" id="{{base_dialog_id}}Label">{{base_dialog_label}}</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form id="frm_{{id}}"> <form id="frm_{{base_dialog_id}}">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed">
<colgroup> <colgroup>
...@@ -68,17 +73,17 @@ label : dialog label ...@@ -68,17 +73,17 @@ label : dialog label
<col class="col-md-{{ msgzone_width|default(5) }}"/> <col class="col-md-{{ msgzone_width|default(5) }}"/>
</colgroup> </colgroup>
<tbody> <tbody>
{% if advanced|default(false) or help|default(false) %} {% if base_dialog_advanced|default(false) or base_dialog_help|default(false) %}
<tr> <tr>
<td>{% if advanced|default(false) %}<a href="#"><i class="fa fa-toggle-off text-danger" id="show_advanced_formDialog{{id}}"></i> </a><small>{{ lang._('advanced mode') }} </small>{% endif %}</td> <td>{% if base_dialog_advanced|default(false) %}<a href="#"><i class="fa fa-toggle-off text-danger" id="show_advanced_formDialog{{base_dialog_id}}"></i> </a><small>{{ lang._('advanced mode') }} </small>{% endif %}</td>
<td colspan="2" style="text-align:right;"> <td colspan="2" style="text-align:right;">
{% if help|default(false) %}<small>{{ lang._('full help') }} </small><a href="#"><i class="fa fa-toggle-off text-danger" id="show_all_help_formDialog{{id}}"></i></a>{% endif %} {% if base_dialog_help|default(false) %}<small>{{ lang._('full help') }} </small><a href="#"><i class="fa fa-toggle-off text-danger" id="show_all_help_formDialog{{base_dialog_id}}"></i></a>{% endif %}
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% set advanced=false %} {% for field in base_dialog_fields|default({})%}
{% set help=false %} {% set advanced=false %}
{% for field in fields|default({})%} {% set help=false %}
{% if field['type'] == 'header' %} {% if field['type'] == 'header' %}
{# close table and start new one with header #} {# close table and start new one with header #}
</tbody> </tbody>
...@@ -109,7 +114,7 @@ label : dialog label ...@@ -109,7 +114,7 @@ label : dialog label
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ lang._('Close') }}</button> <button type="button" class="btn btn-default" data-dismiss="modal">{{ lang._('Close') }}</button>
{% if hasSaveBtn|default('true') == 'true' %} {% if hasSaveBtn|default('true') == 'true' %}
<button type="button" class="btn btn-primary" id="btn_{{id}}_save">{{ lang._('Save changes') }}<i id="btn_{{id}}_save_progress" class=""></i></button> <button type="button" class="btn btn-primary" id="btn_{{base_dialog_id}}_save">{{ lang._('Save changes') }}<i id="btn_{{base_dialog_id}}_save_progress" class=""></i></button>
{% endif %} {% endif %}
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment