Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
2e4ecd3b
Commit
2e4ecd3b
authored
Dec 02, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(php7/phalcon) volt template issues in php7
parent
5ba5a918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
base_dialog.volt
src/opnsense/mvc/app/views/layout_partials/base_dialog.volt
+21
-16
No files found.
src/opnsense/mvc/app/views/layout_partials/base_dialog.volt
View file @
2e4ecd3b
...
@@ -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">×</span></button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment