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
e67997df
Commit
e67997df
authored
Jun 23, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mvc) refactor base_tabs to use base_form
parent
578d0d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
85 deletions
+2
-85
base_tabs.volt
src/opnsense/mvc/app/views/layout_partials/base_tabs.volt
+2
-85
No files found.
src/opnsense/mvc/app/views/layout_partials/base_tabs.volt
View file @
e67997df
...
...
@@ -66,97 +66,14 @@ POSSIBILITY OF SUCH DAMAGE.
{% if tab['subtabs']|default(false) %}
{# Tab with dropdown #}
{% for subtab in tab['subtabs']|default({})%}
{# Find if there are help supported or advanced field on this page #}
{% set help=false %}
{% set advanced=false %}
{% for field in subtab[2]|default({})%}
{% for name,element in field %}
{% if name=='help' %}
{% set help=true %}
{% endif %}
{% if name=='advanced' %}
{% set advanced=true %}
{% endif %}
{% endfor %}
{% if help|default(false) and advanced|default(false) %}
{% break %}
{% endif %}
{% endfor %}
<div id="subtab_{{subtab[0]}}" class="tab-pane fade{% if activetab|default("") == subtab[0] %} in active {% endif %}">
<form id="frm_{{subtab[0]}}" class="form-inline" data-title="{{subtab[1]}}">
<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>
<tbody>
<tr>
<td align="left"><a href="#">{% if advanced|default(false) %}<i class="fa fa-toggle-off text-danger" id="show_advanced_{{subtab[0]}}" type="button"></i> </a><small>{{ lang._('advanced mode') }} </small>{% endif %}</td>
<td><i class="fa fa-chevron-right text-primary"></i><b> {{subtab[1]}} </b><i class="fa fa-chevron-left text-primary"></td>
<td 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_{{subtab[0]}}" type="button"></i></a>{% endif %}
</td>
</tr>
{% for field in subtab[2]|default({})%}
{{ partial("layout_partials/form_input_tr",field) }}
{% endfor %}
<tr>
<td colspan="3"><button class="btn btn-primary" id="save_{{subtab[0]}}" type="button"><b>Apply </b><i id="frm_{{subtab[0]}}_progress" class=""></i></button></td>
</tr>
</tbody>
</table>
</form>
{{ partial("layout_partials/base_form",['fields':subtab[2],'id':'frm_'~subtab[0],'data_title':subtab[1],'apply_btn_id':'save_'~subtab[0]])}}
</div>
{% endfor %}
{% endif %}
{% if tab['subtabs']|default(false)==false %}
{# Find if there are help supported or advanced field on this page #}
{% set help=false %}
{% set advanced=false %}
{% for field in tab[2]|default({})%}
{% for name,element in field %}
{% if name=='help' %}
{% set help=true %}
{% endif %}
{% if name=='advanced' %}
{% set advanced=true %}
{% endif %}
{% endfor %}
{% if help|default(false) and advanced|default(false) %}
{% break %}
{% endif %}
{% endfor %}
<div id="tab_{{tab[0]}}" class="tab-pane fade{% if activetab|default("") == tab[0] %} in active {% endif %}">
<form id="frm_{{tab[0]}}" class="form-inline">
<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>
<tbody>
<tr>
<td align="left"><a href="#">{% if advanced|default(false) %}<i class="fa fa-toggle-off text-danger" id="show_advanced_{{tab[0]}}" type="button"></i> </a><small>{{ lang._('advanced mode') }} </small>{% endif %}</td>
<td colspan="2" 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_{{tab[0]}}" type="button"></i></a>{% endif %}
</td>
</tr>
{% for field in tab[2]|default({})%}
{{ partial("layout_partials/form_input_tr",field)}}
{% endfor %}
<tr>
<td colspan="3"><button class="btn btn-primary" id="save_{{tab[0]}}" type="button"><b>Apply </b><i id="frm_{{tab[0]}}_progress" class=""></i></button></td>
</tr>
</tbody>
</table>
</form>
{{ partial("layout_partials/base_form",['fields':tab[2],'id':'frm_'~tab[0],'apply_btn_id':'save_'~tab[0]])}}
</div>
{% endif %}
{% endfor %}
...
...
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